/* Twinkle Signature v1 x5vEYyL4FVKNMpJUxvWPWrsKD3HHiXi4rrSeD6WKfwiy05unBaFQgZonltVBC3ISMjSJKPz/QRmRFg1l20PVAA== *//*! * Version: master_4700144_3b16ab85_warsaw_all_prod * Build #: 4700144 * Revision: 3b16ab85 * Branch: master * Channel: warsaw * Platform: all * Locale: en-us * Timestamp: 2023-09-21 07:55:53 UTC */ !function(e) { var t = {}; function n(r) { if (t[r]) return t[r].exports; var o = t[r] = { i: r, l: !1, exports: {} }; return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports; } n.m = e, n.c = t, n.d = function(e, t, r) { n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r }); }, n.r = function(e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }); }, n.t = function(e, t) { if (1 & t && (e = n(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var r = Object.create(null); if (n.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var o in e) n.d(r, o, function(t) { return e[t]; }.bind(null, o)); return r; }, n.n = function(e) { var t = e && e.__esModule ? function t() { return e.default; } : function t() { return e; }; return n.d(t, "a", t), t; }, n.o = function(e, t) { return Object.prototype.hasOwnProperty.call(e, t); }, n.p = "", n(n.s = 678); }([ function(e, t, n) { "use strict"; n.r(t), n.d(t, "__extends", function() { return o; }), n.d(t, "__assign", function() { return i; }), n.d(t, "__rest", function() { return a; }), n.d(t, "__decorate", function() { return s; }), n.d(t, "__param", function() { return u; }), n.d(t, "__metadata", function() { return l; }), n.d(t, "__awaiter", function() { return c; }), n.d(t, "__generator", function() { return p; }), n.d(t, "__exportStar", function() { return d; }), n.d(t, "__values", function() { return f; }), n.d(t, "__read", function() { return m; }), n.d(t, "__spread", function() { return h; }), n.d(t, "__await", function() { return g; }), n.d(t, "__asyncGenerator", function() { return y; }), n.d(t, "__asyncDelegator", function() { return S; }), n.d(t, "__asyncValues", function() { return v; }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) { e.__proto__ = t; } || function(e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }; function o(e, t) { function __() { this.constructor = e; } r(e, t), e.prototype = null === t ? Object.create(t) : (__.prototype = t.prototype, new __()); } var i = Object.assign || function e(t) { for (var n, r = 1, o = arguments.length; r < o; r++) for (var i in n = arguments[r]) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); return t; }; function a(e, t) { var n = {}; for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (null != e && "function" == typeof Object.getOwnPropertySymbols) { var o = 0; for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && (n[r[o]] = e[r[o]]); } return n; } function s(e, t, n, r) { var o, i = arguments.length, a = i < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, n) : r; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, r); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a); return i > 3 && a && Object.defineProperty(t, n, a), a; } function u(e, t) { return function(n, r) { t(n, r, e); }; } function l(e, t) { if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t); } function c(e, t, n, r) { return new (n || (n = Promise))(function(o, i) { function a(e) { try { u(r.next(e)); } catch (e) { i(e); } } function s(e) { try { u(r.throw(e)); } catch (e) { i(e); } } function u(e) { e.done ? o(e.value) : new n(function(t) { t(e.value); }).then(a, s); } u((r = r.apply(e, t || [])).next()); }); } function p(e, t) { var n, r, o, i, a = { label: 0, sent: function() { if (1 & o[0]) throw o[1]; return o[1]; }, trys: [], ops: [] }; return i = { next: s(0), throw: s(1), return: s(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this; }), i; function s(i) { return function(s) { return function u(i) { if (n) throw new TypeError("Generator is already executing."); for (;a; ) try { if (n = 1, r && (o = r[2 & i[0] ? "return" : i[0] ? "throw" : "next"]) && !(o = o.call(r, i[1])).done) return o; switch (r = 0, o && (i = [ 0, o.value ]), i[0]) { case 0: case 1: o = i; break; case 4: return a.label++, { value: i[1], done: !1 }; case 5: a.label++, r = i[1], i = [ 0 ]; continue; case 7: i = a.ops.pop(), a.trys.pop(); continue; default: if (!(o = (o = a.trys).length > 0 && o[o.length - 1]) && (6 === i[0] || 2 === i[0])) { a = 0; continue; } if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) { a.label = i[1]; break; } if (6 === i[0] && a.label < o[1]) { a.label = o[1], o = i; break; } if (o && a.label < o[2]) { a.label = o[2], a.ops.push(i); break; } o[2] && a.ops.pop(), a.trys.pop(); continue; } i = t.call(e, a); } catch (e) { i = [ 6, e ], r = 0; } finally { n = o = 0; } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 }; }([ i, s ]); }; } } function d(e, t) { for (var n in e) t.hasOwnProperty(n) || (t[n] = e[n]); } function f(e) { var t = "function" == typeof Symbol && e[Symbol.iterator], n = 0; return t ? t.call(e) : { next: function() { return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e }; } }; } function m(e, t) { var n = "function" == typeof Symbol && e[Symbol.iterator]; if (!n) return e; var r, o, i = n.call(e), a = []; try { for (;(void 0 === t || t-- > 0) && !(r = i.next()).done; ) a.push(r.value); } catch (e) { o = { error: e }; } finally { try { r && !r.done && (n = i.return) && n.call(i); } finally { if (o) throw o.error; } } return a; } function h() { for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(m(arguments[t])); return e; } function g(e) { return this instanceof g ? (this.v = e, this) : new g(e); } function y(e, t, n) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var r, o = n.apply(e, t || []), i = []; return r = {}, a("next"), a("throw"), a("return"), r[Symbol.asyncIterator] = function() { return this; }, r; function a(e) { o[e] && (r[e] = function(t) { return new Promise(function(n, r) { i.push([ e, t, n, r ]) > 1 || s(e, t); }); }); } function s(e, t) { try { !function n(e) { e.value instanceof g ? Promise.resolve(e.value.v).then(u, l) : c(i[0][2], e); }(o[e](t)); } catch (e) { c(i[0][3], e); } } function u(e) { s("next", e); } function l(e) { s("throw", e); } function c(e, t) { e(t), i.shift(), i.length && s(i[0][0], i[0][1]); } } function S(e) { var t, n; return t = {}, r("next"), r("throw", function(e) { throw e; }), r("return"), t[Symbol.iterator] = function() { return this; }, t; function r(r, o) { e[r] && (t[r] = function(t) { return (n = !n) ? { value: g(e[r](t)), done: "return" === r } : o ? o(t) : t; }); } } function v(e) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var t = e[Symbol.asyncIterator]; return t ? t.call(e) : f(e); } }, function(e, t, n) { "use strict"; e.exports = n(857); }, function(e, t, n) { "use strict"; n.r(t), function(e, r) { n.d(t, "$mobx", function() { return Xn; }), n.d(t, "IDerivationState", function() { return _e; }), n.d(t, "ObservableMap", function() { return An; }), n.d(t, "ObservableSet", function() { return On; }), n.d(t, "Reaction", function() { return Ye; }), n.d(t, "_allowStateChanges", function() { return me; }), n.d(t, "_allowStateChangesInsideComputed", function() { return ye; }), n.d(t, "_getAdministration", function() { return jn; }), n.d(t, "_getGlobalState", function() { return Be; }), n.d(t, "_interceptReads", function() { return Lt; }), n.d(t, "_isComputingDerivation", function() { return we; }), n.d(t, "_resetGlobalState", function() { return je; }), n.d(t, "action", function() { return pt; }), n.d(t, "autorun", function() { return ht; }), n.d(t, "comparer", function() { return G; }), n.d(t, "computed", function() { return ce; }), n.d(t, "configure", function() { return Et; }), n.d(t, "createAtom", function() { return N; }), n.d(t, "decorate", function() { return Ct; }), n.d(t, "entries", function() { return Vt; }), n.d(t, "extendObservable", function() { return At; }), n.d(t, "extendShallowObservable", function() { return It; }), n.d(t, "flow", function() { return kt; }), n.d(t, "get", function() { return Xt; }), n.d(t, "getAtom", function() { return Bn; }), n.d(t, "getDebugName", function() { return Hn; }), n.d(t, "getDependencyTree", function() { return wt; }), n.d(t, "getObserverTree", function() { return Rt; }), n.d(t, "has", function() { return Kt; }), n.d(t, "intercept", function() { return Dt; }), n.d(t, "isAction", function() { return ft; }), n.d(t, "isArrayLike", function() { return E; }), n.d(t, "isBoxedObservable", function() { return ve; }), n.d(t, "isComputed", function() { return Ft; }), n.d(t, "isComputedProp", function() { return Gt; }), n.d(t, "isObservable", function() { return Bt; }), n.d(t, "isObservableArray", function() { return Cn; }), n.d(t, "isObservableMap", function() { return Pn; }), n.d(t, "isObservableObject", function() { return Un; }), n.d(t, "isObservableProp", function() { return jt; }), n.d(t, "isObservableSet", function() { return xn; }), n.d(t, "keys", function() { return Ht; }), n.d(t, "observable", function() { return ie; }), n.d(t, "observe", function() { return Yt; }), n.d(t, "onBecomeObserved", function() { return bt; }), n.d(t, "onBecomeUnobserved", function() { return _t; }), n.d(t, "onReactionError", function() { return Je; }), n.d(t, "reaction", function() { return vt; }), n.d(t, "remove", function() { return qt; }), n.d(t, "runInAction", function() { return dt; }), n.d(t, "set", function() { return Wt; }), n.d(t, "spy", function() { return ut; }), n.d(t, "toJS", function() { return Zt; }), n.d(t, "trace", function() { return $t; }), n.d(t, "transaction", function() { return en; }), n.d(t, "untracked", function() { return xe; }), n.d(t, "values", function() { return zt; }), n.d(t, "when", function() { return tn; }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var o = function(e, t) { return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) { e.__proto__ = t; } || function(e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); })(e, t); }; function i(e, t) { function __() { this.constructor = e; } o(e, t), e.prototype = null === t ? Object.create(t) : (__.prototype = t.prototype, new __()); } var a = function() { return (a = Object.assign || function e(t) { for (var n, r = 1, o = arguments.length; r < o; r++) for (var i in n = arguments[r]) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); return t; }).apply(this, arguments); }; function s(e, t) { var n = "function" == typeof Symbol && e[Symbol.iterator]; if (!n) return e; var r, o, i = n.call(e), a = []; try { for (;(void 0 === t || t-- > 0) && !(r = i.next()).done; ) a.push(r.value); } catch (e) { o = { error: e }; } finally { try { r && !r.done && (n = i.return) && n.call(i); } finally { if (o) throw o.error; } } return a; } function u() { for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(s(arguments[t])); return e; } var l = "An invariant failed, however the error is obfuscated because this is an production build.", c = []; Object.freeze(c); var p = {}; function d() { return "undefined" != typeof window ? window : e; } function f() { return ++Ue.mobxGuid; } function m(e) { throw h(!1, e), "X"; } function h(e, t) { if (!e) throw new Error("[mobx] " + (t || l)); } Object.freeze(p); function g(e) { var t = !1; return function() { if (!t) return t = !0, e.apply(this, arguments); }; } var y = function() {}; function S(e) { return null !== e && "object" == typeof e; } function v(e) { if (null === e || "object" != typeof e) return !1; var t = Object.getPrototypeOf(e); return t === Object.prototype || null === t; } function b(e, t, n) { Object.defineProperty(e, t, { enumerable: !1, writable: !0, configurable: !0, value: n }); } function _(e, t, n) { Object.defineProperty(e, t, { enumerable: !1, writable: !1, configurable: !0, value: n }); } function T(e, t) { var n = "isMobX" + e; return t.prototype[n] = !0, function(e) { return S(e) && !0 === e[n]; }; } function E(e) { return Array.isArray(e) || Cn(e); } function C(e) { return void 0 !== d().Map && e instanceof d().Map; } function I(e) { return e instanceof Set; } function A(e) { for (var t = []; ;) { var n = e.next(); if (n.done) break; t.push(n.value); } return t; } function w() { return "function" == typeof Symbol && Symbol.toPrimitive || "@@toPrimitive"; } function P(e) { return null === e ? null : "object" == typeof e ? "" + e : e; } function R() { return "function" == typeof Symbol && Symbol.iterator || "@@iterator"; } function O(e, t) { _(e, R(), t); } function x(e) { return e[R()] = M, e; } function k() { return "function" == typeof Symbol && Symbol.toStringTag || "@@toStringTag"; } function M() { return this; } var L = function() { function e(e) { void 0 === e && (e = "Atom@" + f()), this.name = e, this.isPendingUnobservation = !1, this.isBeingObserved = !1, this.observers = [], this.observersIndexes = {}, this.diffValue = 0, this.lastAccessedBy = 0, this.lowestObserverState = _e.NOT_TRACKING; } return e.prototype.onBecomeUnobserved = function() {}, e.prototype.onBecomeObserved = function() {}, e.prototype.reportObserved = function() { return Ke(this); }, e.prototype.reportChanged = function() { We(), function e(t) { if (t.lowestObserverState === _e.STALE) return; t.lowestObserverState = _e.STALE; var n = t.observers, r = n.length; for (;r--; ) { var o = n[r]; o.dependenciesState === _e.UP_TO_DATE && (o.isTracing !== Te.NONE && Xe(o, t), o.onBecomeStale()), o.dependenciesState = _e.STALE; } }(this), qe(); }, e.prototype.toString = function() { return this.name; }, e; }(), D = T("Atom", L); function N(e, t, n) { void 0 === t && (t = y), void 0 === n && (n = y); var r = new L(e); return bt(r, t), _t(r, n), r; } function F(e, t) { return e === t; } var G = { identity: F, structural: function U(e, t) { return Vn(e, t); }, default: function B(e, t) { return function n(e, t) { return "number" == typeof e && "number" == typeof t && isNaN(e) && isNaN(t); }(e, t) || F(e, t); } }, j = {}, H = {}; function z(e) { if (!0 !== e.__mobxDidRunLazyInitializers) { var t = e.__mobxDecorators; if (t) for (var n in b(e, "__mobxDidRunLazyInitializers", !0), t) { var r = t[n]; r.propertyCreator(e, r.prop, r.descriptor, r.decoratorTarget, r.decoratorArguments); } } } function V(e, t) { return function n() { var r, o = function n(o, i, s, u) { if (!0 === u) return t(o, i, s, o, r), null; if (!Object.prototype.hasOwnProperty.call(o, "__mobxDecorators")) { var l = o.__mobxDecorators; b(o, "__mobxDecorators", a({}, l)); } return o.__mobxDecorators[i] = { prop: i, propertyCreator: t, descriptor: s, decoratorTarget: o, decoratorArguments: r }, function c(e, t) { var n = t ? j : H; return n[e] || (n[e] = { configurable: !0, enumerable: t, get: function() { return z(this), this[e]; }, set: function(t) { z(this), this[e] = t; } }); }(i, e); }; return function i(e) { return (2 === e.length || 3 === e.length) && "string" == typeof e[1] || 4 === e.length && !0 === e[3]; }(arguments) ? (r = c, o.apply(null, arguments)) : (r = Array.prototype.slice.call(arguments), o); }; } function W(e, t, n) { return Bt(e) ? e : Array.isArray(e) ? ie.array(e, { name: n }) : v(e) ? ie.object(e, void 0, { name: n }) : C(e) ? ie.map(e, { name: n }) : I(e) ? ie.set(e, { name: n }) : e; } function q(e) { return e; } function K(e) { var t = V(!0, function(t, n, r, o, i) { Ln(t, n, r ? r.initializer ? r.initializer.call(t) : r.value : void 0, e); }), n = (void 0 !== r && r.env, t); return n.enhancer = e, n; } var X = { deep: !0, name: void 0, defaultDecorator: void 0 }, Y = { deep: !1, name: void 0, defaultDecorator: void 0 }; function J(e) { return null == e ? X : "string" == typeof e ? { name: e, deep: !0 } : e; } function Q(e) { return e.defaultDecorator ? e.defaultDecorator.enhancer : !1 === e.deep ? q : W; } Object.freeze(X), Object.freeze(Y); var Z = K(W), $ = K(function ee(e, t, n) { return null == e ? e : Un(e) || Cn(e) || Pn(e) || xn(e) ? e : Array.isArray(e) ? ie.array(e, { name: n, deep: !1 }) : v(e) ? ie.object(e, void 0, { name: n, deep: !1 }) : C(e) ? ie.map(e, { name: n, deep: !1 }) : I(e) ? ie.set(e, { name: n, deep: !1 }) : m(!1); }), te = K(q), ne = K(function re(e, t, n) { return Vn(e, t) ? t : e; }); var oe = { box: function(e, t) { arguments.length > 2 && se("box"); var n = J(t); return new Se(e, Q(n), n.name, !0, n.equals); }, shallowBox: function(e, t) { return arguments.length > 2 && se("shallowBox"), ie.box(e, { name: t, deep: !1 }); }, array: function(e, t) { arguments.length > 2 && se("array"); var n = J(t); return new yn(e, Q(n), n.name); }, shallowArray: function(e, t) { return arguments.length > 2 && se("shallowArray"), ie.array(e, { name: t, deep: !1 }); }, map: function(e, t) { arguments.length > 2 && se("map"); var n = J(t); return new An(e, Q(n), n.name); }, shallowMap: function(e, t) { return arguments.length > 2 && se("shallowMap"), ie.map(e, { name: t, deep: !1 }); }, set: function(e, t) { arguments.length > 2 && se("set"); var n = J(t); return new On(e, Q(n), n.name); }, object: function(e, t, n) { return "string" == typeof arguments[1] && se("object"), At({}, e, t, J(n)); }, shallowObject: function(e, t) { return "string" == typeof arguments[1] && se("shallowObject"), ie.object(e, {}, { name: t, deep: !1 }); }, ref: te, shallow: $, deep: Z, struct: ne }, ie = function ae(e, t, n) { if ("string" == typeof arguments[1]) return Z.apply(null, arguments); if (Bt(e)) return e; var r = v(e) ? ie.object(e, t, n) : Array.isArray(e) ? ie.array(e, t) : C(e) ? ie.map(e, t) : I(e) ? ie.set(e, t) : e; if (r !== e) return r; m(!1); }; function se(e) { m("Expected one or two arguments to observable." + e + ". Did you accidentally try to use observable." + e + " as decorator?"); } Object.keys(oe).forEach(function(e) { return ie[e] = oe[e]; }); var ue = V(!1, function(e, t, n, r, o) { var i = n.get, s = n.set, u = o[0] || {}; !function l(e, t, n) { var r = Mn(e); n.name = r.name + "." + t, n.context = e, r.values[t] = new be(n), Object.defineProperty(e, t, function o(e) { return Nn[e] || (Nn[e] = { configurable: Ue.computedConfigurable, enumerable: !1, get: function() { return Fn(this).read(this, e); }, set: function(t) { Fn(this).write(this, e, t); } }); }(t)); }(e, t, a({ get: i, set: s }, u)); }), le = ue({ equals: G.structural }), ce = function e(t, n, r) { if ("string" == typeof n) return ue.apply(null, arguments); if (null !== t && "object" == typeof t && 1 === arguments.length) return ue.apply(null, arguments); var o = "object" == typeof n ? n : {}; return o.get = t, o.set = "function" == typeof n ? n : o.set, o.name = o.name || t.name || "", new be(o); }; function pe(e, t) { var n = function() { return de(e, t, this, arguments); }; return n.isMobxAction = !0, n; } function de(e, t, n, r) { var o = function i(e, t, n, r) { var o = rt() && !!e, i = 0; if (o) { i = Date.now(); var a = r && r.length || 0, s = new Array(a); if (a > 0) for (var u = 0; u < a; u++) s[u] = r[u]; it({ type: "action", name: e, object: n, arguments: s }); } var l = ke(); We(); var c = he(!0); return { prevDerivation: l, prevAllowStateChanges: c, notifySpy: o, startTime: i }; }(e, 0, n, r), a = !0; try { var s = t.apply(n, r); return a = !1, s; } finally { a ? (Ue.suppressReactionErrors = a, fe(o), Ue.suppressReactionErrors = !1) : fe(o); } } function fe(e) { ge(e.prevAllowStateChanges), qe(), Me(e.prevDerivation), e.notifySpy && st({ time: Date.now() - e.startTime }); } function me(e, t) { var n, r = he(e); try { n = t(); } finally { ge(r); } return n; } function he(e) { var t = Ue.allowStateChanges; return Ue.allowStateChanges = e, t; } function ge(e) { Ue.allowStateChanges = e; } function ye(e) { var t, n = Ue.computationDepth; Ue.computationDepth = 0; try { t = e(); } finally { Ue.computationDepth = n; } return t; } ce.struct = le; var Se = function(e) { function t(t, n, r, o, i) { void 0 === r && (r = "ObservableValue@" + f()), void 0 === o && (o = !0), void 0 === i && (i = G.default); var a = e.call(this, r) || this; return a.enhancer = n, a.name = r, a.equals = i, a.hasUnreportedChange = !1, a.value = n(t, void 0, r), o && rt() && ot({ type: "create", name: a.name, newValue: "" + a.value }), a; } return i(t, e), t.prototype.dehanceValue = function(e) { return void 0 !== this.dehancer ? this.dehancer(e) : e; }, t.prototype.set = function(e) { var t = this.value; if ((e = this.prepareNewValue(e)) !== Ue.UNCHANGED) { var n = rt(); n && it({ type: "update", name: this.name, newValue: e, oldValue: t }), this.setNewValue(e), n && st(); } }, t.prototype.prepareNewValue = function(e) { if (Pe(this), rn(this)) { var t = an(this, { object: this, type: "update", newValue: e }); if (!t) return Ue.UNCHANGED; e = t.newValue; } return e = this.enhancer(e, this.value, this.name), this.equals(this.value, e) ? Ue.UNCHANGED : e; }, t.prototype.setNewValue = function(e) { var t = this.value; this.value = e, this.reportChanged(), sn(this) && ln(this, { type: "update", object: this, newValue: e, oldValue: t }); }, t.prototype.get = function() { return this.reportObserved(), this.dehanceValue(this.value); }, t.prototype.intercept = function(e) { return on(this, e); }, t.prototype.observe = function(e, t) { return t && e({ object: this, type: "update", newValue: this.value, oldValue: void 0 }), un(this, e); }, t.prototype.toJSON = function() { return this.get(); }, t.prototype.toString = function() { return this.name + "[" + this.value + "]"; }, t.prototype.valueOf = function() { return P(this.get()); }, t; }(L); Se.prototype[w()] = Se.prototype.valueOf; var ve = T("ObservableValue", Se), be = function() { function e(e) { this.dependenciesState = _e.NOT_TRACKING, this.observing = [], this.newObserving = null, this.isBeingObserved = !1, this.isPendingUnobservation = !1, this.observers = [], this.observersIndexes = {}, this.diffValue = 0, this.runId = 0, this.lastAccessedBy = 0, this.lowestObserverState = _e.UP_TO_DATE, this.unboundDepsCount = 0, this.__mapid = "#" + f(), this.value = new Ce(null), this.isComputing = !1, this.isRunningSetter = !1, this.isTracing = Te.NONE, this.derivation = e.get, this.name = e.name || "ComputedValue@" + f(), e.set && (this.setter = pe(this.name + "-setter", e.set)), this.equals = e.equals || (e.compareStructural || e.struct ? G.structural : G.default), this.scope = e.context, this.requiresReaction = !!e.requiresReaction, this.keepAlive = !!e.keepAlive; } return e.prototype.onBecomeStale = function() { !function e(t) { if (t.lowestObserverState !== _e.UP_TO_DATE) return; t.lowestObserverState = _e.POSSIBLY_STALE; var n = t.observers, r = n.length; for (;r--; ) { var o = n[r]; o.dependenciesState === _e.UP_TO_DATE && (o.dependenciesState = _e.POSSIBLY_STALE, o.isTracing !== Te.NONE && Xe(o, t), o.onBecomeStale()); } }(this); }, e.prototype.onBecomeUnobserved = function() {}, e.prototype.onBecomeObserved = function() {}, e.prototype.get = function() { this.isComputing && m("Cycle detected in computation " + this.name + ": " + this.derivation), 0 !== Ue.inBatch || 0 !== this.observers.length || this.keepAlive ? (Ke(this), Ae(this) && this.trackAndCompute() && function e(t) { if (t.lowestObserverState === _e.STALE) return; t.lowestObserverState = _e.STALE; var n = t.observers, r = n.length; for (;r--; ) { var o = n[r]; o.dependenciesState === _e.POSSIBLY_STALE ? o.dependenciesState = _e.STALE : o.dependenciesState === _e.UP_TO_DATE && (t.lowestObserverState = _e.UP_TO_DATE); } }(this)) : Ae(this) && (this.warnAboutUntrackedRead(), We(), this.value = this.computeValue(!1), qe()); var t = this.value; if (Ie(t)) throw t.cause; return t; }, e.prototype.peek = function() { var e = this.computeValue(!1); if (Ie(e)) throw e.cause; return e; }, e.prototype.set = function(e) { if (this.setter) { h(!this.isRunningSetter, "The setter of computed value '" + this.name + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"), this.isRunningSetter = !0; try { this.setter.call(this.scope, e); } finally { this.isRunningSetter = !1; } } else h(!1, !1); }, e.prototype.trackAndCompute = function() { rt() && ot({ object: this.scope, type: "compute", name: this.name }); var e = this.value, t = this.dependenciesState === _e.NOT_TRACKING, n = this.computeValue(!0), r = t || Ie(e) || Ie(n) || !this.equals(e, n); return r && (this.value = n), r; }, e.prototype.computeValue = function(e) { var t; if (this.isComputing = !0, Ue.computationDepth++, e) t = Re(this, this.derivation, this.scope); else if (!0 === Ue.disableErrorBoundaries) t = this.derivation.call(this.scope); else try { t = this.derivation.call(this.scope); } catch (e) { t = new Ce(e); } return Ue.computationDepth--, this.isComputing = !1, t; }, e.prototype.suspend = function() { this.keepAlive || (Oe(this), this.value = void 0); }, e.prototype.observe = function(e, t) { var n = this, r = !0, o = void 0; return ht(function() { var i = n.get(); if (!r || t) { var a = ke(); e({ type: "update", object: n, newValue: i, oldValue: o }), Me(a); } r = !1, o = i; }); }, e.prototype.warnAboutUntrackedRead = function() { }, e.prototype.toJSON = function() { return this.get(); }, e.prototype.toString = function() { return this.name + "[" + this.derivation.toString() + "]"; }, e.prototype.valueOf = function() { return P(this.get()); }, e; }(); be.prototype[w()] = be.prototype.valueOf; var _e, Te, Ee = T("ComputedValue", be); !function(e) { e[e.NOT_TRACKING = -1] = "NOT_TRACKING", e[e.UP_TO_DATE = 0] = "UP_TO_DATE", e[e.POSSIBLY_STALE = 1] = "POSSIBLY_STALE", e[e.STALE = 2] = "STALE"; }(_e || (_e = {})), function(e) { e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK"; }(Te || (Te = {})); var Ce = function() { return function e(t) { this.cause = t; }; }(); function Ie(e) { return e instanceof Ce; } function Ae(e) { switch (e.dependenciesState) { case _e.UP_TO_DATE: return !1; case _e.NOT_TRACKING: case _e.STALE: return !0; case _e.POSSIBLY_STALE: for (var t = ke(), n = e.observing, r = n.length, o = 0; o < r; o++) { var i = n[o]; if (Ee(i)) { if (Ue.disableErrorBoundaries) i.get(); else try { i.get(); } catch (e) { return Me(t), !0; } if (e.dependenciesState === _e.STALE) return Me(t), !0; } } return Le(e), Me(t), !1; } } function we() { return null !== Ue.trackingDerivation; } function Pe(e) { var t = e.observers.length > 0; Ue.computationDepth > 0 && t && m(!1), Ue.allowStateChanges || !t && "strict" !== Ue.enforceActions || m(!1); } function Re(e, t, n) { Le(e), e.newObserving = new Array(e.observing.length + 100), e.unboundDepsCount = 0, e.runId = ++Ue.runId; var r, o = Ue.trackingDerivation; if (Ue.trackingDerivation = e, !0 === Ue.disableErrorBoundaries) r = t.call(n); else try { r = t.call(n); } catch (e) { r = new Ce(e); } return Ue.trackingDerivation = o, function i(e) { for (var t = e.observing, n = e.observing = e.newObserving, r = _e.UP_TO_DATE, o = 0, i = e.unboundDepsCount, a = 0; a < i; a++) { var s = n[a]; 0 === s.diffValue && (s.diffValue = 1, o !== a && (n[o] = s), o++), s.dependenciesState > r && (r = s.dependenciesState); } n.length = o, e.newObserving = null, i = t.length; for (;i--; ) { var s = t[i]; 0 === s.diffValue && ze(s, e), s.diffValue = 0; } for (;o--; ) { var s = n[o]; 1 === s.diffValue && (s.diffValue = 0, He(s, e)); } r !== _e.UP_TO_DATE && (e.dependenciesState = r, e.onBecomeStale()); }(e), r; } function Oe(e) { var t = e.observing; e.observing = []; for (var n = t.length; n--; ) ze(t[n], e); e.dependenciesState = _e.NOT_TRACKING; } function xe(e) { var t = ke(), n = e(); return Me(t), n; } function ke() { var e = Ue.trackingDerivation; return Ue.trackingDerivation = null, e; } function Me(e) { Ue.trackingDerivation = e; } function Le(e) { if (e.dependenciesState !== _e.UP_TO_DATE) { e.dependenciesState = _e.UP_TO_DATE; for (var t = e.observing, n = t.length; n--; ) t[n].lowestObserverState = _e.UP_TO_DATE; } } var De = [ "mobxGuid", "spyListeners", "enforceActions", "computedRequiresReaction", "disableErrorBoundaries", "runId", "UNCHANGED" ], Ne = function() { return function e() { this.version = 5, this.UNCHANGED = {}, this.trackingDerivation = null, this.computationDepth = 0, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !0, this.enforceActions = !1, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.computedConfigurable = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1; }; }(), Fe = !0, Ge = !1, Ue = function() { var e = d(); return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (Fe = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Ne().version && (Fe = !1), Fe ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = new Ne()) : (setTimeout(function() { Ge || m("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`"); }, 1), new Ne()); }(); function Be() { return Ue; } function je() { var e = new Ne(); for (var t in e) -1 === De.indexOf(t) && (Ue[t] = e[t]); Ue.allowStateChanges = !Ue.enforceActions; } function He(e, t) { var n = e.observers.length; n && (e.observersIndexes[t.__mapid] = n), e.observers[n] = t, e.lowestObserverState > t.dependenciesState && (e.lowestObserverState = t.dependenciesState); } function ze(e, t) { if (1 === e.observers.length) e.observers.length = 0, Ve(e); else { var n = e.observers, r = e.observersIndexes, o = n.pop(); if (o !== t) { var i = r[t.__mapid] || 0; i ? r[o.__mapid] = i : delete r[o.__mapid], n[i] = o; } delete r[t.__mapid]; } } function Ve(e) { !1 === e.isPendingUnobservation && (e.isPendingUnobservation = !0, Ue.pendingUnobservations.push(e)); } function We() { Ue.inBatch++; } function qe() { if (0 == --Ue.inBatch) { $e(); for (var e = Ue.pendingUnobservations, t = 0; t < e.length; t++) { var n = e[t]; n.isPendingUnobservation = !1, 0 === n.observers.length && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBecomeUnobserved()), n instanceof be && n.suspend()); } Ue.pendingUnobservations = []; } } function Ke(e) { var t = Ue.trackingDerivation; return null !== t ? (t.runId !== e.lastAccessedBy && (e.lastAccessedBy = t.runId, t.newObserving[t.unboundDepsCount++] = e, e.isBeingObserved || (e.isBeingObserved = !0, e.onBecomeObserved())), !0) : (0 === e.observers.length && Ue.inBatch > 0 && Ve(e), !1); } function Xe(e, t) { if (console.log("[mobx.trace] '" + e.name + "' is invalidated due to a change in: '" + t.name + "'"), e.isTracing === Te.BREAK) { var n = []; !function e(t, n, r) { if (n.length >= 1e3) return void n.push("(and many more)"); n.push("" + new Array(r).join("\t") + t.name); t.dependencies && t.dependencies.forEach(function(t) { return e(t, n, r + 1); }); }(wt(e), n, 1), new Function("debugger;\n/*\nTracing '" + e.name + "'\n\nYou are entering this break point because derivation '" + e.name + "' is being traced and '" + t.name + "' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n" + (e instanceof be ? e.derivation.toString().replace(/[*]\//g, "/") : "") + "\n\nThe dependencies for this derivation are:\n\n" + n.join("\n") + "\n*/\n ")(); } } var Ye = function() { function e(e, t, n) { void 0 === e && (e = "Reaction@" + f()), this.name = e, this.onInvalidate = t, this.errorHandler = n, this.observing = [], this.newObserving = [], this.dependenciesState = _e.NOT_TRACKING, this.diffValue = 0, this.runId = 0, this.unboundDepsCount = 0, this.__mapid = "#" + f(), this.isDisposed = !1, this._isScheduled = !1, this._isTrackPending = !1, this._isRunning = !1, this.isTracing = Te.NONE; } return e.prototype.onBecomeStale = function() { this.schedule(); }, e.prototype.schedule = function() { this._isScheduled || (this._isScheduled = !0, Ue.pendingReactions.push(this), $e()); }, e.prototype.isScheduled = function() { return this._isScheduled; }, e.prototype.runReaction = function() { if (!this.isDisposed) { if (We(), this._isScheduled = !1, Ae(this)) { this._isTrackPending = !0; try { this.onInvalidate(), this._isTrackPending && rt() && ot({ name: this.name, type: "scheduled-reaction" }); } catch (e) { this.reportExceptionInDerivation(e); } } qe(); } }, e.prototype.track = function(e) { We(); var t, n = rt(); n && (t = Date.now(), it({ name: this.name, type: "reaction" })), this._isRunning = !0; var r = Re(this, e, void 0); this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && Oe(this), Ie(r) && this.reportExceptionInDerivation(r.cause), n && st({ time: Date.now() - t }), qe(); }, e.prototype.reportExceptionInDerivation = function(e) { var t = this; if (this.errorHandler) this.errorHandler(e, this); else { if (Ue.disableErrorBoundaries) throw e; var n = "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'"; Ue.suppressReactionErrors ? console.warn("[mobx] (error in reaction '" + this.name + "' suppressed, fix error of causing action below)") : console.error(n, e), rt() && ot({ type: "error", name: this.name, message: n, error: "" + e }), Ue.globalReactionErrorHandlers.forEach(function(n) { return n(e, t); }); } }, e.prototype.dispose = function() { this.isDisposed || (this.isDisposed = !0, this._isRunning || (We(), Oe(this), qe())); }, e.prototype.getDisposer = function() { var e = this.dispose.bind(this); return e.$mobx = this, e; }, e.prototype.toString = function() { return "Reaction[" + this.name + "]"; }, e.prototype.trace = function(e) { void 0 === e && (e = !1), $t(this, e); }, e; }(); function Je(e) { return Ue.globalReactionErrorHandlers.push(e), function() { var t = Ue.globalReactionErrorHandlers.indexOf(e); t >= 0 && Ue.globalReactionErrorHandlers.splice(t, 1); }; } var Qe = 100, Ze = function(e) { return e(); }; function $e() { Ue.inBatch > 0 || Ue.isRunningReactions || Ze(et); } function et() { Ue.isRunningReactions = !0; for (var e = Ue.pendingReactions, t = 0; e.length > 0; ) { ++t === Qe && (console.error("Reaction doesn't converge to a stable state after " + Qe + " iterations. Probably there is a cycle in the reactive function: " + e[0]), e.splice(0)); for (var n = e.splice(0), r = 0, o = n.length; r < o; r++) n[r].runReaction(); } Ue.isRunningReactions = !1; } var tt = T("Reaction", Ye); function nt(e) { var t = Ze; Ze = function(n) { return e(function() { return t(n); }); }; } function rt() { return !!Ue.spyListeners.length; } function ot(e) { if (Ue.spyListeners.length) for (var t = Ue.spyListeners, n = 0, r = t.length; n < r; n++) t[n](e); } function it(e) { ot(a({}, e, { spyReportStart: !0 })); } var at = { spyReportEnd: !0 }; function st(e) { ot(e ? a({}, e, { spyReportEnd: !0 }) : at); } function ut(e) { return Ue.spyListeners.push(e), g(function() { Ue.spyListeners = Ue.spyListeners.filter(function(t) { return t !== e; }); }); } function lt() { m(!1); } function ct(e) { return function(t, n, r) { if (r) { if (r.value) return { value: pe(e, r.value), enumerable: !1, configurable: !0, writable: !0 }; var o = r.initializer; return { enumerable: !1, configurable: !0, writable: !0, initializer: function() { return pe(e, o.call(this)); } }; } return function i(e) { return function(t, n, r) { Object.defineProperty(t, n, { configurable: !0, enumerable: !1, get: function() {}, set: function(t) { b(this, n, pt(e, t)); } }); }; }(e).apply(this, arguments); }; } var pt = function e(t, n, r, o) { return 1 === arguments.length && "function" == typeof t ? pe(t.name || "", t) : 2 === arguments.length && "function" == typeof n ? pe(t, n) : 1 === arguments.length && "string" == typeof t ? ct(t) : !0 !== o ? ct(n).apply(null, arguments) : void (t[n] = pe(t.name || n, r.value)); }; function dt(e, t) { return de("string" == typeof e ? e : e.name || "", "function" == typeof e ? e : t, this, void 0); } function ft(e) { return "function" == typeof e && !0 === e.isMobxAction; } function mt(e, t, n) { b(e, t, pe(t, n.bind(e))); } function ht(e, t) { void 0 === t && (t = p); var n, r = t && t.name || e.name || "Autorun@" + f(); if (!t.scheduler && !t.delay) n = new Ye(r, function() { this.track(a); }, t.onError); else { var o = St(t), i = !1; n = new Ye(r, function() { i || (i = !0, o(function() { i = !1, n.isDisposed || n.track(a); })); }, t.onError); } function a() { e(n); } return n.schedule(), n.getDisposer(); } pt.bound = function gt(e, t, n, r) { return !0 === r ? (mt(e, t, n.value), null) : n ? { configurable: !0, enumerable: !1, get: function() { return mt(this, t, n.value || n.initializer.call(this)), this[t]; }, set: lt } : { enumerable: !1, configurable: !0, set: function(e) { mt(this, t, e); }, get: function() {} }; }; var yt = function(e) { return e(); }; function St(e) { return e.scheduler ? e.scheduler : e.delay ? function(t) { return setTimeout(t, e.delay); } : yt; } function vt(e, t, n) { void 0 === n && (n = p), "boolean" == typeof n && (n = { fireImmediately: n }); var r, o = n.name || "Reaction@" + f(), i = pt(o, n.onError ? function a(e, t) { return function() { try { return t.apply(this, arguments); } catch (t) { e.call(this, t); } }; }(n.onError, t) : t), s = !n.scheduler && !n.delay, u = St(n), l = !0, c = !1, d = n.compareStructural ? G.structural : n.equals || G.default, m = new Ye(o, function() { l || s ? h() : c || (c = !0, u(h)); }, n.onError); function h() { if (c = !1, !m.isDisposed) { var t = !1; m.track(function() { var n = e(m); t = l || !d(r, n), r = n; }), l && n.fireImmediately && i(r, m), l || !0 !== t || i(r, m), l && (l = !1); } } return m.schedule(), m.getDisposer(); } function bt(e, t, n) { return Tt("onBecomeObserved", e, t, n); } function _t(e, t, n) { return Tt("onBecomeUnobserved", e, t, n); } function Tt(e, t, n, r) { var o = "string" == typeof n ? Bn(t, n) : Bn(t), i = "string" == typeof n ? r : n, a = o[e]; return "function" != typeof a ? m(!1) : (o[e] = function() { a.call(this), i.call(this); }, function() { o[e] = a; }); } function Et(e) { var t = e.enforceActions, n = e.computedRequiresReaction, r = e.computedConfigurable, o = e.disableErrorBoundaries, i = e.arrayBuffer, a = e.reactionScheduler; if (!0 === e.isolateGlobalState && function s() { (Ue.pendingReactions.length || Ue.inBatch || Ue.isRunningReactions) && m("isolateGlobalState should be called before MobX is running any reactions"), Ge = !0, Fe && (0 == --d().__mobxInstanceCount && (d().__mobxGlobals = void 0), Ue = new Ne()); }(), void 0 !== t) { var u = void 0; switch (t) { case !0: case "observed": u = !0; break; case !1: case "never": u = !1; break; case "strict": case "always": u = "strict"; break; default: m("Invalid value for 'enforceActions': '" + t + "', expected 'never', 'always' or 'observed'"); } Ue.enforceActions = u, Ue.allowStateChanges = !0 !== u && "strict" !== u; } void 0 !== n && (Ue.computedRequiresReaction = !!n), void 0 !== r && (Ue.computedConfigurable = !!r), void 0 !== o && (!0 === o && console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."), Ue.disableErrorBoundaries = !!o), "number" == typeof i && Tn(i), a && nt(a); } function Ct(e, t) { var n = "function" == typeof e ? e.prototype : e, r = function(e) { var r = t[e]; Array.isArray(r) || (r = [ r ]); var o = Object.getOwnPropertyDescriptor(n, e), i = r.reduce(function(t, r) { return r(n, e, t); }, o); i && Object.defineProperty(n, e, i); }; for (var o in t) r(o); return e; } function It(e, t, n) { return At(e, t, n, Y); } function At(e, t, n, r) { var o = (r = J(r)).defaultDecorator || (!1 === r.deep ? te : Z); z(e), Mn(e, r.name, o.enhancer), We(); try { for (var i in t) { var a = Object.getOwnPropertyDescriptor(t, i); 0; var s = (n && i in n ? n[i] : a.get ? ue : o)(e, i, a, !0); s && Object.defineProperty(e, i, s); } } finally { qe(); } return e; } function wt(e, t) { return Pt(Bn(e, t)); } function Pt(e) { var t = { name: e.name }; return e.observing && e.observing.length > 0 && (t.dependencies = function n(e) { var t = []; return e.forEach(function(e) { -1 === t.indexOf(e) && t.push(e); }), t; }(e.observing).map(Pt)), t; } function Rt(e, t) { return Ot(Bn(e, t)); } function Ot(e) { var t = { name: e.name }; return function n(e) { return e.observers && e.observers.length > 0; }(e) && (t.observers = function r(e) { return e.observers; }(e).map(Ot)), t; } var xt = 0; function kt(e) { 1 !== arguments.length && m("Flow expects one 1 argument and cannot be used as decorator"); var t = e.name || ""; return function() { var n, r = arguments, o = ++xt, i = pt(t + " - runid: " + o + " - init", e).apply(this, r), a = void 0, s = new Promise(function(e, r) { var s = 0; function u(e) { var n; a = void 0; try { n = pt(t + " - runid: " + o + " - yield " + s++, i.next).call(i, e); } catch (e) { return r(e); } c(n); } function l(e) { var n; a = void 0; try { n = pt(t + " - runid: " + o + " - yield " + s++, i.throw).call(i, e); } catch (e) { return r(e); } c(n); } function c(t) { if (!t || "function" != typeof t.then) return t.done ? e(t.value) : (a = Promise.resolve(t.value)).then(u, l); t.then(c, r); } n = r, u(void 0); }); return s.cancel = pt(t + " - runid: " + o + " - cancel", function() { try { a && Mt(a); var e = i.return(), t = Promise.resolve(e.value); t.then(y, y), Mt(t), n(new Error("FLOW_CANCELLED")); } catch (e) { n(e); } }), s; }; } function Mt(e) { "function" == typeof e.cancel && e.cancel(); } function Lt(e, t, n) { var r; if (Pn(e) || Cn(e) || ve(e)) r = jn(e); else { if (!Un(e)) return m(!1); if ("string" != typeof t) return m(!1); r = jn(e, t); } return void 0 !== r.dehancer ? m(!1) : (r.dehancer = "function" == typeof t ? t : n, function() { r.dehancer = void 0; }); } function Dt(e, t, n) { return "function" == typeof n ? function r(e, t, n) { return jn(e, t).intercept(n); }(e, t, n) : function o(e, t) { return jn(e).intercept(t); }(e, t); } function Nt(e, t) { if (null == e) return !1; if (void 0 !== t) { if (!1 === Un(e)) return !1; if (!e.$mobx.values[t]) return !1; var n = Bn(e, t); return Ee(n); } return Ee(e); } function Ft(e) { return arguments.length > 1 ? m(!1) : Nt(e); } function Gt(e, t) { return "string" != typeof t ? m(!1) : Nt(e, t); } function Ut(e, t) { if (null == e) return !1; if (void 0 !== t) { if (Un(e)) { var n = e.$mobx; return n.values && !!n.values[t]; } return !1; } return Un(e) || !!e.$mobx || D(e) || tt(e) || Ee(e); } function Bt(e) { return 1 !== arguments.length && m(!1), Ut(e); } function jt(e, t) { return "string" != typeof t ? m(!1) : Ut(e, t); } function Ht(e) { return Un(e) ? e.$mobx.getKeys() : Pn(e) ? e._keys.slice() : xn(e) ? A(e.keys()) : Cn(e) ? e.map(function(e, t) { return t; }) : m(!1); } function zt(e) { return Un(e) ? Ht(e).map(function(t) { return e[t]; }) : Pn(e) ? Ht(e).map(function(t) { return e.get(t); }) : xn(e) ? A(e.values()) : Cn(e) ? e.slice() : m(!1); } function Vt(e) { return Un(e) ? Ht(e).map(function(t) { return [ t, e[t] ]; }) : Pn(e) ? Ht(e).map(function(t) { return [ t, e.get(t) ]; }) : xn(e) ? A(e.entries()) : Cn(e) ? e.map(function(e, t) { return [ t, e ]; }) : m(!1); } function Wt(e, t, n) { if (2 !== arguments.length || xn(e)) if (Un(e)) { var r = e.$mobx; r.values[t] ? r.write(e, t, n) : Ln(e, t, n, r.defaultEnhancer); } else if (Pn(e)) e.set(t, n); else if (xn(e)) e.add(t); else { if (!Cn(e)) return m(!1); "number" != typeof t && (t = parseInt(t, 10)), h(t >= 0, "Not a valid index: '" + t + "'"), We(), t >= e.length && (e.length = t + 1), e[t] = n, qe(); } else { We(); var o = t; try { for (var i in o) Wt(e, i, o[i]); } finally { qe(); } } } function qt(e, t) { if (Un(e)) e.$mobx.remove(t); else if (Pn(e)) e.delete(t); else if (xn(e)) e.delete(t); else { if (!Cn(e)) return m(!1); "number" != typeof t && (t = parseInt(t, 10)), h(t >= 0, "Not a valid index: '" + t + "'"), e.splice(t, 1); } } function Kt(e, t) { if (Un(e)) { var n = jn(e); return n.getKeys(), !!n.values[t]; } return Pn(e) ? e.has(t) : xn(e) ? e.has(t) : Cn(e) ? t >= 0 && t < e.length : m(!1); } function Xt(e, t) { if (Kt(e, t)) return Un(e) ? e[t] : Pn(e) ? e.get(t) : Cn(e) ? e[t] : m(!1); } function Yt(e, t, n, r) { return "function" == typeof n ? function o(e, t, n, r) { return jn(e, t).observe(n, r); }(e, t, n, r) : function i(e, t, n) { return jn(e).observe(t, n); }(e, t, n); } var Jt = { detectCycles: !0, exportMapsAsObjects: !0, recurseEverything: !1 }; function Qt(e, t, n, r) { return r.detectCycles && e.set(t, n), n; } function Zt(e, t) { var n; return "boolean" == typeof t && (t = { detectCycles: t }), t || (t = Jt), t.detectCycles = void 0 === t.detectCycles ? !0 === t.recurseEverything : !0 === t.detectCycles, t.detectCycles && (n = new Map()), function e(t, n, r) { if (!n.recurseEverything && !Bt(t)) return t; if ("object" != typeof t) return t; if (null === t) return null; if (t instanceof Date) return t; if (ve(t)) return e(t.get(), n, r); if (Bt(t) && Ht(t), !0 === n.detectCycles && null !== t && r.has(t)) return r.get(t); if (Cn(t) || Array.isArray(t)) { var o = Qt(r, t, [], n), i = t.map(function(t) { return e(t, n, r); }); o.length = i.length; for (var a = 0, s = i.length; a < s; a++) o[a] = i[a]; return o; } if (xn(t) || Object.getPrototypeOf(t) === Set.prototype) { if (!1 === n.exportMapsAsObjects) { var u = Qt(r, t, new Set(), n); return t.forEach(function(t) { u.add(e(t, n, r)); }), u; } var l = Qt(r, t, [], n); return t.forEach(function(t) { l.push(e(t, n, r)); }), l; } if (Pn(t) || Object.getPrototypeOf(t) === Map.prototype) { if (!1 === n.exportMapsAsObjects) { var c = Qt(r, t, new Map(), n); return t.forEach(function(t, o) { c.set(o, e(t, n, r)); }), c; } var p = Qt(r, t, {}, n); return t.forEach(function(t, o) { p[o] = e(t, n, r); }), p; } var d = Qt(r, t, {}, n); for (var f in t) d[f] = e(t[f], n, r); return d; }(e, t, n); } function $t() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = !1; "boolean" == typeof e[e.length - 1] && (n = e.pop()); var r = function o(e) { switch (e.length) { case 0: return Ue.trackingDerivation; case 1: return Bn(e[0]); case 2: return Bn(e[0], e[1]); } }(e); if (!r) return m(!1); r.isTracing === Te.NONE && console.log("[mobx.trace] '" + r.name + "' tracing enabled"), r.isTracing = n ? Te.BREAK : Te.LOG; } function en(e, t) { void 0 === t && (t = void 0), We(); try { return e.apply(t); } finally { qe(); } } function tn(e, t, n) { return 1 === arguments.length || t && "object" == typeof t ? function r(e, t) { 0; var n, r = new Promise(function(r, o) { var i = nn(e, r, a({}, t, { onError: o })); n = function() { i(), o("WHEN_CANCELLED"); }; }); return r.cancel = n, r; }(e, t) : nn(e, t, n || {}); } function nn(e, t, n) { var r; "number" == typeof n.timeout && (r = setTimeout(function() { if (!i.$mobx.isDisposed) { i(); var e = new Error("WHEN_TIMEOUT"); if (!n.onError) throw e; n.onError(e); } }, n.timeout)), n.name = n.name || "When@" + f(); var o = pe(n.name + "-effect", t), i = ht(function(t) { e() && (t.dispose(), r && clearTimeout(r), o()); }, n); return i; } function rn(e) { return void 0 !== e.interceptors && e.interceptors.length > 0; } function on(e, t) { var n = e.interceptors || (e.interceptors = []); return n.push(t), g(function() { var e = n.indexOf(t); -1 !== e && n.splice(e, 1); }); } function an(e, t) { var n = ke(); try { var r = e.interceptors; if (r) for (var o = 0, i = r.length; o < i && (h(!(t = r[o](t)) || t.type, "Intercept handlers should return nothing or a change object"), t); o++) ; return t; } finally { Me(n); } } function sn(e) { return void 0 !== e.changeListeners && e.changeListeners.length > 0; } function un(e, t) { var n = e.changeListeners || (e.changeListeners = []); return n.push(t), g(function() { var e = n.indexOf(t); -1 !== e && n.splice(e, 1); }); } function ln(e, t) { var n = ke(), r = e.changeListeners; if (r) { for (var o = 0, i = (r = r.slice()).length; o < i; o++) r[o](t); Me(n); } } var cn, pn, dn = (cn = !1, pn = {}, Object.defineProperty(pn, "0", { set: function() { cn = !0; } }), Object.create(pn)[0] = 1, !1 === cn), fn = 0, mn = function() { return function e() {}; }(); !function hn(e, t) { void 0 !== Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : void 0 !== e.prototype.__proto__ ? e.prototype.__proto__ = t : e.prototype = t; }(mn, Array.prototype), Object.isFrozen(Array) && [ "constructor", "push", "shift", "concat", "pop", "unshift", "replace", "find", "findIndex", "splice", "reverse", "sort" ].forEach(function(e) { Object.defineProperty(mn.prototype, e, { configurable: !0, writable: !0, value: Array.prototype[e] }); }); var gn = function() { function e(e, t, n, r) { this.array = n, this.owned = r, this.values = [], this.lastKnownLength = 0, this.atom = new L(e || "ObservableArray@" + f()), this.enhancer = function(n, r) { return t(n, r, e + "[..]"); }; } return e.prototype.dehanceValue = function(e) { return void 0 !== this.dehancer ? this.dehancer(e) : e; }, e.prototype.dehanceValues = function(e) { return void 0 !== this.dehancer && e.length > 0 ? e.map(this.dehancer) : e; }, e.prototype.intercept = function(e) { return on(this, e); }, e.prototype.observe = function(e, t) { return void 0 === t && (t = !1), t && e({ object: this.array, type: "splice", index: 0, added: this.values.slice(), addedCount: this.values.length, removed: [], removedCount: 0 }), un(this, e); }, e.prototype.getArrayLength = function() { return this.atom.reportObserved(), this.values.length; }, e.prototype.setArrayLength = function(e) { if ("number" != typeof e || e < 0) throw new Error("[mobx.array] Out of range: " + e); var t = this.values.length; if (e !== t) if (e > t) { for (var n = new Array(e - t), r = 0; r < e - t; r++) n[r] = void 0; this.spliceWithArray(t, 0, n); } else this.spliceWithArray(e, t - e); }, e.prototype.updateArrayLength = function(e, t) { if (e !== this.lastKnownLength) throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?"); this.lastKnownLength += t, t > 0 && e + t + 1 > fn && Tn(e + t + 1); }, e.prototype.spliceWithArray = function(e, t, n) { var r = this; Pe(this.atom); var o = this.values.length; if (void 0 === e ? e = 0 : e > o ? e = o : e < 0 && (e = Math.max(0, o + e)), t = 1 === arguments.length ? o - e : null == t ? 0 : Math.max(0, Math.min(t, o - e)), void 0 === n && (n = c), rn(this)) { var i = an(this, { object: this.array, type: "splice", index: e, removedCount: t, added: n }); if (!i) return c; t = i.removedCount, n = i.added; } var a = (n = 0 === n.length ? n : n.map(function(e) { return r.enhancer(e, void 0); })).length - t; this.updateArrayLength(o, a); var s = this.spliceItemsIntoValues(e, t, n); return 0 === t && 0 === n.length || this.notifyArraySplice(e, n, s), this.dehanceValues(s); }, e.prototype.spliceItemsIntoValues = function(e, t, n) { var r; if (n.length < 1e4) return (r = this.values).splice.apply(r, u([ e, t ], n)); var o = this.values.slice(e, e + t); return this.values = this.values.slice(0, e).concat(n, this.values.slice(e + t)), o; }, e.prototype.notifyArrayChildUpdate = function(e, t, n) { var r = !this.owned && rt(), o = sn(this), i = o || r ? { object: this.array, type: "update", index: e, newValue: t, oldValue: n } : null; r && it(a({}, i, { name: this.atom.name })), this.atom.reportChanged(), o && ln(this, i), r && st(); }, e.prototype.notifyArraySplice = function(e, t, n) { var r = !this.owned && rt(), o = sn(this), i = o || r ? { object: this.array, type: "splice", index: e, removed: n, added: t, removedCount: n.length, addedCount: t.length } : null; r && it(a({}, i, { name: this.atom.name })), this.atom.reportChanged(), o && ln(this, i), r && st(); }, e; }(), yn = function(e) { function t(t, n, r, o) { void 0 === r && (r = "ObservableArray@" + f()), void 0 === o && (o = !1); var i = e.call(this) || this, a = new gn(r, n, i, o); if (_(i, "$mobx", a), t && t.length) { var s = he(!0); i.spliceWithArray(0, 0, t), ge(s); } return dn && Object.defineProperty(a.array, "0", vn), i; } return i(t, e), t.prototype.intercept = function(e) { return this.$mobx.intercept(e); }, t.prototype.observe = function(e, t) { return void 0 === t && (t = !1), this.$mobx.observe(e, t); }, t.prototype.clear = function() { return this.splice(0); }, t.prototype.concat = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return this.$mobx.atom.reportObserved(), Array.prototype.concat.apply(this.peek(), e.map(function(e) { return Cn(e) ? e.peek() : e; })); }, t.prototype.replace = function(e) { return this.$mobx.spliceWithArray(0, this.$mobx.values.length, e); }, t.prototype.toJS = function() { return this.slice(); }, t.prototype.toJSON = function() { return this.toJS(); }, t.prototype.peek = function() { return this.$mobx.atom.reportObserved(), this.$mobx.dehanceValues(this.$mobx.values); }, t.prototype.find = function(e, t, n) { void 0 === n && (n = 0), arguments.length; var r = this.findIndex.apply(this, arguments); return -1 === r ? void 0 : this.get(r); }, t.prototype.findIndex = function(e, t, n) { void 0 === n && (n = 0), arguments.length; for (var r = this.peek(), o = r.length, i = n; i < o; i++) if (e.call(t, r[i], i, this)) return i; return -1; }, t.prototype.splice = function(e, t) { for (var n = [], r = 2; r < arguments.length; r++) n[r - 2] = arguments[r]; switch (arguments.length) { case 0: return []; case 1: return this.$mobx.spliceWithArray(e); case 2: return this.$mobx.spliceWithArray(e, t); } return this.$mobx.spliceWithArray(e, t, n); }, t.prototype.spliceWithArray = function(e, t, n) { return this.$mobx.spliceWithArray(e, t, n); }, t.prototype.push = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = this.$mobx; return n.spliceWithArray(n.values.length, 0, e), n.values.length; }, t.prototype.pop = function() { return this.splice(Math.max(this.$mobx.values.length - 1, 0), 1)[0]; }, t.prototype.shift = function() { return this.splice(0, 1)[0]; }, t.prototype.unshift = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = this.$mobx; return n.spliceWithArray(0, 0, e), n.values.length; }, t.prototype.reverse = function() { var e = this.slice(); return e.reverse.apply(e, arguments); }, t.prototype.sort = function(e) { var t = this.slice(); return t.sort.apply(t, arguments); }, t.prototype.remove = function(e) { var t = this.$mobx.dehanceValues(this.$mobx.values).indexOf(e); return t > -1 && (this.splice(t, 1), !0); }, t.prototype.move = function(e, t) { function n(e) { if (e < 0) throw new Error("[mobx.array] Index out of bounds: " + e + " is negative"); var t = this.$mobx.values.length; if (e >= t) throw new Error("[mobx.array] Index out of bounds: " + e + " is not smaller than " + t); } if (n.call(this, e), n.call(this, t), e !== t) { var r, o = this.$mobx.values; r = e < t ? u(o.slice(0, e), o.slice(e + 1, t + 1), [ o[e] ], o.slice(t + 1)) : u(o.slice(0, t), [ o[e] ], o.slice(t, e), o.slice(e + 1)), this.replace(r); } }, t.prototype.get = function(e) { var t = this.$mobx; if (t) { if (e < t.values.length) return t.atom.reportObserved(), t.dehanceValue(t.values[e]); console.warn("[mobx.array] Attempt to read an array index (" + e + ") that is out of bounds (" + t.values.length + "). Please check length first. Out of bound indices will not be tracked by MobX"); } }, t.prototype.set = function(e, t) { var n = this.$mobx, r = n.values; if (e < r.length) { Pe(n.atom); var o = r[e]; if (rn(n)) { var i = an(n, { type: "update", object: this, index: e, newValue: t }); if (!i) return; t = i.newValue; } (t = n.enhancer(t, o)) !== o && (r[e] = t, n.notifyArrayChildUpdate(e, t, o)); } else { if (e !== r.length) throw new Error("[mobx.array] Index out of bounds, " + e + " is larger than " + r.length); n.spliceWithArray(e, 0, [ t ]); } }, t; }(mn); O(yn.prototype, function() { this.$mobx.atom.reportObserved(); var e = this, t = 0; return x({ next: function() { return t < e.length ? { value: e[t++], done: !1 } : { done: !0, value: void 0 }; } }); }), Object.defineProperty(yn.prototype, "length", { enumerable: !1, configurable: !0, get: function() { return this.$mobx.getArrayLength(); }, set: function(e) { this.$mobx.setArrayLength(e); } }), b(yn.prototype, k(), "Array"), [ "every", "filter", "forEach", "indexOf", "join", "lastIndexOf", "map", "reduce", "reduceRight", "slice", "some", "toString", "toLocaleString" ].forEach(function(e) { var t = Array.prototype[e]; h("function" == typeof t, "Base function not defined on Array prototype: '" + e + "'"), b(yn.prototype, e, function() { return t.apply(this.peek(), arguments); }); }), function Sn(e, t) { for (var n = 0; n < t.length; n++) b(e, t[n], e[t[n]]); }(yn.prototype, [ "constructor", "intercept", "observe", "clear", "concat", "get", "replace", "toJS", "toJSON", "peek", "find", "findIndex", "splice", "spliceWithArray", "push", "pop", "set", "shift", "unshift", "reverse", "sort", "remove", "move", "toString", "toLocaleString" ]); var vn = bn(0); function bn(e) { return { enumerable: !1, configurable: !1, get: function() { return this.get(e); }, set: function(t) { this.set(e, t); } }; } function _n(e) { Object.defineProperty(yn.prototype, "" + e, bn(e)); } function Tn(e) { for (var t = fn; t < e; t++) _n(t); fn = e; } Tn(1e3); var En = T("ObservableArrayAdministration", gn); function Cn(e) { return S(e) && En(e.$mobx); } var In = {}, An = function() { function e(e, t, n) { if (void 0 === t && (t = W), void 0 === n && (n = "ObservableMap@" + f()), this.enhancer = t, this.name = n, this.$mobx = In, this._keys = new yn(void 0, q, this.name + ".keys()", !0), "function" != typeof Map) throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js"); this._data = new Map(), this._hasMap = new Map(), this.merge(e); } return e.prototype._has = function(e) { return this._data.has(e); }, e.prototype.has = function(e) { var t = this; if (!Ue.trackingDerivation) return this._has(e); var n = this._hasMap.get(e); if (!n) { var r = n = new Se(this._has(e), q, this.name + "." + wn(e) + "?", !1); this._hasMap.set(e, r), _t(r, function() { return t._hasMap.delete(e); }); } return n.get(); }, e.prototype.set = function(e, t) { var n = this._has(e); if (rn(this)) { var r = an(this, { type: n ? "update" : "add", object: this, newValue: t, name: e }); if (!r) return this; t = r.newValue; } return n ? this._updateValue(e, t) : this._addValue(e, t), this; }, e.prototype.delete = function(e) { var t = this; if (rn(this) && !(o = an(this, { type: "delete", object: this, name: e }))) return !1; if (this._has(e)) { var n = rt(), r = sn(this), o = r || n ? { type: "delete", object: this, oldValue: this._data.get(e).value, name: e } : null; return n && it(a({}, o, { name: this.name, key: e })), en(function() { t._keys.remove(e), t._updateHasMapEntry(e, !1), t._data.get(e).setNewValue(void 0), t._data.delete(e); }), r && ln(this, o), n && st(), !0; } return !1; }, e.prototype._updateHasMapEntry = function(e, t) { var n = this._hasMap.get(e); n && n.setNewValue(t); }, e.prototype._updateValue = function(e, t) { var n = this._data.get(e); if ((t = n.prepareNewValue(t)) !== Ue.UNCHANGED) { var r = rt(), o = sn(this), i = o || r ? { type: "update", object: this, oldValue: n.value, name: e, newValue: t } : null; r && it(a({}, i, { name: this.name, key: e })), n.setNewValue(t), o && ln(this, i), r && st(); } }, e.prototype._addValue = function(e, t) { var n = this; en(function() { var r = new Se(t, n.enhancer, n.name + "." + wn(e), !1); n._data.set(e, r), t = r.value, n._updateHasMapEntry(e, !0), n._keys.push(e); }); var r = rt(), o = sn(this), i = o || r ? { type: "add", object: this, name: e, newValue: t } : null; r && it(a({}, i, { name: this.name, key: e })), o && ln(this, i), r && st(); }, e.prototype.get = function(e) { return this.has(e) ? this.dehanceValue(this._data.get(e).get()) : this.dehanceValue(void 0); }, e.prototype.dehanceValue = function(e) { return void 0 !== this.dehancer ? this.dehancer(e) : e; }, e.prototype.keys = function() { return this._keys[R()](); }, e.prototype.values = function() { var e = this, t = 0; return x({ next: function() { return t < e._keys.length ? { value: e.get(e._keys[t++]), done: !1 } : { value: void 0, done: !0 }; } }); }, e.prototype.entries = function() { var e = this, t = 0; return x({ next: function() { if (t < e._keys.length) { var n = e._keys[t++]; return { value: [ n, e.get(n) ], done: !1 }; } return { done: !0 }; } }); }, e.prototype.forEach = function(e, t) { var n = this; this._keys.forEach(function(r) { return e.call(t, n.get(r), r, n); }); }, e.prototype.merge = function(e) { var t = this; return Pn(e) && (e = e.toJS()), en(function() { v(e) ? Object.keys(e).forEach(function(n) { return t.set(n, e[n]); }) : Array.isArray(e) ? e.forEach(function(e) { var n = s(e, 2), r = n[0], o = n[1]; return t.set(r, o); }) : C(e) ? e.constructor !== Map ? m("Cannot initialize from classes that inherit from Map: " + e.constructor.name) : e.forEach(function(e, n) { return t.set(n, e); }) : null != e && m("Cannot initialize map from " + e); }), this; }, e.prototype.clear = function() { var e = this; en(function() { xe(function() { e._keys.slice().forEach(function(t) { return e.delete(t); }); }); }); }, e.prototype.replace = function(e) { var t = this; return en(function() { var n = function r(e) { return v(e) ? Object.keys(e) : Array.isArray(e) ? e.map(function(e) { return s(e, 1)[0]; }) : C(e) || Pn(e) ? A(e.keys()) : m("Cannot get keys from '" + e + "'"); }(e); t._keys.filter(function(e) { return -1 === n.indexOf(e); }).forEach(function(e) { return t.delete(e); }), t.merge(e); }), this; }, Object.defineProperty(e.prototype, "size", { get: function() { return this._keys.length; }, enumerable: !0, configurable: !0 }), e.prototype.toPOJO = function() { var e = this, t = {}; return this._keys.forEach(function(n) { return t["symbol" == typeof n ? n : wn(n)] = e.get(n); }), t; }, e.prototype.toJS = function() { var e = this, t = new Map(); return this._keys.forEach(function(n) { return t.set(n, e.get(n)); }), t; }, e.prototype.toJSON = function() { return this.toPOJO(); }, e.prototype.toString = function() { var e = this; return this.name + "[{ " + this._keys.map(function(t) { return wn(t) + ": " + e.get(t); }).join(", ") + " }]"; }, e.prototype.observe = function(e, t) { return un(this, e); }, e.prototype.intercept = function(e) { return on(this, e); }, e; }(); function wn(e) { return e && e.toString ? e.toString() : new String(e).toString(); } O(An.prototype, function() { return this.entries(); }), _(An.prototype, k(), "Map"); var Pn = T("ObservableMap", An), Rn = {}, On = function() { function e(e, t, n) { if (void 0 === t && (t = W), void 0 === n && (n = "ObservableSet@" + f()), this.name = n, this.$mobx = Rn, this._data = new Set(), this._atom = N(this.name), "function" != typeof Set) throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js"); this.enhancer = function(e, r) { return t(e, r, n); }, e && this.replace(e); } return e.prototype.dehanceValue = function(e) { return void 0 !== this.dehancer ? this.dehancer(e) : e; }, e.prototype.clear = function() { var e = this; en(function() { xe(function() { e._data.forEach(function(t) { e.delete(t); }); }); }); }, e.prototype.forEach = function(e, t) { var n = this; this._data.forEach(function(r) { e.call(t, r, r, n); }); }, Object.defineProperty(e.prototype, "size", { get: function() { return this._atom.reportObserved(), this._data.size; }, enumerable: !0, configurable: !0 }), e.prototype.add = function(e) { var t = this; if ((Pe(this._atom), rn(this)) && !(o = an(this, { type: "add", object: this, newValue: e }))) return this; if (!this.has(e)) { en(function() { t._data.add(t.enhancer(e, void 0)), t._atom.reportChanged(); }); var n = rt(), r = sn(this), o = r || n ? { type: "add", object: this, newValue: e } : null; 0, r && ln(this, o); } return this; }, e.prototype.delete = function(e) { var t = this; if (rn(this) && !(o = an(this, { type: "delete", object: this, oldValue: e }))) return !1; if (this.has(e)) { var n = rt(), r = sn(this), o = r || n ? { type: "delete", object: this, oldValue: e } : null; return en(function() { t._atom.reportChanged(), t._data.delete(e); }), r && ln(this, o), !0; } return !1; }, e.prototype.has = function(e) { return this._atom.reportObserved(), this._data.has(this.dehanceValue(e)); }, e.prototype.entries = function() { var e = 0, t = A(this.keys()), n = A(this.values()); return x({ next: function() { var r = e; return e += 1, r < n.length ? { value: [ t[r], n[r] ], done: !1 } : { done: !0 }; } }); }, e.prototype.keys = function() { return this.values(); }, e.prototype.values = function() { this._atom.reportObserved(); var e, t = this, n = 0; return void 0 !== this._data.values ? e = A(this._data.values()) : (e = [], this._data.forEach(function(t) { return e.push(t); })), x({ next: function() { return n < e.length ? { value: t.dehanceValue(e[n++]), done: !1 } : { done: !0 }; } }); }, e.prototype.replace = function(e) { var t = this; return xn(e) && (e = e.toJS()), en(function() { Array.isArray(e) ? (t.clear(), e.forEach(function(e) { return t.add(e); })) : I(e) ? (t.clear(), e.forEach(function(e) { return t.add(e); })) : null != e && m("Cannot initialize set from " + e); }), this; }, e.prototype.observe = function(e, t) { return un(this, e); }, e.prototype.intercept = function(e) { return on(this, e); }, e.prototype.toJS = function() { return new Set(this); }, e.prototype.toString = function() { return this.name + "[ " + A(this.keys()).join(", ") + " ]"; }, e; }(); O(On.prototype, function() { return this.values(); }), _(On.prototype, k(), "Set"); var xn = T("ObservableSet", On), kn = function() { function e(e, t, n) { this.target = e, this.name = t, this.defaultEnhancer = n, this.values = {}; } return e.prototype.read = function(e, t) { if (this.target === e || (this.illegalAccess(e, t), this.values[t])) return this.values[t].get(); }, e.prototype.write = function(e, t, n) { var r = this.target; r !== e && this.illegalAccess(e, t); var o = this.values[t]; if (o instanceof be) o.set(n); else { if (rn(this)) { if (!(u = an(this, { type: "update", object: r, name: t, newValue: n }))) return; n = u.newValue; } if ((n = o.prepareNewValue(n)) !== Ue.UNCHANGED) { var i = sn(this), s = rt(), u = i || s ? { type: "update", object: r, oldValue: o.value, name: t, newValue: n } : null; s && it(a({}, u, { name: this.name, key: t })), o.setNewValue(n), i && ln(this, u), s && st(); } } }, e.prototype.remove = function(e) { if (this.values[e]) { var t = this.target; if (rn(this)) if (!(i = an(this, { object: t, name: e, type: "remove" }))) return; try { We(); var n = sn(this), r = rt(), o = this.values[e].get(); this.keys && this.keys.remove(e), delete this.values[e], delete this.target[e]; var i = n || r ? { type: "remove", object: t, oldValue: o, name: e } : null; r && it(a({}, i, { name: this.name, key: e })), n && ln(this, i), r && st(); } finally { qe(); } } }, e.prototype.illegalAccess = function(e, t) { console.warn("Property '" + t + "' of '" + e + "' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner"); }, e.prototype.observe = function(e, t) { return un(this, e); }, e.prototype.intercept = function(e) { return on(this, e); }, e.prototype.getKeys = function() { var e = this; return void 0 === this.keys && (this.keys = new yn(Object.keys(this.values).filter(function(t) { return e.values[t] instanceof Se; }), q, "keys(" + this.name + ")", !0)), this.keys.slice(); }, e; }(); function Mn(e, t, n) { void 0 === t && (t = ""), void 0 === n && (n = W); var r = e.$mobx; return r || (v(e) || (t = (e.constructor.name || "ObservableObject") + "@" + f()), t || (t = "ObservableObject@" + f()), _(e, "$mobx", r = new kn(e, t, n)), r); } function Ln(e, t, n, r) { var o = Mn(e); if (rn(o)) { var i = an(o, { object: e, name: t, type: "add", newValue: n }); if (!i) return; n = i.newValue; } n = (o.values[t] = new Se(n, r, o.name + "." + t, !1)).value, Object.defineProperty(e, t, function s(e) { return Dn[e] || (Dn[e] = { configurable: !0, enumerable: !0, get: function() { return this.$mobx.read(this, e); }, set: function(t) { this.$mobx.write(this, e, t); } }); }(t)), o.keys && o.keys.push(t), function u(e, t, n, r) { var o = sn(e), i = rt(), s = o || i ? { type: "add", object: t, name: n, newValue: r } : null; i && it(a({}, s, { name: e.name, key: n })); o && ln(e, s); i && st(); }(o, e, t, n); } var Dn = Object.create(null), Nn = Object.create(null); function Fn(e) { var t = e.$mobx; return t || (z(e), e.$mobx); } var Gn = T("ObservableObjectAdministration", kn); function Un(e) { return !!S(e) && (z(e), Gn(e.$mobx)); } function Bn(e, t) { if ("object" == typeof e && null !== e) { if (Cn(e)) return void 0 !== t && m(!1), e.$mobx.atom; if (xn(e)) return e.$mobx; if (Pn(e)) { var n = e; return void 0 === t ? Bn(n._keys) : ((r = n._data.get(t) || n._hasMap.get(t)) || m(!1), r); } var r; if (z(e), t && !e.$mobx && e[t], Un(e)) return t ? ((r = e.$mobx.values[t]) || m(!1), r) : m(!1); if (D(e) || Ee(e) || tt(e)) return e; } else if ("function" == typeof e && tt(e.$mobx)) return e.$mobx; return m(!1); } function jn(e, t) { return e || m("Expecting some object"), void 0 !== t ? jn(Bn(e, t)) : D(e) || Ee(e) || tt(e) ? e : Pn(e) || xn(e) ? e : (z(e), e.$mobx ? e.$mobx : void m(!1)); } function Hn(e, t) { return (void 0 !== t ? Bn(e, t) : Un(e) || Pn(e) || xn(e) ? jn(e) : Bn(e)).name; } var zn = Object.prototype.toString; function Vn(e, t) { return Wn(e, t); } function Wn(e, t, n, r) { if (e === t) return 0 !== e || 1 / e == 1 / t; if (null == e || null == t) return !1; if (e != e) return t != t; var o = typeof e; return ("function" === o || "object" === o || "object" == typeof t) && function i(e, t, n, r) { e = qn(e), t = qn(t); var o = zn.call(e); if (o !== zn.call(t)) return !1; switch (o) { case "[object RegExp]": case "[object String]": return "" + e == "" + t; case "[object Number]": return +e != +e ? +t != +t : 0 == +e ? 1 / +e == 1 / t : +e == +t; case "[object Date]": case "[object Boolean]": return +e == +t; case "[object Symbol]": return "undefined" != typeof Symbol && Symbol.valueOf.call(e) === Symbol.valueOf.call(t); } var i = "[object Array]" === o; if (!i) { if ("object" != typeof e || "object" != typeof t) return !1; var a = e.constructor, s = t.constructor; if (a !== s && !("function" == typeof a && a instanceof a && "function" == typeof s && s instanceof s) && "constructor" in e && "constructor" in t) return !1; } r = r || []; var u = (n = n || []).length; for (;u--; ) if (n[u] === e) return r[u] === t; if (n.push(e), r.push(t), i) { if ((u = e.length) !== t.length) return !1; for (;u--; ) if (!Wn(e[u], t[u], n, r)) return !1; } else { var l = Object.keys(e), c = void 0; if (u = l.length, Object.keys(t).length !== u) return !1; for (;u--; ) if (c = l[u], !Kn(t, c) || !Wn(e[c], t[c], n, r)) return !1; } return n.pop(), r.pop(), !0; }(e, t, n, r); } function qn(e) { return Cn(e) ? e.peek() : C(e) || Pn(e) ? A(e.entries()) : I(e) || xn(e) ? A(e.entries()) : e; } function Kn(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } var Xn = "$mobx"; "object" == typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ spy: ut, extras: { getDebugName: Hn }, $mobx: Xn }); }.call(this, n(179), n(339)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(366); e.exports = r.translate; }, function(e, t, n) { !function(e, t, n) { "use strict"; var r = "default" in n ? n.default : n, o = void 0, i = { childContextTypes: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, a = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, s = Object.defineProperty, u = Object.getOwnPropertyNames, l = Object.getOwnPropertySymbols, c = Object.getOwnPropertyDescriptor, p = Object.getPrototypeOf, d = p && p(Object), f = function e(t, n, r) { if ("string" != typeof n) { if (d) { var o = p(n); o && o !== d && e(t, o, r); } var f = u(n); l && (f = f.concat(l(n))); for (var m = 0; m < f.length; ++m) { var h = f[m]; if (!(i[h] || a[h] || r && r[h])) { var g = c(n, h); try { s(t, h, g); } catch (e) {} } } return t; } return t; }, m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e; } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, h = (function() { function e(e) { this.value = e; } function t(t) { var n, r; function o(n, r) { try { var a = t[n](r), s = a.value; s instanceof e ? Promise.resolve(s.value).then(function(e) { o("next", e); }, function(e) { o("throw", e); }) : i(a.done ? "return" : "normal", a.value); } catch (e) { i("throw", e); } } function i(e, t) { switch (e) { case "return": n.resolve({ value: t, done: !0 }); break; case "throw": n.reject(t); break; default: n.resolve({ value: t, done: !1 }); } (n = n.next) ? o(n.key, n.arg) : r = null; } this._invoke = function a(e, t) { return new Promise(function(i, a) { var s = { key: e, arg: t, resolve: i, reject: a, next: null }; r ? r = r.next = s : (n = r = s, o(e, t)); }); }, "function" != typeof t.return && (this.return = void 0); } "function" == typeof Symbol && Symbol.asyncIterator && (t.prototype[Symbol.asyncIterator] = function() { return this; }), t.prototype.next = function(e) { return this._invoke("next", e); }, t.prototype.throw = function(e) { return this._invoke("throw", e); }, t.prototype.return = function(e) { return this._invoke("return", e); }; }(), function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); }), g = function() { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } return function(t, n, r) { return n && e(t.prototype, n), r && e(t, r), t; }; }(), y = function(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t); }, S = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t; }, v = function() { function e() { h(this, e), this.listeners = []; } return g(e, [ { key: "on", value: function e(t) { var n = this; return this.listeners.push(t), function() { var e = n.listeners.indexOf(t); -1 !== e && n.listeners.splice(e, 1); }; } }, { key: "emit", value: function e(t) { this.listeners.forEach(function(e) { return e(t); }); } } ]), e; }(); function b(e) { function n(n, r, o, i, a, s) { for (var u = arguments.length, l = Array(u > 6 ? u - 6 : 0), c = 6; c < u; c++) l[c - 6] = arguments[c]; return t.untracked(function() { if (i = i || "<>", s = s || o, null == r[o]) { if (n) { var t = null === r[o] ? "null" : "undefined"; return new Error("The " + a + " `" + s + "` is marked as required in `" + i + "`, but its value is `" + t + "`."); } return null; } return e.apply(void 0, [ r, o, i, a, s ].concat(l)); }); } var r = n.bind(null, !1); return r.isRequired = n.bind(null, !0), r; } function _(e) { var t = void 0 === e ? "undefined" : m(e); return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : function n(e, t) { return "symbol" === e || ("Symbol" === t["@@toStringTag"] || "function" == typeof Symbol && t instanceof Symbol); }(t, e) ? "symbol" : t; } function T(e, n) { return b(function(r, o, i, a, s) { return t.untracked(function() { if (e && _(r[o]) === n.toLowerCase()) return null; var a = void 0; switch (n) { case "Array": a = t.isObservableArray; break; case "Object": a = t.isObservableObject; break; case "Map": a = t.isObservableMap; break; default: throw new Error("Unexpected mobxType: " + n); } var u = r[o]; if (!a(u)) { var l = function c(e) { var t = _(e); if ("object" === t) { if (e instanceof Date) return "date"; if (e instanceof RegExp) return "regexp"; } return t; }(u), p = e ? " or javascript `" + n.toLowerCase() + "`" : ""; return new Error("Invalid prop `" + s + "` of type `" + l + "` supplied to `" + i + "`, expected `mobx.Observable" + n + "`" + p + "."); } return null; }); }); } function E(e, n) { return b(function(r, o, i, a, s) { for (var u = arguments.length, l = Array(u > 5 ? u - 5 : 0), c = 5; c < u; c++) l[c - 5] = arguments[c]; return t.untracked(function() { if ("function" != typeof n) return new Error("Property `" + s + "` of component `" + i + "` has invalid PropType notation."); var t = T(e, "Array")(r, o, i); if (t instanceof Error) return t; for (var u = r[o], c = 0; c < u.length; c++) if ((t = n.apply(void 0, [ u, c, i, a, s + "[" + c + "]" ].concat(l))) instanceof Error) return t; return null; }); }); } var C = T(!1, "Array"), I = E.bind(null, !1), A = T(!1, "Map"), w = T(!1, "Object"), P = T(!0, "Array"), R = E.bind(null, !0), O = T(!0, "Object"), x = Object.freeze({ observableArray: C, observableArrayOf: I, observableMap: A, observableObject: w, arrayOrObservableArray: P, arrayOrObservableArrayOf: R, objectOrObservableObject: O }), k = { mobxStores: O }; Object.seal(k); var M = { contextTypes: { get: function e() { return k; }, set: function e(t) { console.warn("Mobx Injector: you are trying to attach `contextTypes` on an component decorated with `inject` (or `observer`) HOC. Please specify the contextTypes on the wrapped component instead. It is accessible through the `wrappedComponent`"); }, configurable: !0, enumerable: !1 }, isMobxInjector: { value: !0, writable: !0, configurable: !0, enumerable: !0 } }; function L(e, t, r) { var o, i, a = "inject-" + (t.displayName || t.name || t.constructor && t.constructor.name || "Unknown"); r && (a += "-with-" + r); var s = (i = o = function(r) { function o() { var e, t, n; h(this, o); for (var r = arguments.length, i = Array(r), a = 0; a < r; a++) i[a] = arguments[a]; return n = S(this, (e = o.__proto__ || Object.getPrototypeOf(o)).call.apply(e, [ this ].concat(i))), t = n, n.storeRef = function(e) { n.wrappedInstance = e; }, S(n, t); } return y(o, r), g(o, [ { key: "render", value: function r() { var o = {}; for (var i in this.props) this.props.hasOwnProperty(i) && (o[i] = this.props[i]); var a = e(this.context.mobxStores || {}, o, this.context) || {}; for (var s in a) o[s] = a[s]; return function u(e) { return !(e.prototype && e.prototype.render); }(t) || (o.ref = this.storeRef), n.createElement(t, o); } } ]), o; }(n.Component), o.displayName = a, i); return f(s, t), s.wrappedComponent = t, Object.defineProperties(s, M), s; } function D() { var e = void 0; if ("function" == typeof arguments[0]) return e = arguments[0], function(t) { var n = L(e, t); return n.isMobxInjector = !1, (n = te(n)).isMobxInjector = !0, n; }; for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return e = function r(e) { return function(t, n) { return e.forEach(function(e) { if (!(e in n)) { if (!(e in t)) throw new Error("MobX injector: Store '" + e + "' is not available! Make sure it is provided by some Provider"); n[e] = t[e]; } }), n; }; }(t), function(n) { return L(e, n, t.join("-")); }; } var N = t.$mobx || "$mobx", F = !1, G = !1, U = !1, B = "undefined" != typeof WeakMap ? new WeakMap() : void 0, j = new v(), H = {}; function z(e) { return H[e] || (H[e] = function t(e) { return "function" == typeof Symbol ? Symbol(e) : "$mobxReactProp$" + e + Math.random(); }(e)), H[e]; } var V = z("skipRender"), W = z("isForcingUpdate"); function q(e, t, n) { Object.hasOwnProperty.call(e, t) ? e[t] = n : Object.defineProperty(e, t, { enumerable: !1, configurable: !0, writable: !0, value: n }); } function K(e) { if (o) try { return o(e); } catch (e) { return null; } return null; } function X(e) { var t = K(e); t && B && B.set(t, e), j.emit({ event: "render", renderTime: e.__$mobRenderEnd - e.__$mobRenderStart, totalTime: Date.now() - e.__$mobRenderStart, component: e, node: t }); } function Y() { if ("undefined" == typeof WeakMap) throw new Error("[mobx-react] tracking components is not supported in this browser."); F || (F = !0); } var J = new v(); function Q(e, t) { if (Z(e, t)) return !0; if ("object" !== (void 0 === e ? "undefined" : m(e)) || null === e || "object" !== (void 0 === t ? "undefined" : m(t)) || null === t) return !1; var n = Object.keys(e), r = Object.keys(t); if (n.length !== r.length) return !1; for (var o = 0; o < n.length; o++) if (!hasOwnProperty.call(t, n[o]) || !Z(e[n[o]], t[n[o]])) return !1; return !0; } function Z(e, t) { return e === t ? 0 !== e || 1 / e == 1 / t : e != e && t != t; } var $ = { componentWillUnmount: function e() { if (!0 !== G && (this.render[N] && this.render[N].dispose(), this.__$mobxIsUnmounted = !0, F)) { var t = K(this); t && B && B.delete(t), j.emit({ event: "destroy", component: this, node: t }); } }, componentDidMount: function e() { F && X(this); }, componentDidUpdate: function e() { F && X(this); }, shouldComponentUpdate: function e(t, n) { return G && console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."), this.state !== n || !Q(this.props, t); } }; function ee(e, n) { var r = z(n + " value holder"), o = z(n + " atom holder"); function i() { return this[o] || q(this, o, t.createAtom("reactive " + n)), this[o]; } Object.defineProperty(e, n, { configurable: !0, enumerable: !0, get: function e() { return i.call(this).reportObserved(), this[r]; }, set: function e(t) { this[W] || Q(this[r], t) ? q(this, r, t) : (q(this, r, t), q(this, V, !0), i.call(this).reportChanged(), q(this, V, !1)); } }); } function te(e, r) { if ("string" == typeof e) throw new Error("Store names should be provided as array"); if (Array.isArray(e)) return U || (U = !0, console.warn('Mobx observer: Using observer to inject stores is deprecated since 4.0. Use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))` instead of `@observer(["store1", "store2"]) ComponentClass`')), r ? D.apply(null, e)(te(r)) : function(t) { return te(e, t); }; var o = e; if (!0 === o.isMobxInjector && console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"), o.__proto__ === n.PureComponent && console.warn("Mobx observer: You are using 'observer' on React.PureComponent. These two achieve two opposite goals and should not be used together"), !("function" != typeof o || o.prototype && o.prototype.render || o.isReactClass || n.Component.isPrototypeOf(o))) { var i, a, s = te((a = i = function(e) { function t() { return h(this, t), S(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)); } return y(t, e), g(t, [ { key: "render", value: function e() { return o.call(this, this.props, this.context); } } ]), t; }(n.Component), i.displayName = o.displayName || o.name, i.contextTypes = o.contextTypes, i.propTypes = o.propTypes, i.defaultProps = o.defaultProps, a)); return f(s, o), s; } if (!o) throw new Error("Please pass a valid component to 'observer'"); var u = o.prototype || o; !function l(e) { [ "componentDidMount", "componentWillUnmount", "componentDidUpdate" ].forEach(function(t) { !function n(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], r = e[t], o = $[t], i = r ? !0 === n ? function() { o.apply(this, arguments), r.apply(this, arguments); } : function() { r.apply(this, arguments), o.apply(this, arguments); } : o; e[t] = i; }(e, t); }), e.shouldComponentUpdate ? e.shouldComponentUpdate !== $.shouldComponentUpdate && console.warn("Use `shouldComponentUpdate` in an `observer` based component breaks the behavior of `observer` and might lead to unexpected results. Manually implementing `sCU` should not be needed when using mobx-react.") : e.shouldComponentUpdate = $.shouldComponentUpdate; }(u), o.isMobXReactObserver = !0, ee(u, "props"), ee(u, "state"); var c = u.render; return u.render = function() { return function e(r) { var o = this; if (!0 === G) return r.call(this); function i() { var e = this; l = !1; var n = void 0, r = void 0; if (c.track(function() { F && (e.__$mobRenderStart = Date.now()); try { r = t._allowStateChanges(!1, u); } catch (e) { n = e; } F && (e.__$mobRenderEnd = Date.now()); }), n) throw J.emit(n), n; return r; } var a = this.displayName || this.name || this.constructor && (this.constructor.displayName || this.constructor.name) || "", s = this._reactInternalInstance && this._reactInternalInstance._rootNodeID || this._reactInternalInstance && this._reactInternalInstance._debugID || this._reactInternalFiber && this._reactInternalFiber._debugID; q(this, V, !1), q(this, W, !1); var u = r.bind(this), l = !1, c = new t.Reaction(a + "#" + s + ".render()", function() { if (!l && (l = !0, "function" == typeof o.componentWillReact && o.componentWillReact(), !0 !== o.__$mobxIsUnmounted)) { var e = !0; try { q(o, W, !0), o[V] || n.Component.prototype.forceUpdate.call(o), e = !1; } finally { q(o, W, !1), e && c.dispose(); } } }); return c.reactComponent = this, i[N] = c, this.render = i, i.call(this); }.call(this, c); }, o; } var ne = te(function(e) { var t = e.children, n = e.inject, o = e.render, i = t || o; if (void 0 === i) return null; if (!n) return i(); console.warn(" is no longer supported. Please use inject on the enclosing component instead"); var a = D(n)(i); return r.createElement(a, null); }); ne.displayName = "Observer"; var re, oe, ie = function e(t, n, r, o, i) { var a = "children" === n ? "render" : "children"; return "function" == typeof t[n] && "function" == typeof t[a] ? new Error("Invalid prop,do not use children and render in the same time in`" + r) : "function" != typeof t[n] && "function" != typeof t[a] ? new Error("Invalid prop `" + i + "` of type `" + m(t[n]) + "` supplied to `" + r + "`, expected `function`.") : void 0; }; function ae() { var e = this.constructor.getDerivedStateFromProps(this.props, this.state); null != e && this.setState(e); } function se(e) { this.setState(function t(n) { var r = this.constructor.getDerivedStateFromProps(e, n); return null != r ? r : null; }.bind(this)); } function ue(e, t) { try { var n = this.props, r = this.state; this.props = e, this.state = t, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(n, r); } finally { this.props = n, this.state = r; } } ne.propTypes = { render: ie, children: ie }, ae.__suppressDeprecationWarning = !0, se.__suppressDeprecationWarning = !0, ue.__suppressDeprecationWarning = !0; var le = { children: !0, key: !0, ref: !0 }, ce = (oe = re = function(e) { function t(e, n) { h(this, t); var r = S(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)); return r.state = {}, pe(e, r.state), r; } return y(t, e), g(t, [ { key: "render", value: function e() { return n.Children.only(this.props.children); } }, { key: "getChildContext", value: function e() { var t = {}; return pe(this.context.mobxStores, t), pe(this.props, t), { mobxStores: t }; } } ], [ { key: "getDerivedStateFromProps", value: function e(t, n) { if (!t) return null; if (!n) return t; if (Object.keys(t).filter(de).length !== Object.keys(n).filter(de).length && console.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"), !t.suppressChangedStoreWarning) for (var r in t) de(r) && n[r] !== t[r] && console.warn("MobX Provider: Provided store '" + r + "' has changed. Please avoid replacing stores as the change might not propagate to all children"); return t; } } ]), t; }(n.Component), re.contextTypes = { mobxStores: O }, re.childContextTypes = { mobxStores: O.isRequired }, oe); function pe(e, t) { if (e) for (var n in e) de(n) && (t[n] = e[n]); } function de(e) { return !le[e] && "suppressChangedStoreWarning" !== e; } if (function fe(e) { var t = e.prototype; if (!t || !t.isReactComponent) throw new Error("Can only polyfill class components"); if ("function" != typeof e.getDerivedStateFromProps && "function" != typeof t.getSnapshotBeforeUpdate) return e; var n = null, r = null, o = null; if ("function" == typeof t.componentWillMount ? n = "componentWillMount" : "function" == typeof t.UNSAFE_componentWillMount && (n = "UNSAFE_componentWillMount"), "function" == typeof t.componentWillReceiveProps ? r = "componentWillReceiveProps" : "function" == typeof t.UNSAFE_componentWillReceiveProps && (r = "UNSAFE_componentWillReceiveProps"), "function" == typeof t.componentWillUpdate ? o = "componentWillUpdate" : "function" == typeof t.UNSAFE_componentWillUpdate && (o = "UNSAFE_componentWillUpdate"), null !== n || null !== r || null !== o) { var i = e.displayName || e.name, a = "function" == typeof e.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()"; throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" + i + " uses " + a + " but also contains the following legacy lifecycles:" + (null !== n ? "\n " + n : "") + (null !== r ? "\n " + r : "") + (null !== o ? "\n " + o : "") + "\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks"); } if ("function" == typeof e.getDerivedStateFromProps && (t.componentWillMount = ae, t.componentWillReceiveProps = se), "function" == typeof t.getSnapshotBeforeUpdate) { if ("function" != typeof t.componentDidUpdate) throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"); t.componentWillUpdate = ue; var s = t.componentDidUpdate; t.componentDidUpdate = function e(t, n, r) { var o = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : r; s.call(this, t, n, o); }; } return e; }(ce), !n.Component) throw new Error("mobx-react requires React to be available"); if (!t.spy) throw new Error("mobx-react requires mobx to be available"); if ("object" === ("undefined" == typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ ? "undefined" : m(__MOBX_DEVTOOLS_GLOBAL_HOOK__))) { var me = { spy: t.spy, extras: { getDebugName: t.getDebugName } }, he = { renderReporter: j, componentByNodeRegistry: B, componentByNodeRegistery: B, trackComponents: Y }; __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(he, me); } e.propTypes = x, e.PropTypes = x, e.onError = function e(t) { return J.on(t); }, e.observer = te, e.Observer = ne, e.renderReporter = j, e.componentByNodeRegistery = B, e.componentByNodeRegistry = B, e.trackComponents = Y, e.useStaticRendering = function ge(e) { G = e; }, e.Provider = ce, e.inject = D, Object.defineProperty(e, "__esModule", { value: !0 }); }(t, n(2), n(1)); }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(53), i = n(82), a = n(92), s = (n(491), n(36)); if (a.globalScope.__styleClassInitialized) throw new Error("The StyleClass module has already been loaded.\nThis is most likely due to importing from '../twinkle' instead of 'twinkle'.\nIt can usually be found by checking the stacktrace below.\nOtherwise, run 'yarn ast-inspector' in /client"); a.globalScope.__styleClassInitialized = !0; var u = i.options.enableDevWarnings ? "Missing debug name. If you see this, it means the transformer is broken, or the call was made in another type of file. In that case, you need to pass it manually." : "Missing debug name"; function l(e) { return e && e.pushObjectsTo; } t.isStyleClass = l, t.countUsage = function c(e) { e && t.usageCounter.SurfaceStyle++; }, t.usageCounter = {}; var p = function() { function e() { 0; } return e.prototype.getNumericStyle = function(e, t) { var n = this.getStyleValue(e); return "number" != typeof n || isNaN(n) ? t : n; }, e; }(); t.StyleClass = p; var d = function(e) { function t() { return null !== e && e.apply(this, arguments) || this; } return r.__extends(t, e), t.prototype.getStyleValue = function(e, t) { var n = this.getStyle()[e]; return void 0 === n ? t : n; }, t.prototype.getNumericStyle = function(e, t) { var n = this.getStyle()[e]; return "number" == typeof n ? n : t; }, t; }(p); t.NonMergedStyleClass = d; var f = 1; t.staticStyles = {}; var m = {}, h = s.getBuildInfo().hasGetStyle(), g = {}, y = function(e) { function n(n, r) { var o = e.call(this) || this; return o.style = r, o.kind = "StaticStyle", o.isSentToNative = !1, o.id = f++, t.staticStyles[o.id + ""] = o, o; } return r.__extends(n, e), n.create = function(e, t) { return new n(t, e); }, n.hoist = function(e) { throw new Error("Not hoisted, are the custom transformers broken?"); }, n.prototype.resetHooks = function() { this.style = this.getStyle(), this.hookedStyle = void 0, this.isSentToNative = !1; }, n.prototype.PRIVATE_style = function() { return this.hookedStyle ? this.hookedStyle : this.hookStyle(); }, n.prototype.getStyle = function() { return h && this.style === g ? o.nativeApi.getStyle(this.id) || g : this.style; }, n.prototype.hookStyle = function() { return this.hookedStyle = i.options.styleHook(this.debugName, this.style), this.hookedStyle; }, n.prototype.sendToNative = function() { o.nativeApi.createStyle(this.hookedStyle, this.id), this.isSentToNative = !0, h && (this.hookedStyle = g, this.style = g); }, n.prototype.pushObjectsTo = function(e, n) { t.usageCounter[this.kind]++, this.hookedStyle || this.hookStyle(), n && !this.isSentToNative && this.sendToNative(), e.push(this.id); }, n.wrapLegacyStyle = function(e, t) { if (!t) throw new Error(u); if (m[t]) { if (i.options.enableDevWarnings) throw new Error("You cannot call StaticStyle.wrapLegacyStyle twice for the same style: " + t); return m[t]; } return m[t] = n.create(e, t); }, n.wrapLegacyStyleSheet = function(e, t) { if (!t) throw new Error(u); var r = {}; return Object.keys(e).forEach(function(o) { r[o] = n.wrapLegacyStyle(e[o], t + "_" + o); }), r; }, n; }(d); function S(e, n, r) { return void 0 === e && (e = t.emptyStyle), void 0 === n && (n = t.emptyStyle), e === t.emptyStyle ? n : n === t.emptyStyle ? e : new T(e, n, r); } t.StaticStyle = y, t.emptyStyle = new y("EmptyStyle", {}), t.emptyStyle.pushObjectsTo = function() {}, t.merge2 = S, t.merge3 = function v(e, n, r, o) { return void 0 === e && (e = t.emptyStyle), void 0 === n && (n = t.emptyStyle), void 0 === r && (r = t.emptyStyle), new E(e, n, r, o); }, t.merge4 = function b(e, n, r, o, i) { return void 0 === e && (e = t.emptyStyle), void 0 === n && (n = t.emptyStyle), void 0 === r && (r = t.emptyStyle), void 0 === o && (o = t.emptyStyle), new C(e, n, r, o, i); }; var _ = function(e) { function n(t, n) { var r = e.call(this) || this; return r.style = n, r.kind = "DynamicStyle", r; } return r.__extends(n, e), n.prototype.getStyle = function() { return this.style; }, n.create = function(e, t) { return new n(t, e); }, n.prototype.pushObjectsTo = function(e, n) { t.usageCounter[this.kind]++, e.push(i.options.styleHook(this.debugName, this.style)); }, n.maybeLegacyStyle = function(e, r) { if (!r) throw new Error(u); if (e) { if (Array.isArray(e)) { for (var o = void 0, i = 0, a = e; i < a.length; i++) { var s = a[i], c = n.maybeLegacyStyle(s, r); o = o ? S(o, c) : c; } return o || t.emptyStyle; } return l(e) ? e : n.wrapLegacyStyle(e, r); } return t.emptyStyle; }, n.wrapLegacyStyle = function(e, r) { return e ? n.create(e, r) : t.emptyStyle; }, n; }(d); t.DynamicStyle = _; var T = function(e) { function t(t, n, r) { var o = e.call(this) || this; return o.style1 = t, o.style2 = n, o.kind = "MergeStyle2", o; } return r.__extends(t, e), t.prototype.pushObjectsTo = function(e, t) { this.style1.pushObjectsTo(e, t), this.style2.pushObjectsTo(e, t); }, t.prototype.getStyleValue = function(e, t) { var n = this.style2.getStyleValue(e); return void 0 !== n ? n : this.style1.getStyleValue(e); }, t; }(p); t.MergeStyle2 = T; var E = function(e) { function t(t, n, r, o) { var i = e.call(this) || this; return i.style1 = t, i.style2 = n, i.style3 = r, i.kind = "MergeStyle3", i; } return r.__extends(t, e), t.prototype.pushObjectsTo = function(e, t) { this.style1.pushObjectsTo(e, t), this.style2.pushObjectsTo(e, t), this.style3.pushObjectsTo(e, t); }, t.prototype.getStyleValue = function(e, t) { var n = this.style3.getStyleValue(e); if (void 0 !== n) return n; var r = this.style2.getStyleValue(e); return void 0 !== r ? r : this.style1.getStyleValue(e); }, t; }(p); t.MergeStyle3 = E; var C = function(e) { function t(t, n, r, o, i) { var a = e.call(this) || this; return a.style1 = t, a.style2 = n, a.style3 = r, a.style4 = o, a.kind = "MergeStyle4", a; } return r.__extends(t, e), t.prototype.pushObjectsTo = function(e, t) { this.style1.pushObjectsTo(e, t), this.style2.pushObjectsTo(e, t), this.style3.pushObjectsTo(e, t), this.style4.pushObjectsTo(e, t); }, t.prototype.getStyleValue = function(e, t) { var n = this.style4.getStyleValue(e); if (void 0 !== n) return n; var r = this.style3.getStyleValue(e); if (void 0 !== r) return r; var o = this.style2.getStyleValue(e); return void 0 !== o ? o : this.style1.getStyleValue(e); }, t; }(p); t.MergeStyle4 = C; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(1), o = n(77), i = n(21), a = n(5), s = n(29), u = n(368), l = n(20), c = n(18), p = n(19); function d(e, t) { var n, r = u.useColorStyle(), o = l.isArabicLanguage() ? c.CommonStyles.arabicLetterSpacing : a.emptyStyle; return e.color && (n = a.DynamicStyle.create({ color: e.color }, "6fa32af1:52:21")), a.merge4(t.fontStyle(e.size || i.TextSize.M), n || r, a.DynamicStyle.maybeLegacyStyle(e.style, "6fa32af1:57:45"), o); } function f(e) { switch (e) { case s.TextType.LIGHT: case s.TextType.HEADER_LIGHT: return s.TextType.LIGHT; case s.TextType.NORMAL: case s.TextType.HEADER_NORMAL: return s.TextType.NORMAL; case s.TextType.EMPHASIS: return s.TextType.EMPHASIS; default: return s.TextType.NORMAL; } } t.Text = o.observer(function e(t) { var n = p.useTheme().getFonts(), o = d(t, t.font || t.type && n[t.type] || n[f(t.type)] || n.normal); return r.createElement("surface", { onClick: t.onClick, onMouseEnter: t.onMouseEnter, onMouseDown: t.onMouseDown, text: t.value, style: o }); }), t.useTextStyle = d, t.textToHeaderType = function m(e) { switch (e) { case s.TextType.NORMAL: case s.TextType.HEADER_NORMAL: case s.TextType.EMPHASIS: return s.TextType.HEADER_NORMAL; case s.TextType.LIGHT: case s.TextType.HEADER_LIGHT: return s.TextType.HEADER_LIGHT; default: return s.TextType.HEADER_NORMAL; } }, t.headerToTextType = f; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(5), a = n(5), s = n(9); function u(e, n) { void 0 === n && (n = t.COMPRESSED); var r = n ? 50 : 62, o = n ? 8 : 10; return Math.floor(r * e + o * (e - 1)); } function l(e, n) { void 0 === n && (n = t.COMPRESSED); var r = n ? 8 : 10; return Math.floor(e * r); } t.COMPRESSED = s.SpartaGlobals.bundleIsPC && !0, t.GUTTER = t.COMPRESSED ? 8 : 10, t.COLUMNS = 24, t.getWidth = u, t.getHeight = l, t.spacer = function c(e, n) { return void 0 === e && (e = 1), void 0 === n && (n = t.COMPRESSED), (n ? 8 : 10) * e; }; var p = a.StaticStyle.wrapLegacyStyleSheet({ row: { margin: [ 0, 0, t.GUTTER, 0 ], flexDirection: "row", flexWrap: "nowrap" }, colWithGutter: { margin: [ 0, t.GUTTER, 0, 0 ], flexDirection: "column", flexWrap: "nowrap" }, colWithoutGutter: { margin: [ 0, 0, 0, 0 ], flexDirection: "column", flexWrap: "nowrap" }, rowElementSpacing: { flewDirection: "row", justifyContent: "space-between" } }, "fe76dcdf:44:15"), d = {}, f = {}; t.Row = function m(e) { var t = e.height ? i.DynamicStyle.create(function n(e) { var t = d[e]; return t || (t = d[e] = { height: l(e) }), t; }(e.height), "fe76dcdf:93:39") : a.emptyStyle; return o.createElement("surface", r.__assign({ style: i.merge3(p.row, t, i.DynamicStyle.maybeLegacyStyle(e.style, "fe76dcdf:96:51")) }, e.surfaceProps || {}), e.children); }, t.Col = function h(e) { var t = e.width ? i.DynamicStyle.create(function n(e) { var t = f[e]; return t || (t = f[e] = { width: u(e) }), t; }(e.width), "fe76dcdf:111:37") : a.emptyStyle, r = !i.isStyleClass(e.style) && e.style && e.style.width ? p.colWithGutter : p.colWithoutGutter; return o.createElement("surface", { style: i.merge3(r, t, i.DynamicStyle.maybeLegacyStyle(e.style, "fe76dcdf:115:50")) }, e.children); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(71); t.SpartaContext = r.createContext("Sparta"); }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(36).getBuildInfo(); e.get("SpartaGlobals").info("Running " + r.buildConfig + " on " + r.platform); var o = r.isPC ? "PC" : r.isPS4 ? "PS4" : r.isXboxOne ? "XBOXONE" : "UNKNOWN", i = "PC" === o, a = "PS4" === o, s = "XBOXONE" === o, u = !i, l = o; t.SpartaGlobals = { bundleIsPC: i, bundleIsPS4: a, bundleIsXBOXONE: s, bundleIsConsole: u, bundlePlatform: l }; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(292), o = n(53), i = 0, a = 0; function s(e, t) { var n = {}; return e.forEach(function(e) { n[t(e)] = e; }), n; } function u(e, t) { var n = e.slice(); return n.sort(function(e, n) { return e[t] > n[t] ? 1 : -1; }), n; } var l = function() { function e() {} return e.byFBAction = function(t) { return e._byFBAction[t]; }, e.Accept = new r.Key("Accept", 13, 5, [ "OK", "TwinkleAccept" ], i++, a++, !1), e.Decline = new r.Key("Decline", 27, 7, [ "Back", "TwinkleDecline" ], i++, a++, !1), e.Option1 = new r.Key("Option1", 88, 6, [ "View", "TwinkleOption1" ], i++, a++, !1), e.Option2 = new r.Key("Option2", 89, 4, [ "Edit", "TwinkleOption2" ], i++, a++, !1), e.Option3 = new r.Key("Option3", 45, 10, [ "LThumb", "TwinkleOption3" ], i++, a++, !1), e.Option4 = new r.Key("Option4", 46, 11, [ "RThumb", "TwinkleOption4" ], i++, a++, !1), e.Previous = new r.Key("Previous", 33, 16, [ "TabLeft", "TwinklePrevious" ], i++, a++, !1), e.Next = new r.Key("Next", 34, 17, [ "TabRight", "TwinkleNext" ], i++, a++, !1), e.Home = new r.Key("Home", 36, 14, [ "MenuTriggerLeft", "TwinkleHome" ], i++, a++, !1), e.End = new r.Key("End", 35, 15, [ "MenuTriggerRight", "TwinkleEnd" ], i++, a++, !1), e.Up = new r.Key("Up", 38, 0, [ "NavigateUp", "TwinkleUp" ], i++, a++, !0), e.Down = new r.Key("Down", 40, 1, [ "NavigateDown", "TwinkleDown" ], i++, a++, !0), e.Left = new r.Key("Left", 37, 2, [ "NavigateLeft", "TwinkleLeft" ], i++, a++, !0), e.Right = new r.Key("Right", 39, 3, [ "NavigateRight", "TwinkleRight" ], i++, a++, !0), e.Select = new r.Key("Select", 8, 13, [ "Deactivate", "TwinkleSelect" ], i++, a++, !1), e.ScrollUp = new r.Key("ScrollUp", 47, 29, [ "NavigateRUp", "TwinkleScrollUp" ], i++, a++, !0), e.ScrollDown = new r.Key("ScrollDown", 48, 30, [ "NavigateRDown", "TwinkleScrollDown" ], i++, a++, !0), e.Start = new r.Key("Start", 32, 12, [ "Start", "TwinkleStart" ], i++, a++, !1), e.list = [ e.Accept, e.Decline, e.Option1, e.Option2, e.Option3, e.Option4, e.Previous, e.Next, e.Home, e.End, e.Up, e.Down, e.Left, e.Right, e.Select, e.ScrollUp, e.ScrollDown, e.Start ], e._byFBAction = [ s(e.list, function(e) { return e.fbAction[0]; }), s(e.list, function(e) { return e.fbAction[1]; }) ], e.byKeyCode = s(e.list, function(e) { return "" + e.keyCode; }), e.byPadCode = s(e.list, function(e) { return "" + e.padCode; }), e.prioritized = u(e.list, "priority"), e.ordered = u(e.list, "order"), e; }(); if (t.Keys = l, o.nativeApi.isEnterOnCircle()) { var c = l.Accept; l.Accept = l.Decline, l.Decline = c; } }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = function() { function e(e, t) { this.label = e.label, this.action = e.action, this.holdAction = e.holdAction, this.releaseAction = e.releaseAction, this.key = e.key, this.visible = e.visible, this.fontStyle = e.fontStyle, this.blockInputFor = "number" == typeof e.blockInputFor ? e.blockInputFor : 0, this.icon = e.icon, this.lowPriority = e.lowPriority, this.debugName = e.debugName; } return e.prototype.equals = function(e) { return this === e || this.label === e.label && this.action === e.action && this.holdAction === e.holdAction && this.releaseAction === e.releaseAction && this.key === e.key && this.visible === e.visible && this.blockInputFor === e.blockInputFor && this.fontStyle === e.fontStyle && this.icon === e.icon && this.lowPriority === e.lowPriority; }, e.prototype.extend = function(t) { return new e({ key: t.key || this.key, label: t.label || this.label, action: t.action || this.action, holdAction: t.holdAction || this.holdAction, releaseAction: t.releaseAction || this.releaseAction, visible: "boolean" == typeof t.visible ? t.visible : this.visible, blockInputFor: t.blockInputFor && t.blockInputFor > 0 ? t.blockInputFor : this.blockInputFor, fontStyle: t.fontStyle || this.fontStyle, lowPriority: t.lowPriority || this.lowPriority, debugName: t.debugName ? t.debugName + "_extended" : void 0 }); }, e; }(); function o(e) { return Boolean(e.action && e.label); } t.Input = r, t.isInputWithAction = o, t.filterInputWithAction = function i(e) { return e.filter(o); }; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(2), i = n(5), a = n(17); t.bbOfflineUrl = a.bbOfflineUrl, t.bbUrl = a.bbUrl; var s = n(7), u = n(21), l = n(29), c = n(24), p = n(105), d = n(492), f = n(493), m = n(14), h = n(9), g = n(291), y = n(41), S = n(10), v = "Missing debug name"; function b(e, t, n) { var r = o.observable.box(n, { deep: !1 }); Object.defineProperty(e, t, { enumerable: !0, configurable: !0, get: function() { var e = r.get(); return C.is(e) ? e.getHotReloadableValue() : e; }, set: function(e) { r.set(e); } }); } function _(e) { Object.keys(e).forEach(function(t) { try { var n = e[t]; C.is(n) && n.getCacheableValue(), b(e, t, e[t]); } catch (n) { throw console.error("Error setting up attribute " + t + " in " + e.name), n; } }); } function T(e) { Object.keys(e).forEach(function(t) { var n = e[t]; C.is(n) && (e[t] = n.getCacheableValue()); }); } t.templateFiles = {}, t.Constants = { isPC: h.SpartaGlobals.bundleIsPC, isPS4: h.SpartaGlobals.bundleIsPS4, isXBOXONE: h.SpartaGlobals.bundleIsXBOXONE, useConsoleMenu: p.useConsoleMenu, CompressedDisabled: h.SpartaGlobals.bundleIsPC && !1, LINE_HEIGHTS: u.LINE_HEIGHTS, ELLIPSIS_OFFSET: d.ELLIPSIS_OFFSET, TextSize: u.TextSize, TextType: l.TextType, CardSize: g.CardSize, OldCardSize: y.CardSize, Keys: S.Keys, tweenOptions: { presets: m.Animation.presets, default: m.Animation.defaultTweenOptions } }, t.Grid = { getWidth: s.getWidth, getHeight: s.getHeight, GUTTER: s.GUTTER, COLUMNS: s.COLUMNS, COMPRESSED: s.COMPRESSED, spacer: s.spacer }, t.LayoutBounds = { header: c.header, footer: c.footer, content: c.content, tallContent: c.tallContent, screen: c.screen, background: c.background, fadeAreaTop: c.fadeAreaTop, fadeAreaBottom: c.fadeAreaBottom, safeZone: c.safeZone, dangerZoneSize: c.dangerZoneSize, tabs: c.tabs, mainMenu: c.mainMenu, input: c.input, logo: c.logo, userBar: c.userBar, startScreenLogo: c.startScreenLogo }, t.withDefault = function E(e, t) { return void 0 === e ? t : e; }, t.makeAttributeObservable = b, t.makeTemplateHotReloadable = _, t.makeTemplateCached = T; var C = function() { function e() {} return e.is = function(e) { return e && e.getHotReloadableValue && e.getCacheableValue; }, e; }(), I = function() { return function e(t) { this.func = t; var n = this; this.reaction = new o.Reaction("mobx cache", function() { this.track(function() { n.cachedValue = t(); }); }), this.reaction.runReaction(); }; }(), A = function(e) { function t(t, n) { var r = e.call(this) || this; return r.getter = t, r.debugId = n, r; } return r.__extends(t, e), t.prototype.getHotReloadableValue = function() { var e = this; return this.cache || (this.cache = new I(function() { return e.getCacheableValue(); })), this.cache.cachedValue; }, t.prototype.getCacheableValue = function() { return this.getter(); }, t; }(C); t.WrappedGetter = A; var w = function(e) { function t(t, n) { var r = e.call(this) || this; return r.getter = t, r.debugId = n, r; } return r.__extends(t, e), t.prototype.getHotReloadableValue = function() { var e = this; return this.cache || (this.cache = new I(function() { return e.getCacheableValue(); })), this.cache.cachedValue; }, t.prototype.getCacheableValue = function() { return { events: this.getter(), debugName: this.debugId }; }, t; }(C); t.TimelineWrapper = w; var P = function(e) { function t(t, n) { var r = e.call(this) || this; return r.baseFunc = t, r.conditional = n, r; } return r.__extends(t, e), t.prototype.getHotReloadableValue = function() { var e = this; return this.cache || (this.cache = new I(function() { return e.baseFunc(); })), this.getMerged(this.cache.cachedValue); }, t.prototype.getCacheableValue = function() { return this.getMerged(this.baseFunc()); }, t.prototype.getMerged = function(e) { var t = this; return function(n) { return new i.MergeStyle2(e, t.conditional(n)); }; }, t; }(C); t.StyleFuncWrapper = P, t.multistyle = function R(e) { return new L(e); }, t.multistyle2 = function O(e) { return new L(e); }, t.multistyle3 = function x(e) { return new L(e); }, t.multistyle4 = function k(e) { return new L(e); }, t.multistyle5 = function M(e) { return new L(e); }; var L = function(e) { function t(t) { var n = e.call(this) || this; return n.conditional = t, n.cache = {}, n; } return r.__extends(t, e), t.prototype.wrapInCache = function(e) { var t = this.cache; return function(n, r, o, i, a) { var s = n + "" + r + o + i + a, u = t[s]; return u || (u = t[s] = e(n, r, o, i, a)), u; }; }, t.prototype.getHotReloadableValue = function() { var e = this; return this.wrapInCache(function(t, n, r, i, a) { var s; return new o.Reaction("multistyle cache", function() { this.track(function() { delete e.cache[t + "" + n + r + i + a], s = e.conditional(t, n, r, i, a); }); }).runReaction(), s; }); }, t.prototype.getCacheableValue = function() { return this.wrapInCache(this.conditional); }, t; }(C); function D(e, t) { return new A(e, t || "wrap"); } t.timeline = function N(e, t) { if (!t) throw new Error(v); return new w(e, t); }, t.tween = function F(e, t, n, r, o, i, a, s) { return void 0 === s && (s = []), new f.ChainedTween(e, t, n, r, o, i, a, s); }, t.sleep = function G(e, t) { return void 0 === t && (t = []), new f.ChainedSleep(e, t); }, t.trigger = function U(e, t) { return new f.TriggerEvent(e, t); }, t.tweenSwitch = m.Animation.tweenSwitch, t.wrap = D, t.template = function B(e) { return e; }, t.merge = function j(e, t, n) { return new i.MergeStyle2(e, t, n); }, t.value = function H(e, t) { if (!t) throw new Error(v); return new A(e, t); }, t.valuefunc = function z(e) { return e; }, t.frames = function V(e) { return e / 60 * 1e3; }, t.dynamicStyle = function W(e, t) { if (!t) throw new Error(v); return i.DynamicStyle.create(e, t); }; var q = !1; t.enableHotReload = function K(e) { q = e; }, t.isHotReloadingEnabled = function X() { return q; }, t.Template = function Y(e) { var n = {}; return t.templateFiles[e] = n, { wrap: D, style: function(e) { n[e.name] = e, q ? _(e) : T(e); } }; }, t.TemplateUpdate = function J(n) { return e.log("Reloading template " + n), { wrap: D, style: function(e) { var r = t.templateFiles[n]; if (!r) throw new Error("Could not find template file: " + n); var o = r[e.name]; if (!o) throw new Error("Could not find template: " + e.name); return Object.keys(e).forEach(function(t) { var n = e[t]; o[t] ? o[t] = n : b(o, t, n); }), o; } }; }, t.style = function Q(e, t) { if (!t) throw new Error(v); return i.StaticStyle.create(e, t); }, t.stylefunc = function Z(e, t) { return new P(e, t); }; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(909), o = n(501), i = n(502), a = n(910), s = n(911), u = n(912), l = n(913), c = n(504), p = n(925), d = n(926), f = n(927), m = n(251), h = n(928), g = n(929), y = n(113), S = n(930), v = n(931), b = n(512), _ = n(513), T = n(934), E = n(935), C = n(936), I = n(937), A = n(940), w = n(941), P = n(942), R = n(943), O = n(944), x = n(945), k = n(946), M = n(27), L = n(948), D = n(949), N = n(952), F = n(387), G = n(956), U = n(960), B = n(521), j = n(522), H = n(380), z = n(65), V = n(961), W = n(151), q = n(969), K = n(62), X = n(970), Y = n(971), J = n(391), Q = n(972), Z = n(524), $ = n(973), ee = n(974), te = n(515), ne = n(975), re = n(976), oe = n(977), ie = n(978), ae = n(146), se = n(979), ue = n(980), le = n(983), ce = n(984), pe = n(985), de = n(986), fe = n(988), me = n(989), he = n(990), ge = n(991), ye = n(992), Se = n(993), ve = n(994), be = n(526), _e = n(995), Te = n(997), Ee = n(289), Ce = n(998), Ie = n(1e3), Ae = n(1002), we = n(1004), Pe = n(1006), Re = n(1008), Oe = n(1010), xe = n(1012), ke = n(36), Me = n(395), Le = n(57), De = n(1013), Ne = n(28), Fe = n(1014), Ge = n(255), Ue = n(1018), Be = n(1020), je = n(1021), He = n(1022), ze = n(1025), Ve = n(1026), We = n(1028), qe = n(1029), Ke = n(1030), Xe = n(1048), Ye = n(1049), Je = n(1050), Qe = n(219), Ze = n(150), $e = n(1055), et = n(1056), tt = n(1057), nt = n(1058), rt = n(1059), ot = n(124); t.gatewayState = new m.GatewayState(), t.settingsStore = new o.SettingsStore(K.frostbite, y.coreEventStore, t.gatewayState), t.gameStore = new r.GameStore(), t.routeStore = new a.RouteStore(), t.locationStore = new i.LocationStore(t.routeStore, Ne.focusSystem), t.nativePropertiesStore = new S.NativePropertiesStore(t.gameStore), t.hostingGameStore = new P.HostingGameStore(t.nativePropertiesStore); var it = new De.OriginAccountFlow(K.frostbite, function() { return t.hostingGameStore.game; }); t.presenceStateStore = new b.PresenceStateStore(it), t.userStore = new f.UserStore(), t.onlineState = new p.OnlineState(function() { return ke.getBuildInfo(); }, t.gatewayState, t.userStore, t.presenceStateStore), t.spartaActivatedStore = new R.SpartaActivatedStore(K.frostbite, t.hostingGameStore, W.gameDataStore, t.onlineState), t.gameStateStoreLoader = new O.GameStateStoreLoader(t.nativePropertiesStore), t.partyStoreLoader = new ce.PartyStoreLoader(t.nativePropertiesStore), t.layoutVisibilityStore = new v.LayoutVisibilityStore(K.frostbite, t.gameStateStoreLoader, t.spartaActivatedStore), t.popupStore = new N.PopupStore(t.spartaActivatedStore, t.gameStateStoreLoader, t.layoutVisibilityStore), t.layoutStateStore = new s.LayoutStateStore(t.nativePropertiesStore, t.locationStore, t.routeStore, t.settingsStore, t.popupStore), t.entitlementStore = new k.EntitlementStore(L.createClient(M.request)), t.freemiumStore = new w.FreemiumStore(t.settingsStore, t.layoutStateStore, t.gameStore, t.partyStoreLoader, function(e) { return t.entitlementStore.hasPremiumAccess(e); }), t.medalStore = new x.MedalStore(function() { return t.settingsStore.getServerAdjustedTimestamp(); }, function(e) { return t.gameStore.getGame(e); }), t.matchmakingManager = new B.MatchmakingManager(t.gameStore), t.crosslaunchManager = new F.CrosslaunchManager(t.entitlementStore, t.gameStore), t.serverDetailsStore = new de.ServerDetailsStore(pe.createServerDetailsClient(M.request)), t.expansionStore = new Ce.ExpansionStore(Ie.expansionClient); var at = function() { return function e(n) { var r = this; this.twinkle = n, this.gatewayState = t.gatewayState, this.nowStore = new se.NowStore(), this.localeState = ae.localeState, this.gameStore = t.gameStore, this.routeStore = t.routeStore, this.locationStore = t.locationStore, this.nativePropertiesStore = t.nativePropertiesStore, this.hostingGameStore = t.hostingGameStore, this.spartaActivatedStore = t.spartaActivatedStore, this.menuItemMarkerSyncAnimation = new $e.MenuItemMarkerSyncAnimation(), this.gameStateStoreLoader = t.gameStateStoreLoader, this.partyStoreLoader = t.partyStoreLoader, this.popupStore = t.popupStore, this.layoutStateStore = t.layoutStateStore, this.storeAvailabilityStore = Me.storeAvailabilityStore, this.gaStore = new ne.GAStore(Ue.uuidPromise, Ue.gaClients), this.pinStore = new Be.PinStore(Ue.uuidPromise, je.createClients(M.request), this.nativePropertiesStore, this.locationStore), this.backgroundMusicStore = new l.BackgroundMusicStore(this.nativePropertiesStore, this.twinkle), this.shortcutKitsStore = new u.ShortcutKitsStore(), this.resumablePurchasesStore = new Q.ResumablePurchasesStore(J.getResumablePurchasesClient, J.completePendingPurchaseClient), this.inputPatternStore = new g.InputPatternStore(), this.inputStore = new h.InputStore(Ne.focusSystem, this.inputPatternStore), this.inputRouter = new X.InputRouter(this.nativePropertiesStore, this.twinkle.inputHandler, this.twinkle.buildInfo, this.twinkle.frostbite, this.twinkle.focus, this.inputStore), this.presenceStateStore = t.presenceStateStore, this.layoutVisibilityStore = t.layoutVisibilityStore, this.protocolVersionStore = A.createProtocolVersionStore(this.gameStore, this.nativePropertiesStore), this.userStore = t.userStore, this.onlineState = t.onlineState, this.careerStore = new G.CareerStore(Ye.createCareerClient(M.request), this.onlineState, this.gameStateStoreLoader), this.friendStore = new d.FriendStore(this.userStore, this.onlineState), this.settingsStore = t.settingsStore, this.feedStore = new C.FeedStore(this.friendStore, this.gameStore, this.partyStoreLoader, this.protocolVersionStore, this.onlineState), this.platoons = new Ke.PlatoonsInstance(this.settingsStore, this.onlineState, this.nativePropertiesStore, this.gameStore), this.titleState = new be.TitleState(), this.entitlementStore = t.entitlementStore, this.freemiumStore = t.freemiumStore, this.telemetry = new Qe.TelemetryStore(this.gaStore, this.pinStore, this.entitlementStore, this.nativePropertiesStore, this.locationStore, this.freemiumStore, this.settingsStore, this.presenceStateStore, this.onlineState, Ze.telemetryStoreLoader, this.twinkle.buildInfo), this.pingSiteStore = new et.PingSiteStore(tt.createPingSiteClient(M.request), this.gatewayState, this.gameStore), this.recommendationStore = new _.RecommendationStore(T.createRecommendationTrackingClient(M.request), re.createClient(M.request), re.createPreviewClient(M.request), this.nativePropertiesStore, this.feedStore, this.telemetry, this.platoons, this.pingSiteStore), this.serverCountStore = new I.ServerCountStore(this.recommendationStore, this.protocolVersionStore), this.popupManager = new Le.PopupManager(this.twinkle, this.spartaActivatedStore, this.inputStore, this.telemetry), this.medalStore = t.medalStore, this.gamePushNotifications = new j.GamePushNotifications(y.coreEventStore, this.gatewayState), this.matchmakingManager = t.matchmakingManager, this.crosslaunchManager = t.crosslaunchManager, this.gameJoinNoticeState = new D.GameJoinNoticeState(this.matchmakingManager), this.installStateStore = new E.InstallStateStore(this.twinkle.frostbite, this.nativePropertiesStore), this.joinFlowLoader = new V.JoinFlowLoader({ twinkle: this.twinkle, nativePropertiesStore: this.nativePropertiesStore, matchmakingManager: this.matchmakingManager, presenceStateStore: this.presenceStateStore, gameStateStoreLoader: this.gameStateStoreLoader, partyStoreLoader: this.partyStoreLoader, freemiumStore: this.freemiumStore, crosslaunchManager: this.crosslaunchManager, installStateStore: this.installStateStore, gamePushNotifications: this.gamePushNotifications, popupManager: this.popupManager, canPlayAsCommander: function(e) { return r.careerStore.canPlayAsCommander(e); }, hasPremiumAccess: function(e) { return t.entitlementStore.hasPremiumAccess(e); } }), this.gameViewComponentStore = new U.GameViewComponentStore(this.matchmakingManager, this.gameStateStoreLoader, this.gameStore), this.gameViewCountdownWidgetStore = new qe.GameViewCountdownWidgetStore(this.gameStateStoreLoader), this.gameDataStore = W.gameDataStore, this.blackFadeState = new q.BlackFadeState(), this.socialState = new H.SocialState(this.twinkle, this.inputRouter, this.friendStore, this.onlineState, this.gameDataStore, this.presenceStateStore, this.gameStateStoreLoader, this.partyStoreLoader, this.matchmakingManager, this.entitlementStore, this.nativePropertiesStore, this.installStateStore, this.popupManager, z.supportsSpectating, this.blackFadeState, this.layoutStateStore), this.comCenterState = new c.ComCenterState(this.inputRouter, this.layoutVisibilityStore, this.gameStateStoreLoader, this.partyStoreLoader, this.friendStore, this.presenceStateStore, this.installStateStore, this.nativePropertiesStore, this.socialState), this.offersStore = new ue.OffersStore(le.createClient(M.firstPartyRequest), this.localeState), this.ps4StoreIconStore = new Y.PS4StoreIconStore(this.layoutVisibilityStore, this.gameStateStoreLoader, this.layoutStateStore, this.socialState, this.popupManager, this.blackFadeState, this.twinkle.frostbite, this.twinkle.buildInfo), this.coreEventStore = y.coreEventStore, this.countdownState = new oe.CountdownState(this.nowStore), this.backgroundStore = new ie.BackgroundStore(this.nativePropertiesStore, this.onlineState, this.coreEventStore, M.request), this.serverFilterOptionsStore = new ee.ServerFilterOptionsStore(new Z.GameDataServerFilterOptionsStore(this.gameStore, this.gameDataStore), new $.PopulatedServerFilterOptionsStore()), this.serverFilterStore = new te.ServerFilterStore(this.serverFilterOptionsStore, this.gameStore, this.pingSiteStore, this.onlineState), this.serversSortStore = new he.ServersSortStore(), this.serversStore = new me.ServersStore(this.twinkle, fe.createServersClient(M.request), this.protocolVersionStore, this.gameStore, this.serverFilterStore), this.bookmarkedServersStore = new ge.BookmarkedServersStore(ve.createBookmarkedServersClient(M.request)), this.serverHistoryStore = new Se.ServerHistoryStore(ye.createServerHistoryClient(t.onlineState)), this.serverDetailsStore = t.serverDetailsStore, this.bundleUpdateStore = Ee.bundleUpdateStore, this.noticeStore = new _e.NoticeStore(Te.createNoticeClient(M.request), this.gameStore, this.bundleUpdateStore, this.gameStateStoreLoader), this.premiumFriendsStore = new Ae.PremiumFriendsStore(we.premiumFriendsClient), this.expansionStore = t.expansionStore, this.viewState = new Pe.ViewState(this.layoutStateStore, new Pe.ViewComponentState("0", null), new Pe.ViewComponentState("1", null), new Pe.ViewComponentState("2", null), new Pe.ViewComponentState("3", null)), this.takeoverStore = new Re.TakeoverStore(Oe.takeoverClients, this.nativePropertiesStore, this.settingsStore), this.subscriptionStatusStore = new xe.SubscriptionStatusStore(xe.createSubscriptionStatusClient(M.request), this.twinkle, this.onlineState), this.originAccountFlow = it, this.startScreenStore = new Fe.StartScreenStore({ twinkle: this.twinkle, spartaActivatedStore: this.spartaActivatedStore, hostingGameStore: this.hostingGameStore, blackFadeState: this.blackFadeState, onlineState: this.onlineState, takeoverStore: this.takeoverStore, bundleUpdateStore: this.bundleUpdateStore, originAccountFlow: this.originAccountFlow, popupManager: this.popupManager, installStateStore: this.installStateStore, tryShowLegal: function() { return Ge.tryShowLegal(); } }), this.gameMixStore = new He.GameMixStore(He.createClient(M.request), this.gameDataStore, this.protocolVersionStore), this.gameHintStore = new Xe.GameHintStore(), this.serverPresenceStore = new ze.ServerPresenceStore(this.onlineState, this.friendStore, this.userStore, this.gameStateStoreLoader, this.gamePushNotifications, ze.createFetchServerPresenceClient(M.request)), this.userStateStore = new Ve.UserStateStore(We.createUserStateClients(M.request)), this.savedFiltersStore = new Je.SavedFiltersStore(), this.environmentInfoStore = new nt.EnvironmentInfoStore(rt.createClient(M.request)), this.copyStore = new ot.CopyStore(this.localeState, this.coreEventStore, this.twinkle.buildInfo), this.telemetry.setupTelemetryForAdvancedSearch(this.serversStore, this.serverFilterStore); }; }(); t.CoreStores = at; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(871), a = n(23), s = n(5), u = n(70), l = n(76), c = n(9), p = 0, d = { easing: a.Easing.CubicInOut, duration: 22 / 60 * 1e3 }, f = { transition: r.__assign({}, d, { duration: d.duration / 1.5 }), trickleUp: { values: { opacity: { from: 0, to: 1 }, translateY: { from: 80, to: 0 } }, options: d }, slideRight: { values: { opacity: { from: 0, to: 1 }, translateX: { from: -91, to: 0 } }, options: r.__assign({}, d, { delay: 500 }) }, list: { enter: { duration: d.duration / 4 }, leave: { duration: d.duration / 2 }, scroll: { easing: a.Easing.Linear, duration: d.duration / 4 } }, text: { scroll: { duration: d.duration / 2, easing: a.Easing.CubicOut } }, focusables: { enter: { default: { duration: c.SpartaGlobals.bundleIsPC ? d.duration / 4 : d.duration / 2.5 }, fast: { easing: a.Easing.SineInOut, duration: d.duration / 4 }, slow: { duration: d.duration / 2 } }, leave: { easing: a.Easing.SineInOut, duration: d.duration / 2 } }, press: { duration: c.SpartaGlobals.bundleIsPC ? d.duration / 10 : d.duration / 5 } }, m = function() { function e() {} return e.number = { subtract: function(e, t) { return e - t; }, magnitude: function(e) { return Math.abs(e); } }, e.vector = { subtract: function(e, t) { e = i.ensureVector(e), t = i.ensureVector(t); for (var n = Math.max(e.length, t.length), r = [ 0, 0, 0, 0 ], o = 0; o < n; o++) r[o] = (e[o] || 0) - (t[o] || 0); return r; }, magnitude: function(e) { var t = (e = i.ensureVector(e)).reduce(function(e, t) { return Math.abs(e) + Math.pow(t, 2); }, 0); return Math.sqrt(t); } }, e; }(), h = function() { function t() {} return t.calculateSpeed = function(e, t, n) { void 0 === n && (n = d.duration); var r = 0; return "number" == typeof e && "number" == typeof t ? r = m.number.magnitude(m.number.subtract(t, e)) : Array.isArray(e) && Array.isArray(t) && (r = m.vector.magnitude(m.vector.subtract(t, e))), r / (n || 1); }, t.tweenBetween = function(e, n) { return r.__assign({}, d, { to: n, from: e, speed: t.calculateSpeed(e, n), duration: null }); }, t.tweenSwitchStyle = function(e, n, r, o, i, a, u) { void 0 === i && (i = !1), void 0 === a && (a = {}), void 0 === u && (u = {}); var l = {}; return l[n] = t.tweenSwitch(r, o, i, a, u), s.DynamicStyle.wrapLegacyStyle(l, e); }, t.tweenSwitch = function(n, o, i, a, s) { void 0 === i && (i = !1), void 0 === a && (a = {}), void 0 === s && (s = {}); var u = i ? a : s, l = r.__assign({}, d, u), c = t.calculateSpeed(n, o, l.duration); return c <= 0 ? ("string" == typeof n && "string" == typeof o || e.warn("Performing Animation.tweenSwitch with negative or 0 speed"), r.__assign({}, l, { to: i ? o : n })) : r.__assign({}, l, { to: i ? o : n, speed: c, duration: null }); }, t.tweenTo = function(e, t) { return r.__assign({}, d, { to: e }, t); }, t.tween = function(e, t, n) { return new l.Tween(e + "_" + p++, t, r.__assign({}, d, n)); }, t.lazyTween = function(e, t, n, o) { var i = new l.LazyTween(t + "_" + p++, n, function() { return o ? r.__assign({}, d, o()) : d; }); return u.addLifecycleHook(e, "componentWillUnmount", function() { return i.destroy(); }), i; }, t.componentTween = function(e, t, n, o) { var i = new l.Tween(t + "_" + p++, n, r.__assign({}, d, o)); return u.addLifecycleHook(e, "componentWillUnmount", function() { return i.destroy(); }), i; }, t.defaultTweenOptions = d, t.presets = f, t; }(); t.Animation = h, t.useTween = function g(e, t, n) { var i = o.useState(function() { return new l.Tween(e + "_hook_" + p++, t, r.__assign({}, d, n)); })[0]; return o.useEffect(function() { return function() { return i.destroy(); }; }, []), i; }; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(129); e.exports = r.__Logger; }, function(e, t, n) { var r = n(56), o = n(51), i = n(111), a = n(102), s = n(159), u = function(e, t, n) { var l, c, p, d, f = e & u.F, m = e & u.G, h = e & u.S, g = e & u.P, y = e & u.B, S = m ? r : h ? r[t] || (r[t] = {}) : (r[t] || {}).prototype, v = m ? o : o[t] || (o[t] = {}), b = v.prototype || (v.prototype = {}); for (l in m && (n = t), n) p = ((c = !f && S && void 0 !== S[l]) ? S : n)[l], d = y && c ? s(p, r) : g && "function" == typeof p ? s(Function.call, p) : p, S && a(S, l, p, e & u.U), v[l] != p && i(v, l, d), g && b[l] != p && (b[l] = p); }; r.core = o, u.F = 1, u.G = 2, u.S = 4, u.P = 8, u.B = 16, u.W = 32, u.U = 64, u.R = 128, e.exports = u; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(489); n(53), e.get("bbUrl"); t.bbUrl = function bbUrl(e) { return r.onlinePrefix, r.onlinePrefix + e; }, t.bbOfflineUrl = function bbOfflineUrl(e) { return r.offlinePrefix, r.offlinePrefix + e; }; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(12), i = o.Template("UIStyles"), a = function() { function e() {} return e.children = o.wrap(function() { return o.style({ flex: 1, zOffset: 2 }, "036349e9:19:33"); }), e.glow = o.wrap(function() { return o.style({ position: "absolute", bottom: -9, left: -9, right: -9, top: -9, zOffset: 1, texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/card-border-blur-42d30442.png"), textureMode: "fill", textureBorder: [ 12, 12, 12, 12 ] }, "036349e9:26:29"); }), e = r.__decorate([ i.style ], e); }(); t.PressableStyles = a; var s = function() { function e() {} return e.box = o.wrap(function() { return o.style({ height: o.Grid.getHeight(21), padding: [ 10, 10, 10, 10 ] }, "036349e9:43:28"); }), e.infoText = o.wrap(function() { return o.style({ textAlignForRTL: "left", opacity: .66 }, "036349e9:50:33"); }), e.text = o.wrap(function() { return o.style({ textAlignForRTL: "left" }, "036349e9:57:29"); }), e.smallImage = o.wrap(function() { return o.style({ height: 64 }, "036349e9:63:35"); }), e.dock = o.wrap(function() { return o.style({ position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, "036349e9:69:29"); }), e = r.__decorate([ i.style ], e); }(); t.HighlightCardStyles = s; var u = function() { function e() {} return e.container = o.wrap(function() { return o.style({ marginRight: o.Grid.GUTTER, marginBottom: o.Grid.GUTTER }, "036349e9:82:34"); }), e.children = o.wrap(function() { return o.style({ justifyContent: "flex-end" }, "036349e9:89:33"); }), e = r.__decorate([ i.style ], e); }(); t.CardStyles = u; var l = function() { function e() {} var t; return t = e, e.defaultAvatar = o.value(function() { return o.bbOfflineUrl("/sparta/assets/ui/avatars/default-76365f9d.jpg"); }, "036349e9:98:27"), e.defaultSize = o.value(function() { return o.Grid.getHeight(4); }, "036349e9:99:25"), e.indicatorWidth = o.value(function() { return 2; }, "036349e9:100:28"), e.indicatorSpacing = o.value(function() { return 2; }, "036349e9:101:30"), e.bgColor = o.value(function() { return { Joinable: "#02A0E2", Playing: "#02A0E2", Online: "#007F00", Away: "#DC453E", Offline: "#B3B3B3", Default: "#00000000" }; }, "036349e9:103:21"), e.container = o.stylefunc(function() { return o.style({ position: "relative", textureMode: "cover", textureAtlas: "AvatarAtlas" }, "036349e9:113:14"); }, function(e) { return o.dynamicStyle({ texture: e.texture, width: e.size, height: e.size, marginLeft: e.showPresence ? t.indicatorSpacing + t.indicatorSpacing : void 0 }, "036349e9:119:77"); }), e.presence = o.multistyle(function(e) { return o.style({ zOffset: 1, width: t.indicatorWidth, position: "absolute", top: 0, bottom: 0, left: -(t.indicatorWidth + t.indicatorSpacing), backgroundColor: t.bgColor[e] }, "036349e9:130:82"); }), e = t = r.__decorate([ i.style ], e); }(); t.AvatarStyles = l; var c = function() { function e() {} return e.avatar = o.wrap(function() { return o.style({ backgroundColor: [ 0, 0, 0, 124 ], marginRight: o.Grid.GUTTER / 2 }, "036349e9:145:31"); }), e.avatarContainer = o.wrap(function() { return o.style({ flexDirection: "row", flexWrap: "wrap", zOffset: 51, marginBottom: o.Grid.GUTTER }, "036349e9:152:40"); }), e = r.__decorate([ i.style ], e); }(); t.PlayCardStyles = c; var p = function() { function e() {} return e.margin = o.value(function() { return [ o.Grid.spacer(), 0, o.Grid.spacer(), 0 ]; }, "036349e9:164:20"), e.container = o.stylefunc(function() { return o.style({ flex: 1, alignItems: "center", justifyContent: "center", paddingBottom: o.Grid.getHeight(2) }, "036349e9:167:14"); }, function(e) { return o.dynamicStyle({ height: e.centerVertically ? o.LayoutBounds.content.height : void 0 }, "036349e9:178:49"); }), e.text = o.stylefunc(function() { return o.style({ marginBottom: o.Grid.spacer(), textAlign: "center", textAlignForRTL: "center", textLetterSpacing: 2 }, "036349e9:185:14"); }, function(e) { return o.dynamicStyle({ width: e.textWidth || o.Grid.getWidth(24) }, "036349e9:192:41"); }), e.subText = o.stylefunc(function() { return o.style({ margin: [ o.Grid.spacer(), 0, o.Grid.spacer(), 0 ], textAlign: "center", textAlignForRTL: "center", opacity: .66 }, "036349e9:199:14"); }, function(e) { return o.dynamicStyle({ width: e.textWidth || o.Grid.getWidth(24) }, "036349e9:206:41"); }), e.subTextType = o.value(function() { return o.Constants.TextType.NORMAL; }, "036349e9:212:25"), e.btn = o.wrap(function() { return o.style({ margin: [ o.Grid.spacer(2), 0, o.Grid.spacer(), 0 ], width: o.Grid.getWidth(4) }, "036349e9:214:28"); }), e = r.__decorate([ i.style ], e); }(); t.EmptyStateStyles = p; var d = function() { function e() {} return e.blendModeAdditive = o.wrap(function() { return o.style({ blendMode: "gpu-blend-mode", gpuBlendColorOp: "add", gpuBlendAlphaOp: "add", gpuBlendSourceColor: "one", gpuBlendDestColor: "one", gpuBlendSourceAlpha: "zero", gpuBlendDestAlpha: "one" }, "036349e9:225:42"); }), e.flexRow = o.wrap(function() { return o.style({ flexDirection: "row" }, "036349e9:236:32"); }), e.flexColumn = o.wrap(function() { return o.style({ flexDirection: "column" }, "036349e9:237:35"); }), e.flex0 = i.wrap(function() { return o.style({ flex: 0 }, "036349e9:238:19"); }), e.flex1 = i.wrap(function() { return o.style({ flex: 1 }, "036349e9:239:19"); }), e.flex4 = i.wrap(function() { return o.style({ flex: 4 }, "036349e9:240:19"); }), e.flex5 = i.wrap(function() { return o.style({ flex: 5 }, "036349e9:241:19"); }), e.flex7 = i.wrap(function() { return o.style({ flex: 7 }, "036349e9:242:19"); }), e.justifyContentFlexStart = o.wrap(function() { return o.style({ justifyContent: "flex-start" }, "036349e9:243:48"); }), e.justifyContentFlexEnd = o.wrap(function() { return o.style({ justifyContent: "flex-end" }, "036349e9:244:46"); }), e.justifyContentCenter = o.wrap(function() { return o.style({ justifyContent: "center" }, "036349e9:245:45"); }), e.justifyContentSpaceBetween = o.wrap(function() { return o.style({ justifyContent: "space-between" }, "036349e9:246:51"); }), e.noLocalBounds = o.wrap(function() { return o.style({ localBounds: !1 }, "036349e9:247:38"); }), e.disableMouseEvents = o.wrap(function() { return o.style({ enableMouseEvents: !1 }, "036349e9:248:43"); }), e.mouseEvents = o.multistyle(function(e) { return o.style({ enableMouseEvents: e }, "036349e9:249:58"); }), e.leftAlignTextRTL = o.wrap(function() { return o.style({ textAlignForRTL: "left" }, "036349e9:250:41"); }), e.rightAlignTextRTL = o.wrap(function() { return o.style({ textAlignForRTL: "right" }, "036349e9:251:42"); }), e.alignItemsCenter = o.wrap(function() { return o.style({ alignItems: "center" }, "036349e9:252:41"); }), e.alignItemsFlexEnd = o.wrap(function() { return o.style({ alignItems: "flex-end" }, "036349e9:253:42"); }), e.alignSelfCenter = o.wrap(function() { return o.style({ alignSelf: "center" }, "036349e9:254:40"); }), e.spaceBetweenContent = o.wrap(function() { return o.style({ justifyContent: "space-between" }, "036349e9:255:44"); }), e.flexWrap = o.wrap(function() { return o.style({ flexWrap: "wrap" }, "036349e9:256:33"); }), e.whitespaceNoWrap = o.wrap(function() { return o.style({ whiteSpace: "nowrap" }, "036349e9:257:41"); }), e.textureModeCover = o.wrap(function() { return o.style({ textureMode: "cover" }, "036349e9:258:41"); }), e.textureModeContain = o.wrap(function() { return o.style({ textureMode: "contain" }, "036349e9:259:43"); }), e.textureModeFill = o.wrap(function() { return o.style({ textureMode: "fill" }, "036349e9:260:40"); }), e.textureModeNone = o.wrap(function() { return o.style({ textureMode: "none" }, "036349e9:261:40"); }), e.textureScale = o.multistyle(function(e) { return o.style({ textureScale: e }, "036349e9:262:73"); }), e.textAlignCenter = o.wrap(function() { return o.style({ textAlign: "center", textAlignForRTL: "center" }, "036349e9:263:40"); }), e.textAlignRight = i.wrap(function() { return o.style({ textAlign: "right" }, "036349e9:264:28"); }), e.textAlignLeft = i.wrap(function() { return o.style({ textAlign: "left", textAlignForRTL: "left" }, "036349e9:265:27"); }), e.zOffset = o.multistyle(function(e) { return o.style({ zOffset: e }, "036349e9:266:64"); }), e.opacity = o.multistyle(function(e) { return o.style({ opacity: e }, "036349e9:267:71"); }), e.textLetterSpacing = o.multistyle(function(e) { return o.style({ textLetterSpacing: e }, "036349e9:268:76"); }), e.color = o.multistyle(function(e) { return o.style({ color: e }, "036349e9:269:86"); }), e.bgColor = o.multistyle(function(e) { return o.style({ backgroundColor: e }, "036349e9:271:120"); }), e.grayScale = o.multistyle(function(e) { return o.style({ grayScale: e }, "036349e9:274:48"); }), e.dockBottom = o.wrap(function() { return o.style({ position: "absolute", left: 0, bottom: 0, right: 0 }, "036349e9:275:35"); }), e.dock = o.wrap(function() { return o.style({ position: "absolute", top: 0, right: 0, bottom: 0, left: 0 }, "036349e9:276:29"); }), e.lastCard = o.wrap(function() { return o.style({ marginRight: 0 }, "036349e9:277:33"); }), e.removeLastCardMargin = i.wrap(function() { return o.style({ marginRight: -o.Grid.spacer(), alignSelf: "flex-start" }, "036349e9:278:34"); }), e.layer = i.wrap(function() { return o.style({ layer: !0 }, "036349e9:279:19"); }), e.layerClip = i.wrap(function() { return o.style({ layer: !0, layerClip: !0 }, "036349e9:280:23"); }), e.arabicLetterSpacing = i.wrap(function() { return o.style({ textLetterSpacing: .4 }, "036349e9:281:33"); }), e.cleanStrokes = i.wrap(function() { return o.style({ textSoftness: 2, textEdgeOffset: 0 }, "036349e9:282:26"); }), e.headerText = i.wrap(function() { return o.style({ position: "absolute", left: o.LayoutBounds.header.left, top: o.LayoutBounds.header.top, height: o.LayoutBounds.header.height, backgroundColor: "#ff0000" }, "036349e9:283:24"); }), e.hScroller = o.stylefunc(function() { return o.style({ flexDirection: "row", width: o.Grid.getWidth(24) }, "036349e9:292:14"); }, function(e) { return o.dynamicStyle({ height: o.Grid.getHeight(e.height) }, "036349e9:297:37"); }), e = r.__decorate([ i.style ], e); }(); t.CommonStyles = d; var f = function() { function e() {} return e.container = o.multistyle(function(e) { return o.style({ flexDirection: "row", height: e, padding: 0, borderRadius: [ 0, 0, 0, 0 ] }, "036349e9:306:63"); }), e.defaultBarColorStyle = o.wrap(function() { return o.style({ backgroundColor: "#ff9900" }, "036349e9:315:45"); }), e.defaultBgColorStyle = o.wrap(function() { return o.style({ backgroundColor: "#00000066" }, "036349e9:321:44"); }), e = r.__decorate([ i.style ], e); }(); t.ProgressBarStyles = f; var m = function() { function e() {} return e.text = o.multistyle(function(e) { return void 0 === e && (e = !1), o.style({ zOffset: 1, flex: 1, marginLeft: e ? void 0 : o.Grid.spacer(1), marginRight: e ? o.Grid.spacer(1) : void 0 }, "036349e9:330:60"); }), e = r.__decorate([ i.style ], e); }(); t.FilterOptionStyles = m; var h = function() { function e() {} return e.small = o.value(function() { return 16; }, "036349e9:342:19"), e.medium = o.value(function() { return 26; }, "036349e9:343:20"), e.large = o.value(function() { return 50; }, "036349e9:344:19"), e.size = o.multistyle(function(e) { return o.style({ width: e, height: e }, "036349e9:345:53"); }), e.spriteAnimation = o.wrap(function() { return o.style({ spriteAnimation: { spriteSheet: o.bbOfflineUrl("/sparta/assets/ui/sprites/spinner-9900576b.png"), fps: 60, frameWidth: 102, frameHeight: 102, totalFrames: 87, looping: !0 } }, "036349e9:352:40"); }), e.center = o.wrap(function() { return o.style({ flex: 1, justifyContent: "center", alignItems: "center" }, "036349e9:365:31"); }), e = r.__decorate([ i.style ], e); }(); t.SpinnerStyles = h; var g = function() { function e() {} var t; return t = e, e.height = o.value(function() { return o.Grid.getHeight(12); }, "036349e9:376:20"), e.width = o.value(function() { return o.Grid.getWidth(5); }, "036349e9:377:19"), e.container = i.wrap(function() { return o.style({ height: t.height, width: t.width, marginRight: o.Grid.spacer(1) }, "036349e9:379:23"); }), e = t = r.__decorate([ i.style ], e); }(); t.HomeWidgetStyles = g; var y = function() { function e() {} return e.container = i.wrap(function() { return o.style({ alignItems: "center", justifyContent: "flex-start", flexDirection: "row" }, "036349e9:388:23"); }), e.labelElement = i.wrap(function() { return o.style({ flex: 1, flexWrap: "wrap" }, "036349e9:394:26"); }), e = r.__decorate([ i.style ], e); }(); t.LabeledIconStyles = y; var S = function() { function e() {} return e.TRANSPARENT = o.value(function() { return "#00000000"; }, "036349e9:403:25"), e.BLACK = o.value(function() { return "#000000"; }, "036349e9:406:19"), e.BLACK_20 = o.value(function() { return "#00000033"; }, "036349e9:407:22"), e.BLACK_30 = o.value(function() { return "#0000004D"; }, "036349e9:408:22"), e.BLACK_40 = o.value(function() { return "#00000066"; }, "036349e9:409:22"), e.BLACK_50 = o.value(function() { return "#00000080"; }, "036349e9:410:22"), e.BLACK_60 = o.value(function() { return "#00000099"; }, "036349e9:411:22"), e.BLACK_70 = o.value(function() { return "#000000B3"; }, "036349e9:412:22"), e.BLACK_80 = o.value(function() { return "#000000CC"; }, "036349e9:413:22"), e.BLACK_90 = o.value(function() { return "#000000E6"; }, "036349e9:414:22"), e.WHITE = o.value(function() { return "#FFFFFF"; }, "036349e9:417:19"), e.WHITE_20 = o.value(function() { return "#FFFFFF20"; }, "036349e9:418:22"), e.WHITE_33 = o.value(function() { return "#FFFFFF33"; }, "036349e9:419:22"), e.WHITE_40 = o.value(function() { return "#FFFFFF66"; }, "036349e9:420:22"), e.WHITE_50 = o.value(function() { return "#FFFFFF80"; }, "036349e9:421:22"), e.WHITE_60 = o.value(function() { return "#FFFFFF99"; }, "036349e9:422:22"), e.WHITE_80 = o.value(function() { return "#FFFFFF80"; }, "036349e9:423:22"), e.WHITE_90 = o.value(function() { return "#FFFFFFE6"; }, "036349e9:424:22"), e.LIGHT_GRAY = o.value(function() { return "#999999"; }, "036349e9:427:24"), e.GRAY = o.value(function() { return "#666666"; }, "036349e9:428:18"), e.ORANGE = o.value(function() { return "#ED582C"; }, "036349e9:431:20"), e = r.__decorate([ i.style ], e); }(); t.CommonColors = S; var v = function() { function e() {} return e.completedText = i.wrap(function() { return o.style({ color: "#ff9900" }, "036349e9:436:27"); }), e.customLabel = i.wrap(function() { return o.style({ color: "#d9d91d" }, "036349e9:437:25"); }), e = r.__decorate([ i.style ], e); }(); t.GameColorStyles = v; var b = function() { function e() {} return e.completedText = i.wrap(function() { return o.style({}, "036349e9:442:27"); }), e.customLabel = i.wrap(function() { return o.style({}, "036349e9:443:25"); }), e = r.__decorate([ i.style ], e); }(); t.EmptyGameColorStyles = b; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(1), o = n(2), i = n(71); t.ThemeContext = i.createContext("Theme"), t.useTheme = function a() { return o.untracked(t.ThemeContext.use()); }, t.ThemeProvider = function s(e) { var n = r.useState(function() { return o.observable.box(e.theme); })[0]; r.useEffect(o.action(function() { n.set(e.theme); }), [ e.theme ]); var i = r.useCallback(function() { return n.get(); }, [ e.theme ]); return r.createElement(t.ThemeContext.Provider, { value: i }, e.children); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(146), a = n(166), s = n(5); function u(e) { return void 0 === e && (e = !1), e ? i.localeState.gameLocale === a.Locale.ARABIC : i.localeState.displayLocale === a.Locale.ARABIC; } function l() { return i.localeState.displayLocale === a.Locale.JAPANESE; } function c() { return i.localeState.displayLocale === a.Locale.CHINESE_TRADITIONAL; } function p() { return i.localeState.displayLocale === a.Locale.CHINESE_SIMPLIFIED; } function d() { return i.localeState.displayLocale === a.Locale.KOREAN; } t.isRTLLanguage = u, t.localeRearrange = function f(e, t) { return void 0 === t && (t = !1), e && !u(t) ? e : e.reverse(); }, t.LocaleRearrange = function m(e) { var t = e.children, n = e.forceUserLocale, i = r.__rest(e, [ "children", "forceUserLocale" ]); return o.createElement("surface", r.__assign({}, i), Array.isArray(t) && u(n) ? t.slice().reverse() : t); }, t.localeLetterSpacing = function h(e) { return u() && e && (e.textLetterSpacing = 0), s.DynamicStyle.wrapLegacyStyle(e, "d6fcadaf:35:11"); }, t.isArabicLanguage = function g() { return i.localeState.displayLocale === a.Locale.ARABIC; }, t.isItalianLanguage = function y() { return i.localeState.displayLocale === a.Locale.ITALIAN; }, t.isRussianLanguage = function S() { return i.localeState.displayLocale === a.Locale.RUSSIAN; }, t.isFrenchLanguage = function v() { return i.localeState.displayLocale === a.Locale.FRENCH; }, t.isJapaneseLanguage = l, t.isTradChineseLanguage = c, t.isSimpChineseLanguage = p, t.isKoreanLanguage = d, t.isAsianLanguage = function b() { return d() || p() || l() || c(); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(9); t.TextSize = { XXXXL: "XXXXL", XXXL: "XXXL", XXL: "XXL", XL: "XL", L: "L", M: "M", S: "S", XS: "XS", XXS: "XXS" }, t.PC_LINE_HEIGHTS = { XXXXL: 92, XXXL: 92, XXL: 92, XL: 62, L: 42, M: 32, S: 22, XS: 18, XXS: 14 }, t.CONSOLE_LINE_HEIGHTS = { XXXXL: 100, XXXL: 100, XXL: 100, XL: 70, L: 50, M: 40, S: 30, XS: 25, XXS: 20 }, t.RIME_LINE_HEIGHTS = { XXXXL: 130, XXXL: 130, XXL: 89, XL: 74, L: 54, M: 40, S: 32, XS: 24, XXS: 20 }, t.LINE_HEIGHTS = r.SpartaGlobals.bundleIsPC ? t.PC_LINE_HEIGHTS : t.CONSOLE_LINE_HEIGHTS; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.quitSparta = r.createTypedAction(), t.gotoLocation = r.createTypedAction(), t.updateLocation = r.createTypedAction(), t.setNavigationEnabled = r.createTypedAction(), t.setClientVideoRecordingEnabled = r.createTypedAction(); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e.InsertMarkup = "INSERT_MARKUP", e.MoveExisting = "MOVE_EXISTING", e.RemoveNode = "REMOVE_NODE"; }(t.SurfaceChildOperationType || (t.SurfaceChildOperationType = {})), function(e) { e.Linear = "Linear", e.QuadraticIn = "QuadraticIn", e.QuadraticOut = "QuadraticOut", e.QuadraticInOut = "QuadraticInOut", e.CubicIn = "CubicIn", e.CubicOut = "CubicOut", e.CubicInOut = "CubicInOut", e.CubicOutBack = "CubicOutBack", e.SineIn = "SineIn", e.SineOut = "SineOut", e.SineInOut = "SineInOut", e.Bezier = "Bezier"; }(t.Easing || (t.Easing = {})), function(e) { e[e.GET = 0] = "GET", e[e.POST = 1] = "POST"; }(t.HttpMethod || (t.HttpMethod = {})), function(e) { e[e.onMouseDown = 0] = "onMouseDown", e[e.onMouseUp = 1] = "onMouseUp", e[e.onClick = 2] = "onClick", e[e.onDoubleClick = 3] = "onDoubleClick", e[e.onMouseScroll = 4] = "onMouseScroll", e[e.onMouseEnter = 5] = "onMouseEnter", e[e.onMouseLeave = 6] = "onMouseLeave"; }(t.MouseEventType || (t.MouseEventType = {})), function(e) { e[e.onBoundsChanged = 7] = "onBoundsChanged"; }(t.OtherEventType || (t.OtherEventType = {})), function(e) { e[e.None = -1] = "None", e[e.Primary = 0] = "Primary", e[e.Secondary = 1] = "Secondary", e[e.Wheel = 2] = "Wheel", e[e.Back = 3] = "Back", e[e.Forward = 4] = "Forward"; }(t.MouseButton || (t.MouseButton = {})), function(e) { e[e.OK = 0] = "OK", e[e.KEY_INVALID = -1] = "KEY_INVALID", e[e.NO_FILESYSTEM = -2] = "NO_FILESYSTEM", e[e.KEY_NOT_FOUND = -3] = "KEY_NOT_FOUND", e[e.FAILED_FILE_INFO = -4] = "FAILED_FILE_INFO"; }(t.GetItemResult || (t.GetItemResult = {})), function(e) { e[e.OK = 0] = "OK", e[e.KEY_INVALID = -1] = "KEY_INVALID", e[e.FILE_DELETE_FAILURE = -2] = "FILE_DELETE_FAILURE"; }(t.RemoveKeyResult || (t.RemoveKeyResult = {})), function(e) { e[e.OK = 0] = "OK", e[e.KEY_INVALID = -1] = "KEY_INVALID", e[e.KEY_TOO_LONG = -2] = "KEY_TOO_LONG", e[e.NO_FILESYSTEM = -3] = "NO_FILESYSTEM", e[e.FILE_CREATION_FAILURE = -4] = "FILE_CREATION_FAILURE"; }(t.StoreItemResult || (t.StoreItemResult = {})), function(e) { e[e.OK = 0] = "OK", e[e.FILE_SYSTEM_ERROR = -1] = "FILE_SYSTEM_ERROR", e[e.DELETE_ERROR = -2] = "DELETE_ERROR"; }(t.ClearResult || (t.ClearResult = {})), function(e) { e[e.staticAtlas = 0] = "staticAtlas", e[e.singleTexture = 1] = "singleTexture", e[e.dynamicAtlas = 2] = "dynamicAtlas", e[e.invalid = 3] = "invalid"; }(t.TextureAtlas || (t.TextureAtlas = {})), function(e) { e.Controller = "controller", e.Keyboard = "keyboard", e.Mouse = "mouse"; }(t.LastUsedInputMethod || (t.LastUsedInputMethod = {})), function(e) { e[e.DEFAULT = 0] = "DEFAULT", e[e.FIXED = 1] = "FIXED", e[e.WINDOW_FACTOR = 2] = "WINDOW_FACTOR", e[e.CONTAINER_FACTOR = 3] = "CONTAINER_FACTOR"; }(t.DebugUiWidthInfo || (t.DebugUiWidthInfo = {})); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(130), o = n(7), i = n(367), a = n(105); t.dangerZoneSize = i.dangerZoneSize, t.safeZone = i.safeZone, t.screen = i.screen, t.background = i.screen; var s = { breadcrumbs: o.getHeight(o.COMPRESSED ? 4 : 3), header: o.getHeight(o.COMPRESSED ? 5 : 4), headerBottomMargin: o.getHeight(o.COMPRESSED ? 4 : 3), tabs: o.getHeight(o.COMPRESSED ? 4 : 3), fadeTop: o.getHeight(o.COMPRESSED ? 4 : 3), fadeBottom: o.getHeight(o.COMPRESSED ? 0 : 3), footerTopMargin: o.getHeight(o.COMPRESSED ? 0 : 1), footer: o.getHeight(o.COMPRESSED ? 0 : 5), tallContent: o.getHeight(o.COMPRESSED ? 14 : 10) }, u = (o.COMPRESSED ? t.dangerZoneSize.height : 0) + t.safeZone.height - s.breadcrumbs - s.header - s.headerBottomMargin - s.tabs - s.fadeTop - s.fadeBottom - s.footerTopMargin - s.footer; t.header = new r.Bounds(t.safeZone.left, t.safeZone.top, t.safeZone.width, s.breadcrumbs + s.header), t.tabs = new r.Bounds(t.safeZone.left, t.header.bottom + s.headerBottomMargin, o.getWidth(o.COLUMNS), s.tabs), t.fadeAreaTop = new r.Bounds(t.safeZone.left, t.tabs.bottom, o.getWidth(o.COLUMNS), s.fadeTop), t.footer = new r.Bounds(t.safeZone.left, t.safeZone.bottom - s.footer, t.safeZone.width, s.footer), t.input = t.footer, t.fadeAreaBottom = new r.Bounds(t.safeZone.left, t.footer.top - s.footerTopMargin - s.fadeBottom, t.safeZone.width, s.fadeBottom), t.content = new r.Bounds(t.safeZone.left, t.fadeAreaTop.bottom, o.getWidth(o.COLUMNS), u), t.tallContent = new r.Bounds(t.safeZone.left, t.content.top, t.safeZone.width, s.tallContent); var l = Math.ceil(t.screen.width * (997 / 1920)), c = Math.ceil(t.screen.height * (273 / 1080)), p = o.COMPRESSED ? 189 : 277, d = o.COMPRESSED ? 63 : 76, f = o.getWidth(9), m = o.COMPRESSED ? o.getHeight(5) : t.footer.height, h = a.useConsoleMenu ? o.getWidth(7) + t.dangerZoneSize.width : i.sideOffset; t.startScreenLogo = new r.Bounds(Math.floor(t.screen.width / 2 - l / 2), Math.floor(t.screen.height / 2.3 - c / 2), l, c), t.mainMenu = new r.Bounds(t.screen.left - h, t.screen.top, h, t.screen.height), t.logo = new r.Bounds(t.header.right - p, t.header.top, p, d), t.comCenterWidth = o.COMPRESSED ? o.getWidth(6) - 4 * o.GUTTER : o.getWidth(8) + t.dangerZoneSize.width, t.userBar = o.COMPRESSED ? new r.Bounds(t.safeZone.right - f, t.content.bottom - m, f, m) : new r.Bounds(t.footer.right - f, t.footer.bottom - m, f, m); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(1), o = n(2), i = n(71), a = n(8), s = n(370), u = n(147), l = 0, c = 0, p = i.createModernContext("ParentInput"); var d = 0, f = function() { function e(e, t, n, r, o, i, a) { this.inputStore = t, this.parentManager = n, this.getInput = r, this.viewComponentState = o, this.tabSlotItem = i, this.inputOptions = a, this._allowIsolation = !0, this.hasRegisteredInputs = !1, this.unmounted = !1, this.debugName = e + "_" + d++; var s = !1 !== this.inputOptions.group; this.isOwnInputGroup = s || !n || !n.inputOptions.passDownId, this.inputGroupId = this.isOwnInputGroup || !n ? this.debugName + "_" + l++ : n.inputGroupId, this.registrationId = this.debugName + "_" + c++; } return Object.defineProperty(e.prototype, "isActive", { get: function() { return !this.viewComponentState || !!this.viewComponentState.isActive && (!this.tabSlotItem || this.tabSlotItem.isActive); }, enumerable: !0, configurable: !0 }), e.prototype.onUnmount = function() { this.unmounted = !0, this.disposeReaction && this.disposeReaction(), this.hasRegisteredInputs && (this.hasRegisteredInputs = !1, this.inputStore.unregister(this.registrationId, this.inputGroupId)); }, e.prototype.updateInput = function(e) { if (!this.unmounted) { void 0 === e && (e = this.getInput()); var t = e ? Array.isArray(e) ? e : [ e ] : []; !this.isActive || this.hasRegisteredInputs && 0 === t.length ? (this.hasRegisteredInputs = !1, this.inputStore.unregister(this.registrationId, this.inputGroupId)) : t.length > 0 && (this.hasRegisteredInputs = !0, this.inputStore.register(this.registrationId, this.inputGroupId, t)); } }, e.prototype.updateReaction = function() { var e = this; this.unmounted || (this.disposeReaction && this.disposeReaction(), this.disposeReaction = o.reaction(function() { return { isActive: e.isActive, inputs: e.getInput() }; }, function(t) { var n = t.inputs; return e.updateInput(n); }, { fireImmediately: !0 })); }, e.prototype.allowIsolation = function(e) { this._allowIsolation = e; var t = this.parentManager; t && t.allowIsolation(e); }, e.prototype.isIsolationAllowed = function() { if (this.inputOptions.ignoreParentIsolation) return this._allowIsolation; if (!this._allowIsolation) return !1; var e = this.parentManager; return !e || e.isIsolationAllowed(); }, e.prototype.isolateInputGroup = function() { if (this.isIsolationAllowed()) { if (this.isOwnInputGroup) { var e = this.parentManager; e && e.allowIsolation(!1); } this.inputStore.isolateGroup(this.inputGroupId); } }, e.prototype.releaseInputGroup = function() { if (this._allowIsolation) { if (this.isOwnInputGroup) { var e = this.parentManager; e && e.allowIsolation(!0); } this.inputStore.releaseGroup(this.inputGroupId); } }, e; }(); t.InputManager = f, t.InputRegistration = r.forwardRef(function e(t, n) { var o = function i(e, t, n, o, l, c) { var d = p.useMaybe(), m = s.ViewSlotContext.useMaybe(), h = u.TabSlotItemContext.useMaybe(), g = a.SpartaContext.use(), y = r.useState(function() { return new f(e, g.stores.inputStore, d, t, m, h, { group: o, ignoreParentIsolation: l, passDownId: c }); })[0]; return r.useEffect(function() { return function() { y.onUnmount(); }; }, [ y ]), r.useImperativeHandle(n, function() { return y; }, [ y ]), r.useEffect(function() { y.viewComponentState = m, y.tabSlotItem = h, y.getInput = t, y.updateReaction(); }), y; }(t.debugName, t.getInput, n, !!t.group, !!t.ignoreParentIsolation, void 0 === t.passDownId || t.passDownId); return r.createElement(p.Provider, { value: o }, t.children); }); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.display = r.createTypedAction(), t.close = r.createTypedAction(), t.closeAll = r.createTypedAction(), t.closeGroup = r.createTypedAction(); }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(510), i = n(251), a = n(45), s = n(299), u = n(121), l = n(209), c = n(369), p = n(92), d = n(23); t.onSuccess = a.createTypedAction(), t.onError = a.createTypedAction(); var f, m = e.get("GatewayClient"); !function(e) { e.Request = "request", e.Response = "response", e.ResponseError = "response error"; }(f || (f = {})); var h = function() { function e() { this.warning = "Attempt to use an unconfigured GatewayClient, please wait for nativeClientReadyMessage"; } return e.prototype.warningFormat = function(e) { return this.warning + " (" + e + ")"; }, e.prototype.request = function(e, t, n) { var r = this.warningFormat(e); return m.error(r), Promise.reject(new Error(r)); }, e.prototype.firstPartyRequest = function(e, t, n) { var r = this.warningFormat(e); return m.error(r), Promise.reject(new Error(r)); }, e.prototype.connect = function() { m.error(this.warningFormat("connect")); }, e.prototype.disconnect = function() { m.error(this.warningFormat("disconnect")); }, e; }(); t.NullGatewayClient = h; var g = new h(); t.connectWhenReady = function y() { m.info("Native Client and Presence Ready, connecting..."), t.connect(); }, t.connect = function() { return g.connect(); }, t.disconnect = function() { return g.disconnect(); }, t.request = function(e, t, n) { return void 0 === n && (n = !0), g.request(e, t, n); }, t.firstPartyRequest = function(e, t, n) { return void 0 === n && (n = !0), g.firstPartyRequest(e, t, n); }; var S = function() { function e(e, t, n, r, o, i, a) { this.frostbite = e, this.buildInfo = t, this.store = r, this.getAuthCode = o, this.getFirstPartyTokens = i, m.info("GatewayClient configured: " + n.gatewayHost), this.authProps = n.authProps, this.baseUrl = n.gatewayHost + "/jsonrpc/" + t.bundlePlatform.toLowerCase() + "/api", this.httpRequest = a || l.httpRequest, this.headers = { "X-ClientVersion": "master_4700144_3b16ab85_warsaw_all_prod", "X-DbId": t.fbDatabaseId, "X-Sparta-Info": [ "tenancyRootEnv=" + n.gatewayTenancyRootEnv, "tenancyBlazeEnv=" + n.gatewayTenancyBlazeEnv ].join("; ") }, t.patchVersion && (this.headers["X-PatchVersion"] = t.patchVersion), t.codeChangeList && (this.headers["X-CodeCL"] = t.codeChangeList), t.dataChangeList && (this.headers["X-DataCL"] = t.dataChangeList), t.saveGameVersion && (this.headers["X-SaveGameVersion"] = t.saveGameVersion), n.hostingGameId && (this.headers["X-HostingGameId"] = n.hostingGameId), n.region && (this.headers["X-Region"] = n.region); } return e.prototype.connect = function() { this.store.canConnect ? (this.store.setSessionState(i.GatewaySessionState.connecting), this.useSession()) : m.error("Cannot connect in this state"); }, e.prototype.disconnect = function() { this.sessionPromise = null, this.endFirstPartyTokenRenewal(), this.store.dropSession(); }, e.prototype.useSession = function() { var e = this; if (null != this.sessionPromise) return this.sessionPromise; if (null != this.store.session) return this.sessionPromise = Promise.resolve(this.store.session.sessionId), this.sessionPromise; if (this.store.sessionState !== i.GatewaySessionState.connecting) return Promise.reject(new Error("Making gateway request without a gateway session")); var t = this.getAuthCode().then(function(t) { return e.requestSession(t); }).then(function(t) { return e.store.receiveSession(new o.GatewaySession(t.personaId, t.sessionId, t.envId, t.parameters)), t.sessionId; }).catch(function(n) { throw e.sessionPromise === t ? (m.error("Failed to create session:", n.message), e.sessionPromise = void 0, e.store.setSessionState(i.GatewaySessionState.failed)) : m.error("Failed to create session, but this is an old session which was dropped:", n.message), n; }); return this.sessionPromise = t, this.sessionPromise; }, e.prototype.requestSession = function(e) { return this.gatewayRequest(null, "Authentication.getEnvIdViaAuthCode", r.__assign({ authCode: e }, this.authProps)).then(function(t) { var n = t.sessionId; if (!n) throw new Error('Bad response from gateway "getEnvIdViaAuthCode" using auth code ' + e + ': No session id received (response.sessionId == "' + n + '")'); return t; }, function(e) { throw m.error("Authentication.getEnvIdViaAuthCode failed:", e.code, e.message), e; }); }, e.prototype.request = function(e, t, n) { var r = this; return void 0 === n && (n = !0), this.store.sessionState === i.GatewaySessionState.failed ? Promise.reject(new Error("GatewayClient offline, call GatewayClient.connect to go online - " + e)) : this.useSession().then(function(n) { return r.gatewayRequest(n, e, t); }).catch(function(o) { if (o.code === u.GatewayErrorCodes.INVALID_SESSION) { if (r.sessionPromise && r.store.sessionState === i.GatewaySessionState.established && (r.sessionPromise = void 0, r.store.setSessionState(i.GatewaySessionState.connecting)), n) return r.request(e, t, !1); throw o; } throw o; }); }, e.prototype.logRequestOrResponse = function(e, t, n, r, o, i) { if (this.buildInfo && ("debug" === this.buildInfo.buildConfig || "release" === this.buildInfo.buildConfig || "final" === this.buildInfo.buildConfig)) { var a, s = c.start(); switch (e) { case f.ResponseError: a = m.error; break; case f.Request: case f.Response: a = m.debug; break; default: m.warn("Missing logger type for " + e), a = m.info; } a("[Gateway JSONRPC] " + e + " --\x3e method: " + t + ", id: " + n + ", headers:", p.globalScope.isJSC ? "{" + Object.keys(r).map(function(e) { return e + ": " + r[e]; }).join(", ") + "}" : r, ", data:", p.globalScope.isJSC ? JSON.stringify(o) : o), null == o && a("WARNING: empty data returned from: " + t + " requestId: " + n), p.globalScope.isJSC || e !== f.Response || m.log(t, i, o); var u = e.split(/\s+/).join("-"); c.end("JSONRPC-" + u, s); } }, e.prototype.gatewayRequest = function(e, n, o) { var i = this, a = { jsonrpc: "2.0", method: n, params: o || {}, id: s.createUUID() }, c = r.__assign({}, this.headers); e && "" !== e ? c["X-GatewaySession"] = e : c["X-Guest"] = "no-session-id"; var p = { methodName: n, params: o || {} }, m = this; return new Promise(function(e, r) { i.logRequestOrResponse(f.Request, n, a.id, c, a); var s = Object.keys(c).map(function(e) { return e + ": " + c[e]; }).join("\r\n"); i.httpRequest(d.HttpMethod.POST, i.baseUrl + "?" + n, a, s, !0, function(i, s, c) { var d = l.parseHeaders(c); if (i && !s.error) m.logRequestOrResponse(f.Response, n, a.id, d, s.result, o), t.onSuccess(s.result, p), e(s.result); else { p.traceId = d["X-GatewayTraceId"], m.logRequestOrResponse(f.ResponseError, n, a.id, d, s.error || s.result), t.onError(s.error, p); var h = s.error ? new u.GatewayRequestError(s.error.message, s.error.code, p) : new u.GatewayRequestError("Unspecified error", 0, p); r(h); } }); }); }, e.prototype.renewFirstPartyTokens = function() { var e = this; return this.renewFirstPartyTokensPromise ? this.renewFirstPartyTokensPromise : (this.renewFirstPartyTokensPromise = this.request("Inventory.getFirstPartyServices").then(function(t) { return e.getFirstPartyTokens(e.frostbite, t); }).then(function(t) { return e.request("Inventory.registerFirstPartyTokens", { tokens: t }); }).then(function() { return e.endFirstPartyTokenRenewal(); }).catch(function(t) { throw m.error(t), e.endFirstPartyTokenRenewal(), t; }), this.renewFirstPartyTokensPromise); }, e.prototype.endFirstPartyTokenRenewal = function() { this.renewFirstPartyTokensPromise = void 0; }, e.prototype.firstPartyRequest = function(e, t, n) { var r = this; return void 0 === n && (n = !0), this.request(e, t).catch(function(o) { if (o.code !== u.GatewayErrorCodes.FIRST_PARTY_TOKEN_EXPIRED) throw o; if (n) return r.renewFirstPartyTokens().then(function() { return r.firstPartyRequest(e, t, !1); }); }); }, e; }(); t.GatewayClient = S, t.setInstance = function v(e) { g = e; }; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(882); t.focusSystem = new r.FocusSystem(); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e.NORMAL = "normal", e.EMPHASIS = "emphasis", e.LIGHT = "light", e.HEADER_LIGHT = "headerLight", e.HEADER_NORMAL = "headerNormal"; }(t.TextType || (t.TextType = {})); }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(2), i = n(933), a = function() { function t(e) { this.paramsUsedToFetch = new WeakMap(), this.fragments = o.observable.map([], { deep: !1 }), this.fragmentTtl = -1, this.fragmentFailstateTtl = 1e4, e && (void 0 !== e.fragmentTtl && (this.fragmentTtl = e.fragmentTtl), void 0 !== e.fragmentFailstateTtl && (this.fragmentFailstateTtl = e.fragmentFailstateTtl)); } return t.prototype.saveParamsAndFetch = function(e, t) { this.paramsUsedToFetch.set(e, t), this.fetch(e, t); }, t.prototype.setFragment = function(e, t) { t.parentStore = this, this.fragments.set(e, t), this.deleteSurplusFragments(); }, t.prototype.deleteFragment = function(e) { var t = this.fragments.get(e); t && (t.parentStore = void 0), this.fragments.delete(e); }, t.prototype.clearFragments = function() { this.fragments.forEach(function(e) { e.parentStore = void 0; }), this.fragments.clear(); }, t.prototype.resetFragment = function(e) { var t = this.fragments.get(e); t && t.reset(); }, t.prototype.deleteSurplusFragments = function() { var e = this; this.fragmentLimit && this.fragments.size > this.fragmentLimit && o.values(this.fragments).slice().sort(function(e, t) { var n = t.lastAccessed - e.lastAccessed; return 0 !== n ? n : e.created > t.created ? 1 : -1; }).slice(this.fragmentLimit).forEach(function(t) { return e.deleteFragment(t.id); }); }, t.prototype.expireFragment = function(e) { var t = this.getFragment(e); return !(!t || t.isLoading || t.hasExpired) && (t.expire(), !0); }, t.prototype.expireFragments = function() { var e = this; this.fragments.forEach(function(t) { return e.expireFragment(t.id); }); }, t.prototype.refreshFragments = function(e) { var t = this; this.fragments.forEach(function(n) { return t.refreshFragment(n.id, e); }); }, t.prototype.refreshFragment = function(e, t) { var n = this.getFragment(e); return this.saveParamsAndFetch(n, t || this.paramsUsedToFetch.get(n)), n; }, t.prototype.createEmptyFragment = function(e) { return new i.Fragment(e, void 0, { ttl: this.fragmentTtl, failstateTtl: this.fragmentFailstateTtl, valueMapper: this.valueMapper, parentStore: this }); }, t.prototype.getFragment = function(e) { var t = this.fragments.get(e); return t || (t = this.createEmptyFragment(e), this.setFragment(e, t)), t.updateLastAccessed(), t; }, t.prototype.fetchFragment = function(t, n) { var r = this; e(o.action(function() { t.needsFetch && r.saveParamsAndFetch(t, n); })); }, t.prototype.getOrFetchFragment = function(e, t) { var n = this.getFragment(e); return n.needsFetch && this.fetchFragment(n, t), n; }, t.prototype.hasFragment = function(e) { return this.fragments.has(e); }, r.__decorate([ o.action ], t.prototype, "setFragment", null), r.__decorate([ o.action ], t.prototype, "deleteFragment", null), r.__decorate([ o.action ], t.prototype, "clearFragments", null), r.__decorate([ o.action ], t.prototype, "refreshFragment", null), t; }(); t.FragmentStore = a; }).call(this, n(277).setImmediate); }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(2), i = n(386); function a(e, t) { var n = JSON.stringify(t); return e.currentRequests.list.filter(function(e) { return JSON.stringify(e.params) === n; }).length > 0; } function s(e, t, n, r) { return t === l.ERROR; } var u = function() { function e(e, t) { this.endpoint = e, this.resultHandlers = [], this.currentRequests = new c(this), this.config = r.__assign({}, t); } return e.prototype.clearHandlers = function() { this.resultHandlers = [], this.config.requirementDeterminators = []; }, e.prototype.withThrottling = function(e, t) { return this.config.throttleTimeout = e, t && t.throttleDeterminator && (this.config.throttleDeterminator = t.throttleDeterminator), this; }, e.prototype.withRetries = function(e, t, n) { return this.config.maxRetries = e, this.config.retryTimeout = t, n && (n.retryDeterminator && (this.config.retryDeterminator = n.retryDeterminator), n.retryParams && (this.config.retryParams = n.retryParams)), this; }, e.prototype.withRequestPerformer = function(e) { return this.config.requestPerformer = e, this; }, e.prototype.addResultHandler = function(e) { var t = this; return this.resultHandlers.push(e), function() { var n = t.resultHandlers.indexOf(e); t.resultHandlers.splice(n, 1); }; }, e.prototype.handleResult = function(e) { return this.resultHandlers.forEach(function(t) { t(e); }), e; }, e.prototype.addRequirement = function(e) { var t = this.config.requirementDeterminators || []; return t.push(e), this.config.requirementDeterminators = t, function() { var n = t.indexOf(e); t.splice(n, 1); }; }, e.prototype.checkRequirements = function(e) { var t = this, n = this.config.requirementDeterminators || []; if (0 === n.length) return !0; var r = !0; return n.forEach(function(n) { if (!r) return !1; r = n(t, e); }), r; }, e.prototype.request = function(e) { if (!this.checkRequirements(e)) { var t = new f(l.UNSATISFIED); return this.handleResult(t); } if (this.config.throttleTimeout) { var n = this.config.throttleDeterminator || a; if (this.currentRequests.list.length > 0 && n && n(this, e)) { var r = new f(l.THROTTLED); return this.handleResult(r); } } var o = new d(this, e, this.config.requestPerformer), i = new f(l.PENDING, o); return this.config.throttleTimeout && this.currentRequests.add(o), this.handleResult(i); }, e; }(); t.Client = u; var l, c = function() { function e(e) { this.client = e, this.list = []; } return e.prototype.add = function(e) { var t = this, n = this.client.config.throttleTimeout || 0; n > 0 && (this.list.push(e), setTimeout(function() { var n = t.list.indexOf(e); n > -1 && t.list.splice(n, 1); }, n)); }, e; }(); !function(e) { e[e.THROTTLED = 0] = "THROTTLED", e[e.UNSATISFIED = 1] = "UNSATISFIED", e[e.PENDING = 2] = "PENDING", e[e.RETRYING = 3] = "RETRYING", e[e.SUCCESS = 4] = "SUCCESS", e[e.ERROR = 5] = "ERROR"; }(l = t.RequestState || (t.RequestState = {})); var p = [ l.THROTTLED, l.UNSATISFIED, l.ERROR, l.SUCCESS ], d = function() { function e(e, t, n) { this.client = e, this.performer = n, this.status = l.PENDING, this.attempt = 1, this.params = t, this.performRequest(t); } return e.prototype.performRequest = function(e, t) { var n = this; void 0 === t && (t = 1), this.params = e, this.attempt = t, this.update(l.PENDING), this.performer(this.client.endpoint, e).then(function(e) { return n.shouldRetry(l.SUCCESS, e, void 0) || n.update(l.SUCCESS, e), null; }).catch(function(e) { n.shouldRetry(l.ERROR, void 0, e) || n.update(l.ERROR, void 0, e); }); }, e.prototype.update = function(e, t, n) { this.status = e, this.response = t, this.error = n; }, e.prototype.shouldRetry = function(e, t, n) { var r = this, o = this.client.config; if (o.maxRetries && this.attempt <= o.maxRetries) { var i = o.retryDeterminator || s; if (i && i(this, e, t, n)) { var a = o.retryParams ? o.retryParams(this) : this.params; return setTimeout(function() { r.performRequest(a, r.attempt + 1); }, o.retryTimeout || 0), this.update(l.RETRYING), !0; } } }, r.__decorate([ o.observable ], e.prototype, "status", void 0), r.__decorate([ o.action ], e.prototype, "update", null), e; }(); t.Request = d; var f = function() { function t(e, t) { this.initialStatus = e, this.request = t, this.disposers = []; } return Object.defineProperty(t.prototype, "status", { get: function() { return this.request ? this.request.status : this.initialStatus; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "error", { get: function() { return this.request ? this.request.error : null; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "response", { get: function() { return this.request ? this.request.response : null; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "isComplete", { get: function() { switch (this.status) { case l.PENDING: case l.RETRYING: return !1; case l.UNSATISFIED: case l.THROTTLED: case l.SUCCESS: case l.ERROR: return !0; default: throw i.unexhaustiveSwitch(this.status); } }, enumerable: !0, configurable: !0 }), t.prototype.dispose = function() { this.disposers.forEach(function(e) { e(); }); }, t.prototype.onStatusChange = function(t, n, r) { var i = this; void 0 === r && (r = !1), "function" == typeof n && this.disposers.push(o.reaction(function() { return i.status; }, function(o) { o === t && (n(), r && e(function() { return i.dispose(); })); }, { fireImmediately: !0 })); }, t.prototype.onThrottled = function(e) { return this.onStatusChange(l.THROTTLED, function() { return e(); }, !0), this; }, t.prototype.onPending = function(e) { return this.onStatusChange(l.PENDING, function() { return e(); }), this; }, t.prototype.onUnsatisfied = function(e) { return this.onStatusChange(l.UNSATISFIED, function() { return e(); }, !0), this; }, t.prototype.onRetrying = function(e) { return this.onStatusChange(l.RETRYING, function() { return e(); }), this; }, t.prototype.onSuccess = function(e) { var t = this; return this.onStatusChange(l.SUCCESS, function() { return e(t.response); }, !0), this; }, t.prototype.onError = function(e) { var t = this; return this.onStatusChange(l.ERROR, function() { return e(t.error || new Error("An unknown error occured.")); }, !0), this; }, t.prototype.onFinished = function(t) { var n = this; p.forEach(function(r) { n.onStatusChange(r, function() { e(function() { return t(); }); }); }); }, t.prototype.toPromise = function() { var e = this; return new Promise(function(t) { e.onFinished(t); }); }, r.__decorate([ o.computed ], t.prototype, "status", null), r.__decorate([ o.computed ], t.prototype, "isComplete", null), t; }(); t.Result = f; }).call(this, n(277).setImmediate); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(36); t.tunguskaGameId = r.getBuildInfo().isCTE() ? "bf1cte" : "tunguska", t.tunguskaConquestAssaultMaps = [ "mp_beachhead", "mp_harbor", "mp_naval", "mp_offensive", "mp_river" ]; }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(1), o = n(69), i = n(5), a = n(130), s = n(4), u = n(2), l = n(14), c = n(10), p = n(7), d = n(25), f = n(11), m = n(18), h = n(5), g = n(28), y = n(37), S = n(148), v = function() { function e(e, t) { void 0 === e && (e = 0), void 0 === t && (t = 0), this.localX = e, this.localY = t; } return Object.defineProperty(e.prototype, "x", { get: function() { return this.localX; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "y", { get: function() { return this.localY; }, enumerable: !0, configurable: !0 }), e; }(), b = function() { function t() { var e = this; this.scrollOffset = new v(), this.containerBounds = new a.Bounds(), this.contentBounds = new a.Bounds(), this.isHovered = !1, this.focusAncestor = g.focusSystem.createAncestor(o.autoId("scrollcontainer")), this.scrolledOnOldBoundsY = 0, this.scrolledOnOldBoundsX = 0, this.setHovered = function() { e.isHovered = !0; }, this.unsetHovered = function() { e.isHovered = !1; }; } return Object.defineProperty(t.prototype, "canScrollUp", { get: function() { return this.scrollOffset.y > 0; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "canScrollLeft", { get: function() { return this.scrollOffset.x > 0; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "canScrollDown", { get: function() { return this.scrollOffset.y < this.maxScrollOffset.y; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "canScrollRight", { get: function() { return this.scrollOffset.x < this.maxScrollOffset.x; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "canScroll", { get: function() { return this.contentBounds.width > this.containerBounds.width || this.contentBounds.height > this.containerBounds.height; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "maxScrollOffset", { get: function() { return new v(Math.max(this.contentBounds.width - this.containerBounds.width, 0), Math.max(this.contentBounds.height - this.containerBounds.height, 0)); }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "viewportBounds", { get: function() { return new a.Bounds(this.scrollOffset.x, this.scrollOffset.y, this.containerBounds.width, this.containerBounds.height); }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "scrollbarOffset", { get: function() { var e = this.scrollOffset.y / this.contentBounds.height; return new v(0, e * this.containerBounds.height); }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "scrollbarHeight", { get: function() { return 0 === this.contentBounds.height ? 0 : this.containerBounds.height / this.contentBounds.height * this.containerBounds.height; }, enumerable: !0, configurable: !0 }), t.prototype.scrollInDirection = function(e, t, n) { void 0 === n && (n = 100); var r = this.scrollOffset.x + e * n, o = this.scrollOffset.y + t * n; this.setScrollOffset(r, o); }, t.prototype.scrollToBounds = function(e) { var t = this.viewportBounds, n = 0, r = 0; e.top < t.top ? n = e.top - t.top : e.bottom > t.bottom && (n = e.bottom - t.bottom), e.left < t.left ? r = e.left - t.left : e.right > t.right && (r = e.right - t.right), this.setScrollOffset(this.scrollOffset.x + r + this.scrolledOnOldBoundsX, this.scrollOffset.y + n + this.scrolledOnOldBoundsY), this.scrolledOnOldBoundsY = -n, this.scrolledOnOldBoundsX = -r; }, t.prototype.setScrollOffset = function(e, t) { var n = Math.max(Math.min(e, this.maxScrollOffset.x), 0), r = Math.max(Math.min(t, this.maxScrollOffset.y), 0); this.scrollOffset.x === n && this.scrollOffset.y === r || (this.scrollOffset = new v(n, r)); }, t.prototype.setContainerBounds = function(e) { e.equals(this.containerBounds, !1) || (this.containerBounds = e, this.setScrollOffset(this.scrollOffset.x, this.scrollOffset.y)); }, t.prototype.setContentBounds = function(e) { e.equals(this.contentBounds, !1) || (this.contentBounds = e, this.scrolledOnOldBoundsY = 0, this.scrolledOnOldBoundsX = 0, this.setScrollOffset(this.scrollOffset.x, this.scrollOffset.y)); }, t.prototype.getLocalBounds = function(e) { return e.offset(this.containerBounds.x - this.scrollOffset.x, this.containerBounds.y - this.scrollOffset.y); }, Object.defineProperty(t.prototype, "smartSoftClipModifier", { get: function() { if (!this.canScroll) return [ 0, 0, 0, 0 ]; var e = this.scrollOffset, t = this.maxScrollOffset, n = [ 1, 1, 1, 1 ]; return 0 === e.x ? n[3] = 0 : e.x === t.x && (n[1] = 0), 0 === e.y ? n[0] = 0 : e.y === t.y && (n[2] = 0), n; }, enumerable: !0, configurable: !0 }), e.__decorate([ u.observable ], t.prototype, "scrollOffset", void 0), e.__decorate([ u.observable ], t.prototype, "containerBounds", void 0), e.__decorate([ u.observable ], t.prototype, "contentBounds", void 0), e.__decorate([ u.observable ], t.prototype, "isHovered", void 0), e.__decorate([ u.computed ], t.prototype, "canScrollUp", null), e.__decorate([ u.computed ], t.prototype, "canScrollLeft", null), e.__decorate([ u.computed ], t.prototype, "canScrollDown", null), e.__decorate([ u.computed ], t.prototype, "canScrollRight", null), e.__decorate([ u.computed ], t.prototype, "canScroll", null), e.__decorate([ u.computed ], t.prototype, "maxScrollOffset", null), e.__decorate([ u.computed ], t.prototype, "viewportBounds", null), e.__decorate([ u.computed ], t.prototype, "scrollbarOffset", null), e.__decorate([ u.computed ], t.prototype, "scrollbarHeight", null), e.__decorate([ u.action ], t.prototype, "scrollInDirection", null), e.__decorate([ u.action ], t.prototype, "scrollToBounds", null), e.__decorate([ u.action ], t.prototype, "setScrollOffset", null), e.__decorate([ u.action ], t.prototype, "setContainerBounds", null), e.__decorate([ u.action ], t.prototype, "setContentBounds", null), e.__decorate([ u.action ], t.prototype, "setHovered", void 0), e.__decorate([ u.action ], t.prototype, "unsetHovered", void 0), e.__decorate([ u.computed ], t.prototype, "smartSoftClipModifier", null), t; }(); t.ScrollerState = b; var _ = function(t) { function n(e, n) { var r = t.call(this, e, n) || this; return r.canScroll = !1, r.getInput = function() { var e = (r.scrollerState.canScrollUp || r.scrollerState.canScrollDown) && g.focusSystem.controllerMode; if (e && ("auto" === r.props.controller ? e = r.scrollerState.focusAncestor.hasFocusedChild : r.props.controller || (e = !1)), e) return [ new f.Input({ action: function() { return r.scrollInDirection(0, -1); }, key: c.Keys.ScrollUp, visible: !1 }), new f.Input({ action: function() { return r.scrollInDirection(0, 1); }, key: c.Keys.ScrollDown, label: __("ID_SPARTA_ACTION_SCROLL") }) ]; }, r.onBounds = function(e) { r.scrollerState.setContainerBounds(a.Bounds.fromRaw(e)); }, r.updateContentBounds = function(e) { var t; if (e instanceof a.Bounds ? t = e : (Math.abs(e.height - r.scrollerState.contentBounds.height) <= 1 && (e.height = r.scrollerState.contentBounds.height), t = a.Bounds.fromRaw(e)), !r.props.noHorizontalScroll) { var n = P(r.scrollerState.focusAncestor.children); n.width > t.width && (t = new a.Bounds(t.x, t.y, n.width, t.height, t.localX, t.localY)); } r.scrollerState.setContentBounds(t); }, r.onMouseScroll = function(e) { r.scrollInDirection(0, e.scroll > 0 ? -1 : 1), r.props.onMouseScroll && r.props.onMouseScroll(e), e.stopPropagation(); }, r.shouldTween = function() { return void 0 !== r.props.tween ? r.props.tween : g.focusSystem.controllerMode; }, r.scrollerState = e.scrollerState || new b(), r.reaction(function() { return r.scrollerState.focusAncestor.children.filter(function(e) { return e.bounds; }).length; }, function() { return r.updateContentBounds(r.scrollerState.contentBounds); }), r.reaction(function() { return r.scrollerState.canScrollUp || r.scrollerState.canScrollDown; }, function(e) { e === r.canScroll || r.props.noVerticalScroll || r.setCanScroll(e); }, { fireImmediately: !0 }), r; } return e.__extends(n, t), n.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return e.scrollerState.focusAncestor.focusedChild; }, function(t) { return e.onFocusChildChanged(t); }, { fireImmediately: !0 }); }, n.prototype.componentWillUnmount = function() { this.scrollerState.focusAncestor.destroy(); }, n.prototype.setCanScroll = function(e) { this.canScroll = e; }, n.prototype.getNearestEdgeVector = function(e) { var t = P(this.scrollerState.focusAncestor.children); if (w(e.left, t.left) && this.scrollerState.canScrollLeft) return new v(0, this.scrollerState.scrollOffset.y); if (w(e.right, t.right) && this.scrollerState.canScrollRight) { var n = this.props.noHorizontalScroll ? 0 : this.scrollerState.maxScrollOffset.x; return new v(n, this.scrollerState.scrollOffset.y); } if (w(e.top, t.top) && this.scrollerState.canScrollUp) return new v(this.scrollerState.scrollOffset.x, 0); if (w(e.bottom, t.bottom) && this.scrollerState.canScrollDown) { var r = this.props.noVerticalScroll ? 0 : this.scrollerState.maxScrollOffset.y; return new v(this.scrollerState.scrollOffset.x, r); } }, n.prototype.shouldScrollToFocus = function() { if (g.focusSystem.lastFocusSource === y.FocusSource.Auto) return !1; var e = void 0 !== this.props.focus ? this.props.focus : g.focusSystem.controllerMode; return !0 === e || "key" === e && g.focusSystem.lastFocusSource === y.FocusSource.Spatial; }, n.prototype.onFocusChildChanged = function(e) { if (e && this.shouldScrollToFocus()) { var t = e.getBounds(); if (!t) return; var n = this.getNearestEdgeVector(t); n ? this.scrollTo(n.x, n.y) : this.scrollToBounds(t); } }, n.prototype.scrollInDirection = function(e, t) { this.scrollerState.scrollInDirection(e, t); }, n.prototype.scrollToElement = function(e) { e.bounds && this.scrollerState.scrollToBounds(this.scrollerState.getLocalBounds(e.bounds)); }, n.prototype.scrollToBounds = function(e) { this.scrollerState.scrollToBounds(this.scrollerState.getLocalBounds(e)); }, n.prototype.scrollTo = function(e, t) { this.scrollerState.setScrollOffset(e, t); }, n.prototype.render = function() { var e, t, n = this.props.style; return !n || Array.isArray(n) || i.isStyleClass(n) || (e = n.maxWidth, t = n.maxHeight), r.createElement(d.InputRegistration, { debugName: "44db0545:521:43", getInput: this.getInput }, r.createElement("surface", { style: this.props.style, onBounds: this.onBounds }, r.createElement(A, { scrollerState: this.scrollerState, clipMargin: this.props.clipMargin, softClip: this.props.softClip, maxWidth: e, maxHeight: t, onMouseScroll: this.onMouseScroll, onMouseEnter: this.scrollerState.setHovered, onMouseLeave: this.scrollerState.unsetHovered }, r.createElement(T, { shouldTween: this.shouldTween, onBoundsChanged: this.updateContentBounds, scrollerState: this.scrollerState }, this.props.children)), this.canScroll && r.createElement(C, { shouldTween: this.shouldTween, scrollerState: this.scrollerState, position: this.props.scrollbarPosition, enabled: this.props.scrollbar }), this.props.overlay)); }, n.defaultProps = { controller: "auto", noVerticalScroll: !1 }, e.__decorate([ u.observable ], n.prototype, "canScroll", void 0), e.__decorate([ u.action ], n.prototype, "setCanScroll", null), n = e.__decorate([ s.observer ], n); }(r.Component); t.Scroller = _; var T = function(t) { function n() { var e = null !== t && t.apply(this, arguments) || this; return e.translateX = l.Animation.componentTween(e, "44db0545:570:56", 0, l.Animation.presets.list.scroll), e.translateY = l.Animation.componentTween(e, "44db0545:571:56", 0, l.Animation.presets.list.scroll), e; } return e.__extends(n, t), n.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return e.props.scrollerState.scrollOffset; }, function(t) { return e.updateTweens(t); }, { fireImmediately: !0 }); }, n.prototype.updateTweens = function(e) { this.props.shouldTween() ? (this.translateX.to(-e.x), this.translateY.to(-e.y)) : (this.translateX.set(-e.x), this.translateY.set(-e.y)); }, n.prototype.render = function() { var t = h.merge2(this.translateX.getStyleClass("translateX"), this.translateY.getStyleClass("translateY")); return r.createElement("surface", e.__assign({ style: t }, this.props.scrollerState.focusAncestor.hooks, { onBounds: this.props.onBoundsChanged }), this.props.children); }, n; }(r.Component), E = h.StaticStyle.wrapLegacyStyleSheet({ scrollbarContainer: { position: "absolute", top: 0, bottom: 0, width: 2 }, inside: { right: 0 }, outside: { right: -p.GUTTER }, scrollIndicator: { position: "absolute", top: 0, right: 0, left: 0, backgroundColor: "#ffffffa6" } }, "44db0545:607:15"), C = function(t) { function n() { var e = null !== t && t.apply(this, arguments) || this; return e.twinkle = S.TwinkleContext.getFromComponent(e), e.shouldKeepScrollbarVisible = !1, e.translateTween = l.Animation.componentTween(e, "44db0545:651:60", 0, l.Animation.presets.list.scroll), e.heightTween = l.Animation.componentTween(e, "44db0545:652:57", 0), e.opacityTween = l.Animation.componentTween(e, "44db0545:653:58", 0), e; } return e.__extends(n, t), n.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return e.props.scrollerState.scrollbarOffset; }, function(t) { return e.updateTweens(t); }, { fireImmediately: !0 }), this.reaction(function() { return e.props.scrollerState.scrollbarHeight; }, function(t) { e.heightTween.set(t), e.opacityTween.to(e.visible ? 1 : 0), e.keepScrollbarVisibleFor(1e3); }, { fireImmediately: !0 }), this.reaction(function() { return e.visible; }, function(t) { e.opacityTween.to(t ? 1 : 0); }, { fireImmediately: !0 }); }, n.prototype.shouldComponentUpdate = function(e) { return !1; }, n.prototype.updateTweens = function(e) { this.props.shouldTween && this.props.shouldTween() ? this.translateTween.to(e.y > 0 && isFinite(e.y) ? e.y : 0) : this.translateTween.set(e.y > 0 && isFinite(e.y) ? e.y : 0), this.twinkle.buildInfo.isConsole && this.keepScrollbarVisibleFor(1e3); }, n.prototype.keepScrollbarVisibleFor = function(e) { var t = this; this.shouldKeepScrollbarVisible = !0, clearTimeout(this.keepScrollbarVisibleTimeout), this.keepScrollbarVisibleTimeout = setTimeout(u.action(function() { t.shouldKeepScrollbarVisible = !1; }), e); }, Object.defineProperty(n.prototype, "visible", { get: function() { return !(!this.props.scrollerState.canScrollUp && !this.props.scrollerState.canScrollDown) && (!(!this.shouldKeepScrollbarVisible || !1 === this.props.enabled) || ("auto" === this.props.enabled ? this.props.scrollerState.focusAncestor.hasFocusedChild || this.props.scrollerState.isHovered : !0 === this.props.enabled)); }, enumerable: !0, configurable: !0 }), n.prototype.render = function() { var e = h.merge3(E.scrollbarContainer, (this.props.position, E.outside), this.opacityTween.getStyleClass("opacity")), t = h.merge3(E.scrollIndicator, this.heightTween.getStyleClass("height"), this.translateTween.getStyleClass("translateY")); return r.createElement("surface", { style: e }, r.createElement("surface", { style: t })); }, n.contextTypes = S.TwinkleContext.contextTypes, n.defaultProps = { enabled: "auto", position: "outside", shouldTween: function() { return g.focusSystem.controllerMode; } }, e.__decorate([ u.observable ], n.prototype, "shouldKeepScrollbarVisible", void 0), e.__decorate([ u.action ], n.prototype, "keepScrollbarVisibleFor", null), e.__decorate([ u.computed ], n.prototype, "visible", null), n; }(r.Component); t.Scrollbar = C; var I = h.StaticStyle.create({ flex: 1, flexDirection: "row", layer: !0, layerClip: !0 }, "44db0545:789:37"), A = function(t) { function n() { var e = null !== t && t.apply(this, arguments) || this; return e.softClipTweens = [ l.Animation.componentTween(e, "44db0545:759:39", 0), l.Animation.componentTween(e, "44db0545:760:39", 0), l.Animation.componentTween(e, "44db0545:761:39", 0), l.Animation.componentTween(e, "44db0545:762:39", 0) ], e; } return e.__extends(n, t), n.prototype.componentWillMount = function() { var e = this; this.reaction(function() { return e.props.scrollerState.smartSoftClipModifier; }, function() { return e.updateSoftClip(); }, { fireImmediately: !0 }); }, n.prototype.componentDidUpdate = function() { this.updateSoftClip(); }, n.prototype.updateSoftClip = function() { var e = this, t = this.props.softClip || [ 0, 0, 0, 0 ]; this.props.scrollerState.smartSoftClipModifier.map(function(n, r) { return e.softClipTweens[r].set(Math.max(n * t[r], 0)); }); }, n.prototype.render = function() { var e = this.props, t = e.clipMargin, n = e.maxWidth, o = e.maxHeight, i = h.merge3(I, h.merge4(this.softClipTweens[0].getStyleClass("layerSoftClipTop"), this.softClipTweens[1].getStyleClass("layerSoftClipRight"), this.softClipTweens[2].getStyleClass("layerSoftClipBottom"), this.softClipTweens[3].getStyleClass("layerSoftClipLeft")), h.DynamicStyle.create({ maxWidth: n, maxHeight: o, margin: t ? t.map(function(e) { return -e; }) : void 0, padding: t }, "44db0545:801:15")); return r.createElement("surface", { style: i, onMouseScroll: this.props.onMouseScroll, onMouseEnter: this.props.onMouseEnter, onMouseLeave: this.props.onMouseLeave }, r.createElement("surface", { style: m.CommonStyles.flex1 }, this.props.children)); }, n = e.__decorate([ s.observer ], n); }(r.Component); function w(e, t, n) { return void 0 === n && (n = 5), Math.abs(e - t) <= n; } function P(e) { var t = e.map(function(e) { return e.bounds; }), n = Number.MAX_VALUE, r = Number.MAX_VALUE, o = -Number.MAX_VALUE, i = -Number.MAX_VALUE; return t.forEach(function(e) { e && (e.left < n && (n = e.left), e.top < r && (r = e.top), e.right > o && (o = e.right), e.bottom > i && (i = e.bottom)); }), new a.Bounds(n, r, o - n, i - r); } }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(4), a = n(7), s = n(33), u = n(24), l = n(495), c = n(295), p = n(5), d = n(9), f = n(19), m = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.getTheme = f.ThemeContext.getFromComponent(t), t.scroller = o.createRef(), t; } return r.__extends(t, e), t.prototype.scrollTo = function(e, t) { this.scroller.current && this.scroller.current.scrollTo(e, t); }, Object.defineProperty(t.prototype, "style", { get: function() { return this.getTheme().legacyTemplate; }, enumerable: !0, configurable: !0 }), t.prototype.renderHeader = function() { if (this.props.header) { var e = this.props.shortHeader ? this.style.shortHeader : this.style.header; return o.createElement("surface", { style: p.merge2(e, this.props.headerStyle || p.emptyStyle) }, this.props.header, this.props.showDivider && o.createElement(c.Divider, { style: this.style.divider })); } }, t.prototype.renderAboveContent = function() { if (this.props.aboveContent) return o.createElement("surface", { style: this.style.aboveContent }, this.props.aboveContent); }, t.prototype.renderBelowContent = function() { if (this.props.belowContent) return o.createElement("surface", { style: this.style.belowContent }, this.props.belowContent); }, t.prototype.render = function() { var e = this.style, t = this.props.wideContent && a.COMPRESSED ? u.safeZone.width : u.content.width; return this.props.scrollContent && a.COMPRESSED && this.props.verticalIndicator && this.props.wideContent && (t -= a.GUTTER), o.createElement("surface", { style: e.container }, (this.props.debugGrid || e.debugGrid, null), this.renderHeader(), this.renderAboveContent(), o.createElement("surface", { style: e.contentWrapper(this.props.tallContent) }, this.props.scrollContent ? o.createElement(s.Scroller, { ref: this.scroller, style: e.scroller({ width: t }), controller: this.props.scrollListener, softClip: e.softClipping, focus: this.props.scrollToFocus, scrollbar: !!this.props.verticalIndicator && "auto", noHorizontalScroll: this.props.noHorizontalScroll }, this.props.children) : o.createElement(l.Clipper, { width: t, height: u.content.height, clipContent: this.props.clipContent, clipPadding: e.clipPadding, softClip: e.softClipping }, this.props.children)), this.renderBelowContent()); }, t.defaultProps = { tallContent: a.COMPRESSED, scrollContent: d.SpartaGlobals.bundleIsPC, scrollToFocus: d.SpartaGlobals.bundleIsConsole, clipContent: !1, shortHeader: !1, debugGrid: !1, wideContent: !1, verticalIndicator: a.COMPRESSED }, t.contextTypes = f.ThemeContext.contextTypes, t = r.__decorate([ i.observer ], t); }(o.Component); t.Template = m; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(4), a = n(5), s = n(19), u = function(t) { function n(e, n) { var r = t.call(this, e, n) || this; return r.getTheme = s.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta, r.setSurfaceId = function(e) { r.surfaceId = e, r.surfaceId && !1 === r.props.wait && r.sparta.twinkle.nativeApi.playSpriteAnimation(r.surfaceId, !0); }, r.timeout = 0, !1 !== e.wait && (r.waitTimeout = setTimeout(function() { r.surfaceId && r.sparta.twinkle.nativeApi.playSpriteAnimation(r.surfaceId, !0); }, r.props.wait ? r.props.wait : 500)), r; } return r.__extends(n, t), n.prototype.componentDidMount = function() { var t = this; this.timeout = setTimeout(function() { var n = "Spinner component " + t.surfaceId + " has been mounted for 15+ seconds, stuck in an endless loading state?"; e.warn(n); }, 15e3); }, n.prototype.componentWillUnmount = function() { clearTimeout(this.timeout), clearTimeout(this.waitTimeout); }, n.prototype.render = function() { var e = this.props, t = e.style, n = e.large, r = e.small, i = this.getTheme().spinner, s = i.medium; n ? s = i.large : r && (s = i.small); var u = a.merge3(i.size(s), i.spriteAnimation, t || a.emptyStyle); return o.createElement("surface", { style: u, onSurfaceId: this.setSurfaceId }); }, n.contextTypes = s.ThemeContext.contextTypes, n = r.__decorate([ i.observer ], n); }(o.Component); t.Spinner = u; var l = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.getTheme = s.ThemeContext.getFromComponent(t), t; } return r.__extends(t, e), t.prototype.render = function() { var e = this.getTheme().spinner; return o.createElement("surface", { style: e.center }, o.createElement(u, r.__assign({}, this.props))); }, t.contextTypes = s.ThemeContext.contextTypes, t = r.__decorate([ i.observer ], t); }(o.Component); t.CenteredSpinner = l; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(53), i = function() { function e(e, t, n, r, o, i, a, s, u, l, c, p) { this.platform = e, this.buildConfig = t, this.scriptEngine = n, this.fbBranchName = r, this.fbDatabaseId = o, this.features = i, this.functions = a, this.surfaceProps = s, this.codeChangeList = u, this.dataChangeList = l, this.saveGameVersion = c, this.patchVersion = p; } return e.prototype.isFeatureSupported = function(e) { var t = this.features[e]; return !!t && t.enabled; }, e.prototype.isFunctionSupported = function(e) { return !!this.functions[e]; }, e.prototype.isAlpha = function() { return -1 !== this.fbDatabaseId.indexOf("Alpha") || -1 !== this.fbBranchName.indexOf("Alpha"); }, e.prototype.isBeta = function() { return -1 !== this.fbDatabaseId.indexOf("Beta") || -1 !== this.fbBranchName.indexOf("Beta"); }, e.prototype.isCTE = function() { return -1 !== this.fbDatabaseId.indexOf("CTE"); }, e.prototype.isEventBuild = function() { return -1 !== this.fbDatabaseId.indexOf("Events"); }, e.prototype.isRetail = function() { return "retail" === this.buildConfig; }, e.prototype.hasTextureFadeIn = function() { return this.surfaceProps.hasOwnProperty("textureFadeInTime"); }, e.prototype.hasMutableDefaultSurface = function() { return this.hasTextureFadeIn(); }, e.prototype.isEndUserBuild = function() { return "final" !== this.buildConfig && "performance" !== this.buildConfig && "release" !== this.buildConfig && "debug" !== this.buildConfig; }, e.prototype.getSurfaceProps = function() { var e = Object.keys(this.surfaceProps); return 0 === e.length ? [ "enable", "zIndex", "zOffset", "blendMode", "layer", "layerOpacity", "layerBlur", "layerBlurStrength", "layerBlurTintColor", "layerBlurSamples", "layerBlurPass", "layerClip", "layerSoftClip", "layerGrabBackground", "layerClearColor", "layerGrayScale", "layerStereoPostProcess", "layerStereoPostProcessIntensity", "layerStereoPostProcessColorShift", "layerStereoPostProcessScanlines", "layerStereoPostProcessDistort", "localBounds", "focusable", "events", "opacity", "selfOpacity", "backgroundColor", "borderColor", "color", "grayScale", "text", "textEdgeOffset", "textSoftness", "textLetterSpacing", "textLineSpacing", "enableMouseEvents", "texture", "video", "textureMode", "textureAlign", "textureOffset", "textureOffsetX", "textureOffsetY", "textureScale", "textureRotateZ", "textureBorder", "texture1", "video1", "texture1Mode", "texture1Align", "texture1Offset", "texture1OffsetX", "texture1OffsetY", "texture1Scale", "texture1RotateZ", "texture1Border", "texture2", "video2", "texture2Mode", "texture2Align", "texture2Offset", "texture2OffsetX", "texture2OffsetY", "texture2Scale", "texture2RotateZ", "texture2Border", "texture3", "video3", "texture3Mode", "texture3Align", "texture3Offset", "texture3OffsetX", "texture3OffsetY", "texture3Scale", "texture3RotateZ", "texture3Border", "width", "height", "minWidth", "maxWidth", "minHeight", "maxHeight", "flex", "flexWrap", "flexDirection", "fontFamily", "fontSize", "justifyContent", "alignContent", "alignItems", "alignSelf", "textAlign", "wordWrap", "whiteSpace", "position", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "left", "top", "right", "bottom", "translate", "translateX", "translateY", "translateZ", "rotate", "rotateX", "rotateY", "rotateZ", "scale", "scaleX", "scaleY", "borderSize", "shaderUrl", "shaderProgram", "shaderSurfaceUv", "spriteAnimation", "borderRadius" ] : ([ "texture", "texture1", "texture2", "texture3", "spriteAnimation" ].forEach(function(t) { -1 === e.indexOf(t) && e.push(t); }), e); }, e.prototype.isRemoteEngine = function() { return "remote" === this.scriptEngine; }, e.prototype.hasBatchedRemoteCalls = function() { return this.isRemoteEngine() && this.isFeatureSupported("BatchedRemoteCalls"); }, e.prototype.hasLoadAssetRequest = function() { return this.isFeatureSupported("LoadAssetRequest"); }, e.prototype.hasConsoleCalls = function() { return this.isFeatureSupported("ConsoleCalls"); }, e.prototype.hasDebugHttp = function() { return this.isFeatureSupported("DebugHttp"); }, e.prototype.hasGetStyle = function() { return this.isFunctionSupported("getStyle"); }, e.prototype.hasVerifyCodeSignature = function() { return this.isFeatureSupported("VerifyCodeSignature"); }, e.prototype.hasUseTextureUrl = function() { return this.isFeatureSupported("UseTextureUrl"); }, e.prototype.hasJsStartSync = function() { return this.isFeatureSupported("JsStartSync"); }, e.prototype.hasJsCreateAtlas = function() { return this.isFeatureSupported("JsCreateAtlas"); }, e.prototype.hasAudioBus = function() { return this.isFeatureSupported("AudioBus"); }, e.prototype.hasVideoSaveCacheOnDisk = function() { return this.isFeatureSupported("VideoSaveCacheOnDisk"); }, e.prototype.hasScreenshotFiles = function() { return this.isFeatureSupported("ScreenshotFiles"); }, e.prototype.hasVideoRenderWorld = function() { return this.isFeatureSupported("VideoRenderWorld"); }, e.prototype.hasSetGlyphSamplesSync = function() { return this.isFeatureSupported("SetGlyphSamplesSync"); }, e.prototype.hasSetGlyphTextureSizeSync = function() { return this.isFeatureSupported("SetGlyphTextureSizeSync"); }, e.prototype.hasSetFullscreenResampleSync = function() { return this.isFeatureSupported("SetFullscreenResampleSync"); }, e.prototype.hasSurfaceDebugHighlight = function() { return this.isFeatureSupported("SurfaceDebugHighlight"); }, e.prototype.hasOpenUrl = function() { return this.isFeatureSupported("OpenUrl"); }, Object.defineProperty(e.prototype, "isPC", { get: function() { return "win64" === this.platform; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "isXboxOne", { get: function() { return "xboxone" === this.platform; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "isConsole", { get: function() { return !this.isPC; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "bundlePlatform", { get: function() { return this.isPC ? "PC" : this.isPS4 ? "PS4" : this.isXboxOne ? "XBOXONE" : "UNKNOWN"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "isPS4", { get: function() { return "ps4" === this.platform; }, enumerable: !0, configurable: !0 }), e.prototype.hasSDF = function() { return this.hasConsoleCalls(); }, e; }(); function a() { if (!r) try { var e = o.nativeApi.getBuildInfoSync(), t = e.features, n = e.platform, a = e.buildConfig, s = e.scriptEngine, u = e.branchName || "", l = e.databaseId || "", c = e.functions || {}, p = e.surfaceProps || {}, d = e.codeChangeList, f = e.dataChangeList, m = e.saveGameVersion, h = e.patchVersion; r = new i(n, a, s, u, l, t, c, p, d, f, m, h); } catch (e) { r = new i("unknown", "unknown", "unknown", "unknown", "unknown", {}, {}, {}, void 0, void 0, void 0, void 0); } return r; } t.BuildInfo = i, t.getBuildInfo = a, t.platformTranslation = function s(e, t, n) { return r || a(), r.isPS4 ? n : r.isXboxOne ? t : e; }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e[e.Up = 2] = "Up", e[e.Down = 3] = "Down"; }(t.Direction || (t.Direction = {})), function(e) { e[e.HORIZONTAL = 1] = "HORIZONTAL", e[e.VERTICAL = 2] = "VERTICAL", e[e.WRAP_AROUND = 4] = "WRAP_AROUND", e[e.EDGE_STOP = 8] = "EDGE_STOP", e[e.REMEMBER_LAST_FOCUSED_MEMBER = 16] = "REMEMBER_LAST_FOCUSED_MEMBER", e[e.PREFER_FIRST_MEMBER_OVER_TARGET = 32] = "PREFER_FIRST_MEMBER_OVER_TARGET"; }(t.GroupBehavior || (t.GroupBehavior = {})), function(e) { e[e.STOP = 0] = "STOP", e[e.FALLTHROUGH = 1] = "FALLTHROUGH", e[e.HIT = 2] = "HIT"; }(t.NavigationResultType || (t.NavigationResultType = {})), function(e) { e[e.Spatial = 0] = "Spatial", e[e.Mouse = 1] = "Mouse", e[e.Auto = 2] = "Auto"; }(t.FocusSource || (t.FocusSource = {})); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(1), o = n(916), i = n(6), a = n(9), s = 0; var u = function() { return function e(t) { var n = this; this.showCloseButton = !1, this.createdDate = new Date(), this.id = t.id || "popup" + s++, this.group = t.group || "default", this.content = function u(e) { return "string" == typeof e ? r.createElement(i.Text, { value: e }) : e; }(t.content), this.createButtons = void 0 !== t.createButtons ? t.createButtons : a.SpartaGlobals.bundleIsPC, this.fullScreen = void 0 !== t.fullScreen && t.fullScreen, this.onTop = void 0 !== t.onTop && t.onTop, this.onClose = t.onClose, this.onOpen = t.onOpen, this.containContent = void 0 === t.containContent || t.containContent, this.centerContent = void 0 === t.centerContent || t.centerContent, this.backgroundColor = t.backgroundColor, this.requireOnline = t.requireOnline, this.disableBlur = t.disableBlur, this.buttonStyle = t.buttonStyle, this.useInputStore = t.useInputStore || !1, this.leftAlignInputs = void 0 !== t.leftAlignInputs && t.leftAlignInputs, this.priority = "number" == typeof t.priority ? t.priority : 0, this.stackable = void 0 !== t.stackable && t.stackable, this.instantShow = void 0 !== t.instantShow && t.instantShow, this.closePopupOnAction = void 0 === t.closePopupOnAction || t.closePopupOnAction, t.contentHandleInputRegistration && (this.contentHandleInputRegistration = t.contentHandleInputRegistration); var l = t.inputs || []; this.inputs = l.map(function(e) { return new o.PopupInput(Object.assign({}, e, { popup: n })); }); var c = t.content; "string" != typeof c && "string" != typeof c.type && (this.showCloseButton = function p(e) { return !!e.showCloseButton; }(c.type)); }; }(); t.Popup = u; }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(1), o = n(14), i = n(25), a = n(11), s = n(10), u = n(4), l = n(6), c = n(73), p = n(5), d = n(21), f = n(29), m = n(70), h = n(37), g = n(19), y = function(t) { function n(e, n) { var r = t.call(this, e, n) || this; return r.getTheme = g.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta, r.getInput = function() { var e = []; return r.props.noFocus && r.props.highlight && e.push(new a.Input({ label: r.props.inputLabel ? r.props.inputLabel : __("ID_SPARTA_ACTION_SELECT"), action: r.props.action, key: s.Keys.Accept, blockInputFor: r.props.blockInputFor })), e; }, r.focusItem = e.focusItem || r.sparta.twinkle.focus.create(r, e.name), r.props.disableAutoFocus || (r.focusItem.autoFocusCandidate = !0), m.onComponentUpdate(r, function(e) { r.focusItem.setActive("fabddbc4:82:38", !e.disabled); }), r; } return e.__extends(n, t), n.prototype.componentWillMount = function() { var e = this.getTheme().button; this.bgColorTween = o.Animation.tween("fabddbc4:88:45", e.backgroundColor, { duration: e.tweenDuration }), this.bgOverlayTween = o.Animation.tween("fabddbc4:91:47", e.backgroundOverlayColor, { duration: e.tweenDuration }), this.showOnHoverTween = o.Animation.tween("fabddbc4:94:49", 0, { duration: e.tweenDuration }), this.hideOnHoverTween = o.Animation.tween("fabddbc4:95:49", 1, { duration: e.tweenDuration }); }, n.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return [ e.focusItem.isFocused, e.focusItem.isHovered ]; }, function(t) { var n = t[0], r = t[1]; if (!e.showOnHoverTween.isDestroyed() && !e.hideOnHoverTween.isDestroyed()) { var o = !e.props.noFocus && !e.props.disabled; e.toggleHighlight(n && o, r && o); } }, { fireImmediately: !0 }), this.props.stealFocus && this.sparta.twinkle.focus.setAsFocused(this.focusItem, h.FocusSource.Auto, !0); }, n.prototype.componentWillUnmount = function() { this.bgColorTween.destroy(), this.bgOverlayTween.destroy(), this.showOnHoverTween.destroy(), this.hideOnHoverTween.destroy(); }, n.prototype.componentWillReceiveProps = function(e) { this.props.noFocus && void 0 !== e.highlight && this.props.highlight !== e.highlight && this.toggleHighlight(e.highlight); }, n.prototype.toggleHighlight = function(e, t) { var n = this.getTheme().button, r = t ? n.backgroundHoverColor : e ? n.backgroundFocusColor : n.backgroundColor, i = t ? n.backgroundOverlayHoverColor : e ? n.backgroundOverlayFocusColor : n.backgroundOverlayColor, a = e || t, s = a ? 1 : 0, u = a ? 0 : 1; n.tweenDuration ? (this.bgColorTween.to(r), this.bgOverlayTween.to(i), this.showOnHoverTween.to(s), this.hideOnHoverTween.to(u)) : this.sparta.twinkle.focus.controllerMode ? (this.bgColorTween.to(r, o.Animation.presets.focusables.enter.default), this.bgOverlayTween.to(i, o.Animation.presets.focusables.enter.default), this.showOnHoverTween.to(s, o.Animation.presets.focusables.enter.default), this.hideOnHoverTween.to(u, o.Animation.presets.focusables.enter.default)) : (this.bgColorTween.set(r), this.bgOverlayTween.set(i), this.showOnHoverTween.set(s), this.hideOnHoverTween.set(u)); }, n.prototype.getContent = function() { return this.props.content ? { disabled: this.props.content.disabled, normal: r.createElement("surface", { style: this.hideOnHoverTween.getStyleClass("opacity") }, this.props.content.normal), hover: r.createElement("surface", { style: this.showOnHoverTween.getStyleClass("opacity") }, this.props.content.hover) } : this.props.icon ? this.getIcons() : this.props.text ? this.getTexts() : { disabled: void 0, normal: void 0, hover: void 0 }; }, n.prototype.getTexts = function() { var e = this.getTheme().button, t = this.props, n = t.textSize, o = t.textType, i = t.textStyle, a = this.props.text && this.props.upperCase ? this.props.text.toUpperCase() : this.props.text || ""; return { disabled: r.createElement(l.Text, { value: a, size: n, key: "disabled", type: o, style: p.merge2(e.text(!1, !1), i) }), normal: r.createElement(l.Text, { value: a, size: n, key: "normal", type: o, style: p.merge3(e.text(!1, !1), this.hideOnHoverTween.getStyleClass("opacity"), i) }), hover: r.createElement(l.Text, { value: a, size: n, key: "hover", type: e.boldHoverText ? f.TextType.EMPHASIS : o, style: p.merge3(e.text(!0, this.focusItem.isHovered), this.showOnHoverTween.getStyleClass("opacity"), i) }) }; }, n.prototype.getIcons = function() { var e = this.getTheme().button, t = this.props, n = t.icon, o = t.size; return n ? { disabled: r.createElement("surface", { style: e.icon({ texture: n.normal, size: o, disabled: !0 }) }), normal: r.createElement("surface", { style: p.merge2(e.icon({ texture: n.normal, size: o }), this.hideOnHoverTween.getStyleClass("opacity")) }), hover: r.createElement("surface", { style: p.merge2(e.icon({ texture: n.hover, size: o, hover: !0 }), this.showOnHoverTween.getStyleClass("opacity")) }) } : { disabled: void 0, normal: void 0, hover: void 0 }; }, n.prototype.render = function() { var t = this.getTheme(), n = t.components.HoverSFX, o = t.button, u = this.props, d = u.text, f = u.inputLabel, m = u.action, h = u.disabled, g = u.style, y = u.blockInputFor, S = u.upperCase, v = u.fitContent, b = u.noFocus, _ = this.getContent(), T = p.merge2(o.button(h), p.DynamicStyle.maybeLegacyStyle(g, "fabddbc4:294:60")), E = this.bgColorTween.getStyleClass("backgroundColor"), C = this.bgOverlayTween.getStyleClass("backgroundColor"); if (h) return r.createElement(i.InputRegistration, { debugName: "fabddbc4:301:47", getInput: this.getInput }, r.createElement(n, { focusItem: this.focusItem }, r.createElement("surface", e.__assign({ style: T }, this.focusItem.hooks), r.createElement("surface", { style: p.merge2(o.background, E) }), r.createElement("surface", { style: o.border }), r.createElement("surface", { style: o.textContainer(v) }, _.disabled)))); if (b) return r.createElement(i.InputRegistration, { debugName: "fabddbc4:313:47", getInput: this.getInput }, r.createElement(n, { focusItem: this.focusItem }, r.createElement("surface", { style: T }, r.createElement("surface", { style: p.merge2(o.background, E) }), r.createElement("surface", { style: o.border }), r.createElement("surface", { style: o.textContainer(v) }, _.hover), r.createElement("surface", { style: o.textContainer(v) }, _.normal)))); var I = m ? new a.Input({ label: f || __("ID_SPARTA_ACTION_SELECT"), action: m, key: s.Keys.Accept, blockInputFor: y }) : void 0, A = v && r.createElement(l.Text, { value: d && S ? d.toUpperCase() : d, size: this.props.textSize, style: o.boxFiller }); return r.createElement(i.InputRegistration, { debugName: "fabddbc4:343:47", getInput: this.getInput }, r.createElement(n, { focusItem: this.focusItem }, r.createElement(c.Pressable, { input: I, glow: o.borderGlow, style: T, focusItem: this.focusItem }, r.createElement("surface", { style: p.merge2(o.background, E) }), r.createElement("surface", { style: p.merge2(o.backgroundOverlay, C) }), r.createElement("surface", { style: o.border }), A, r.createElement("surface", { style: o.textContainer(v) }, _.hover), r.createElement("surface", { style: o.textContainer(v) }, _.normal)))); }, n.contextTypes = g.ThemeContext.contextTypes, n.defaultProps = { noFocus: !1, blockInputFor: 500, textSize: d.TextSize.S, textType: f.TextType.NORMAL, text: " ", upperCase: !0 }, n = e.__decorate([ u.observer ], n); }(r.Component); t.Button = y; }).call(this, n(3)); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(1), o = n(4), i = n(77), a = n(5), s = n(37), u = n(11), l = n(10), c = n(6), p = n(21), d = n(19), f = function(t) { function n(e, n) { var r = t.call(this, e, n) || this; return r.getTheme = d.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta, r.focusItem = e.focusItem || r.sparta.twinkle.focus.create(r, e.name), r.focusItem.autoFocusCandidate = !e.disableAutoFocus, r.input = new u.Input({ label: __("ID_SPARTA_ACTION_SELECT", !0), action: function() { return r.props.action && r.props.action(); }, key: l.Keys.Accept, blockInputFor: e.blockInputFor }), r.sparta.stores.inputStore.bindInputToFocusItem(function() { return r.props.disabled ? void 0 : r.input; }, r.focusItem), r; } return e.__extends(n, t), n.prototype.componentDidMount = function() { this.props.stealFocus && this.sparta.twinkle.focus.setAsFocused(this.focusItem, s.FocusSource.Auto, !0); }, n.prototype.render = function() { var t = this.props, n = t.text, o = t.disabled, i = t.style, s = t.upperCase, u = t.textSize, l = t.children, p = t.textStyle, d = this.focusItem.isFocused, f = this.focusItem.isHovered, h = this.focusItem.isPressed, g = this.getTheme(), y = g.components.HoverSFX, S = g.button2; return r.createElement(y, { focusItem: this.focusItem }, r.createElement("surface", e.__assign({ style: a.merge2(S.button(o, d, f, h), i) }, this.focusItem.hooks), S.showGlow && r.createElement(m, { focusItem: this.focusItem }), S.showBorder && r.createElement("surface", { style: S.border }), S.showOverlay && r.createElement("surface", { style: S.overlay(o, d, f, h) }), l && l({ disabled: o, isFocused: d, isHovered: f, isPressed: h }), n ? r.createElement(c.Text, { value: s ? n.toUpperCase() : n, size: u, type: S.textType, style: a.merge2(S.text(o, d, f, h), p) }) : r.createElement("surface", null))); }, n.contextTypes = d.ThemeContext.contextTypes, n.defaultProps = { blockInputFor: 500, disabled: !1, upperCase: !0, text: " ", textSize: p.TextSize.S }, n = e.__decorate([ o.observer ], n); }(r.Component); t.Button = f; var m = i.observer(function e(t) { var n = t.focusItem, o = d.useTheme().button2; return r.createElement("surface", { style: o.glow(n.isFocusedOrHovered) }); }); }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(9); !function(e) { e.SSL = "SSL", e.XL = "XL", e.L = "L", e.SSM = "SSM", e.M = "M", e.S = "S", e.SW = "SW"; }(t.CardSize || (t.CardSize = {})), function(e) { e.S = "S"; }(r || (r = {})); t.CARD_WIDTH = o.SpartaGlobals.bundleIsPC ? { cells: { SSL: 9.6, XL: 6, L: 8, SSM: 4.8, M: 4, S: 5, SW: 5.75 }, parts: { S: 8 } } : { cells: { SSL: 12, XL: 6, L: 10, SSM: 6, M: 5, S: 4, SW: 5.75 }, parts: { S: 8 } }, t.CARD_HEIGHT = o.SpartaGlobals.bundleIsPC ? { cells: { SSL: 43.5, XL: 55, L: 35.5, SSM: 43.5, M: 35.5, S: 22, SW: 22 }, parts: { S: 3.55 } } : { cells: { SSL: 55, XL: 55, L: 45, SSM: 55, M: 45, S: 34, SW: 22 }, parts: { S: 3.4 } }; }, function(e, t) { e.exports = function(e) { try { return !!e(); } catch (e) { return !0; } }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.stopGame = r.createTypedAction(), t.joinServer = r.createTypedAction(), t.joinLanServer = r.createTypedAction(), t.joinFriend = r.createTypedAction(), t.joinMatchmakingResult = r.createTypedAction(), t.handleJoinReady = r.createTypedAction(), t.refreshInstalledGames = r.createTypedAction(), t.setInstalledExpansions = r.createTypedAction(), t.joinedServer = r.createTypedAction(), t.leftServer = r.createTypedAction(), t.sendServerInvite = r.createTypedAction(), t.activateEor = r.createTypedAction(), t.enterSpecificGameMode = r.createTypedAction(); }, function(e, t) { e.exports = function(e) { return "object" == typeof e ? null !== e : "function" == typeof e; }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(365), o = n(70); t.createTypedAction = function i() { var e = new r.Publisher(), t = function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; e.publish.apply(e, t); }; return t.listen = e.listen.bind(e), t.subscribeTo = function(t, n) { o.addLifecycleHook(t, "componentWillUnmount", e.listen(n)); }, t; }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(955); function o(e) { return r.requesterClient(e); } function i() { r.instances.forEach(function(e) { return e.reset(); }); } t.createClient = o, t.resetClients = i, t.requester = { createClient: o, resetClients: i }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45), o = n(132), i = n(172); t.getCampaignEpisodes = r.createTypedAction(), t.selectCurrentMedal = r.createTypedAction(), t.getCurrentMedals = r.createTypedAction(), t.gameShowOptions = r.createTypedAction(), t.gameShowCredits = r.createTypedAction(), t.joinGame = r.createTypedAction(), t.enterOperations = r.createTypedAction(), t.enterCampaign = r.createTypedAction(), t.quitCampaign = r.createTypedAction(), t.fetchEorData = r.createTypedAction(), t.updateUnrankedEorData = r.createTypedAction(), t.endOfRoundCountdownCompleted = r.createTypedAction(), t.showLoadout = r.createTypedAction(), t.viewBlueprint = r.createTypedAction(), t.claimBlueprint = r.createTypedAction(), t.scrapItem = r.createTypedAction(), t.scrapDuplicateItems = r.createTypedAction(), t.getBattlepackScrapExchange = r.createTypedAction(), t.buyBattlepackScrapExchange = r.createTypedAction(), t.showCodex = r.createTypedAction(), t.showReportEmblemFromGame = r.createTypedAction(), t.receivedPlayerList = i.frostbiteListenable("tunguska.getPlayerListResponse"), t.getPlayerList = o.frostbiteAction("tunguska.getPlayerList"); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(1), r = n(6), o = n(25), i = n(11), a = n(10), s = n(40), u = n(5), l = n(29), c = n(19), p = n(8); t.EmptyState = function d(t) { var n = t.text, d = t.subText, f = t.centerVertically, m = t.textWidth, h = t.retryAction, g = t.style, y = t.children, S = p.SpartaContext.use(), v = c.useTheme().emptyState, b = e.useCallback(function() { if (h && S.twinkle.focus.controllerMode) return new i.Input({ visible: !0, label: __("ID_SPARTA_ACTION_RETRY"), action: h, key: a.Keys.Accept }); }, [ h ]); return e.createElement(o.InputRegistration, { debugName: "05d480a2:49:39", getInput: b }, e.createElement("surface", { style: u.merge2(v.container({ centerVertically: f }), g) }, n ? e.createElement(r.Text, { value: n.toUpperCase(), size: "M", type: l.TextType.NORMAL, style: v.text({ textWidth: m }) }) : null, d ? e.createElement(r.Text, { value: d, size: "S", style: v.subText({ textWidth: m }), type: v.subTextType }) : null, h && S.twinkle.buildInfo.isPC && e.createElement(s.Button, { name: "05d480a2:70:35", text: __("ID_SPARTA_ACTION_RETRY"), action: h, style: v.btn }), y)); }; }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e[e.None = 0] = "None", e[e.FrontEnd = 1] = "FrontEnd", e[e.LoadingScreen = 2] = "LoadingScreen", e[e.InGameMenu = 3] = "InGameMenu", e[e.EndOfRound = 4] = "EndOfRound"; }(t.NavigationStates || (t.NavigationStates = {})); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.show = r.createTypedAction(), t.hide = r.createTypedAction(), t.route = r.createTypedAction(), t.browseWhileWaiting = r.createTypedAction(); }, function(e, t) { var n = e.exports = { version: "2.5.3" }; "number" == typeof __e && (__e = n); }, function(e, t, n) { var r = n(44); e.exports = function(e) { if (!r(e)) throw TypeError(e + " is not an object!"); return e; }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(859), i = n(485), a = n(486), s = n(860), u = n(862), l = n(92); if (l.globalScope.TwinkleNative) r = new i.InprocDelegate(); else if (l.globalScope.__TEST__) r = new a.MockDelegate(); else { var c = new u.RemoteEngine(); r = new o.RemoteDelegate(c); } t.nativeApi = new s.NativeAPI(r), r instanceof o.RemoteDelegate ? r.remoteEngine.onScriptCalls = t.nativeApi.onScriptCalls.bind(t.nativeApi) : r instanceof i.InprocDelegate ? l.globalScope.onScriptCalls = t.nativeApi.onScriptCalls.bind(t.nativeApi) : r instanceof a.MockDelegate && (r.onScriptCalls = t.nativeApi.onScriptCalls.bind(t.nativeApi)); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(1), o = n(11), i = n(26), a = n(38), s = n(69), u = n(10), l = n(7), c = n(6), p = n(40), d = n(115), f = n(20), m = n(35), h = n(5), g = n(2), y = n(383), S = n(150), v = n(19), b = n(212), _ = function(t) { function n() { var e = null !== t && t.apply(this, arguments) || this; return e.getTheme = v.ThemeContext.getFromComponent(e), e; } return e.__extends(n, t), n.prototype.render = function() { var e = this.props, t = this.getTheme().popup, n = t.message, o = []; return e.title && o.push(r.createElement(c.Text, { key: "title", value: e.title.toUpperCase(), size: t.titleTextSize, type: t.titleTextType, style: t.header })), e.image ? o.push(r.createElement("surface", { key: "image", style: h.merge2(h.DynamicStyle.create({ texture: e.image }, "8ade4bb3:53:52"), t.image) })) : e.customContent && o.push(e.customContent), e.switchTitleAndImage && (o = o.reverse()), r.createElement("surface", { style: t.container }, o, r.createElement(c.Text, { value: e.message, style: n, size: t.messageTextSize, type: t.messageTextType })); }, n.contextTypes = v.ThemeContext.contextTypes, n; }(r.Component); function T(e, n, r, i) { return void 0 === i && (i = 500), new o.Input({ label: r || t.buttonLabels.confirm(), key: n, blockInputFor: i, action: e }); } function E(e, n, r, o, i) { return void 0 === i && (i = 0), f.localeRearrange([ T(e, u.Keys.Accept, r || t.buttonLabels.confirm(), i), T(n, u.Keys.Decline, o || t.buttonLabels.deny()) ], !0); } t.MessageContent = _, t.buttonLabels = { confirm: function() { return __("ID_SPARTA_ACTION_OK", !0); }, deny: function() { return __("ID_SPARTA_ACTION_CANCEL", !0); }, continue: function() { return __("ID_SPARTA_ACTION_CONTINUE", !0); } }, t.createInput = T; var C = function() { return function e(t, n) { this.action = t, this.label = n; }; }(); function I(e, n, o, s, l, c) { return void 0 === l && (l = !1), new Promise(function(p) { i.display(new a.Popup({ content: r.createElement(_, { message: e, title: n, image: o, switchTitleAndImage: l }), inputs: [ T(p, u.Keys.Accept, t.buttonLabels.confirm()), T(s.action, s.key, s.label) ], createButtons: !0, onTop: !0, buttonStyle: c })); }); } function A(t, n, o, s, u, l, c) { return void 0 === u && (u = null), void 0 === l && (l = {}), void 0 === c && (c = {}), new Promise(function(p, d) { var f = u ? { id: u } : {}, m = c.blockInputFor ? c.blockInputFor : 500; i.display(new a.Popup(e.__assign({ content: r.createElement(_, { message: t, title: n }), inputs: E(function() { return p(!0); }, function() { return p(!1); }, o, s, m), createButtons: !0, onTop: !0 }, l, f))); }); } t.UserError = C, t.getMessageContent = function w(e, t) { return r.createElement(_, { message: e, title: t }); }, t.errorWithImageAndOption = function P(e, t, n, r, o, i, a) { return void 0 === i && (i = !1), S.telemetryStoreLoader.get().trackUserFacingError(e), I(t, n, r, o, i, a); }, t.alertWithImageAndOption = I, t.alertWithInputs = function R(e, t, n, o) { return new Promise(function(s) { i.display(new a.Popup({ content: r.createElement(_, { message: e, title: t }), inputs: n.map(function(e) { return T(function() { s(e.key), e.action && e.action(); }, e.key, e.label, e.blockInputFor); }), createButtons: !0, onTop: !0, buttonStyle: h.merge2(y.PopupStyles.buttonFlexible, o) })); }); }, t.loading = function O(t, n, o) { return new Promise(function(s) { var u = t ? { id: t } : {}; i.display(new a.Popup(e.__assign({ content: r.createElement(_, { message: o || "", title: n, customContent: r.createElement(m.Spinner, { key: "spinner", style: y.PopupStyles.spinner, large: !0 }), switchTitleAndImage: !0 }), onClose: s, onTop: !0 }, u))); }); }, t.displayLoadingUntilDefined = function x(e, t, n) { var o, u, l = s.autoId("when_loading"), c = !1, p = function() { c || (c = !0, i.close(l)); }; return i.display(new a.Popup({ content: r.createElement(_, { message: n.message || "", title: n.title, customContent: r.createElement(m.Spinner, { key: "spinner", style: y.PopupStyles.spinner, large: !0 }), switchTitleAndImage: !0 }), onTop: !0, id: l, onOpen: function() { u = setTimeout(function() { p(), o(), n.onTimeout(); }, n.timeout), o = g.reaction(function() { return e(); }, function(e) { void 0 !== e && (p(), o(), clearTimeout(u), t(e)); }, { name: l, fireImmediately: !0 }); } })), function() { p(), o && o(), u && clearTimeout(u); }; }, t.spartaConfirm = A, t.legacyConfirm = function k(t, n, r, o, i, a, s) { return void 0 === i && (i = null), void 0 === a && (a = {}), void 0 === s && (s = {}), e.__awaiter(this, void 0, Promise, function() { return e.__generator(this, function(e) { switch (e.label) { case 0: return [ 4, A(t, n, r, o, i, a, s) ]; case 1: if (!e.sent()) throw new Error("confirm onDeny callback triggered"); return [ 2 ]; } }); }); }; var M = h.StaticStyle.create({ marginBottom: l.GUTTER }, "8ade4bb3:483:28"), L = function(n) { function o(e, o) { var a = n.call(this, e, o) || this; return a.getTheme = v.ThemeContext.getFromComponent(a), a.sparta = a.getTheme().sparta, a.inputField = r.createRef(), a.getInput = function() { return [ T(a.onCancel, u.Keys.Decline, t.buttonLabels.deny()) ]; }, a.onOk = function() { a.inputField.current && a.props.onOk(a.inputField.current.state.value), a.props.popupInfo && i.close(a.props.popupInfo.id); }, a.onOkClicked = function() { a.props.onOkValidate && a.inputField.current ? a.props.onOkValidate(a.inputField.current.state.value).then(function() { return a.onOk(); }).catch(function(e) { console.error(e), a.setState({ isValid: !1, validationMessage: e }); }) : a.onOk(); }, a.onCancel = function() { a.props.popupInfo && i.close(a.props.popupInfo.id), a.props.onCancel(); }, a.onTypingInput = function(e) { if (!a.sparta.twinkle.buildInfo.isConsole) { var t = a.isTypingValid(e); a.state.isValid !== t && a.setState({ isValid: t }); } }, a.state = { isValid: !0, validationMessage: null }, a; } return e.__extends(o, n), o.prototype.isTypingValid = function(e) { var t = this.props, n = t.minLength, r = t.maxLength, o = t.onTypingValidate, i = e.trim(), a = i.length >= n && i.length <= r; return a && o ? o(i) : a; }, o.prototype.renderButtons = function() { var e = this.sparta.twinkle.buildInfo, n = this.getTheme().popup; return r.createElement("surface", { style: n.promptButtonContainer }, r.createElement(p.Button, { name: "8ade4bb3:444:27", text: this.props.confirmLabel || t.buttonLabels.confirm(), style: n.promptButton, textSize: n.buttonTextSize, action: this.onOkClicked, disabled: !this.state.isValid && e.isPC }), e.isPC ? r.createElement(p.Button, { name: "8ade4bb3:453:31", text: this.props.denyLabel || t.buttonLabels.deny(), style: n.promptButton, textSize: n.buttonTextSize, action: this.onCancel }) : null); }, o.prototype.render = function() { var e = this.getTheme().popup, t = this.renderButtons(); return r.createElement("surface", { style: e.container }, this.props.title ? r.createElement(c.Text, { value: this.props.title.toUpperCase(), size: e.titleTextSize, type: e.titleTextType, style: e.header }) : null, r.createElement(c.Text, { value: this.state.validationMessage || this.props.defaultMessage, size: e.messageTextSize, type: e.messageTextType, style: M }), r.createElement(d.InputField, { size: e.inputFieldTextSize, key: "field", ref: this.inputField, title: this.props.title || "", description: this.props.title || "", style: e.input, type: this.props.inputType, maxLength: this.props.maxLength, isInvalid: !this.state.isValid, onValueChanged: this.onTypingInput, deactivateOnBlur: !1, editKey: u.Keys.Accept }), t); }, o.contextTypes = v.ThemeContext.contextTypes, o.defaultProps = { defaultMessage: "" }, o; }(b.PopupComponent); t.prompt = function D(t, n, o, s, u) { return void 0 === u && (u = {}), new Promise(function(l, c) { i.display(new a.Popup(e.__assign({ id: "prompt", onTop: !0, content: r.createElement(L, { title: t, minLength: n, maxLength: o, inputType: s.inputType, defaultMessage: s.message, onTypingValidate: s.onTypingValidate, onOkValidate: s.onOkValidate, confirmLabel: s.confirmLabel, denyLabel: s.denyLabel, onOk: l, onCancel: function() { return c(new Error("Prompt onCancel callback triggered")); } }) }, u))); }); }; }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.showLocalUserSelectionUI = r.createTypedAction(), t.getOnlinePrivileges = r.createTypedAction(), t.showUserProfile = r.createTypedAction(), t.setUGCAccessLevel = r.createTypedAction(), t.refreshCareer = r.createTypedAction(), t.onSignInChange = r.createTypedAction(); }, function(e, t) { var n = e.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); "number" == typeof __g && (__g = n); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(0), i = n(2), a = n(378), s = n(49), u = n(54), l = n(38), c = n(26), p = n(10); !function(e) { e.Info = "Info"; }(r = t.ToastImageRef || (t.ToastImageRef = {})); var d = function() { function e(e, t, n, r) { this.twinkle = e, this.spartaActivatedStore = t, this.inputStore = n, this.telemetry = r, this.numOpenRIMEPopups = 0, this.onAlertDismissed = a.frostbiteListenable(this.twinkle.frostbite, "sparta.onPopupDismissed"), this.showToastNotification = a.frostbiteAction(this.twinkle.frostbite, "sparta.showToastNotification"), this.showInteractiveToastNotification = a.frostbiteActionWithResponse(this.twinkle.frostbite, "sparta.showToastNotification", "sparta.showToastNotificationResponse"); } return e.prototype.showAlert = function(e) { e.subtitle || delete e.subtitle, this.twinkle.frostbite.sendMessage("sparta.showPopup", e); }, e.prototype.resetIfLoading = function(e) { var t = this; return i.when(function() { return t.spartaActivatedStore.navigationState === s.NavigationStates.LoadingScreen || t.spartaActivatedStore.navigationState === s.NavigationStates.EndOfRound; }, e); }, e.standardAlert = function(e, t, n, r) { void 0 === r && (r = {}), c.display(new l.Popup(o.__assign({ content: u.getMessageContent(e, t), inputs: [ u.createInput(n, p.Keys.Accept, u.buttonLabels.confirm()) ], createButtons: !0, onTop: !0 }, r))); }, e.standardAlertWithOption = function(e, t, n, r, o) { var i = []; n.useConfirmInput && i.push(u.createInput(r, p.Keys.Accept, u.buttonLabels.confirm())); var a = n.customInput; a && i.push(u.createInput(a.action, a.key, a.label)), c.display(new l.Popup({ content: u.getMessageContent(e, t), inputs: i, createButtons: !0, onTop: !0, id: o })); }, e.prototype.alert = function(t, n, r, o, i) { void 0 === o && (o = {}), this.spartaActivatedStore.navigationState === s.NavigationStates.LoadingScreen || (this.spartaActivatedStore.navigationState, s.NavigationStates.EndOfRound), e.standardAlert(t, n, r, o); }, e.prototype.confirmWithError = function(e, t, n, r, o, i, a, s, u, l) { this.telemetry.trackUserFacingError(e), this.confirm(t, n, r, o, i, a, s, u, l); }, e.prototype.alertWithError = function(e, t, n, r, o) { this.telemetry.trackUserFacingError(e), this.alert(t, n, r, void 0, o); }, e.prototype.toasterWithError = function(e, t, n) { this.telemetry.trackUserFacingError(e), this.showToastNotification({ title: n.toUpperCase(), message: t, imageRef: r.Info, durationMs: 3e3 }); }, e.prototype.confirm = function(e, t, n, r, o, i, a, l, c) { this.spartaActivatedStore.navigationState === s.NavigationStates.LoadingScreen || (this.spartaActivatedStore.navigationState, s.NavigationStates.EndOfRound), u.legacyConfirm(e, t, n, r, l).then(function() { o && o(); }).catch(function() { i && i(); }); }, e.prototype.confirmPromise = function(e, t, n, r, o, i) { var a = this; return new Promise(function(s, u) { a.confirm(e, t, n, r, function() { return s(!0); }, function() { return s(!1); }, function() { return u(new Error("Popup was removed because the navigationState changed")); }, o, i); }); }, e.prototype.confirmWithErrorPromise = function(e, t, n, r, o, i, a) { var s = this; return new Promise(function(u, l) { s.confirmWithError(e, t, n, r, o, function() { return u(!0); }, function() { return u(!1); }, function() { return l(new Error("Popup was removed because the navigationState changed")); }, i, a); }); }, o.__decorate([ i.observable ], e.prototype, "numOpenRIMEPopups", void 0), o.__decorate([ i.action ], e.prototype, "alert", null), o.__decorate([ i.action ], e.prototype, "confirm", null), e; }(); t.PopupManager = d; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.setFilterOptions = r.createTypedAction(), t.fetchServerCounts = r.createTypedAction(), t.trackFilterJoin = r.createTypedAction(), t.toggleBookmark = r.createTypedAction(), t.serverBookmarkingFailed = r.createTypedAction(), t.refreshBookmarks = r.createTypedAction(), t.refreshHistory = r.createTypedAction(), t.refreshRentedServers = r.createTypedAction(), t.requestPings = r.createTypedAction(); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(4), a = n(148), s = n(70), u = n(919), l = function(e) { function t(t, n) { var r = e.call(this, t, n) || this; return r.twinkle = a.TwinkleContext.getFromComponent(r), r.focusItem = r.twinkle.focus.create(r, r.props.id), r.focusItem.autoFocusCandidate = !!t.autoFocusCandidate, t.group && t.group.addMember(r.focusItem, t.groupIndex), r.reaction(function() { return r.focusItem.bounds; }, function(e) { "function" == typeof r.props.onBounds && e && r.props.onBounds(e); }, { fireImmediately: !0 }), s.onComponentDidUpdate(r, function(e) { void 0 !== e.focusOnHover && (r.focusItem.focusOnHover = e.focusOnHover), r.focusItem.setActive("Focusable.tsx", "boolean" != typeof e.isActive || e.isActive); }), r; } return r.__extends(t, e), t.prototype.componentDidMount = function() { var e = this; this.focusItem.onFocus(function() { "function" == typeof e.props.onFocus && e.props.onFocus(e.props.groupIndex); }), this.focusItem.onBlur(function() { "function" == typeof e.props.onBlur && e.props.onBlur(e.props.groupIndex); }), this.focusItem.onHover(function() { "function" == typeof e.props.onHover && e.props.onHover(e.props.groupIndex); }), this.focusItem.onLeave(function() { "function" == typeof e.props.onLeave && e.props.onLeave(e.props.groupIndex); }); }, t.prototype.render = function() { return this.props.children(this.focusItem) || null; }, t.contextTypes = a.TwinkleContext.contextTypes, t = r.__decorate([ i.observer ], t); }(o.Component); t.Focusable = l, t.useFocusItem = function c(e) { var t = a.useTwinkle().focus, n = o.useState(function() { return t.createFocusItem(e); })[0]; return o.useEffect(function() { return function() { return n.destroy(); }; }, [ n ]), n; }, t.useFocusGroup = function p(e) { var t = a.useTwinkle().focus, n = o.useState(function() { return t.createStaticGroup(e); })[0]; return o.useEffect(function() { return function() { return n.destroy(); }; }, [ n ]), n; }; var d = function(e) { return e.destroy(); }; t.useMaybeFocusItem = function f(e, t) { var n = a.useTwinkle().focus, r = o.useCallback(function() { return n.createFocusItem(e); }, [ e ]); return u.useValueOrCreateDefault(r, d, t); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(12), i = o.Template("LayoutStyles"), a = function() { function e() {} return e.viewportSafety = o.value(function() { return -2001; }, "540caa5d:21:28"), e.background = o.value(function() { return -1e3; }, "540caa5d:22:24"), e.backgroundEdges = o.value(function() { return 1001; }, "540caa5d:23:29"), e.content = o.value(function() { return 1e3; }, "540caa5d:24:21"), e.logo = o.value(function() { return 1200; }, "540caa5d:25:18"), e.header = o.value(function() { return 1200; }, "540caa5d:26:20"), e.viewContainer = o.value(function() { return 1e4; }, "540caa5d:27:27"), e.gameView = o.value(function() { return 15e3; }, "540caa5d:28:22"), e.gameJoinNotice = o.value(function() { return 19999; }, "540caa5d:29:28"), e.tint = o.value(function() { return 2e4; }, "540caa5d:30:18"), e.comCenter = o.value(function() { return 40001; }, "540caa5d:31:23"), e.mainMenu = o.value(function() { return 5e4; }, "540caa5d:32:22"), e.socialOverlay = o.value(function() { return 5e4; }, "540caa5d:33:27"), e.startScreen = o.value(function() { return 9e4; }, "540caa5d:34:25"), e.contextMenu = o.value(function() { return 9e4; }, "540caa5d:35:25"), e.popups = o.value(function() { return 1e5; }, "540caa5d:36:20"), e.popupCloseButton = o.value(function() { return 100001; }, "540caa5d:37:30"), e.inputs = o.value(function() { return 2e5; }, "540caa5d:38:20"), e.watermark = o.value(function() { return 2e5; }, "540caa5d:39:23"), e.blackFade = o.value(function() { return 1e6; }, "540caa5d:40:23"), e.outroTakeover = o.value(function() { return 1000001; }, "540caa5d:41:27"), e.socialWidget = o.value(function() { return 1000002; }, "540caa5d:42:26"), e = r.__decorate([ i.style ], e); }(); t.OffsetStyles = a; var s = function() { function e() {} return e.topContent = o.wrap(function() { return o.style({ marginTop: o.Constants.isPC ? o.Grid.getHeight(36) : o.Grid.getHeight(12) }, "540caa5d:47:35"); }), e.heading = o.wrap(function() { return o.style({ height: o.Constants.LINE_HEIGHTS.L, width: o.Grid.getWidth(24), alignSelf: "center" }, "540caa5d:53:32"); }), e.headingInner = o.wrap(function() { return o.style({ flexDirection: "row", alignItems: "center", alignSelf: "center" }, "540caa5d:61:37"); }), e.message = o.wrap(function() { return o.style({ textLetterSpacing: 4, alignSelf: "center" }, "540caa5d:69:32"); }), e = r.__decorate([ i.style ], e); }(); t.OverviewHeadingStyles = s; var u = function() { function e() {} var t; return t = e, e.eaLogo = o.value(function() { return o.bbOfflineUrl("/sparta/jsclient/builds/assets/logo-ea-300d3ce5.png"); }, "540caa5d:79:20"), e.diceLogo = o.value(function() { return o.bbOfflineUrl("/sparta/jsclient/builds/assets/logo-dice-c4e44205.png"); }, "540caa5d:80:22"), e.progressStyle = o.wrap(function() { return o.style({ position: "absolute", width: o.LayoutBounds.screen.width, left: o.LayoutBounds.screen.left, top: o.LayoutBounds.startScreenLogo.bottom + o.Grid.getHeight(4, !1), flexDirection: "column", alignItems: "center", justifyContent: "flex-start", zOffset: 20 }, "540caa5d:82:38"); }), e.backdrop = o.wrap(function() { return o.style({ padding: [ o.Grid.spacer(2), o.Grid.spacer(3), o.Grid.spacer(2), o.Grid.spacer(3) ], backgroundColor: "#00000099", color: "#ffffff", height: o.Constants.isPC ? o.Grid.getHeight(6) : o.Grid.getHeight(5), alignItems: "center", justifyContent: "center" }, "540caa5d:95:33"); }), e.betaDisclaimer = o.wrap(function() { return o.style({ width: o.LayoutBounds.startScreenLogo.width, color: "#ffffff", textAlign: "center", textAlignForRTL: "center" }, "540caa5d:106:39"); }), e.betaDisclaimerContainer = o.wrap(function() { return o.style({ marginTop: o.Grid.spacer(8), padding: o.Grid.spacer(), backgroundColor: "#00000050" }, "540caa5d:115:48"); }), e.bottomBarContainer = o.wrap(function() { return o.style({ zOffset: 3, position: "absolute", bottom: o.LayoutBounds.dangerZoneSize.height, left: o.LayoutBounds.dangerZoneSize.width, right: o.LayoutBounds.dangerZoneSize.width, flexDirection: "row", alignItems: "center" }, "540caa5d:123:43"); }), e.ea = i.wrap(function() { return o.style({ texture: t.eaLogo, textureMode: "contain", backgroundColor: "#ffffff", marginRight: 20, height: 50, width: 50 }, "540caa5d:135:16"); }), e.dice = i.wrap(function() { return o.style({ texture: t.diceLogo, textureAlignX: 0, textureMode: "contain", backgroundColor: "#ffffff", flex: 1, height: 18, width: 74 }, "540caa5d:144:18"); }), e.copyright = i.wrap(function() { return o.style({ color: "#ffffff" }, "540caa5d:154:23"); }), e = t = r.__decorate([ i.style ], e); }(); t.StartScreenStyles = u; var l = function() { function e() {} return e.container = o.multistyle(function(e) { return o.style({ zOffset: a.content, position: "absolute", left: o.LayoutBounds.screen.left, top: o.LayoutBounds.screen.top, width: o.LayoutBounds.screen.width, height: o.LayoutBounds.screen.height, opacity: o.tweenSwitch(0, 1, e), enableMouseEvents: e }, "540caa5d:161:58"); }), e = r.__decorate([ i.style ], e); }(); t.ContentStyles = l; var c = function() { function e() {} var t; return t = e, e.itemHeight = o.value(function() { return o.Grid.getHeight(8); }, "540caa5d:177:24"), e.itemContentHeight = o.value(function() { return t.itemHeight - o.Grid.spacer(2); }, "540caa5d:178:31"), e.itemLabelBlurred = i.wrap(function() { return o.style({ color: "#5f6165" }, "540caa5d:180:30"); }), e.itemDisabled = i.wrap(function() { return o.style({ opacity: .3 }, "540caa5d:184:26"); }), e.disabledItem = i.wrap(function() { return o.style({ layer: !0, layerGrabBackground: !1, layerGrayScale: 1 }, "540caa5d:188:26"); }), e.itemLabel = o.multistyle(function(e) { return o.style({ color: e ? "#000000" : "#5f6165" }, "540caa5d:194:58"); }), e.itemLabelFiller = i.wrap(function() { return o.style({ opacity: 0, height: 1, marginBottom: -1 }, "540caa5d:200:29"); }), e.item = i.wrap(function() { return o.style({ zOffset: 10, height: t.itemHeight, flexDirection: "row", padding: [ o.Grid.spacer(), 0, o.Grid.spacer(), 0 ] }, "540caa5d:206:18"); }), e.menu = i.wrap(function() { return o.style({ zOffset: a.mainMenu, position: "absolute", right: o.LayoutBounds.screen.width, backgroundColor: "#ffffff", justifyContent: "center", alignItems: "flex-end" }, "540caa5d:213:18"); }), e.menuTransition = o.value(function() { return o.Constants.isPC ? { duration: 22 / 60 * 1e3 / 1.5 } : {}; }, "540caa5d:223:28"), e.menuWrapper = o.multistyle(function(e) { return o.style({ enableMouseEvents: e, opacity: o.Constants.isPC ? o.tweenSwitch(0, 1, e, t.menuTransition, t.menuTransition) : 1, translateX: o.tweenSwitch(0, o.LayoutBounds.mainMenu.width, e, t.menuTransition, t.menuTransition) }, "540caa5d:225:60"); }), e.wrapper = o.multistyle(function(e) { return o.style({ paddingTop: o.LayoutBounds.dangerZoneSize.height, paddingBottom: o.LayoutBounds.dangerZoneSize.height, height: o.LayoutBounds.mainMenu.height, width: (e ? o.Grid.spacer(3) : 0) + o.LayoutBounds.mainMenu.width - o.LayoutBounds.dangerZoneSize.width }, "540caa5d:243:51"); }), e.itemsPC = i.wrap(function() { return o.style({ height: 10.5 * t.itemHeight }, "540caa5d:251:21"); }), e.itemsConsole = i.wrap(function() { return o.style({ height: 9.5 * t.itemHeight }, "540caa5d:254:26"); }), e.logo = i.wrap(function() { return o.style({ width: 261, height: 50, marginBottom: o.Grid.getHeight(5.5), textureMode: "contain", textureAlign: [ 0, .5 ], texture: o.bbOfflineUrl("/sparta/assets/layout/logos/logo-gray-on-white-e3651836.png") }, "540caa5d:258:18"); }), e.activeIndicator = i.wrap(function() { return o.style({ position: "absolute", right: 0, zOffset: 100, top: o.Grid.spacer(), width: o.Grid.spacer(), height: t.itemContentHeight, backgroundColor: [ 255, 153, 0, 255 ] }, "540caa5d:267:29"); }), e.betaIcon = i.wrap(function() { return o.style({ texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/beta_small-05316fb7.png"), width: 60, height: 24, marginLeft: 3 * o.Grid.GUTTER }, "540caa5d:277:22"); }), e.labelIcon = i.wrap(function() { return o.style({ flex: 1, marginRight: o.Grid.spacer(4) }, "540caa5d:284:23"); }), e = t = r.__decorate([ i.style ], e); }(); t.MainMenuStyles = c; var p = function() { function e() {} return e.base = i.wrap(function() { return o.style({ zOffset: a.tint, position: "absolute" }, "540caa5d:292:18"); }), e.tint = o.multistyle2(function(e, t) { return o.style({ layer: !0, layerBlur: 1, layerBlurStrength: 5, layerGrabBackground: !0, backgroundColor: o.tweenSwitch("#000000cc", "#00000088", t), layerOpacity: o.tweenSwitch(0, 1, e), enableMouseEvents: e }, "540caa5d:297:72"); }), e = r.__decorate([ i.style ], e); }(); t.TintStyles = p; var d = function() { function e() {} var t; return t = e, e.uppercaseText = o.value(function() { return !0; }, "540caa5d:312:27"), e.textType = o.value(function() { return o.Constants.TextType.EMPHASIS; }, "540caa5d:313:22"), e.supportLineBreak = o.value(function() { return !1; }, "540caa5d:314:30"), e.displayIcon = o.value(function() { return { 0: !0, 1: !0, 2: !0, 3: !0, 4: !0, 5: !1 }; }, "540caa5d:316:25"), e.displayTimeLeft = o.value(function() { return { 0: !1, 1: !1, 2: !1, 3: !1, 4: !1, 5: !1 }; }, "540caa5d:325:29"), e.color = o.value(function() { return { 0: "#ffad32", 1: "#a6f59c", 2: "#89f0ff", 3: "#ffad32", 4: "#f69a9a", 5: void 0 }; }, "540caa5d:334:19"), e.container = i.wrap(function() { return o.style({ flexDirection: "row", alignItems: "center", alignSelf: "center" }, "540caa5d:343:23"); }), e.iconContainer = o.multistyle(function(e) { return o.style({ zOffset: 1, width: 24, height: 24, marginRight: o.Grid.spacer(2) }, "540caa5d:349:81"); }), e.icon = o.multistyle(function(e) { return o.style({ zOffset: 2, texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/notice-white-fc04f4ac.png"), width: 24, height: 24, color: t.color[e] }, "540caa5d:358:72"); }), e.text = o.multistyle(function(e) { return o.style({ zOffset: 2, color: t.color[e], textAlignForRTL: "left" }, "540caa5d:368:72"); }), e.countdown = i.wrap(function() { return o.style({ zOffset: 2, opacity: .8, textAlignForRTL: "left" }, "540caa5d:376:23"); }), e = t = r.__decorate([ i.style ], e); }(); t.NoticeStyles = d; var f = function() { function e() {} return e.mainMenuWidth = o.value(function() { return o.LayoutBounds.mainMenu.width; }, "540caa5d:385:27"), e.transitionOptions = o.value(function() { return o.Constants.isPC ? o.Constants.tweenOptions.presets.transition : o.Constants.tweenOptions.default; }, "540caa5d:386:31"), e.viewport = i.wrap(function() { return o.style({ zOffset: a.viewContainer, position: "absolute", left: o.LayoutBounds.screen.left, top: o.LayoutBounds.screen.top, width: o.LayoutBounds.screen.width, height: o.LayoutBounds.screen.height }, "540caa5d:390:22"); }), e = r.__decorate([ i.style ], e); }(); t.ViewContainerStyles = f; var m = function() { function e() {} return e.black = o.multistyle(function(e) { return o.style({ position: "absolute", top: 0, right: 0, bottom: 0, left: 0, zOffset: a.blackFade, backgroundColor: "#000000", enableMouseEvents: e }, "540caa5d:402:62"); }), e = r.__decorate([ i.style ], e); }(); t.BlackFadeStyles = m; var h = function() { function e() {} return e.rankBadge = i.wrap(function() { return o.style({ position: "absolute", top: o.Constants.isPC ? -33 : -27 }, "540caa5d:418:23"); }), e = r.__decorate([ i.style ], e); }(); t.LogoStyles = h; }, function(e, t, n) { var r = n(343)("wks"), o = n(180), i = n(56).Symbol, a = "function" == typeof i; (e.exports = function(e) { return r[e] || (r[e] = a && i[e] || (a ? i : o)("Symbol." + e)); }).store = r; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(120), o = n(82), i = n(53), a = n(369), s = n(129).__Logger.get("Frostbite"), u = {}, l = new Set([ "sparta.audioMessage" ]); t.frostbite = { sendMessage: function(e, n) { (void 0 === n && (n = null), o.options.enableLogging) && (l.has(e) ? s.debug("Frostbite event (send):", e, n) : s.info("Frostbite event (send):", e, n), t.frostbite.getMessageListener("frostbiteMessageSent").trigger(e, n)); i.nativeApi.sendMessage(e, n); }, getMessageListener: function(e) { return u[e] || (u[e] = new r.TwinkleEvent()); }, registerMessageListener: function(e, t) { return this.getMessageListener(e).listen(function() { for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n]; t && t.apply(t, e); }); } }, i.nativeApi.onFrostbiteMessage = function(e, n) { var r = a.start(), i = u[e]; o.options.enableLogging && (i && i.callbacks.length ? l.has(e) ? s.debug("Frostbite event (receive):", e, n) : s.info("Frostbite event (receive):", e, n) : o.options.enableDevWarnings && s.warn("Unhandled Frostbite Event received! Is this a legacy message or did you forget to add a listener? :", e, n), t.frostbite.getMessageListener("frostbiteMessageReceived").trigger(e, n)); if (i) try { i.trigger(e, n); } catch (t) { throw t.message = "Failed to handle frostbite message " + e + ":" + t.message, t; } a.end("msg-" + e, r); }; }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(146); function r(t) { var n = e.localeState.gameLocaleOrDefault; if ("number" != typeof t || void 0 === u[n]) return ""; var r = t.toFixed(2), o = u[n].decimal; return r.replace(".", o); } function o(t) { if (void 0 === t) return ""; var n = e.localeState.gameLocaleOrDefault, r = t.toString().split("."), o = u[n]; return r[0] = r[0].replace(/\B(?=(\d{3})+(?!\d))/g, o.thousand), r.join(o.decimal); } t.formatNumber = function i(e) { return isNaN(e) ? "0" : o(Math.round(10 * e) / 10); }, t.formatRatio = r, t.formatRatioBetweenNumbers = function a(e, t) { return "number" != typeof e || "number" != typeof t ? "" : r(e / Math.max(t, 1)); }, t.formatThousands = o, t.formatDecimals = function s(t, n) { var r = 2, o = 100, i = e.localeState.gameLocaleOrDefault, a = u[i], s = function(e) { return void 0 === u[i] ? e : e.replace(".", a.decimal); }; return isNaN(t) ? s("0.00") : ((n && !isNaN(n) || 0 === n) && (r = n, o = Math.pow(10, n)), s((Math.round(t * o) / o).toFixed(r))); }, t.formatDateDifference = function(e, t, n) { void 0 === n && (n = !1); var r = t / 1e3, o = Math.floor(r / 86400); r -= 86400 * o; var i = Math.floor(r / 3600) % 24; r -= 3600 * i; var a = Math.floor(r / 60) % 60, s = __("ID_SPARTA_NUM_DAY"); (o > 1 || 0 === o) && (s = __("ID_SPARTA_NUM_DAYS")); var u = __("ID_SPARTA_NUM_HOUR"); (i > 1 || 0 === i) && (u = __("ID_SPARTA_NUM_HOURS")); var l = __("ID_SPARTA_NUM_MINUTE"); (a > 1 || 0 === a) && (l = __("ID_SPARTA_NUM_MINUTES")), s = s.replace("[DAYS]", o + ""), u = u.replace("[HOURS]", i + ""), l = l.replace("[MINUTES]", a + ""); var c = "", p = "", d = ""; return o > 0 ? (c = s, n || (p = u)) : i > 0 ? (p = u, n || (d = l)) : d = l, e.replace("[NUMDAYS]", c).replace("[NUMHOURS]", p).replace("[NUMMINUTES]", d).replace(/\s+/g, " ").trim(); }, t.formatDateDifferenceShort = function(e, t) { var n = t / 1e3, r = Math.floor(n / 604800); n -= 86400 * r * 7; var o = Math.floor(n / 86400); n -= 86400 * o; var i = Math.floor(n / 3600) % 24; n -= 3600 * i; var a = Math.floor(n / 60) % 60; n -= 60 * a; var s = Math.floor(n), u = __("ID_SPARTA_NUM_WEEKS_SHORT").replace("[WEEK]", String(r)), l = __("ID_SPARTA_NUM_DAYS_SHORT").replace("[DAYS]", String(o)), c = __("ID_SPARTA_NUM_HOURS_SHORT").replace("[HOURS]", String(i)), p = __("ID_SPARTA_NUM_MINUTES_SHORT").replace("[MINUTES]", String(a)), d = __("ID_SPARTA_NUM_SECONDS_SHORT").replace("[SECONDS]", String(s)), f = "", m = "", h = "", g = "", y = ""; return r ? (f = u, o && (m = l)) : o ? (m = l, h = c) : i ? (h = c, g = p) : a ? (g = p, y = d) : y = d, e.replace("[NUMWEEKS]", f).replace("[NUMDAYS]", m).replace("[NUMHOURS]", h).replace("[NUMMINUTES]", g).replace("[NUMSECONDS]", y).replace(/\s+/g, " "); }; var u = { "ar-sa": { decimal: ".", thousand: "," }, "cs-cz": { decimal: ".", thousand: "," }, "de-de": { decimal: ",", thousand: "." }, "en-us": { decimal: ".", thousand: "," }, "es-es": { decimal: ",", thousand: " " }, "es-mx": { decimal: ".", thousand: " " }, "fr-fr": { decimal: ",", thousand: " " }, "it-it": { decimal: ",", thousand: "." }, "ja-jp": { decimal: ".", thousand: "," }, "ko-kr": { decimal: ".", thousand: "," }, "pl-pl": { decimal: ",", thousand: " " }, "pt-br": { decimal: ",", thousand: "." }, "ru-ru": { decimal: ",", thousand: " " }, "tr-tr": { decimal: ",", thousand: "." }, "zh-cn": { decimal: ".", thousand: "," }, "zh-tw": { decimal: ".", thousand: "," } }; }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(0), i = n(1), a = n(2), s = n(4), u = n(14), l = n(6), c = n(20), p = n(1114), d = n(18), f = n(5), m = n(148), h = n(23); !function(e) { e.Left = "left", e.Right = "right"; }(r = t.Direction || (t.Direction = {})); var g = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.translateX = u.Animation.componentTween(t, "38e8cd1c:42:56", t.origin), t.loopTimeout = 0, t.shuttleTimeout = 0, t.delayTimeout = 0, t.animationStarted = !1, t.autoShuttleId = 0, t.currentShuttleId = -1, t; } return o.__extends(t, e), Object.defineProperty(t.prototype, "origin", { get: function() { return this.props.direction === r.Right || this.props.rtl ? 0 : this.props.getOuterWidth() - this.props.getInnerWidth(); }, enumerable: !0, configurable: !0 }), t.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return [ e.shouldScroll, e.props.getInnerWidth(), e.props.getOuterWidth() ]; }, function() { e.componentDidUpdate(); }, { fireImmediately: !0 }); }, t.prototype.componentWillUnmount = function() { clearTimeout(this.delayTimeout), clearTimeout(this.loopTimeout), clearTimeout(this.shuttleTimeout); }, t.prototype.componentDidUpdate = function() { var e = this; this.props.getInnerWidth() && this.props.getOuterWidth() && (this.props.delay ? (clearTimeout(this.delayTimeout), this.delayTimeout = setTimeout(function() { return e.update(); }, this.props.delay)) : this.update()); }, Object.defineProperty(t.prototype, "shouldScroll", { get: function() { return this.props.scroll || this.props.focusItem && this.props.focusItem.isFocusedOrHovered; }, enumerable: !0, configurable: !0 }), t.prototype.getDistance = function(e) { return this.props.loop ? e : Math.max(0, e - this.props.getOuterWidth()); }, t.prototype.update = function() { var e = this.props.getOuterWidth(), t = this.props.getInnerWidth(), n = this.getDistance(t); clearTimeout(this.loopTimeout), clearTimeout(this.shuttleTimeout), this.reset(), t > 0 && e > 0 && e < t ? this.props.loop ? this.loop(n, !0) : this.shouldScroll && (this.props.direction !== r.Right || this.props.rtl || (n = -n), this.autoShuttleId++, this.currentShuttleId = this.autoShuttleId, this.scroll(0, n, this.currentShuttleId)) : this.translateX.set(0); }, t.prototype.loop = function(e, t) { var n = this; void 0 === t && (t = !1), this.animationStarted || (this.animationStarted = !0, this.props.onScrollChange(!0)); var o = +this.props.speed.toFixed(3), i = this.props.direction === r.Left || this.props.rtl, a = i ? e : -e, s = i ? -this.props.getOuterWidth() : this.props.getOuterWidth(), u = t ? 0 : s, l = (i ? a - u : u - a) / (10 * o * 60) * 1e3, c = { duration: l, speed: null, easing: h.Easing.Linear }; this.translateX.set(u), this.translateX.to(a, c), this.loopTimeout = setTimeout(function() { n.props.loop && (n.translateX.set(s), n.loop(e)); }, l); }, t.prototype.scroll = function(e, t, n) { var r = this; if (!this.props.shuttle || this.currentShuttleId === n) { this.animationStarted || (this.animationStarted = !0, this.props.onScrollChange(!0)); var o = { duration: null, speed: this.props.speed, easing: h.Easing.Linear }; this.translateX.to(t, o, function() { r.props.shuttle && r.currentShuttleId === n && (r.shuttleTimeout = setTimeout(function() { r.scroll(t, e, n); }, 500)); }); } }, t.prototype.reset = function() { var e = this; if (this.animationStarted && !this.props.loop && !this.shouldScroll) { var t = { duration: null, speed: this.props.speed, easing: h.Easing.Linear }; this.translateX.to(this.origin, t, function() { e.props.onScrollChange(!1); }), this.animationStarted = !1, this.currentShuttleId = -1; } }, t.prototype.render = function() { return i.createElement("surface", { style: f.merge2(this.translateX.getStyleClass("translateX"), d.CommonStyles.disableMouseEvents), onBounds: this.props.onBoundsChanged }, this.props.children); }, o.__decorate([ a.computed ], t.prototype, "shouldScroll", null), t = o.__decorate([ s.observer ], t); }(i.Component), y = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.twinkle = m.TwinkleContext.getFromComponent(t), t.outerWidth = 0, t.innerWidth = 0, t.isAnimated = !1, t.updateOuterBounds = a.action(function(e) { n.isSizeEqual(t.outerWidth, e.width) || (t.outerWidth = e.width); }), t.updateInnerBounds = a.action(function(e) { n.isSizeEqual(t.innerWidth, e.width) || (t.innerWidth = e.width); }), t.onScrollChange = a.action(function(e) { t.isAnimated = e; }), t.getOuterWidth = function() { return t.props.width || t.outerWidth; }, t.getInnerWidth = function() { return t.innerWidth; }, t; } var n; return o.__extends(t, e), n = t, Object.defineProperty(t.prototype, "hasOverflow", { get: function() { var e = this.getOuterWidth(), t = this.getInnerWidth(); return t > 0 && e > 0 && e < t || !1; }, enumerable: !0, configurable: !0 }), t.isSizeEqual = function(e, t) { if (e && t) { return Math.abs(e - t) < 2 && Math.abs(e - t) < 2; } return !1; }, t.prototype.wrapWithEllipsis = function(e, t) { return this.props.showEllipsis && this.hasOverflow ? i.createElement("surface", { style: f.merge3(e, this.props.style, p.MarqueeStyles.containerMargin) }, i.createElement(S, { focusItem: this.props.focusItem, scroll: this.props.scroll }), t) : t; }, t.prototype.render = function() { var e, t = this.props.scrollTo === r.Left || this.props.rtl, n = this.hasOverflow || this.isAnimated; e = this.props.width ? f.DynamicStyle.create({ width: this.props.width }, "38e8cd1c:306:25") : f.emptyStyle; var o = f.merge4(e, p.MarqueeStyles.marquee(n), t ? d.CommonStyles.justifyContentFlexEnd : f.emptyStyle, f.merge2(this.props.style, n ? this.props.overflowStyle : f.emptyStyle)); return this.wrapWithEllipsis(e, i.createElement("surface", { style: o, onBounds: this.updateOuterBounds }, i.createElement(g, { scroll: this.props.scroll, focusItem: this.props.focusItem, loop: this.props.loop, delay: this.props.delay, direction: this.props.scrollTo, getInnerWidth: this.getInnerWidth, getOuterWidth: this.getOuterWidth, speed: this.props.speed, onScrollChange: this.onScrollChange, onBoundsChanged: this.updateInnerBounds, shuttle: this.props.shuttle && this.twinkle.buildInfo.isFeatureSupported("TweenerAttachTweenFinishedFix"), rtl: this.props.rtl }, this.props.children))); }, t.contextTypes = m.TwinkleContext.contextTypes, t.defaultProps = { scroll: !1, scrollTo: r.Right, loop: !1, showEllipsis: !1, speed: .1, rtl: !1 }, o.__decorate([ a.observable ], t.prototype, "outerWidth", void 0), o.__decorate([ a.observable ], t.prototype, "innerWidth", void 0), o.__decorate([ a.observable ], t.prototype, "isAnimated", void 0), o.__decorate([ a.computed ], t.prototype, "hasOverflow", null), t = n = o.__decorate([ s.observer ], t); }(i.Component); t.Marquee = y; var S = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.opacityTween = u.Animation.componentTween(t, "38e8cd1c:351:50", 0), t; } return o.__extends(t, e), t.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return e.props.scroll || e.props.focusItem && (e.props.focusItem.isFocused || e.props.focusItem.isHovered); }, function(t) { e.opacityTween.to(t ? 0 : 1); }, { fireImmediately: !0 }); }, t.prototype.render = function() { var e = f.merge2(p.MarqueeStyles.ellipsis(c.isRTLLanguage()), this.opacityTween.getStyleClass("opacity")); return i.createElement(l.Text, { value: "...", style: e }); }, t = o.__decorate([ s.observer ], t); }(i.Component); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(2), o = n(13), i = n(13), a = n(518); function s(e) { var t = i.nativePropertiesStore.getHostingGameId(); if (!t) throw new Error("Cannot check hosting game before it is set!"); return t === e; } t.isHostingGame = s, t.routeIsHostingGame = r.computed(function() { return s(o.layoutStateStore.current.config.gameId); }), t.supportsSpectating = function u(e) { var t = i.gameStore.getGame(e); return !!(t && t.serverConfig.supportedRoles && t.serverConfig.supportedRoles.indexOf("spectator") > -1) && (!t.serverConfig.hasSpectatorFeatureFlag || (t.serverConfig.spectatorFeatureFlag ? t.serverConfig.spectatorFeatureFlag.isEnabled() : a.gameFeatureFlags.spectator.isEnabled())); }, t.supportsCommander = function l(e) { var t = i.gameStore.getGame(e); return t && t.serverConfig.supportedRoles && t.serverConfig.supportedRoles.indexOf("commander") > -1; }; }, function(e, t, n) { var r = n(52), o = n(450), i = n(160), a = Object.defineProperty; t.f = n(81) ? Object.defineProperty : function e(t, n, s) { if (r(t), n = i(n, !0), r(s), o) try { return a(t, n, s); } catch (e) {} if ("get" in s || "set" in s) throw TypeError("Accessors not supported!"); return "value" in s && (t[n] = s.value), t; }; }, function(e, t, n) { "use strict"; var r; Object.defineProperty(t, "__esModule", { value: !0 }); var o = n(891), i = n(892), a = n(82), s = n(36), u = n(144), l = n(893), c = n(53), p = n(129), d = n(70), f = p.__Logger.get("TextureHandler"); t.GAME_SCREEN_TEXTURE = "GAME_SCREEN_TEXTURE", t.STATIC_ATLAS = "STATIC_ATLAS", t.SINGLE_TEXTURE = "SINGLE_TEXTURE", t.DYNAMIC_ATLAS = "DYNAMIC_ATLAS", t.twinkleAtlasIds = { StaticAtlas: 0, SingleTexture: 1, DynamicAtlas: 2 }, t.atlasToId = ((r = {})[t.STATIC_ATLAS] = t.twinkleAtlasIds.StaticAtlas, r[t.SINGLE_TEXTURE] = t.twinkleAtlasIds.SingleTexture, r[t.DYNAMIC_ATLAS] = t.twinkleAtlasIds.DynamicAtlas, r); var m = function() { function e(e) { var t = this; this.unmounted = !1, this.unloaders = [], this.textures = [], e && d.addLifecycleHook(e, "componentWillUnmount", function() { t.destroy(); }); } return e.prototype.isLoaded = function() { return this.textures.length > 0 && this.textures.every(function(e) { return e.isLoaded(); }); }, e.prototype.onLoaded = function(e) { if (this.isLoaded()) e(); else var t = this.textures.length, n = this.textures.map(function(r) { return r.onLoaded(function() { 0 === --t && (n && n.forEach(function(e) { return e(); }), e()); }); }); }, e.prototype.preload = function(e, n) { var r = this; if (this.unmounted) throw new Error("Trying to preload on an unmounted component"); var o = t.textureHandler.getOrCreateTexture(a.options.urlHook(e), n); this.textures.push(o), t.textureHandler.keepAlive.increaseRefCount(o); var i = !1, s = function() { if (!i) { i = !0; var e = r.textures.indexOf(o); r.textures.splice(e, 1), t.textureHandler.keepAlive.decreaseRefCount(o); } }; return this.unloaders.push(s), s; }, e.prototype.unloadAll = function() { this.unloaders.forEach(function(e) { return e(); }), this.unloaders.length = 0; }, e.prototype.destroy = function() { this.unmounted = !0, this.unloadAll(); }, e; }(); t.TexturePreloader = m; var h = function() { function e() { var e = this; this.keyToTexture = {}, this.keepAlive = new l.TextureKeepAlive(), this.getPendingTextures = function() { return e.getTextures().filter(function(e) { return !e.isLoaded(); }); }; } return e.backwardsCompatibleAtlas = function(e, n) { if ("string" == typeof n) return s.getBuildInfo().hasJsCreateAtlas() ? n : "SpartaCommonAtlas" === n ? t.DYNAMIC_ATLAS : t.SINGLE_TEXTURE; if ("number" == typeof n) { if (n === t.twinkleAtlasIds.StaticAtlas) return t.STATIC_ATLAS; if (n === t.twinkleAtlasIds.SingleTexture) return t.SINGLE_TEXTURE; if (n === t.twinkleAtlasIds.DynamicAtlas) return t.DYNAMIC_ATLAS; } else if (void 0 === n) return t.SINGLE_TEXTURE; throw new Error("Got invalid atlas " + n + " for url " + e); }, e.prototype.unmount = function(e) { this.keepAlive.unmount(e), o.TextureFadeIn.unmount(e); }, e.prototype.createPreloader = function(e) { return new m(e); }, e.prototype.getTextures = function() { var e = this; return Object.keys(this.keyToTexture).map(function(t) { return e.keyToTexture[t]; }); }, e.prototype.loadDefaultTexture = function(e, t, n) { c.nativeApi.loadDefaultTexture(e, a.options.urlHook(t), n); }, e.prototype.getTexture = function(t, n) { var r = i.Texture.toReference(t, e.backwardsCompatibleAtlas(t, n)); return this.keyToTexture[r.key]; }, e.prototype.getOrCreateTexture = function(t, n) { var r = i.Texture.toReference(t, e.backwardsCompatibleAtlas(t, n)), o = this.keyToTexture[r.key]; return o || (o = this.keyToTexture[r.key] = new i.Texture(r)), o; }, e.prototype.getAtlas = function(n, r, o) { return r === t.GAME_SCREEN_TEXTURE ? t.SINGLE_TEXTURE : "" !== r ? e.backwardsCompatibleAtlas(r, o) : void f.error("Trying to load empty string as texture in surface. " + n); }, e.prototype.handle = function(e, n, r, i) { if (n === t.GAME_SCREEN_TEXTURE) return t.SINGLE_TEXTURE; if ("" !== n) { var a = this.getOrCreateTexture(n, r); return a.isLoaded() || a.loading(), i && (this.keepAlive.handle(e, a, i), o.TextureFadeIn.handle(e, a, i)), a.reference.atlas; } f.error("Trying to load empty string as texture in surface: " + e._rootNodeID); }, e.prototype.update = function(e, n, r) { "string" == typeof n.texture && (n.texture = a.options.urlHook(n.texture), n.textureAtlas = this.handle(e, n.texture, n.textureAtlas, r ? void 0 : n)), "string" == typeof n.texture1 && (n.texture1 = a.options.urlHook(n.texture1), n.texture1Atlas = this.handle(e, n.texture1, n.texture1Atlas)), "string" == typeof n.texture2 && (n.texture2 = a.options.urlHook(n.texture2), n.texture2Atlas = this.handle(e, n.texture2, n.texture2Atlas)), "string" == typeof n.texture3 && (n.texture3 = a.options.urlHook(n.texture3), n.texture3Atlas = this.handle(e, n.texture3, n.texture3Atlas)), n.spriteAnimation && "string" == typeof n.spriteAnimation.spriteSheet && (n.spriteAnimation.spriteSheet = a.options.urlHook(n.spriteAnimation.spriteSheet), n.spriteAnimation.spriteSheetAtlas = this.handle(e, n.spriteAnimation.spriteSheet, t.SINGLE_TEXTURE)), delete n.isPreloader; }, e.prototype.onTextureUnloaded = function(e, n) { if (e !== t.GAME_SCREEN_TEXTURE) { var r = this.getTexture(e, n); r ? r.unloaded() : f.warn("Got unload for unknown texture:", e, n); } }, e.prototype.onTextureLoaded = function(e, n, r, o, i) { e !== t.GAME_SCREEN_TEXTURE && (this.getOrCreateTexture(e, n).loaded(r), u.onTextureLoaded.trigger()); }, e.prototype.waitForReady = function(e, t, n) { return void 0 === t && (t = 5e3), new Promise(function(r) { var o, i; 0 !== n().length ? (i = u.onTextureLoaded.listen(function() { 0 === n().length && a(!0); }), o = setTimeout(function() { f.warn(e + " timed out waiting " + t + "ms for all textures to be ready.", "Textures still loading:", n().map(function(e) { return e.reference.url; })), a(!1); }, t)) : r(!0); function a(e) { i(), clearTimeout(o), r(e); } }); }, e; }(); t.TextureHandler = h, t.textureHandler = new h(), c.nativeApi.onTextureLoaded = t.textureHandler.onTextureLoaded.bind(t.textureHandler), c.nativeApi.onTextureUnloaded = t.textureHandler.onTextureUnloaded.bind(t.textureHandler); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(2), i = n(326), a = n(13), s = n(154), u = n(43); !function(e) { e[e.highlights = 0] = "highlights", e[e.personal = 1] = "personal", e[e.scoreboard = 2] = "scoreboard", e[e.squad = 3] = "squad", e[e.feedback = 4] = "feedback", e[e.operations = 5] = "operations", e[e.stats = 6] = "stats"; }(t.EorPages || (t.EorPages = {})), t.isEorPayload = function l(e, t) { return "EOR_UPDATE" === t; }; var c = function() { function e() { var e = this; this.data = void 0, this.unrankedData = void 0, this.battlePacksData = void 0, this.scrapsData = void 0, this.error = void 0, this.isActive = !1, this.fallbackMapName = "", this.fallbackGameMode = "", this.nextLevelName = void 0, this.nextGameMode = void 0, this.loadingScreenReady = !1, this.quitInProgress = !1, this.viewedPages = [], this.gameReadyToQuit = !1, this.reportedPlayers = [], this.unrankedGame = !1, this.readyToShowNextInfo = !1, this.surveySeen = !1, this.surveyComplete = !1, this.mustQuitAfterUpdate = !1, this.hasReceivedNextRoundInfo = !1, this.mustQuitAfterUpdateDisposer = o.reaction(function() { return e.mustQuitAfterUpdate; }, function(t) { t && (e.setMustQuitAfterUpdate(!1), s.toggleQuittingOverlay(!1)); }), u.stopGame.listen(function() { e.data && e.clearEndOfRoundData(); }); } return e.prototype.initializeEor = function() { this.loadingScreenReady = !1; }, e.prototype.setEndOfRoundData = function(e) { this.data = e; }, e.prototype.setError = function(e) { this.error = e; }, e.prototype.clearEndOfRoundData = function(e) { this.viewedPages = [], this.reportedPlayers = [], this.data = void 0, this.unrankedData = void 0, this.error = void 0, this.gameReadyToQuit = !1, this.surveySeen = !1, this.battlePacksData && this.battlePacksData.gameReportId !== e && (this.battlePacksData = void 0), this.fallbackGameMode = "", this.fallbackMapName = "", this.nextGameMode = void 0, this.nextLevelName = void 0, this.readyToShowNextInfo = !1, this.hasReceivedNextRoundInfo = !1, this.surveyComplete = !1; }, Object.defineProperty(e.prototype, "battlePacks", { get: function() { return this.data && this.data.battlePacks || this.battlePacksData; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "scraps", { get: function() { return this.data && this.data.scraps && this.data.scraps.totalAmount > 0 ? this.data.scraps : this.scrapsData && this.scrapsData.totalAmount > 0 ? this.scrapsData : new i.EndOfRoundScraps(0, 0, 0); }, enumerable: !0, configurable: !0 }), e.prototype.setBattlepacks = function(e) { this.battlePacksData = e; }, e.prototype.setScraps = function(e) { this.scrapsData = e; }, e.prototype.setFallbackMapName = function(e) { this.fallbackMapName = e; }, e.prototype.setFallbackGameMode = function(e) { this.fallbackGameMode = e; }, e.prototype.setQuitProgress = function(e) { this.quitInProgress = e; }, e.prototype.setGameReadyToQuit = function(e) { this.gameReadyToQuit = e; }, e.prototype.setReadyToShowNextInfo = function() { this.readyToShowNextInfo = !0; }, e.prototype.setLoadingState = function(e) { var t = this, n = e.levelName || ""; -1 === n.toLowerCase().indexOf("frontend") ? (n && "" !== n && (this.nextLevelName = function r(e) { var t = e.lastIndexOf("/"); return t > -1 ? e.substring(t + 1) : void 0; }(n)), e.gameMode && "" !== e.gameMode && (this.nextGameMode = e.gameMode && e.gameMode.replace(/[_0-9]+$/, "")), this.loadingScreenReady = !0, this.hasReceivedNextRoundInfo || (this.hasReceivedNextRoundInfo = !0, setTimeout(function() { t.setReadyToShowNextInfo(); }, 1e3))) : (this.nextLevelName = void 0, this.nextGameMode = void 0); }, e.prototype.clearViewedPages = function() { this.viewedPages = []; }, e.prototype.viewPage = function(e) { this.isViewed(e) || this.viewedPages.push(e); }, e.prototype.reportPlayer = function(e) { this.isReported(e) || this.reportedPlayers.push(e); }, e.prototype.setUnrankedGame = function(e) { this.unrankedGame = e; }, e.prototype.setSurveySeen = function() { this.surveySeen = !0; }, e.prototype.setUnRankedData = function(e) { this.unrankedData = e; }, e.prototype.setSurveyComplete = function(e) { this.surveyComplete = e; }, e.prototype.setMustQuitAfterUpdate = function(e) { this.mustQuitAfterUpdate = e; }, e.prototype.isViewed = function(e) { return this.viewedPages.indexOf(e) >= 0; }, e.prototype.isReported = function(e) { return this.reportedPlayers.indexOf(e) >= 0; }, r.__decorate([ o.observable ], e.prototype, "data", void 0), r.__decorate([ o.observable ], e.prototype, "unrankedData", void 0), r.__decorate([ o.observable ], e.prototype, "battlePacksData", void 0), r.__decorate([ o.observable ], e.prototype, "scrapsData", void 0), r.__decorate([ o.observable ], e.prototype, "error", void 0), r.__decorate([ o.observable ], e.prototype, "isActive", void 0), r.__decorate([ o.observable ], e.prototype, "fallbackMapName", void 0), r.__decorate([ o.observable ], e.prototype, "fallbackGameMode", void 0), r.__decorate([ o.observable ], e.prototype, "nextLevelName", void 0), r.__decorate([ o.observable ], e.prototype, "nextGameMode", void 0), r.__decorate([ o.observable ], e.prototype, "loadingScreenReady", void 0), r.__decorate([ o.observable ], e.prototype, "quitInProgress", void 0), r.__decorate([ o.observable ], e.prototype, "viewedPages", void 0), r.__decorate([ o.observable ], e.prototype, "gameReadyToQuit", void 0), r.__decorate([ o.observable ], e.prototype, "reportedPlayers", void 0), r.__decorate([ o.observable ], e.prototype, "unrankedGame", void 0), r.__decorate([ o.observable ], e.prototype, "readyToShowNextInfo", void 0), r.__decorate([ o.observable ], e.prototype, "surveySeen", void 0), r.__decorate([ o.observable ], e.prototype, "surveyComplete", void 0), r.__decorate([ o.observable ], e.prototype, "mustQuitAfterUpdate", void 0), r.__decorate([ o.action ], e.prototype, "initializeEor", null), r.__decorate([ o.action ], e.prototype, "setEndOfRoundData", null), r.__decorate([ o.action ], e.prototype, "setError", null), r.__decorate([ o.action ], e.prototype, "clearEndOfRoundData", null), r.__decorate([ o.computed ], e.prototype, "battlePacks", null), r.__decorate([ o.computed ], e.prototype, "scraps", null), r.__decorate([ o.action ], e.prototype, "setBattlepacks", null), r.__decorate([ o.action ], e.prototype, "setScraps", null), r.__decorate([ o.action ], e.prototype, "setFallbackMapName", null), r.__decorate([ o.action ], e.prototype, "setFallbackGameMode", null), r.__decorate([ o.action ], e.prototype, "setQuitProgress", null), r.__decorate([ o.action ], e.prototype, "setGameReadyToQuit", null), r.__decorate([ o.action ], e.prototype, "setReadyToShowNextInfo", null), r.__decorate([ o.action ], e.prototype, "setLoadingState", null), r.__decorate([ o.action ], e.prototype, "clearViewedPages", null), r.__decorate([ o.action ], e.prototype, "viewPage", null), r.__decorate([ o.action ], e.prototype, "reportPlayer", null), r.__decorate([ o.action ], e.prototype, "setUnrankedGame", null), r.__decorate([ o.action ], e.prototype, "setSurveySeen", null), r.__decorate([ o.action ], e.prototype, "setUnRankedData", null), r.__decorate([ o.action ], e.prototype, "setSurveyComplete", null), r.__decorate([ o.action ], e.prototype, "setMustQuitAfterUpdate", null), e; }(); t.TunguskaEndOfRoundStore = c, t.tunguskaEndOfRoundStore = new c(), a.gameStateStoreLoader.onLoad(function(e) { o.reaction(function() { return e.hasLoadedLevel; }, function(e) { return t.tunguskaEndOfRoundStore.setGameReadyToQuit(e); }); }); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), n(1), n(0), n(858), n(863), n(864); var r = n(82), o = n(53); t.loadFont = function(e, t) { r.options.urlHook && (t = r.options.urlHook(t)), o.nativeApi.loadFont(e, t); }; var i = 0; t.autoId = function a(e) { return e + "_" + i++; }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(1), o = n(2); function i(e, t, n) { var r = e._lifecycleHooks || (e._lifecycleHooks = {}), i = !!r[t], a = r[t] || (r[t] = []); if (a.push(n), !i) { var s = e[t]; e[t] = function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; o.transaction(function() { s && s.apply(e, t), a.forEach(function(e) { return e.apply(void 0, t); }); }); }; } return function() { var e = a.indexOf(n); e > -1 && a.splice(e, 1); }; } t.addReactHelperFunctions = function a() { r.Component.prototype.reaction = function e(t, n, r) { i(this, "componentWillUnmount", o.reaction(t, n, r)); }, r.Component.prototype.autorun = function e(t) { i(this, "componentWillUnmount", o.autorun(t)); }, r.Component.prototype.when = function e(t, n, r) { i(this, "componentWillUnmount", o.when(t, n, r)); }; }, t.onComponentUpdate = function s(e, t) { i(e, "componentWillMount", function() { t(e.props, e.state); }), i(e, "componentWillUpdate", function(e, n) { t(e, n); }); }, t.onComponentDidUpdate = function u(e, t) { i(e, "componentDidMount", function() { t(e.props, e.state); }), i(e, "componentDidUpdate", function() { t(e.props, e.state); }); }, t.addLifecycleHook = i; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(873), a = n(77), s = 0; function u(e, t) { var n = o.useContext(t); if (void 0 === n) throw new Error("Cannot find " + e + " in context"); return n; } function l(e, t) { var n = o.createContext(t); function r() { return u(e, n); } function i(e) { var t = r(); return a.useObserver(function() { return e.children(t); }, i.displayName); } return i.displayName = e + "Consumer", { Provider: n.Provider, Consumer: i, contextType: n, use: r, useMaybe: function s() { return o.useContext(n); } }; } t.useDefinedContext = u, t.createModernContext = l, t.createContext = function c(e, t) { var n = l(e, t), a = e + s++; function u(e) { var t; return (t = {})["contextValue_" + a] = e, t; } var c = u(i.any); function p(n) { if (void 0 === n.context) throw new Error(e + ": No context found in " + (n.displayName || n.name)); var r; return n.constructor.contextType ? r = n.context : n.constructor.contextTypes && (r = n.context["contextValue_" + a]), void 0 === r ? t : r; } var d = function(t) { function i() { return null !== t && t.apply(this, arguments) || this; } return r.__extends(i, t), i.prototype.getChildContext = function() { return u(this.props.value); }, i.prototype.render = function() { return o.createElement(n.Provider, { value: this.props.value }, this.props.children || null); }, i.displayName = e + "Provider", i.childContextTypes = c, i; }(o.Component); return r.__assign({}, n, { Provider: d, contextTypes: c, getFromComponent: function f(t) { var n = p(t); if (void 0 === n) throw new Error(e + ": value not found in context"); return n; }, findFromComponent: p, getContextObject: u }); }; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r, o, i = n(0), a = n(2), s = e.get("GameViewState"); !function(e) { e.NONE = "none", e.EOR = "eor", e.OPERATIONS_PRE_EOR = "operationspreeor", e.BATTLEPLAN_PRE_EOR = "battleplanpreeor", e.PLAYING = "playing", e.LOADING = "loading"; }(r = t.GameViewRoute || (t.GameViewRoute = {})), function(e) { e.NONE = "none", e.DEFAULT = "default", e.RSP_ADMIN = "rspadmin", e.SERVER_DETAILS = "serverdetails", e.SERVER_BANS = "serverbans", e.BATTLEPACKS = "battlepacks", e.SURVEY = "survey", e.MEDALS = "medals", e.MISSIONS = "missions", e.HELP = "help", e.TOW = "tow"; }(o = t.GameViewSubRoute || (t.GameViewSubRoute = {})); var u = function() { function e() { this.route = o.NONE, this.subRoute = o.NONE, this.previousRoute = r.NONE, this.previousSubRoute = o.NONE, this.isVisible = !1; } return e.prototype.setVisible = function(e) { s.debug("setVisible", e), this.isVisible = e, e || (this.route = r.NONE, this.subRoute = o.NONE); }, e.prototype.setRoute = function(e) { s.debug("setRoute", e), this.previousRoute = this.route, this.route = e; }, e.prototype.setSubRoute = function(e) { s.debug("setSubRoute", e), this.previousSubRoute = this.subRoute, this.subRoute = e; }, e.prototype.clearPreviousRoutes = function() { this.previousRoute = r.NONE, this.previousSubRoute = o.NONE; }, e.prototype.isRoute = function(e) { return this.route === e; }, e.prototype.hasSubRoute = function() { return this.subRoute !== o.NONE; }, e.prototype.hasRoute = function() { return this.route !== r.NONE; }, i.__decorate([ a.observable ], e.prototype, "route", void 0), i.__decorate([ a.observable ], e.prototype, "subRoute", void 0), i.__decorate([ a.observable ], e.prototype, "previousRoute", void 0), i.__decorate([ a.observable ], e.prototype, "previousSubRoute", void 0), i.__decorate([ a.observable ], e.prototype, "isVisible", void 0), i.__decorate([ a.action ], e.prototype, "setVisible", null), i.__decorate([ a.action ], e.prototype, "setRoute", null), i.__decorate([ a.action ], e.prototype, "setSubRoute", null), i.__decorate([ a.action ], e.prototype, "clearPreviousRoutes", null), e; }(); t.GameViewState = u; }).call(this, n(15)); }, function(e, t, n) { "use strict"; (function(e, __) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(25), a = n(11), s = n(95), u = n(14), l = n(10), c = n(4), p = n(18), d = n(5), f = n(28), m = n(70), h = n(23), g = n(76); function y(e, t) { return e && t ? function() { for (var n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r]; if (!(n && n.length && n[0].isRepeat)) { var o = e.apply(void 0, n); o instanceof Promise ? o.then(t) : t.apply(void 0, n); } } : e || t; } var S = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.glowTween = u.Animation.componentTween(t, "e6be625a:40:47", 0), t; } return r.__extends(t, e), t.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return e.props.focusItem.isFocusedOrHovered; }, function(t) { e.glowTween.set(t ? .2 : 0); }, { fireImmediately: !0 }); }, t.prototype.shouldComponentUpdate = function() { return !1; }, t.prototype.render = function() { return o.createElement("surface", { style: d.merge2(p.PressableStyles.glow, this.glowTween.getStyleClass("opacity")) }); }, t; }(o.Component), v = function(t) { function n(e, n) { var r = t.call(this, e, n) || this; if (r.failedEnterPlay = !1, r.tweens = { scaleX: u.Animation.componentTween(r, "e6be625a:106:47", 1), scaleY: u.Animation.componentTween(r, "e6be625a:107:47", 1) }, r.pressInOptions = { easing: h.Easing.Linear, duration: u.Animation.presets.press.duration }, r.pressOutOptions = { easing: h.Easing.CubicOut, duration: u.Animation.presets.press.duration }, r.inputManager = null, r.onInputManager = function(e) { r.inputManager = e; }, r.getInput = function() { if (r.props.focusItem.isFocused) return r.mutatedInput; }, r.playEnter = function() { if (r.props.scaleValues) if (r.props.scale && 1 === r.props.scaleValues.scaleX.to && 1 === r.props.scaleValues.scaleY.to) r.failedEnterPlay = !0; else if (r.props.scale && r.props.scaleInOptions) return r.playAnimation(r.props.scaleValues, "to", r.props.scaleInOptions); }, r.playLeave = function() { if (r.props.scale && r.props.scaleValues && r.props.scaleOutOptions) return r.playAnimation(r.props.scaleValues, "from", r.props.scaleOutOptions); }, !e.focusItem) throw new Error("No focus item passed to "); r.triggerInput = s.debounce(function() { r.mutatedInput.length && r.mutatedInput.forEach(function(e) { return e.action && e.action(); }); }, 250, !0, !1), r.updateAnimationSettings(); var o = e.focusItem; return m.onComponentUpdate(r, function(e) { o.setActive("e6be625a:138:33", !e.disabled); }), r; } return r.__extends(n, t), n.prototype.componentDidMount = function() { var e = this; this.mutateInput(this.props.input), this.props.disableFocusInputUpdate || this.reaction(function() { return f.focusSystem.controllerMode && e.props.focusItem.isFocused; }, function(t) { t && e.inputManager && e.inputManager.updateInput(); }, { fireImmediately: !0 }), this.updateAnimationSettings(); var t = this.props.focusItem; this.eventListeners = [ t.onClick.listen(this.triggerInput), t.onFocusOrHover(this.playEnter), t.onBlurOrLeave(this.playLeave) ]; }, n.prototype.componentWillReceiveProps = function(e) { this.mutateInput(e.input); }, n.prototype.componentDidUpdate = function(e) { this.failedEnterPlay && (this.failedEnterPlay = !1, this.playEnter()), this.updateAnimationSettings(); }, n.prototype.componentWillUnmount = function() { for (this._animating && e.error("Un-mounting Pressable that is currently animating!"); this.eventListeners.length; ) { var t = this.eventListeners.pop(); t && t(); } }, n.prototype.updateAnimationSettings = function() { this.props.scaleValues && this.props.pressScale && (this.pressAnimation = { scaleX: { from: this.props.scale ? this.props.scaleValues.scaleX.to : 1, to: this.props.scale ? this.props.pressScale : 1 }, scaleY: { from: this.props.scale ? this.props.scaleValues.scaleY.to : 1, to: this.props.scale ? this.props.pressScale : 1 } }); }, n.prototype.mutateInput = function(e) { var t = this; switch (e && (e = Array.isArray(e) ? e : [ e ]), e && 0 !== e.length || (e = [], this.props.useDefaultInput && e.push(new a.Input({ label: __("ID_SPARTA_ACTION_SELECT"), key: l.Keys.Accept }))), this.props.triggerMode) { case "before": this.mutatedInput = e.map(function(e) { return e.extend({ action: y(e.action, function() { return t.playPress(); }) }); }); break; case "between": this.mutatedInput = e.map(function(e) { var n = e.action; return e.extend({ action: y(function() { return t.playPressDown(); }, function() { return n && n(), t.playReleaseUp(); }) }); }); break; case "after": this.mutatedInput = e.map(function(e) { return e.extend({ action: y(function() { return t.playPress(); }, e.action) }); }); } }, n.prototype.playPressDown = function() { return this.playAnimation(this.pressAnimation, "to", this.pressInOptions); }, n.prototype.playReleaseUp = function() { if (this.props.focusItem.isFocusedOrHovered) return this.playAnimation(this.pressAnimation, "from", this.pressOutOptions); }, n.prototype.playPress = function() { var e = this; if (!this.props.disabled) return this.playPressDown().then(function() { return e.playReleaseUp(); }); }, n.prototype.playAnimation = function(e, t, n) { var r = this; this._animating = !0; var o = Object.keys(e).map(function(o) { return r.tweens[o].isDestroyed() ? Promise.resolve() : r.tweens[o].promiseTo(e[o][t], n); }); return Promise.all(o).then(function() { r._animating = !1; }); }, n.prototype.render = function() { var e = g.Tween.getStyleClass("e6be625a:324:48", this.tweens), t = d.merge2(e, this.props.style || d.emptyStyle), n = d.merge2(p.PressableStyles.children, this.props.childrenStyle || d.emptyStyle); return o.createElement(i.InputRegistration, { debugName: "e6be625a:329:43", getInput: this.getInput, ref: this.onInputManager }, o.createElement("surface", r.__assign({ style: t }, this.props.focusItem.hooks), this.props.glow && o.createElement(S, { focusItem: this.props.focusItem }), o.createElement("surface", { style: n }, this.props.children))); }, n.defaultProps = { glow: !1, scale: !1, scaleValues: { scaleX: { from: 1, to: 1.057 }, scaleY: { from: 1, to: 1.057 } }, useDefaultInput: !1, scaleInOptions: u.Animation.presets.focusables.enter.default, scaleOutOptions: u.Animation.presets.focusables.leave, triggerMode: "between", pressScale: .965, disabled: !1, disableFocusInputUpdate: !1 }, n = r.__decorate([ c.observer ], n); }(o.Component); t.Pressable = v; }).call(this, n(15), n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(2), a = n(4), s = n(48), u = n(35), l = n(8); function c(e) { return e.isReady && !e.failstate; } var p = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.sparta = l.SpartaContext.getFromComponent(t), t; } return r.__extends(t, e), t.prototype.componentDidMount = function() { var e = this, t = this.sparta.stores.presenceStateStore.isReady; this.reaction(function() { return e.sparta.stores.presenceStateStore.isReady; }, function(n) { if (n && n !== t) { var r = e.props.load; r.failstate && !r.isLoading && r.expire(); } t = n; }); }, Object.defineProperty(t.prototype, "isSuccessConditionMet", { get: function() { return !this.props.successCondition || this.props.successCondition(this.props.load); }, enumerable: !0, configurable: !0 }), t.prototype.render = function() { var e = this.props, t = e.load; if (c(t) && this.isSuccessConditionMet) return e.children(t.value); if (!e.disableLoadingState && t.isLoading) return o.createElement(s.EmptyState, { centerVertically: !0, style: this.props.emptyStyle }, o.createElement(u.Spinner, { large: !0 })); if (t.isReady && (t.failstate || !this.isSuccessConditionMet)) { if (function n(e) { return e.hasOwnProperty("defaultValues"); }(e)) return e.children(e.defaultValues); if (function r(e) { return e.hasOwnProperty("errorMessage"); }(e)) return o.createElement(s.EmptyState, { centerVertically: !0, text: e.errorMessage, subText: "function" == typeof e.errorSubText ? e.errorSubText() : e.errorSubText, style: e.emptyStyle }); } return null; }, t.contextTypes = l.SpartaContext.contextTypes, r.__decorate([ i.computed ], t.prototype, "isSuccessConditionMet", null), t = r.__decorate([ a.observer ], t); }(o.Component); t.FragmentLoader = p; var d = function() { function e() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; this.fragments = e; } return Object.defineProperty(e.prototype, "id", { get: function() { return this.fragments.map(function(e) { return e.id; }).join(":"); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "value", { get: function() { return this.fragments.every(c) ? this.fragments.map(function(e) { return e.value; }) : null; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "isLoading", { get: function() { return this.fragments.some(function(e) { return e.isLoading; }); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "isReady", { get: function() { return this.fragments.every(function(e) { return e.isReady; }); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "failstate", { get: function() { for (var e = 0, t = this.fragments; e < t.length; e++) { var n = t[e]; if (n.failstate) return n.failstate; } }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "fragmentInFailstate", { get: function() { for (var e = 0, t = this.fragments; e < t.length; e++) { var n = t[e]; if (n.failstate) return n; } }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "needsFetch", { get: function() { return this.fragments.some(function(e) { return e.needsFetch; }); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "hasExpired", { get: function() { return this.fragments.some(function(e) { return e.hasExpired; }); }, enumerable: !0, configurable: !0 }), e.prototype.expire = function() { this.fragments.forEach(function(e) { return e.expire(); }); }, r.__decorate([ i.computed ], e.prototype, "value", null), r.__decorate([ i.computed ], e.prototype, "isLoading", null), r.__decorate([ i.computed ], e.prototype, "isReady", null), e; }(); t.FragmentList = d; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(71); t.TunguskaContext = r.createContext("Tunguska"); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(0), i = n(2), a = n(36), s = n(82), u = n(288), l = n(53), c = n(5), p = {}; !function(e) { e[e.finished = 0] = "finished"; }(r || (r = {})); var d = a.getBuildInfo().isFeatureSupported("TweenerAttachTweenFinishedFix"); function f() { return {}; } function m(e) { if (!a.getBuildInfo().isRetail()) throw new Error(e); } function h(e) { return "string" == typeof e ? "#" === e.substr(0, 1) : "number" == typeof e ? isFinite(e) : void 0 === e || "object" == typeof e && (null === e || Array.isArray(e) && 4 === e.length); } t.emptyTweenOptions = f; var g = function() { function e(e, t, n) { void 0 === n && (n = {}); var r = this; this.id = e, this.initialValue = t, this.defaultOptions = n, this._isDestroyed = !1, this.runCallback = function() { var e = r.callback; e && (r.callback = void 0, e()); }, this.previousInstruction = { to: t, options: n }, p[e] = this, l.nativeApi.createTween(e, void 0 !== t ? t : null); } return e.destroyTweens = function(e) { Object.keys(e).forEach(function(t) { e[t].destroy(); }); }, e.instructionsEquals = function(t, n) { return t.from === n.from && t.to === n.to && e.optionsEquals(t.options, n.options); }, e.optionsEquals = function(e, t) { return e.duration === t.duration && e.speed === t.speed && e.easing === t.easing && e.delay === t.delay; }, e.getStyles = function(t) { var n = {}; return Object.keys(t).forEach(function(r) { var o = t[r]; n[r] = o instanceof e ? o.getStyle() : e.getStyles(o || {}); }), n; }, e.getStyleClass = function(t, n) { var r; return Object.keys(n).forEach(function(t) { var o = n[t]; if (o instanceof e) { var i = o.getStyleClass(t); r = r ? c.merge2(r, i) : i; } else if (s.options.enableDevWarnings) throw new Error("Tween.getStyleClass called with non-tween (property: " + t + ")"); }), r || c.emptyStyle; }, e.prototype.onTweenStatus = function(e) { e === r.finished && this.runCallback(); }, e.prototype.isDestroyed = function() { return this._isDestroyed; }, e.prototype.destroy = function() { this.cancelAutorun && this.cancelAutorun(), this._isDestroyed = !0, delete p[this.id], l.nativeApi.destroyTween(this.id); }, e.getTotalDuration = function(e) { var t = e.loopCount || 0; if (t < 0) return -1; var n = e.duration || 0, r = (e.delay || 0) + n; return t > 0 && (r += (n + (e.loopDelay || 0)) * t), r; }, e.prototype.instruct = function(t, n) { if (this._isDestroyed) return n && n(), void (s.options.enableDevWarnings && m("Tween.transition: Trying to update destroyed Tween with id " + this.id)); if (this.cancelAutorun && this.cancelAutorun(), void 0 === t.from && e.instructionsEquals(this.previousInstruction, t)) n && n(); else { if (this.runCallback(), n && (this.callback = n, !d)) { var r = e.getTotalDuration(t.options); r >= 0 && setTimeout(this.runCallback, r); } t = function o(e) { if (h(e.from) || (e = Object.assign({}, e, { from: null }), m("Infinity or NaN passed in Tween from value")), h(e.to) || (e = Object.assign({}, e, { to: null }), m("Infinity or NaN passed in Tween to value")), e.options && null != e.options.duration && !isFinite(e.options.duration)) { var t = Object.assign({}, e.options, { duration: null }); e = Object.assign({}, e, { options: t }), m("Infinity or NaN passed in Tween duration value"); } return e; }(t), this.previousInstruction = t, u.tweenBatcher.batch.push({ tween: this, instruction: t }), 0 === u.tweenBatcher.depth && u.tweenBatcher.flush(l.nativeApi); } }, e.prototype.transition = function(e, t, n, r) { this.instruct({ from: e, to: t, options: o.__assign({}, this.defaultOptions, n) }, r); }, e.prototype.promiseTransition = function(e, t, n) { var r = this; return new Promise(function(o) { r.transition(e, t, n, o); }); }, e.prototype.autorun = function(e) { var t = this; this.cancelAutorun && this.cancelAutorun(), this.cancelAutorun = i.autorun(function() { return e(t); }); }, e.prototype.to = function(e, t, n) { this.transition(void 0, e, t, n); }, e.prototype.promiseTo = function(e, t) { var n = this; return new Promise(function(r) { n.to(e, t, r); }); }, e.prototype.set = function(e) { this.transition(e, e, { speed: null, duration: 1 }); }, e.prototype.get = function() { return this._isDestroyed ? (s.options.enableDevWarnings && m("Tween.get: Trying to get a value for destroyed Tween with id " + this.id), 0) : l.nativeApi.getTweenValueSync(this.id); }, e.prototype.getStyle = function() { return this.id; }, e.prototype.getStyleClass = function(e) { var t, n = ((t = {})[e] = this.id, t); return c.DynamicStyle.create(n, "Tween-" + this.id + "-" + e); }, e; }(); t.Tween = g, l.nativeApi.onTweenStatus = d ? function(e, t) { var n = p[e]; n && n.onTweenStatus(t); } : function() {}; var y = function() { function e(e, t, n) { this.id = e, this.initialValue = t, this.options = n; } return e.prototype.ensureTween = function(e) { return this.tween ? e(this.tween) : e(this.createTween(this.initialValue())); }, e.prototype.createTween = function(e) { return this.tween = new g(this.id, this.initialValue(), this.options ? this.options() : void 0), this.tween; }, e.prototype.to = function(e) { return this.ensureTween(function(t) { return t.to(e); }); }, e.prototype.promiseTo = function(e) { return this.ensureTween(function(t) { return t.promiseTo(e); }); }, e.prototype.set = function(e) { return this.createTween(e); }, e.prototype.destroy = function() { this.tween && this.tween.destroy(); }, e.prototype.getStyle = function() { return this.ensureTween(function(e) { return e.getStyle(); }); }, e.prototype.getStyleClass = function(e) { return this.ensureTween(function(t) { return t.getStyleClass(e); }); }, e; }(); t.LazyTween = y; }, function(e, t, n) { "use strict"; n.r(t), n.d(t, "useObservable", function() { return i; }), n.d(t, "useComputed", function() { return a; }), n.d(t, "useDisposable", function() { return u; }), n.d(t, "isUsingStaticRendering", function() { return p; }), n.d(t, "useStaticRendering", function() { return c; }), n.d(t, "observer", function() { return S; }), n.d(t, "useObserver", function() { return y; }), n.d(t, "Observer", function() { return b; }), n.d(t, "useForceUpdate", function() { return h; }); var r = n(2), o = n(1); if (!o.useState) throw new Error("mobx-react-lite requires React with Hooks support"); if (!r.spy) throw new Error("mobx-react-lite requires mobx at least version 4 to be available"); function i(e) { var t = Object(o.useRef)(null); return t.current || (t.current = Object(r.observable)(e)), t.current; } function a(e, t) { return void 0 === t && (t = []), Object(o.useMemo)(function() { return Object(r.computed)(e); }, t).get(); } var s = function() {}; function u(e, t) { void 0 === t && (t = []); var n = Object(o.useRef)(null), r = Object(o.useRef)(!1); function i(t) { if (r.current) return s; if (!n.current) { var o = e(); if ("function" != typeof o) { var i = new Error("generated disposer must be a function"); return console.error(i), s; } n.current = o; } return function() { n.current && (n.current(), n.current = null), t && (r.current = !0); }; } return Object(o.useEffect)(function() { return i(!1); }, t), i(!0); } var l = !1; function c(e) { l = e; } function p() { return l; } /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var d = function() { return (d = Object.assign || function e(t) { for (var n, r = 1, o = arguments.length; r < o; r++) for (var i in n = arguments[r]) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); return t; }).apply(this, arguments); }; function f(e) { return e.current ? Object(r.getDependencyTree)(e.current) : ""; } var m = []; function h() { var e = function t(e, n) { var r = "function" == typeof Symbol && e[Symbol.iterator]; if (!r) return e; var o, i, a = r.call(e), s = []; try { for (;(void 0 === n || n-- > 0) && !(o = a.next()).done; ) s.push(o.value); } catch (e) { i = { error: e }; } finally { try { o && !o.done && (r = a.return) && r.call(a); } finally { if (i) throw i.error; } } return s; }(Object(o.useState)(0), 2)[1]; return Object(o.useCallback)(function() { e(function(e) { return e + 1; }); }, []); } var g = {}; function y(e, t, n) { if (void 0 === t && (t = "observed"), void 0 === n && (n = g), p()) return e(); var i, a, s = (n.useForceUpdate || h)(), u = Object(o.useRef)(null); if (u.current || (u.current = new r.Reaction("observer(" + t + ")", function() { s(); })), Object(o.useDebugValue)(u, f), function l(e) { Object(o.useEffect)(function() { return e; }, m); }(function() { u.current.dispose(); }), u.current.track(function() { try { i = e(); } catch (e) { a = e; } }), a) throw u.current.dispose(), a; return i; } function S(e, t) { if (p()) return e; var n, r = d({ forwardRef: !1 }, t), i = e.displayName || e.name, a = function(t, n) { return y(function() { return e(t, n); }, i); }; return a.displayName = i, n = r.forwardRef ? Object(o.memo)(Object(o.forwardRef)(a)) : Object(o.memo)(a), function s(e, t) { Object.keys(e).forEach(function(n) { e.hasOwnProperty(n) && !v[n] && Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n)); }); }(e, n), n.displayName = i, n; } var v = { $$typeof: !0, render: !0, compare: !0, type: !0 }; function b(e) { var t = e.children, n = e.render, r = t || n; return "function" != typeof r ? null : y(r); } function _(e, t, n, r, o) { var i = "children" === t ? "render" : "children", a = "function" == typeof e[t], s = "function" == typeof e[i]; return a && s ? new Error("MobX Observer: Do not use children and render in the same time in`" + n) : a || s ? null : new Error("Invalid prop `" + o + "` of type `" + typeof e[t] + "` supplied to `" + n + "`, expected `function`."); } b.propTypes = { children: _, render: _ }, b.displayName = "Observer"; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(310), o = n(987), i = new r.GameExpansion({ name: "DEFAULT", mask: 1, license: "", prettyName: "" }), a = [ "OFFICIAL", "RANKED", "UNRANKED", "PRIVATE" ], s = function() { function e(t) { void 0 === t && (t = {}); var n = this; this.region = t.region || "", this.country = t.country || "", this.game = t.game || "", this.gameId = t.gameId ? t.gameId + "" : "", this.platform = t.platform || "", this.guid = t.guid || "", this.protocolVersion = t.protocolVersion || "", this.mapMode = t.mapMode || "", this.mapModePretty = t.mapModePretty || "", this.mapVariant = t.mapVariant, this.mapName = t.mapName || "", this.mapNamePretty = t.mapNamePretty || "", this.mapImageUrl = t.mapImageUrl || "", this.name = t.name ? t.name.trim() : "", this.description = t.description || "", this.ranked = t.ranked || !1, this.preset = t.preset || "", this.serverType = e.isCorrectServerType(t.serverType) ? t.serverType : "OFFICIAL", this.tickRate = t.tickRate || -1, this.ip = t.ip || "", this.pingSiteAlias = t.pingSiteAlias || "", this.passwordProtected = t.passwordProtected || !1, this.custom = t.custom || !1, this.isFavorite = t.isFavorite || !1, this.mapExpansion = t.mapExpansion || i, this.isActive = void 0 === t.isActive || t.isActive, this.experience = t.experience || "", this.operationIndex = t.operationIndex, this.forceJoin = t.forceJoin, this.imageUrl = t.imageUrl, this.mixId = t.mixId, this.serverMode = t.serverMode, this.playgroundId = t.playgroundId, this.overallGameMode = t.overallGameMode, t.owner ? (this.owner = t.owner, this.ownerId = t.owner.ownerId) : this.ownerId = t.ownerId, this.expansions = Array.isArray(t.expansions) ? t.expansions.map(function(e) { return new r.GameExpansion(e); }) : []; var a = t.slots || {}; this.slots = { soldier: new o.GameServerSlot(a.soldier || a.Soldier), commander: new o.GameServerSlot(a.commander || a.Commander), queue: new o.GameServerSlot(a.queue || a.Queue), spectator: new o.GameServerSlot(a.spectator || a.Spectator) }, this.expansionMask = 0, this.expansions && this.expansions.forEach(function(e) { n.expansionMask += e.mask; }), this.rsp = t.rsp; } return e.fromBackend = function(t) { return new e(t); }, e.prototype.hasAvailableSlotsForRole = function(e) { var t = this.slots[e]; return t && t.current < t.max; }, e.prototype.isRoleSupported = function(e) { var t = this.slots[e]; return t && t.max > 0; }, Object.defineProperty(e.prototype, "isCompetitive", { get: function() { return !!this.serverMode && "CMP" === this.serverMode.slice(0, 3); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "isClosedCompetitive", { get: function() { return this.isCompetitive && "CMPSTANDARD" !== this.serverMode; }, enumerable: !0, configurable: !0 }), e.isCorrectServerType = function(e) { return !!e && a.indexOf(e) > -1; }, Object.defineProperty(e.prototype, "isTournament", { get: function() { return !!this.serverMode && "MPTOURNAMENT" === this.serverMode; }, enumerable: !0, configurable: !0 }), e; }(); t.GameServer = s; }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(1), o = n(405), i = n(2), a = n(4), s = n(77), u = n(11), l = n(10), c = n(6), p = n(64), d = n(21), f = n(211), m = n(5), h = n(29), g = n(8), y = n(25), S = n(37), v = n(19), b = n(71), _ = n(552), T = n(59), E = n(261); t.ListFocusGroupContext = b.createModernContext("ListFocusGroup"); var C = function(n) { function o(e, t) { var r = n.call(this, e, t) || this; return r.sparta = g.SpartaContext.getFromComponent(r), e.focusGroup || null === e.focusGroup ? r.focusGroup = e.focusGroup : r.focusGroup = r.sparta.twinkle.focus.createComponentGroup(r, "list", S.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | S.GroupBehavior.VERTICAL), r; } return e.__extends(o, n), o.prototype.render = function() { return r.createElement("surface", { style: this.props.style }, r.createElement(t.ListFocusGroupContext.Provider, { value: this.focusGroup }, this.props.children)); }, o.contextTypes = g.SpartaContext.contextTypes, o = e.__decorate([ a.observer ], o); }(r.Component); t.List = C, t.ListItemBackground = s.observer(function e(t) { var n = v.useTheme(), o = s.useComputed(function() { return t.selectionState.activeItemIndex === t.index && !t.disableActiveIndicator; }, [ t ]), i = n.list, a = t.faded, u = void 0 !== a && a, l = t.focusItem, c = !!l && l.isFocused, p = !!l && l.isHovered, d = !!l && l.isPressed; return r.createElement("surface", { style: i.backgroundContainer(u, o, c, p, d) }, r.createElement("surface", { style: i.backgroundOverlay(u, o, c, p, d) })); }); var I = function(t) { function n() { var e = null !== t && t.apply(this, arguments) || this; return e.getTheme = v.ThemeContext.getFromComponent(e), e.opacityTween = f.TweenStyle.create("de2e38e8:120:38", e, "opacity", function() { return e.getTheme(); }, function(t, n) { t.set(e.isActive ? 1 : 0); }), e; } return e.__extends(n, t), Object.defineProperty(n.prototype, "isActive", { get: function() { return this.props.selectionState.activeItemIndex === this.props.index; }, enumerable: !0, configurable: !0 }), n.prototype.render = function() { var e = this.getTheme().list; return r.createElement("surface", { key: "activeIndicator", style: m.merge2(e.activeIndicator, this.opacityTween) }); }, n.contextTypes = v.ThemeContext.contextTypes, e.__decorate([ i.computed ], n.prototype, "isActive", null), n = e.__decorate([ a.observer ], n); }(r.Component); function A() { return t.ListItemContext.use(); } t.ListItemContext = b.createModernContext("ListItem"), t.useListItemContext = A; var w = function(n) { function o(e, t) { var r = n.call(this, e, t) || this; return r.getInput = function() { if (r.focusItem.isFocused && r.sparta.twinkle.focus.controllerMode) return r.input; }, r.sparta = r.props.theme.sparta, r.focusItem = e.focusItem, r.focusItem.autoFocusCandidate = !0, r.focusItem.onClick.listen(function() { [].concat(r.input).forEach(function(e) { e.action && e.action(); }); }), e.focusGroup && e.focusGroup.addMember(r.focusItem, r.props.index), r; } return e.__extends(o, n), Object.defineProperty(o.prototype, "input", { get: function() { var e = this; return this.props.input ? this.props.input : (this.defaultInput || (this.defaultInput = new u.Input({ label: __("ID_SPARTA_ACTION_SELECT"), key: l.Keys.Accept, action: _.withDoubleClickHandler(this.sparta.twinkle.buildInfo.isPC, this.props.inputAction, function() { e.props.onDoubleClick && e.props.onDoubleClick(e.props.index); }) })), this.defaultInput); }, enumerable: !0, configurable: !0 }), Object.defineProperty(o.prototype, "getItemContextState", { get: function() { return { index: this.props.index, focusItem: this.focusItem, selectionState: this.props.selectionState, disableActiveIndicator: !!this.props.disableActiveIndicator, faded: !!this.props.faded }; }, enumerable: !0, configurable: !0 }), o.prototype.render = function() { var n = this.props, o = n.children, i = n.selectionState, a = n.index, s = n.theme, u = n.style, l = n.faded, c = void 0 !== l && l, p = this.focusItem, d = s.components.HoverSFX, f = s.list; return r.createElement(y.InputRegistration, { debugName: "de2e38e8:252:43", getInput: this.getInput }, r.createElement(t.ListItemContext.Provider, { value: this.getItemContextState }, r.createElement(d, { focusItem: this.focusItem }, r.createElement("surface", e.__assign({ style: m.merge2(f.container(c), u) }, p.hooks), f.showSeparator && 0 === a && r.createElement("surface", { style: f.separator }), r.createElement(t.ListItemBackground, { focusItem: this.focusItem, selectionState: i, index: a, faded: this.props.faded, disableActiveIndicator: this.props.disableActiveIndicator }), !this.props.disableActiveIndicator && f.showActiveIndicator && r.createElement(I, { focusItem: this.focusItem, selectionState: i, index: a }), "function" == typeof o ? o(p, f.itemContent) : r.createElement("surface", { style: f.itemContent }, o), f.showSeparator && r.createElement("surface", { style: f.separator }))))); }, e.__decorate([ i.computed ], o.prototype, "getItemContextState", null), o = e.__decorate([ a.observer ], o); }(r.Component); function P(e) { var n = v.useTheme(), r = t.ListFocusGroupContext.use(); return { theme: n, focusItem: T.useMaybeFocusItem(e.debugName, e.focusItem), focusGroup: r }; } function R() {} t.BaseListItem = w, t.ListItem = s.observer(function t(n) { var o = P(n), i = o.theme, a = o.focusItem, s = o.focusGroup, u = r.useCallback(function(e) { e || a.setFocused(S.FocusSource.Mouse, !0), n.selectionState.setActiveItem(n.index); }, [ a, n.selectionState, n.index ]); return r.createElement(w, e.__assign({}, n, { focusItem: a, theme: i, focusGroup: s, inputAction: u })); }), t.ListItemAutoActive = s.observer(function t(n) { var o = P(n), a = o.theme, s = o.focusItem, u = o.focusGroup; return r.useEffect(function() { return i.reaction(function() { return s.isFocusedOrHovered; }, function(e) { var t = n.selectionState, r = n.index; e ? t.setActiveItem(r) : t.keepLastSelection || t.activeItemIndex !== r || t.setActiveItem(-1); }, { fireImmediately: !0 }); }, [ s, n.selectionState, n.index ]), r.createElement(w, e.__assign({}, n, { focusItem: s, theme: a, focusGroup: u, inputAction: R })); }), t.ListItemLabel = s.observer(function e(t) { var n = v.useTheme(), o = A(), i = t.value, a = t.right, s = void 0 !== a && a, u = t.flex, l = void 0 === u ? 1 : u, c = t.textSize, d = t.color, f = t.rtl, m = t.noMarquee, h = n.list.label(s, l), g = r.createElement(O, { value: i, textSize: c, color: d, font: t.font }); return m ? r.createElement("surface", { style: h }, g) : r.createElement(p.Marquee, { style: h, focusItem: o.focusItem, speed: s ? .3 : void 0, delay: s ? 0 : 100, scrollTo: s ? p.Direction.Left : p.Direction.Right, rtl: f }, g); }); var O = s.observer(function e(t) { var n = v.useTheme(), o = A(), i = s.useComputed(function() { return !o.disableActiveIndicator && o.selectionState.activeItemIndex === o.index; }, [ o ]), a = t.textSize, u = void 0 === a ? d.TextSize.S : a, l = n.list, p = o.focusItem, f = t.color, g = o.faded, y = p.isFocused, S = p.isHovered, b = p.isPressed, _ = m.merge2(l.labelText, f ? l.labelTextDynamicColor({ faded: g, active: i, focused: y, hovered: S, pressed: b, color: f }) : l.labelTextColor(g, i, y, S, b)); return r.createElement(c.Text, { size: u, style: _, value: t.value, type: h.TextType.LIGHT, font: t.font }); }); t.ListItemIcon = s.observer(function e(t) { var n = v.useTheme(), o = A(), i = s.useComputed(function() { return !o.disableActiveIndicator && o.selectionState.activeItemIndex === o.index; }, [ o ]), a = n.list, u = o.focusItem, l = t.color, c = o.faded, p = u.isFocused, d = u.isHovered, f = u.isPressed, h = m.merge2(a.icon({ size: t.size, texture: t.src }), l ? a.labelTextDynamicColor({ faded: c, active: i, focused: p, hovered: d, pressed: f, color: l }) : a.labelTextColor(c, i, p, d, f)); return r.createElement("surface", { style: h }); }), t.ListHeader = s.observer(function e(t) { var n = v.useTheme().list; return r.createElement("surface", { style: n.container(!1) }, r.createElement("surface", { style: n.headerContent }, r.createElement(c.Text, { size: "S", type: h.TextType.EMPHASIS, style: n.headerText, value: t.value.toUpperCase() })), r.createElement("surface", { style: n.separator })); }), t.ListItemContextMenu = s.observer(function e(t) { var n = t.menuItems, i = t.style, a = g.SpartaContext.use(), s = v.useTheme(), c = r.useRef(!1), p = r.useState(!1), d = p[0], f = p[1], h = A(), S = h.focusItem, b = h.faded, _ = r.useCallback(function() { var e = S.bounds; e && (c.current = !0, f(!0), o.display({ menuItems: E.toContextMenuItems("function" == typeof n ? n() : n), position: { x: e.right - a.uiState.viewportPosition.left, y: e.bottom - a.uiState.viewportPosition.top }, align: E.Alignment.Right, onClose: function() { c.current && (c.current = !1, f(!1)); }, customWidth: e.width, theme: s })); }, [ S, n ]); r.useEffect(function() { var e = S.onClick.listen(_); return function() { e(), c.current && (c.current = !1, o.hide()); }; }, [ S, _ ]); var T = r.useCallback(function() { return a.twinkle.focus.controllerMode && S.isFocused ? new u.Input({ key: l.Keys.Accept, label: __("ID_SPARTA_ACTION_SELECT"), action: _ }) : d ? new u.Input({ key: l.Keys.Decline, label: __("ID_SPARTA_ACTION_CLOSE"), action: o.hide }) : void 0; }, [ d, _ ]), C = S.isFocused, I = S.isHovered, w = S.isPressed, P = s.list, R = P.labelTextColor(b, !1, C, I, w); return r.createElement(y.InputRegistration, { debugName: "de2e38e8:606:39", getInput: T }, r.createElement("surface", { style: m.merge3(P.dots, R, i) })); }); }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(98); t.tunguskaFeatureFlags = r.featureFlags.register({ tunguskaAssignmentsPauseMenu: new r.FeatureFlag({}), tunguskaAssignments: new r.FeatureFlag({}), tunguskaCTEAssignments: new r.FeatureFlag({}), tunguskaCustomizeFrontend: new r.FeatureFlag({}), tunguskaRSP: new r.FeatureFlag({}), tunguskaPremiumPassPagePrio: new r.FeatureFlag({}), tunguskaCTERegister: new r.FeatureFlag({}), tunguskaICERegister: new r.FeatureFlag({}), tunguskaCTESpectator: new r.FeatureFlag({}), ingameBattlepackVideos: new r.FeatureFlag({}), disableBattlepackVideos: new r.FeatureFlag({}), eorPersonalTabForFreemium: new r.FeatureFlag({}), bf1CteEorFeedback: new r.FeatureFlag({}), tunguskaEorFeedback: new r.FeatureFlag({}), tunguskaCTEShowInstallMessage: new r.FeatureFlag({}), ingameBattlepacks: new r.FeatureFlag({}), simultaneousMedals: new r.FeatureFlag({}), tunguskaConquestAssaultEnabled: new r.FeatureFlag({}), tunguskaConquestAssaultTutorials: new r.FeatureFlag({}), tunguskaEndOfRoundBattleplan: new r.FeatureFlag({}), tunguskaEndOfRoundBattleplanClaimButton: new r.FeatureFlag({}) }); }, function(e, t, n) { e.exports = !n(42)(function() { return 7 != Object.defineProperty({}, "a", { get: function() { return 7; } }).a; }); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = function() { return function e() { this.defaultTextStyle = void 0, this.useNativeStyles = !1, this.useNativeTextureFadeIn = !1, this.enableMouse = !0, this.enableDevWarnings = !0, this.enableLogging = !0, this.onErrorCallback = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; }, this.urlHook = function(e) { return e; }, this.styleHook = function(e, t) { return t; }, this.batchCallTransformer = function(e) { return e; }; }; }(); t.Options = r, t.options = new r(); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(0), i = n(168), a = n(386), s = n(2), u = n(938), l = n(515); !function(e) { e.ON = "on", e.OFF = "off"; }(r = t.FilterValue || (t.FilterValue = {})), function(e) { e.EOR = "end-of-round"; }(t.MatchmakingContext || (t.MatchmakingContext = {})); var c = function() { return function e() {}; }(); function p(e, t) { var n = s.observable.map(); return e && Object.keys(e).forEach(function(r) { n.set(r, e[r]), t && l.withOriginal(r, t, function(t) { n.set(t.filterKey, e[r]); }); }), n; } t.FilterCategory = c; var d = function(e) { function t(t, n, r) { var o = e.call(this) || this; return o.name = t, o.values = p(n, r), o.optionsCategory = r, o; } return o.__extends(t, e), t; }(c); t.CheckBoxFilterCategory = d; var f = function(e) { function t(t, n, r) { var o = e.call(this) || this; return o.name = t, o.values = p(n), o.optionsCategory = r, o; } return o.__extends(t, e), t; }(c); t.OnOffFilterCategory = f; var m = function(e) { function t(t, n, r) { var o = e.call(this) || this; return o.name = t, o.values = p(n), o.optionsCategory = r, o; } return o.__extends(t, e), t; }(c); t.RangeFilterCategory = m; var h, g = function(e) { function t(t, n, r) { var o = e.call(this) || this; return o.name = t, o.values = p(n), o.optionsCategory = r, o; } return o.__extends(t, e), t; }(c); function y(e) { switch (e) { case r.ON: return r.OFF; case r.OFF: return; default: return r.ON; } } function S(e) { if (e instanceof i.BoolFilterOptionsCategory) return e; } function v(e) { if (e instanceof i.IntFilterOptionsCategory) return e; } function b(e) { if (e instanceof i.ScalesFilterOptionsCategory) return e; } t.ScalesFilterCategory = g, t.getNextOnOrOffValue = y, function(e) { e.Maps = "maps", e.GameModes = "gameModes", e.Slots = "slots", e.ServerType = "serverType", e.Regions = "regions", e.PingSites = "pingSites", e.Presets = "presets", e.TickRates = "tickRates", e.GameSizes = "gameSizes", e.Advanced = "advanced", e.Rules = "rules", e.Kits = "kits", e.Vehicles = "vehicles", e.WeaponClasses = "weaponClasses", e.Misc = "misc", e.Scales = "scales", e.Experiences = "experiences", e.Mixes = "mixes", e.Difficulties = "difficulties", e.ServerMode = "serverMode"; }(h = t.FilterCategoryName || (t.FilterCategoryName = {})), t.FilterCategoryNames = [ h.Maps, h.GameModes, h.Slots, h.ServerType, h.Regions, h.PingSites, h.Presets, h.TickRates, h.GameSizes, h.Advanced, h.Rules, h.Kits, h.Vehicles, h.WeaponClasses, h.Misc, h.Scales, h.Experiences, h.Mixes, h.Difficulties, h.ServerMode ], t.ServerFilterNameField = "name"; var _ = function() { function e(e, t) { void 0 === t && (t = {}), this.filterOptions = t, this.name = s.observable({ name: "" }), this.version = e.version || 6, this.categories = { maps: new d(h.Maps, e.maps, S(t.maps)), gameModes: new d(h.GameModes, e.gameModes, S(t.gameModes)), vehicles: new f(h.Vehicles, e.vehicles, S(t.vehicles)), weaponClasses: new f(h.WeaponClasses, e.weaponClasses, S(t.weaponClasses)), slots: new d(h.Slots, this.prepareSlotsDict(e.slots), S(t.slots)), serverType: new d(h.ServerType, e.serverType, S(t.serverType)), regions: new d(h.Regions, e.regions, S(t.regions)), pingSites: new d(h.PingSites, e.pingSites, S(t.pingSites)), kits: new f(h.Kits, e.kits, S(t.kits)), presets: new d(h.Presets, e.presets, S(t.presets)), misc: new f(h.Misc, e.misc, S(t.misc)), scales: new g(h.Scales, e.scales, b(t.scales)), advanced: new f(h.Advanced, e.advanced, S(t.advanced)), rules: new m(h.Rules, e.rules, v(t.rules)), tickRates: new d(h.TickRates, e.tickRates, S(t.tickRates)), gameSizes: new d(h.GameSizes, e.gameSizes, S(t.gameSizes)), experiences: new d(h.Experiences, e.experiences, S(t.experiences)), mixes: new d(h.Mixes, e.mixes, S(t.mixes)), difficulties: new d(h.Difficulties, e.difficulties, S(t.difficulties)), serverMode: new f(h.ServerMode, e.serverMode, S(t.serverMode)) }, "string" == typeof e.name ? this.name.name = e.name : e.name && e.name.name && (this.name.name = e.name.name), this.id = e.id || 0, this.filterName = e.filterName || "", this.role = e.role, this.mapRotation = e.mapRotation, this.modeRotation = e.modeRotation, this.operationIndex = e.operationIndex, this.playground = e.playground, this.isEORMM = e.isEORMM, this.matchmakingContext = e.matchmakingContext; } return e.prototype.prepareSlotsDict = function(e) { var t = {}; return e && Object.keys(e).forEach(function(n) { var r = e[n]; void 0 !== r && (t[n] = r); }), t; }, e.prototype.getCategory = function(e) { return this.categories[e]; }, e.prototype.serialize = function() { return u.formatFilter(Object.assign({ version: this.version, name: this.name.name, role: this.role, passwordProtected: this.name.name ? void 0 : "off", mapRotation: this.mapRotation, modeRotation: this.modeRotation, operationIndex: this.operationIndex, playground: this.playground, isEORMM: this.isEORMM, matchmakingContext: this.matchmakingContext }, a.mapValues(this.categories, function(e) { return e.values.toJSON(); }))); }, Object.defineProperty(e.prototype, "json", { get: function() { return JSON.stringify(this.serialize()); }, enumerable: !0, configurable: !0 }), e.prototype.toggleAll = function(e) { var t = this.getCategory(e); if (!t || !t.optionsCategory) return this; var n, o = t.optionsCategory.options.concat(t.optionsCategory.clonedOptions).map(function(e) { return e.filterKey; }); if (t instanceof d) { var i = o.every(function(e) { return t.values.get(e) === r.ON; }); o.forEach(function(e) { return t.values.set(e, i ? void 0 : r.ON); }); } t instanceof f && (n = o.every(function(e) { return t.values.get(e) === r.ON; }) ? r.OFF : o.every(function(e) { return t.values.get(e) === r.OFF; }) ? void 0 : r.ON, o.every(function(e) { return t.values.get(e) === n; }) || o.forEach(function(e) { return t.values.set(e, n); })); }, e.prototype.invertCategory = function(e) { var t = this.getCategory(e); if (!t || !t.optionsCategory) return this; t.optionsCategory.options.concat(t.optionsCategory.clonedOptions).map(function(e) { return e.filterKey; }).forEach(function(e) { null == t.values.get(e) ? t.values.set(e, r.ON) : t.values.delete(e); }); }, e.prototype.setName = function(e) { this.name.name = e; }, e.prototype.toggleFilterCondition = function(e, t) { var n, o = this.getCategory(e), i = o.values.get(t), a = this.categories.mixes; if (a.values.size > 0 && e !== h.Slots && e !== h.Regions && a.values.clear(), o instanceof d && (i === r.ON ? o.values.delete(t) : o.values.set(t, r.ON)), o instanceof f && o.values.set(t, y(i)), o instanceof m && o.optionsCategory) { var s = void 0, u = o.optionsCategory.options.find(function(e) { return e.filterKey === t; }); if (!u) return; null == i && "number" == typeof u.defaultValue && (s = [ u.defaultValue, u.defaultValue ]), o.values.set(t, s); } if (o instanceof g && o.optionsCategory) { var l = o.optionsCategory.options.find(function(e) { return e.filterKey === t; }); if (!l) return; var c = Object.keys(l.options).sort(function(e, t) { return l.options[e] - l.options[t]; }), p = c.filter(function(e) { return o.values.get(e) === r.ON; }), S = p.length > 0 ? p[0] : null, v = S ? ((n = {})[S] = l.options[S], n) : null, b = -1, _ = void 0; v && (_ = Object.keys(v)[0], b = c.indexOf(_)); var T = b + 1; if (T < c.length) { var E = c[T]; _ && o.values.delete(_), o.values.set(E, r.ON); } else c.forEach(function(e) { return o.values.delete(e); }); } }, e.prototype.resetFilterId = function() { (this.id || this.filterName) && (this.id = 0, this.filterName = void 0); }, o.__decorate([ s.observable ], e.prototype, "version", void 0), o.__decorate([ s.observable ], e.prototype, "categories", void 0), o.__decorate([ s.observable ], e.prototype, "name", void 0), o.__decorate([ s.observable ], e.prototype, "id", void 0), o.__decorate([ s.observable ], e.prototype, "filterName", void 0), o.__decorate([ s.observable ], e.prototype, "role", void 0), o.__decorate([ s.observable ], e.prototype, "mapRotation", void 0), o.__decorate([ s.observable ], e.prototype, "modeRotation", void 0), o.__decorate([ s.observable ], e.prototype, "operationIndex", void 0), o.__decorate([ s.observable ], e.prototype, "playground", void 0), o.__decorate([ s.observable ], e.prototype, "isEORMM", void 0), o.__decorate([ s.observable ], e.prototype, "matchmakingContext", void 0), o.__decorate([ s.computed ], e.prototype, "json", null), o.__decorate([ s.action ], e.prototype, "toggleAll", null), o.__decorate([ s.action ], e.prototype, "invertCategory", null), o.__decorate([ s.action ], e.prototype, "setName", null), o.__decorate([ s.action ], e.prototype, "toggleFilterCondition", null), o.__decorate([ s.action ], e.prototype, "resetFilterId", null), e; }(); t.GameFilter = _; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, o = n(0), i = n(1), a = n(18), s = n(5); !function(e) { e[e.S = 4] = "S", e[e.M = 8] = "M", e[e.L = 16] = "L", e[e.XL = 20] = "XL"; }(r || (r = {})); var u = function(e) { function t() { return null !== e && e.apply(this, arguments) || this; } return o.__extends(t, e), t.prototype.render = function() { var e = Math.max(0, Math.min(this.props.completed, 1)), t = 1 - e, n = s.DynamicStyle.create({ flex: e }, "b2b45145:29:26"), o = s.DynamicStyle.create({ flex: t }, "b2b45145:30:30"), u = r[this.props.height || "M"], l = this.props.bgColorStyle || a.ProgressBarStyles.defaultBgColorStyle, c = this.props.barColorStyle || a.ProgressBarStyles.defaultBarColorStyle; return i.createElement("surface", { style: s.merge3(a.ProgressBarStyles.container(u), this.props.style, l) }, e > 0 && i.createElement("surface", { style: s.merge3(n, a.CommonStyles.zOffset(1), c) }), t > 0 && i.createElement("surface", { style: o })); }, t; }(i.Component); t.ProgressBar = u; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(27), o = n(2), i = n(46), a = n(47), s = n(65), u = n(32), l = n(87), c = n(31), p = n(269), d = n(587), f = n(588), m = n(199), h = n(427), g = n(13), y = n(150), S = e.get("TunguskaBattlepackClients"), v = function(e, t, n, r) { var o = { transactionSource: e, transactionType: "item_purchase_scraps", transactionCode: "drain", itemId: t, price: n, balance: r, currency: "scraps", status: "complete", revenueModel: "virtual" }; y.telemetryStoreLoader.get().trackTransaction(o); }; t.buyScrapExchangeOffer = i.requester.createClient({ requestOn: [ a.buyBattlepackScrapExchange ], throttle: 500, request: function(e, t, n) { return new Promise(function(o, i) { r.request("ScrapExchange.buyItemForScraps", { game: "tunguska", item: e }).then(function(r) { o(r || void 0), v("scrap_store", e, t, n - t), y.telemetryStoreLoader.get().gaStore.trackEvent("ScrapExchange", "Buy", "Success"); }).catch(function(e) { i(e), y.telemetryStoreLoader.get().gaStore.trackEvent("ScrapExchange", "Buy", "Failure"); }); }); }, parse: function(e) { return e; }, update: function(e) { this.publish(e); } }), t.getScrapExchangeOffers = i.requester.createClient({ requestOn: [ a.getBattlepackScrapExchange ], throttle: 500, request: function() { return r.request("ScrapExchange.getOffers", { game: "tunguska" }); }, parse: function(e) { return e; }, update: function(e) { l.tunguskaBattlepackScrapExchangeStore.setRevision(e), this.publish(e); } }), t.claimBlueprint = i.requester.createClient({ requestOn: [ a.claimBlueprint ], throttle: 2e3, shouldPerformRequest: function() { return !0; }, request: function(e) { return r.request("Battlepack.open", { game: u.tunguskaGameId, withVoucher: e }); }, parse: function(e) { return e; }, onRequestError: function(e, t) { this.publish(new Error("Request error when attempting to claim blueprint"), t); }, update: function(e, t, n) { e ? this.publish(null, e) : this.publish(new Error("Failed to claim blueprint")); } }), t.scrap = i.requester.createClient({ requestOn: [ a.scrapItem ], throttle: 500, shouldPerformRequest: function() { return !0; }, request: function(e) { return r.request("Battlepack.scrapItem", { game: u.tunguskaGameId, item: e.key }); }, parse: function(e) { return e; }, onRequestError: function(e, t) { this.publish(new Error("Request error when attempting to scrap item"), t); }, update: function(e, t, n) { e ? (n.quantity -= 1, this.publish(null, n)) : this.publish(new Error("Failed to scrap item"), n), a.getBattlepackScrapExchange(); } }), t.scrapDuplicates = i.requester.createClient({ requestOn: [ a.scrapDuplicateItems ], throttle: 500, shouldPerformRequest: function() { return !0; }, request: function() { return r.request("Battlepack.scrapDuplicateItems", { game: u.tunguskaGameId }); }, parse: function(e) { return e; }, onRequestError: function(e) { this.publish(new Error("Request error when attempting to scrap item")); }, update: function(e, t) { e ? this.publish(e) : this.publish(new Error("Failed to scrap item")); } }), t.handleStalePurchases = i.requester.createClient({ throttle: 2e4, shouldPerformRequest: function() { return !0; }, request: function() { return new Promise(function(e, t) { r.firstPartyRequest("Inventory.getPurchases", { games: [ u.tunguskaGameId ], categories: [ "battlepacks" ] }).then(function(n) { if (!n || !n.purchases) return t(); var o = Promise.resolve({}); n.purchases.forEach(function(e) { 0 === e.state.value ? o = o.then(function() { return new Promise(function(t, n) { r.firstPartyRequest("Inventory.startPurchase", { game: e.game, productId: "", data: e.data, pinData: null, deviceIdType: "machash", deviceId: y.telemetryStoreLoader.map(function(e) { return e.pinStore.uuid; }) }).then(function(o) { if (!o || !o.purchaseId) return n(); r.firstPartyRequest("Inventory.completePurchase", { game: e.game, productId: "", purchaseId: o.purchaseId, result: "completed", pinData: null, deviceIdType: "machash", deviceId: y.telemetryStoreLoader.map(function(e) { return e.pinStore.uuid; }) }).then(t, n); }, n); }); }) : 1 === e.state.value && (o = o.then(function() { return r.firstPartyRequest("Inventory.completePurchase", { game: e.game, productId: "", purchaseId: e.purchaseId, result: "completed", pinData: null, deviceIdType: "machash", deviceId: y.telemetryStoreLoader.map(function(e) { return e.pinStore.uuid; }) }); })); }); var i = n.purchases.length > 0; o.then(function() { e(i), i && h.tunguskaBattlepackUnopenedStore.refetch(u.tunguskaGameId); }).catch(function(e) { S.error(e); }); }, t); }); }, parse: function(e) { return e; }, update: function(e) { this.publish(e); } }), t.getPuzzleCategories = new c.Client("Battlepack.getPuzzleCategories", { requestPerformer: r.request }), t.getFullInventory = new c.Client("Battlepack.listFullInventory", { requestPerformer: r.request }), t.getUnopened = new c.Client("Battlepack.listBattlepackVouchers", { requestPerformer: r.request }), t.getSummary = new c.Client("Battlepack.getSummary", { requestPerformer: r.request }), t.getBattlepackWidget = new c.Client("Battlepack.getWidgetData", { requestPerformer: r.request }), t.getBattlepackOffers = new c.Client("Battlepack.getBattlepackOffers", { requestPerformer: r.firstPartyRequest }), t.getPurchasablePacks = new c.Client("Battlepack.getAllPurchasablePacks", { requestPerformer: r.request }), t.openBattlepack = new c.Client("Battlepack.open", { requestPerformer: r.request }), t.buyForScraps = new c.Client("Battlepack.buyForScraps", { requestPerformer: r.request }), t.buyForScraps.addResultHandler(function(e) { e.onSuccess(function() { if (e.response && e.request) { var t = e.request.params; v("battlepack_store", t.pack, t.price, t.balance - t.price); } }); }), t.initialFetch = i.requester.createClient({ throttle: 1e3, shouldPerformRequest: function() { return s.isHostingGame(u.tunguskaGameId) && !0; }, request: function() { return new Promise(function(e) { t.handleStalePurchases.trigger(), e(); }); }, parse: function(e) { return e; }, update: function(e) { this.publish(e); } }), t.expireTunguskaBattlepackFragments = function(e) { o.when(function() { return g.onlineState.isOnlineBlazeAndGateway; }, function() { S.info("The fragments has been expired"), f.battlepackWidgetStore.expireFragment(u.tunguskaGameId), e ? (m.tunguskaBattlepackSummaryStore.expireFragment(u.tunguskaGameId), h.tunguskaBattlepackUnopenedStore.expireFragment(u.tunguskaGameId), p.tunguskaBattlepackInventoryStore.expireFragment(u.tunguskaGameId)) : (m.tunguskaBattlepackSummaryStore.refetch(u.tunguskaGameId), h.tunguskaBattlepackUnopenedStore.refetch(u.tunguskaGameId), p.tunguskaBattlepackInventoryStore.refetch(u.tunguskaGameId), d.tunguskaBattlepackPuzzleCategoriesStore.refetch(u.tunguskaGameId)); }); }, t.buyForScraps.addResultHandler(function(e) { e.onSuccess(function() { return t.expireTunguskaBattlepackFragments(); }); }), t.openBattlepack.addResultHandler(function(e) { e.onSuccess(function() { return t.expireTunguskaBattlepackFragments(); }); }), t.scrap.listen(function() { t.expireTunguskaBattlepackFragments(); }), t.scrapDuplicates.listen(function() { t.expireTunguskaBattlepackFragments(); }), t.buyScrapExchangeOffer.listen(function() { t.expireTunguskaBattlepackFragments(); }), t.claimBlueprint.listen(function() { t.expireTunguskaBattlepackFragments(); }); var b = [ t.scrap, t.claimBlueprint, t.buyScrapExchangeOffer, t.getScrapExchangeOffers, t.scrapDuplicates ]; t.startListening = function _() { b.forEach(function(e) { return e.startListening(); }); }, t.stopListening = function T() { b.forEach(function(e) { return e.stopListening(); }); }; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(2), i = function() { function e(e) { void 0 === e && (e = !1), this.keepLastSelection = e, this.activeItemIndex = 0; } return e.prototype.setActiveItem = function(e) { this.activeItemIndex = e; }, r.__decorate([ o.observable ], e.prototype, "activeItemIndex", void 0), r.__decorate([ o.action ], e.prototype, "setActiveItem", null), e; }(); t.ListSelectionState = i; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(418), i = n(1215), a = n(1216), s = n(1217), u = n(1218), l = n(1219), c = n(1221), p = n(1223), d = n(47), f = n(382), m = n(13), h = n(1224), g = n(1226), y = n(1228), S = n(32), v = n(1229), b = n(1234), _ = n(576), T = n(1235), E = n(1239), C = n(1240); t.tunguskaVoipState = new f.VoipState(m.settingsStore), t.tunguskaBattlepackScrapExchangeStore = new s.TunguskaBattlepackScrapExchangeStore(), t.teamsStore = new u.TeamsStore(d.receivedPlayerList), t.tunguskaMissionsStore = new l.TunguskaMissionsStore(c.missionsClients), t.tunguskaAssignmentsSelectState = new a.TunguskaAssignmentsSelectState(), t.tunguskaAssignmentsStore = new o.TunguskaAssignmentsStore(S.tunguskaGameId, h.tunguskaAssignmentsClients), t.tunguskaTrackedAssignmentStore = new i.TunguskaTrackedAssignmentStore(h.tunguskaAssignmentsClients, y.tunguskaIngameAssignmentProgressClient, t.tunguskaAssignmentsStore, m.spartaActivatedStore, m.onlineState), t.tunguskaOperationsCampaignStore = new p.TunguskaOperationsCampaignStore(S.tunguskaGameId, g.tunguskaOperationsCampaignClient); var I = function(e) { function n(n, r) { var o = e.call(this, n) || this; return o.tunguskaEndOfRoundStore = r, o.tunguskaVoipState = t.tunguskaVoipState, o.tunguskaBattlepackScrapExchangeStore = t.tunguskaBattlepackScrapExchangeStore, o.teamsStore = t.teamsStore, o.tunguskaMissionsStore = t.tunguskaMissionsStore, o.tunguskaAssignmentsSelectState = t.tunguskaAssignmentsSelectState, o.tunguskaAssignmentsStore = t.tunguskaAssignmentsStore, o.tunguskaTrackedAssignmentStore = t.tunguskaTrackedAssignmentStore, o.tunguskaOperationsCampaignStore = t.tunguskaOperationsCampaignStore, o.tunguskaEndOfRoundBattleplanStore = new b.TunguskaEndOfRoundBattleplanStore(o.tunguskaEndOfRoundStore), o.quickmatchState = new v.QuickmatchState(o.sparta, o.sparta.stores.gameStore, o.sparta.stores.nativePropertiesStore, S.tunguskaGameId), o.gameServerDetailsStore = T.createGameServerDetailsStore(o.sparta.gatewayClient, o.sparta.stores.gameDataStore, o.sparta.stores.presenceStateStore), o.emblemState = new E.EmblemState(o.sparta.twinkle.buildInfo, C.createEmblemClients(o.sparta.gatewayClient.request), !0), o; } return r.__extends(n, e), n; }(_.GameStores); t.TunguskaStores = I; }, function(e, t, n) { var r = n(141), o = Math.min; e.exports = function(e) { return e > 0 ? o(r(e), 9007199254740991) : 0; }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1016); function i(e, t) { var n; return (n = function(n) { function o(e, r) { var o = n.call(this, e, r) || this; return o._isMounted = !0, o._storeUnsubscribes = [], o.state || (o.state = {}), t && o.subscribeToStores(t, !1), o; } return r.__extends(o, n), o.prototype.componentWillUnmount = function() { e.prototype.componentWillUnmount && e.prototype.componentWillUnmount.call(this), this._isMounted = !1, this.unsubscribeFromStores(); }, o.prototype.subscribeToStores = function(e, t) { var n = this; void 0 === t && (t = !0); var o = !1, i = {}; return Object.keys(e).forEach(function(t) { var r = e[t]; r && ("function" == typeof r.getState && (i[t] = r.getState.apply(r), o = !0), n._storeUnsubscribes.push(r.listen(n.onStoreChange.bind(n, t)))); }), o && (t ? this.setState(i) : this.state = r.__assign({}, this.state, i)), i; }, o.prototype.unsubscribeFromStores = function() { this._storeUnsubscribes.forEach(function(e) { return e(); }), this._storeUnsubscribes = []; }, o.prototype.onStoreChange = function(e, t) { if (this._isMounted) { var n = {}; n[e] = t, this.setState(n); } }, o; }(e)).displayName = o.getDisplayName(e), n.contextTypes = e.contextTypes, n; } t.subscribeToStores = function a(e) { return function(t) { return i(t, e); }; }, t.storeSubscriber = i; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(2), i = n(528), a = n(24), s = n(5), u = n(144), l = n(14), c = function() { function e() { this.left = 0, this.top = 0, this.width = 0, this.height = 0; } return r.__decorate([ o.observable ], e.prototype, "left", void 0), r.__decorate([ o.observable ], e.prototype, "top", void 0), r.__decorate([ o.observable ], e.prototype, "width", void 0), r.__decorate([ o.observable ], e.prototype, "height", void 0), e; }(), p = function() { return function e() { this.extra = new i.ExtraElements("UIState"), this.tweenTranslateY = l.Animation.tween("89a21824:17:46", 0); }; }(), d = function() { function e() { this.window = new c(), this.layout = new p(); } return Object.defineProperty(e.prototype, "viewportScale", { get: function() { var e = this.window.width / a.screen.style.width, t = this.window.height / a.screen.style.height, n = Math.min(e, t); return { scaleX: n, scaleY: n }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "viewportScaleStyle", { get: function() { return s.DynamicStyle.wrapLegacyStyle(this.viewportScale, "89a21824:35:15"); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "viewportPosition", { get: function() { return { left: this.window.width / 2 - a.screen.style.width / 2 + a.screen.style.left, top: this.window.height / 2 - a.screen.style.height / 2 + a.screen.style.top }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "viewportPositionStyle", { get: function() { return s.DynamicStyle.wrapLegacyStyle(this.viewportPosition, "89a21824:49:15"); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "viewportWindowStyle", { get: function() { return s.DynamicStyle.wrapLegacyStyle({ left: this.window.left, top: this.window.top, width: this.window.width, height: this.window.height }, "89a21824:55:15"); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "viewportSizeStyle", { get: function() { return s.DynamicStyle.wrapLegacyStyle({ width: this.window.width, height: this.window.height }, "89a21824:66:15"); }, enumerable: !0, configurable: !0 }), e.prototype.setWindowSize = function(e, t) { this.window.width = e, this.window.height = t; }, r.__decorate([ o.computed ], e.prototype, "viewportScale", null), r.__decorate([ o.computed ], e.prototype, "viewportScaleStyle", null), r.__decorate([ o.computed ], e.prototype, "viewportPosition", null), r.__decorate([ o.computed ], e.prototype, "viewportPositionStyle", null), r.__decorate([ o.computed ], e.prototype, "viewportWindowStyle", null), r.__decorate([ o.computed ], e.prototype, "viewportSizeStyle", null), r.__decorate([ o.action ], e.prototype, "setWindowSize", null), e; }(); t.UIState = d, t.uiState = new d(), u.onWindowSizeChanged.listen(function(e, n) { t.uiState.setWindowSize(e, n); }); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(69), a = n(4), s = n(2), u = n(136), l = n(41), c = n(6), p = n(7), d = n(14), f = n(565), m = n(20), h = n(5), g = n(29), y = n(8), S = h.StaticStyle.wrapLegacyStyleSheet({ heading: { opacity: .8, marginBottom: p.GUTTER }, iconContainer: { position: "absolute", top: 0, right: 0, bottom: 0, left: 0, alignItems: "center", justifyContent: "center" }, icon: { textureMode: "contain", textureAlign: [ .5, 1 ] } }, "4b10a21b:18:15"), v = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.sparta = y.SpartaContext.getFromComponent(t), t.iconScaleTween = d.Animation.componentTween(t, "4b10a21b:126:52", 1), t.iconGrayScaleTween = d.Animation.componentTween(t, "4b10a21b:127:56", 1), t.iconTween = d.Animation.componentTween(t, "4b10a21b:128:47", 1), t.iconSizeTween = d.Animation.componentTween(t, "4b10a21b:129:51", 0), t.iconColorTween = d.Animation.componentTween(t, "4b10a21b:130:52", "#ffffff"), t.mounted = !1, t.setCard = function(e) { t.card = e; }, t; } return r.__extends(t, e), Object.defineProperty(t.prototype, "iconSize", { get: function() { if (this.props.iconSize && this.card) { var e = this.props.staticContentSize ? this.card.height : this.card.backgroundHeight; if (e > 0) return Math.ceil(e * this.props.iconSize); } return 0; }, enumerable: !0, configurable: !0 }), t.prototype.componentWillMount = function() { var e = this; this.mounted = !0; var t = this.props.debugName || i.autoId("basicCard"); this.focusItem = this.props.focusItem || this.sparta.twinkle.focus.create(this, t), this.reaction(function() { return e.focusItem.isFocusedOrHovered; }, function() { return e.updateTweens(); }, { fireImmediately: !0 }), this.reaction(function() { return e.iconSize; }, function(t) { e.iconSizeTween.set(t); }, { fireImmediately: !0 }); }, t.prototype.componentWillUnmount = function() { this.mounted = !1; }, t.prototype.componentDidUpdate = function() { this.updateTweens(); }, t.prototype.updateTweens = function() { if (this.mounted) { var e = !1 !== this.props.enabled, t = 1, n = 0; (this.props.useGrayScale || this.props.forceGrayScale) && (t = this.props.forceGrayScale || !e ? .5 : 1, n = this.props.forceGrayScale || !e ? 1 : 0), this.props.activeIconColor && (this.focusItem.isFocusedOrHovered ? this.iconColorTween.to(this.props.activeIconColor, u.tweenInOptions) : this.iconColorTween.to("#ffffff", u.tweenOutOptions)), this.iconTween.set(Math.min(1, t)), this.iconGrayScaleTween.to(n, u.tweenOutOptions), this.sparta.twinkle.buildInfo.isConsole && this.iconScaleTween.to(1, u.tweenOutOptions); } }, t.prototype.renderTexts = function() { var e = this.props, t = e.heading, n = e.description, r = e.layout, i = e.textHeight, a = "split" === r, s = this.props.headingType || g.TextType.NORMAL, u = h.DynamicStyle.create({ opacity: a ? .66 : 1, textAlignForRTL: m.isRTLLanguage() ? "left" : "right" }, "4b10a21b:204:26"); t && "string" == typeof t && (t = t.toUpperCase()); var l = h.DynamicStyle.create({ color: this.props.headingColor, textAlignForRTL: m.isRTLLanguage() ? "left" : "right", marginBottom: n ? S.heading.getStyleValue("marginBottom") : 0 }, "4b10a21b:213:29"); return o.createElement("surface", { style: { height: i } }, b(t, { style: h.merge2(S.heading, l), size: a ? "M" : "XS", type: s }), b(n, { style: u, size: a ? "XS" : "M" })); }, t.prototype.renderIcon = function(e, t) { var n; return n = this.props.iconShadow ? o.createElement(f.ShadowedTexture, { src: e, style: t }) : o.createElement("surface", { style: [ t, { texture: e } ] }), o.createElement("surface", { style: [ S.iconContainer, this.iconTween.getStyleClass("opacity") ] }, n); }, t.prototype.render = function() { var e, t, n, i = this.props, a = (i.heading, i.description, i.activeIconColor, i.debugName, i.textHeight, i.iconSize, i.headingColor, i.iconShadow, i.forceGrayScale, i.headingType, i.children), s = i.bottom, l = i.enabled, c = i.layout, p = i.icon, d = r.__rest(i, [ "heading", "description", "activeIconColor", "debugName", "textHeight", "iconSize", "headingColor", "iconShadow", "forceGrayScale", "headingType", "children", "bottom", "enabled", "layout", "icon" ]), f = !1 !== l, m = this.renderTexts(); if ("split" === (void 0 !== c ? c : p ? "split" : "inline") ? e = m : t = m, s && (e = s, t = m), p) { var g = h.merge4(S.icon, this.iconSizeTween.getStyleClass("width"), this.iconSizeTween.getStyleClass("height"), h.merge4(this.iconScaleTween.getStyleClass("scaleX"), this.iconScaleTween.getStyleClass("scaleY"), this.iconColorTween.getStyleClass("color"), this.iconGrayScaleTween.getStyleClass("grayScale"))); n = this.renderIcon(p, g); } return o.createElement(u.Card, r.__assign({ ref: this.setCard }, d, { focusItem: this.focusItem, enabled: f, bottom: e }), n, a, t); }, t.contextTypes = y.SpartaContext.contextTypes, t.defaultProps = { size: l.CardSize.SSM, useGrayScale: !0, forceGrayScale: !1, iconSize: .75 }, r.__decorate([ s.observable ], t.prototype, "card", void 0), r.__decorate([ s.computed ], t.prototype, "iconSize", null), r.__decorate([ s.action ], t.prototype, "setCard", void 0), t = r.__decorate([ a.observer ], t); }(o.Component); function b(e, t) { return "string" == typeof e ? o.createElement(c.Text, r.__assign({ value: e }, t)) : e; } t.BasicCard = v; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }), t.globalScope = e; }).call(this, n(179)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(82), o = n(53), i = 1, a = function() { function e(e, t, n, r) { void 0 === n && (n = !1), void 0 === r && (r = 1), this.id = e, this.url = t, this.loop = n, this.volume = r, this.unload = this.stop; } return e.prototype.play = function() { o.nativeApi.playSound(this.id, this.url, this.loop), o.nativeApi.setSoundVolume(this.id, this.volume); }, e.prototype.playInAudioBus = function(e) { o.nativeApi.playSoundAudioBus(this.id, this.url, this.loop, e), o.nativeApi.setSoundVolume(this.id, this.volume); }, e.prototype.stop = function() { o.nativeApi.stopSound(this.id); }, e.prototype.stopWithFadeOut = function(e) { void 0 === e && (e = 3e3), o.nativeApi.stopSoundWithFadeout(this.id, e); }, e.prototype.setVolume = function(e) { this.volume = e; }, e.prototype.setLoop = function(e) { this.loop = e; }, e.load = function(t) { return r.options.urlHook && (t = r.options.urlHook(t)), new e(i++, t); }, e.stopAll = function() { o.nativeApi.stopAllSounds(); }, e; }(); t.Sound = a; }, function(e, t, n) { "use strict"; var r; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e.soldier = "soldier", e.spectator = "spectator", e.commander = "commander"; }(r = t.JoinRole || (t.JoinRole = {})); var o = function() { return function e(t, n) { void 0 === t && (t = ""), void 0 === n && (n = 0), this.address = t, this.port = n; }; }(); t.JoinLanServerOptions = o; var i = function() { function e(e, t, n) { void 0 === t && (t = r.soldier), this.password = null, this.server = e, this.role = t, n && (this.squad = n.squad, this.party = n.party, this.password = n.password, this.friend = n.friend, this.platoonMember = n.platoonMember, this.platoonGuid = n.platoonGuid, this.matchmakingSession = n.matchmakingSession, this.individualJoin = !!n.individualJoin, this.hasReservation = !!n.hasReservation); } return e.prototype.withPassword = function(t) { var n = this, r = n.party, o = n.squad, i = n.friend, a = n.platoonMember, s = n.platoonGuid; return new e(this.server, this.role, { party: r, squad: o, friend: i, platoonMember: a, platoonGuid: s, password: t }); }, e.isMultiplayerServerOptions = function(t) { return !!t && t instanceof e; }, e; }(); t.JoinMultiplayerServerOptions = i; var a = function() { return function e(t, n, o, i) { void 0 === o && (o = r.soldier), this.friend = t, this.gameId = n, this.role = o, this.server = i; }; }(); t.JoinMultiplayerFriendOptions = a; }, function(e, t, n) { "use strict"; function r(e, t, n, r) { var o; return void 0 === n && (n = !0), void 0 === r && (r = !0), function() { for (var i = this, a = [], s = 0; s < arguments.length; s++) a[s] = arguments[s]; n && !o ? (e.apply(this, a), o = setTimeout(function() { o = null; }, t)) : (o && clearTimeout(o), o = setTimeout(function() { r && e.apply(i, a), o = null; }, t)); }; } Object.defineProperty(t, "__esModule", { value: !0 }), t.debounce = r, t.debounced = function o(e) { return function(t, n, o) { if (!o) throw new Error("Failed to decorate " + n + " with debounced(" + e + "), missing property descriptor"); if ("function" != typeof o.value) throw new Error("Failed to decorate " + n + " with debounced(" + e + "), " + n + " is not a function"); o.value = r(o.value, e.duration, e.isLeading, e.isTailing); }; }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(33), a = n(4), s = n(2), u = n(17), l = n(14), c = n(7), p = n(367), d = n(5), f = n(9), m = n(18), h = n(28), g = d.StaticStyle.create({ texture: u.bbOfflineUrl("/sparta/jsclient/builds/assets/right_white-8a3f8212.png") }, "9817d95f:16:21"); t.sideSoftClip = f.SpartaGlobals.bundleIsConsole ? p.dangerZoneSize.width : c.getWidth(2.5); var y = c.getWidth(1), S = d.StaticStyle.wrapLegacyStyleSheet({ arrow: { zOffset: 1e3, width: y, height: y, padding: [ c.GUTTER, 1.5 * c.GUTTER, c.GUTTER, 1.5 * c.GUTTER ], position: "absolute" }, arrowTexture: { flex: 1, textureAtlas: "SpartaCommonAtlas", textureMode: "cover" } }, "9817d95f:22:15"), v = function(e) { function t(t, n) { var r = e.call(this, t, n) || this; return r.shouldKeepArrowsVisible = !1, r.visiblityTween = l.Animation.tween("9817d95f:51:38", 0), r.onMouseScroll = function(e) { r.props.onMouseScroll(e); }, r.focusItem = h.focusSystem.create(r, "arrow_" + t.direction + "-" + t.id), r.focusItem.onClick.listen(function() { r.keepArrowsVisibleFor(1e3), r.props.onClick(t.direction); }), r; } return r.__extends(t, e), t.prototype.componentWillUnmount = function() { clearTimeout(this.keepArrowsVisibleTimeout), this.visiblityTween.destroy(); }, Object.defineProperty(t.prototype, "isVisible", { get: function() { var e = this.props.scrollerState[this.props.canScroll] || this.shouldKeepArrowsVisible; return this.visiblityTween.to(e ? 1 : 0, e ? l.Animation.presets.focusables.enter.fast : l.Animation.presets.focusables.leave), e; }, enumerable: !0, configurable: !0 }), t.prototype.keepArrowsVisibleFor = function(e) { var t = this; this.shouldKeepArrowsVisible = !0, this.keepArrowsVisibleTimeout = setTimeout(s.action(function() { t.shouldKeepArrowsVisible = !1; }), e); }, t.prototype.render = function() { var e = m.CommonStyles.textureScale("left" === this.props.direction ? [ -1, 1 ] : [ 1, 1 ]), t = m.CommonStyles.color(this.focusItem.isHovered ? "#000000" : "#ffffff"), n = d.DynamicStyle.create({ top: (this.props.scrollerState.containerBounds.height - y) / 2, enableMouseEvents: this.isVisible, backgroundColor: this.focusItem.isHovered ? "#ffffff" : "#00000055", left: "left" === this.props.direction ? c.GUTTER - y / 2 : void 0, right: "right" === this.props.direction ? -c.getWidth(1.5) : void 0 }, "9817d95f:100:27"); return o.createElement("surface", r.__assign({ style: d.merge3(S.arrow, this.visiblityTween.getStyleClass("opacity"), n) }, this.focusItem.hooks, { onMouseScroll: this.onMouseScroll }), o.createElement("surface", { style: d.merge4(S.arrowTexture, g, e, t) })); }, r.__decorate([ s.observable ], t.prototype, "shouldKeepArrowsVisible", void 0), r.__decorate([ s.computed ], t.prototype, "isVisible", null), r.__decorate([ s.action ], t.prototype, "keepArrowsVisibleFor", null), t = r.__decorate([ a.observer ], t); }(o.Component), b = function(e) { function n() { var t = null !== e && e.apply(this, arguments) || this; return t.scrollerState = new i.ScrollerState(), t.scroll = function(e) { var n = _(t.scrollerState, e); n && t.scrollerState.scrollToBounds(t.scrollerState.getLocalBounds(n)); }, t.onMouseScroll = function(e) { t.props.mouseScroll && (t.scrollerState.canScrollLeft || t.scrollerState.canScrollRight) && (e.stopPropagation(), t.scroll(e.scroll > 0 ? "left" : "right")); }, t; } return r.__extends(n, e), n.prototype.renderArrows = function() { return !h.focusSystem.controllerMode && [ o.createElement(v, { key: "left", scrollerState: this.scrollerState, canScroll: "canScrollLeft", direction: "left", id: this.props.id, onClick: this.scroll, onMouseScroll: this.onMouseScroll }), o.createElement(v, { key: "right", scrollerState: this.scrollerState, canScroll: "canScrollRight", direction: "right", id: this.props.id, onClick: this.scroll, onMouseScroll: this.onMouseScroll }) ]; }, n.prototype.render = function() { var e = f.SpartaGlobals.bundleIsPC && this.props.width === c.getWidth(24) ? c.getWidth(23) : this.props.width, n = d.merge2(d.DynamicStyle.create({ width: e }, "9817d95f:182:30"), d.DynamicStyle.maybeLegacyStyle(this.props.style, "9817d95f:182:59")), a = d.merge2(d.DynamicStyle.create({ flexWrap: "nowrap", flexDirection: "row" }, "9817d95f:183:35"), d.DynamicStyle.maybeLegacyStyle(this.props.innerStyle, "9817d95f:184:77")); return o.createElement(i.Scroller, r.__assign({ tween: !0, scrollbar: !1, noVerticalScroll: !0, scrollerState: this.scrollerState, onMouseScroll: this.onMouseScroll, softClip: [ 0, t.sideSoftClip, 0, this.props.clipLeft ? t.sideSoftClip : 0 ], style: n, clipMargin: [ 3 * c.GUTTER, t.sideSoftClip, 3 * c.GUTTER, f.SpartaGlobals.bundleIsPC ? this.props.clipLeft ? t.sideSoftClip : 5 * c.GUTTER : c.getWidth(this.props.clipLeft ? .5 : 2) ] }, this.props.scrollerProps, { overlay: f.SpartaGlobals.bundleIsPC && this.renderArrows() }), o.createElement("surface", { style: a }, this.props.children)); }, n.defaultProps = { mouseScroll: !0 }, n = r.__decorate([ a.observer ], n); }(o.Component); function _(e, t) { return h.focusSystem.withBounds(function() { var n = e.focusAncestor.children.map(function(e) { return e.getBounds(); }).filter(function(e) { return !!e; }), r = e.containerBounds.left, o = e.containerBounds.right, i = Number.MAX_VALUE, a = [], s = []; "left" === t ? (a = n.map(function(e) { return e && e.right < r ? r - e.right : i; }), s = n.map(function(e) { return e && e.right > r && e.left < r ? r - e.left : i; })) : (a = n.map(function(e) { return e && e.left > o ? e.left - o : i; }), s = n.map(function(e) { return e && e.left < o && e.right > o ? e.right - o : i; })); var u = T(a), l = T(s); return u && u.delta !== i ? n[u.index] : l && l.delta !== i ? n[l.index] : void 0; }); } function T(e) { return e.map(function(e, t) { return { delta: e, index: t }; }).sort(function(e, t) { return e.delta > t.delta ? 1 : -1; })[0]; } t.CardCarousel = b, t.getBoundsForOverflowingChildInDirection = _; }, function(e, t) { var n = {}.hasOwnProperty; e.exports = function(e, t) { return n.call(e, t); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = function() { function e(e) { this.name = e.name || ""; } return e.prototype.init = function(e, t) { return "" === this.name && (this.name = e), this.flagStore = t, this; }, e; }(), i = function(e) { function t() { return null !== e && e.apply(this, arguments) || this; } return r.__extends(t, e), t.prototype.isEnabled = function() { return this.flagStore.isFeatureEnabled(this.name); }, t; }(o); t.FeatureFlag = i; var a = function(e) { function t() { return null !== e && e.apply(this, arguments) || this; } return r.__extends(t, e), t.prototype.isEnabledFor = function(e) { return this.flagStore.isFeatureEnabled(e.toLowerCase() + "_" + this.name); }, t; }(o); t.GameFeatureFlag = a; var s = function(e) { function t() { return null !== e && e.apply(this, arguments) || this; } return r.__extends(t, e), t.prototype.isEnabled = function() { return this.flagStore.hasUGCAccess() && this.flagStore.isFeatureEnabled(this.name); }, t; }(o); t.UGCRestrictedFeatureFlag = s; var u = function() { function e() { this.flagsRegistered = {}; } return e.prototype.isFeatureEnabled = function(e) { return !!this.settingsStore && this.settingsStore.isFeatureEnabled(e); }, e.prototype.hasUGCAccess = function() { return !!this.settingsStore && (!!this.settingsStore.UGCAccessLevel && this.settingsStore.hasUGCAccess()); }, e.prototype.register = function(e) { var t = this; return Object.keys(e).forEach(function(n) { var r = e[n]; if (r.init(n, t), t.flagsRegistered[r.name]) throw new Error("There is already a feature flag registered with the name '" + n + "'"); t.flagsRegistered[n] = r; }), e; }, e; }(); t.featureFlags = new u(); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(131), i = [ "logoUrl", "disableBackground", "backgroundDisableViewOffset", "backgroundSize", "backgroundUrl", "backgroundOverlayUrl", "backgroundOverlaySize", "backgroundVideoUrl", "backgroundVideoFirstFrame", "backgroundVideoTint", "backgroundMusicTrack", "backgroundColor", "backgroundMusicUrl", "backgroundSkyColor", "dynamicBackground", "requireOnline", "requireMpInstalled", "isBeta", "gameId", "disableHorizontalNavigation", "disableBreadcrumbs" ]; function a() { return ""; } var s = function() { function e(t) { this.requireMpInstalled = !1, this.enableMainMenu = !0, this.showHeader = !0, this.children = e.EmptyChildren, this.getTitle = a, Object.assign(this, t); } return e.createChildrenWithInheritance = function(t) { return t.children.map(function(n, a) { var s = new e(r.__assign({}, n, { parent: t })); return void 0 === s.priority && (s.priority = a), i.forEach(function(e) { void 0 !== t[e] && void 0 === s[e] && (s[e] = t[e]); }), s.location = new o.Location([ t.location.path, s.location.path ].filter(function(e) { return !!e; }).join("/")), s.children = e.createChildrenWithInheritance(s), s; }); }, e.prototype.cascade = function() { return new e(r.__assign({}, this, { children: e.createChildrenWithInheritance(this) })); }, e.prototype.flatten = function() { for (var e = [ this ], t = []; e.length; ) { var n = e.pop(); n && (t.push(n), e.push.apply(e, n.children)); } return t; }, e.prototype.asSubMenuRoute = function() { return new e({ getTitle: this.getSubtitle || a, location: this.location, priority: -1 }); }, e.EmptyChildren = [], e.Empty = new e({}), e; }(); t.Route = s; var u = function(e) { function t(t, n) { if (n.location = new o.Location(t), void 0 === n.visible) { var r = !!n.getTitle; n.visible = r; } return e.call(this, n) || this; } return r.__extends(t, e), t; }(s); t.RouteDeclaration = u; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e[e.None = 0] = "None", e[e.Joinable = 1] = "Joinable", e[e.Playing = 2] = "Playing", e[e.Online = 3] = "Online", e[e.Away = 4] = "Away", e[e.Offline = 5] = "Offline"; }(t.UserPresenceStates || (t.UserPresenceStates = {})); }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r, o, i = n(0), a = n(399), s = n(31), u = n(27), l = n(132), c = n(172), p = n(296), d = n(390), f = n(150), m = n(2), h = e.get("Purchase"), g = { requestPerformer: u.firstPartyRequest }, y = new s.Client("Inventory.startPurchase", g), S = new s.Client("Inventory.completePurchase", g), v = new s.Client("Economy.claimPromotions", g), b = l.frostbiteAction("sparta.commerceCheckout"), _ = c.frostbiteListenable("sparta.commerceStatusMessage"); !function(e) { e.IDLE = "IDLE", e.STARTED = "STARTED", e.REGISTERED = "REGISTERED", e.RESUMED = "RESUMED", e.CHECKOUT = "CHECKOUT", e.SUCCESS = "SUCCESS", e.ERROR = "ERROR", e.CANCELLED = "CANCELLED"; }(r = t.PurchaseFlowState || (t.PurchaseFlowState = {})), function(e) { e.PURCHASE = "PURCHASE", e.CLAIM = "CLAIM"; }(o = t.PurchaseType || (t.PurchaseType = {})); var T = [ r.SUCCESS, r.ERROR, r.CANCELLED ], E = 0, C = function() { function e(e, t, n, o) { var i, s = this; this.offer = e, this.type = t, this.purchaseId = null, this.response = null, this.checkoutMessageBuffer = new d.SimpleBuffer(_), this.purchaseData = n || e.rawData, this.listeners = new p.ScopedRegistry("PurchaseFlow.listeners"), this.jobId = ++E, i = o ? [ this.getIdleState(), this.getStartedState(r.RESUMED), this.getResumedState(), this.getSuccessState(), this.getErrorState() ] : [ this.getIdleState(), this.getStartedState(r.REGISTERED), this.getRegisteredState(), this.getCheckoutState(), this.getSuccessState(), this.getErrorState(), this.getCancelledState() ], this.state = new a.StateMachine("PurchaseFlow", r.IDLE, i, { debug: !0 }), this.state.start(); var u = this.state.onStateChange(function(e) { s.listeners.list(e.stateId.toString()).forEach(function(e) { return e(s); }), I.list(e.stateId.toString()).forEach(function(e) { return e(s); }), T.indexOf(e.stateId) >= 0 && (u(), s.listeners.disposeAll()); }); } return e.start = function(t, n) { return new e(t, o.PURCHASE, n); }, e.claim = function(t, n) { return new e(t, o.CLAIM, n); }, e.resumeOrphaned = function(t, n, r) { return new e(t, o.PURCHASE, n, r); }, e.prototype.getIdleState = function() { var e = this; return { id: r.IDLE, transitions: [ r.STARTED ], onEnter: function() { setTimeout(function() { e.state.transitionTo(r.STARTED); }, 1); } }; }, e.prototype.getStartedState = function(e) { var t = this; return { id: r.STARTED, transitions: [ e, r.ERROR ], onEnter: function() { h.debug("Starting flow for", t.offer.type, t.offer.group), y.request({ game: t.offer.gameId, productId: t.offer.offerId, data: t.purchaseData, pinData: t.offer.pinData, deviceIdType: "machash", deviceId: f.telemetryStoreLoader.map(function(e) { return e.pinStore.uuid; }) }).onSuccess(function(n) { t.purchaseId = n.purchaseId, t.state.transitionTo(e); }).onError(function(e) { t.error = e, t.state.transitionTo(r.ERROR); }); } }; }, e.prototype.getRegisteredState = function() { var e = this; return { id: r.REGISTERED, transitions: [ r.CHECKOUT ], requirement: function() { return !!e.purchaseId; }, onEnter: function() { b({ offerId: e.offer.productId, crossTitleCheckout: "game" === e.offer.type, owned: !!e.offer.owned, jobId: e.jobId }), e.state.transitionTo(r.CHECKOUT); } }; }, e.prototype.getResumedState = function() { var e = this; return { id: r.RESUMED, transitions: [ r.SUCCESS, r.ERROR ], requirement: function() { return !!e.purchaseId; }, onEnter: function() { e.purchaseId ? (e.checkoutResult = "completed", S.request({ game: e.offer.gameId, productId: e.offer.offerId, purchaseId: e.purchaseId, pinData: e.offer.pinData, result: e.checkoutResult, deviceIdType: "machash", deviceId: f.telemetryStoreLoader.map(function(e) { return e.pinStore.uuid; }) }).onSuccess(function(t) { e.response = t, e.state.transitionTo(r.SUCCESS); }).onError(function(t) { e.error = t, e.state.transitionTo(r.ERROR); })) : h.error("Missing purchaseId, this should never happen"); } }; }, e.prototype.getCheckoutState = function() { var e = this; return { id: r.CHECKOUT, transitions: [ r.SUCCESS, r.ERROR, r.CANCELLED ], requirement: function() { return !!e.purchaseId; }, onEnter: function() { e.checkoutMessageBuffer.read(function(t) { e.purchaseId ? t.jobId === e.jobId && (e.checkoutResult = "error", t.status === t.CHECKOUT_COMPLETED ? e.checkoutResult = "completed" : t.status === t.CHECKOUT_CANCELLED ? e.checkoutResult = "cancelled" : t.status === t.CHECKOUT_FAILURE ? e.checkoutResult = "error" : t.status === t.CHECKOUT_OIG_DISABLED && (e.checkoutResult = "disabled"), S.request({ game: e.offer.gameId, productId: e.offer.offerId, purchaseId: e.purchaseId, pinData: e.offer.pinData, result: e.checkoutResult, deviceIdType: "machash", deviceId: f.telemetryStoreLoader.map(function(e) { return e.pinStore.uuid; }) }).onSuccess(function(n) { e.response = n, t.status === t.CHECKOUT_COMPLETED ? e.state.transitionTo(r.SUCCESS) : t.status === t.CHECKOUT_CANCELLED ? e.state.transitionTo(r.CANCELLED) : (e.error = t, e.state.transitionTo(r.ERROR)); }).onError(function(t) { e.error = t, e.state.transitionTo(r.ERROR); })) : h.error("Missing purchaseId, this should never happen"); }); }, onLeave: function() { e.checkoutMessageBuffer.dispose(); } }; }, e.prototype.getSuccessState = function() { var e = this; return { id: r.SUCCESS, transitions: [], onEnter: function() { v.request({ game: e.offer.gameId }); } }; }, e.prototype.getErrorState = function() { var e = this; return { id: r.ERROR, transitions: [], requirement: function() { return e.error; } }; }, e.prototype.getCancelledState = function() { return { id: r.CANCELLED, transitions: [] }; }, e.prototype.onFinished = function(e) { var t = this, n = T.map(function(n) { return t.listeners.add(e, n.toString()); }); return function() { return n.forEach(function(e) { return e(); }); }; }, e.prototype.listen = function(e, t) { return this.listeners.add(t, e.toString()); }, e.onStart = function(t) { return e.listen(r.STARTED, t); }, e.onFinished = function(e) { var t = T.map(function(t) { return I.add(e, t.toString()); }); return function() { return t.forEach(function(e) { return e(); }); }; }, e.listen = function(e, t) { return I.add(t, e.toString()); }, i.__decorate([ m.observable ], e, "inProgress", void 0), e; }(); t.PurchaseFlow = C; var I = new p.ScopedRegistry("PurchaseFlow.globalListeners"); C.onStart(function(e) { m.runInAction(function() { C.inProgress = e; }); }), C.onFinished(function() { m.runInAction(function() { C.inProgress = null; }); }); }).call(this, n(15)); }, function(e, t, n) { var r = n(56), o = n(111), i = n(97), a = n(180)("src"), s = Function.toString, u = ("" + s).split("toString"); n(51).inspectSource = function(e) { return s.call(e); }, (e.exports = function(e, t, n, s) { var l = "function" == typeof n; l && (i(n, "name") || o(n, "name", t)), e[t] !== n && (l && (i(n, a) || o(n, a, e[t] ? "" + e[t] : u.join(String(t)))), e === r ? e[t] = n : s ? e[t] ? e[t] = n : o(e, t, n) : (delete e[t], o(e, t, n))); })(Function.prototype, "toString", function e() { return "function" == typeof this && this[a] || s.call(this); }); }, function(e, t, n) { var r = n(237), o = n(163); e.exports = function(e) { return r(o(e)); }; }, function(e, t, n) { var r = n(16), o = n(42), i = n(163), a = /"/g, s = function(e, t, n, r) { var o = String(i(e)), s = "<" + t; return "" !== n && (s += " " + n + '="' + String(r).replace(a, """) + '"'), s + ">" + o + ""; }; e.exports = function(e, t) { var n = {}; n[e] = t(s), r(r.P + r.F * o(function() { var t = ""[e]('"'); return t !== t.toLowerCase() || t.split('"').length > 3; }), "String", n); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(9); t.useConsoleMenu = r.SpartaGlobals.bundleIsConsole || !1; }, function(e, t, n) { "use strict"; var r; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e.IDLE = "IDLE", e.NEGOTIATING = "NEGOTIATING", e.PREFLIGHT = "PREFLIGHT", e.VALIDATING_SQUAD = "VALIDATING_SQUAD", e.STARTING_TO_SQUAD_UP = "STARTING_TO_SQUAD_UP", e.FINDING_SQUAD = "FINDING_SQUAD", e.BACKFILLING_SQUAD = "BACKFILLING_SQUAD", e.SQUAD_FOUND = "SQUAD_FOUND", e.WAITING_FOR_LEADER = "WAITING_FOR_LEADER", e.STARTING = "STARTING", e.WAITING = "WAITING", e.GAME_FOUND = "GAME_FOUND", e.SUCCESS = "SUCCESS", e.ERROR = "ERROR", e.CANCELING = "CANCELING", e.RETRYING = "RETRYING", e.CANCELED = "CANCELED"; }(r = t.MatchmakingState || (t.MatchmakingState = {})), t.stringIsMatchmakingState = function o(e) { return Object.keys(r).indexOf(e) >= 0; }, t.MATCHMAKING_FINISHED_STATES = [ r.CANCELED, r.ERROR, r.SUCCESS ]; var i = function() { return function e(t, n, r, o, i, a) { void 0 === o && (o = !1), this.title = t, this.description = n, this.debugMessage = r, this.silent = o, this.code = i, this.blazeStatus = a; }; }(); t.MatchmakingError = i, function(e) { e[e.mp = 0] = "mp", e[e.coop = 1] = "coop", e[e.royale = 2] = "royale"; }(t.MatchmakingSessionType || (t.MatchmakingSessionType = {})); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(13), r = n(54), o = n(10), i = n(11), a = n(22), s = n(7), u = n(954), l = n(115), c = n(387), p = n(5), d = n(57), f = n(150), m = n(36); t.showStopMatchmaking = function h(e) { return r.legacyConfirm(__("ID_SPARTA_GAMESTATE_STOP_QUICKMATCH", !0), __("ID_SPARTA_GAMESTATE_STOP_MATCHMAKING_TITLE", !0), __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_NO", !0), "quitMatchmaking" + e); }, t.showLeaveQueue = function g() { return r.legacyConfirm(__("ID_SPARTA_GAMESTATE_LEAVE_QUEUE", !0), __("ID_SPARTA_MATCHMAKING_LEAVE_QUEUE", !0), __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_NO", !0), "leaveQueue"); }, t.showPartyLeaderRestriction = function y() { var e = m.platformTranslation(__("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_PC", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_XB1", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_PS4", !0)), t = m.platformTranslation(__("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_TITLE_PC", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_TITLE_XB1", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_TITLE_PS4", !0)); return r.legacyConfirm(e, t, __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_NO", !0), "proceedNotPartyLeader"); }; var S = p.StaticStyle.create({ width: s.getWidth(4.5) }, "684acb14:134:14"); t.showNotInHostingGame = function v(t, n) { void 0 === t && (t = "gamePopups"); var s = e.nativePropertiesStore.getHostingGame(), u = e.layoutStateStore.current.config.gameId || "", l = e.gameStore.getGame(u), p = __("ID_SPARTA_RIME_NO_ACCESS", !0).replace("[[game]]", s.displayName()); function m() { var e = new r.UserError(t, (void 0 !== n ? n + ":" : "") + "RIME_NO_ACCESS"); f.telemetryStoreLoader.get().trackUserFacingError(e), d.PopupManager.standardAlert(p); } if (l) { var h = e.entitlementStore.ownsGame(l.gameId), g = e.crosslaunchManager.setting === c.CrosslaunchManager.SettingOptions.Full; if (!h || g) { var y = __(h ? "ID_SPARTA_RIME_NO_ACCESS_LAUNCH_GAME" : "ID_SPARTA_RIME_NO_ACCESS_BUY_GAME", !0), v = l.displayName(), b = { title: p, details: __("ID_SPARTA_RIME_NO_ACCESS_SWITCH_GAME", !0).replace("[[game]]", v), label: y.replace("[[game]]", v), image: l.boxShot || "" }, _ = new r.UserError(t, (void 0 !== n ? n + ":" : "") + (h ? "RIME_NO_ACCESS_LAUNCH_GAME" : "RIME_NO_ACCESS_BUY_GAME")); r.errorWithImageAndOption(_, b.details, b.title, b.image, new i.Input({ action: function() { h ? e.crosslaunchManager.continueCrosslaunch(l.gameId, {}) : a.gotoLocation(l.storeConfig.route + "?tab=game"); }, key: o.Keys.Option2, label: b.label }), !0, S).then(function() {}); } else m(); } else m(); }, t.showMissingGame = function b(t, n, s) { void 0 === n && (n = "gamePopups"); var u = e.gameStore.getGame(t), l = u ? u.displayName() : "", c = { title: __("ID_SPARTA_COMMERCE_UNOWNED_GAME", !0).replace("[[game]]", l.toUpperCase()), details: __("ID_SPARTA_COMMERCE_UNOWNED_GAME_DESC", !0).replace("[[game]]", l), label: __("ID_SPARTA_COMMERCE_UNOWNED_GAME_GET", !0), image: u && u.boxShot || "" }, p = new r.UserError(n, (void 0 !== s ? s + ":" : "") + "COMMERCE_UNOWNED_GAME_GET"); return r.errorWithImageAndOption(p, c.details, c.title, c.image, new i.Input({ action: function() { return a.gotoLocation(u ? u.startRoute + "/store/list?tab=game" : ""); }, key: o.Keys.Option2, label: c.label }), !0); }, t.showNotSupportedRole = function _(e, t) { var n = ""; switch (t) { case "spectator": n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED_SPECTATOR", !0); break; case "commander": n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED_COMMANDER", !0); break; case "soldier": n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED_SOLDIER", !0); break; default: n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED", !0).replace("[[role]]", t); } e.alert(n, __("ID_SPARTA_ONLINE_JOIN_FAILED_TITLE", !0)); }, t.showPartyContentMissing = function T() { return r.legacyConfirm(__("ID_SPARTA_USER_PARTY_MISSING_CONTENT_MESSAGE", !0), __("ID_SPARTA_USER_PARTY_MISSING_CONTENT_TITLE", !0), __("ID_SPARTA_ACTION_CONTINUE", !0), __("ID_SPARTA_ACTION_CANCEL", !0), "missingContent"); }, t.showPasswordPrompt = function E(e) { return r.prompt(__("ID_SPARTA_ONLINE_JOIN_PASSWORD_PROTECTED"), 1, 36, { onOkValidate: function(t) { return new Promise(function(n, r) { t.trim().length < 1 && r(__("ID_SPARTA_ONLINE_JOIN_ENTER_VALID_PASSWORD")), u.ServerVerifyPasswordClient.triggerAsPromise(e, t).then(function(e) { e.gameId, e.verified ? n(t) : r(__("ID_SPARTA_ONLINE_JOIN_INVALID_PASSWORD")); }); }); }, inputType: l.CharacterType.Password, message: __("ID_SPARTA_ONLINE_JOIN_ENTER_PASSWORD") }); }, t.showTooFewSlotsOnServer = function C() { return r.legacyConfirm(__("ID_SPARTA_USER_PARTY_TOO_FEW_SLOTS_MESSAGE", !0), __("ID_SPARTA_USER_PARTY_TOO_FEW_SLOTS_TITLE", !0), __("ID_SPARTA_ACTION_CONTINUE", !0), __("ID_SPARTA_ACTION_CANCEL", !0), "fewSlots"); }; }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.onJoinMultiplayerServerResult = r.createTypedAction(), t.onMultiplayerServerDisconnection = r.createTypedAction(), t.onJoinMultiplayerFailed = r.createTypedAction(), t.onLeaveServerQueue = r.createTypedAction(); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(11), a = n(25), s = n(298), u = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.visualButton = o.createRef(), t.getInput = function() { if (t.props.action || t.props.holdAction || t.props.releaseAction) return new i.Input({ visible: !1, key: t.props.inputKey, action: t.props.action, holdAction: t.props.holdAction, releaseAction: t.props.releaseAction, blockInputFor: t.props.blockInputFor || 0 }); }, t; } return r.__extends(t, e), t.prototype.render = function() { var e = this.props, t = e.inputKey, n = e.useConsoleStyle, r = e.iconSize, i = e.large, u = e.inverted, l = e.style, c = e.styleSheetOverride, p = e.label, d = e.labelDecoration, f = e.fontStyle, m = e.icon, h = e.animatedLabeledIcon; return o.createElement(a.InputRegistration, { debugName: "2f3756ac:46:43", getInput: this.getInput }, o.createElement(s.VisualButton, { inputKey: t, useConsoleStyle: n, iconSize: r, large: i, inverted: u, style: l, styleSheetOverride: c, label: p, labelDecoration: d, fontStyle: f, icon: m, ref: this.visualButton, animatedLabeledIcon: h })); }, t; }(o.Component); t.InputButton = u; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.getArticles = r.createTypedAction(), t.getArticleDetail = r.createTypedAction(), t.saveArticleMetrics = r.createTypedAction(), t.resetArticleDetailState = r.createTypedAction(), t.getContactChannels = r.createTypedAction(), t.updateLocation = r.createTypedAction(), t.updateSource = r.createTypedAction(), t.updateCategories = r.createTypedAction(), t.updateArticleId = r.createTypedAction(), t.updateSelectedCategory = r.createTypedAction(), t.resetContextDetails = r.createTypedAction(), t.updateContactDetails = r.createTypedAction(), t.createCase = r.createTypedAction(), t.updateSelectedChannel = r.createTypedAction(), t.resetCaseDetailState = r.createTypedAction(), t.resetChannelDetailState = r.createTypedAction(); }, function(e, t, n) { var r = n(66), o = n(161); e.exports = n(81) ? function(e, t, n) { return r.f(e, t, o(1, n)); } : function(e, t, n) { return e[t] = n, e; }; }, function(e, t, n) { var r = n(163); e.exports = function(e) { return Object(r(e)); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(2), i = n(120), a = function() { function e() { this.allModulesLoaded = !1, this.firstPartyConnectedMessage = null, this.nativeClientSettingsMessage = null, this.nativeClientReadyMessage = null, this.blazeConfigReadyMessage = null, this.spartaErrorEvent = new i.TwinkleTypedEvent(); } return e.prototype.onAllModulesLoaded = function() { this.allModulesLoaded = !0; }, e.prototype.onFirstPartyConnectedMessage = function(e) { this.firstPartyConnectedMessage = e; }, e.prototype.onNativeClientReadyMessage = function(e) { this.nativeClientReadyMessage = e; }, e.prototype.onBlazeConfigReadyMessage = function(e) { this.blazeConfigReadyMessage = e; }, e.prototype.onNativeClientSettingsMessage = function(e) { this.nativeClientSettingsMessage = e; }, e.prototype.spartaErrorMessage = function(e, t, n) { this.spartaErrorEvent.trigger({ message: e, title: t, closeCallback: n }); }, r.__decorate([ o.observable ], e.prototype, "allModulesLoaded", void 0), r.__decorate([ o.observable ], e.prototype, "firstPartyConnectedMessage", void 0), r.__decorate([ o.observable ], e.prototype, "nativeClientSettingsMessage", void 0), r.__decorate([ o.observable ], e.prototype, "nativeClientReadyMessage", void 0), r.__decorate([ o.observable ], e.prototype, "blazeConfigReadyMessage", void 0), r.__decorate([ o.action ], e.prototype, "onAllModulesLoaded", null), r.__decorate([ o.action ], e.prototype, "onFirstPartyConnectedMessage", null), r.__decorate([ o.action ], e.prototype, "onNativeClientReadyMessage", null), r.__decorate([ o.action ], e.prototype, "onBlazeConfigReadyMessage", null), r.__decorate([ o.action ], e.prototype, "onNativeClientSettingsMessage", null), e; }(); t.CoreEventStore = a, t.coreEventStore = new a(); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.playEffect = r.createTypedAction(), t.playTrack = r.createTypedAction(), t.stopTrack = r.createTypedAction(); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e, r = n(0), o = n(1), i = n(4), a = n(25), s = n(14), u = n(11), l = n(22), c = n(10), p = n(6), d = n(917), f = n(918), m = n(21), h = n(5), g = n(5), y = n(18), S = n(9), v = n(23), b = n(19), _ = n(29), T = /[\u0020-\u007E\u00A0-\u017F\u0192\u01FA-\u01FF\u20AC\u2122\u2012\u2013\u2014\u2018\u2019\u201C\u201D\u0410-\u042F\u0490\u0406\u0402\u0452\u0403\u0453\u0456\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\u040B\u045B\u040C\u045C\u0455\u040E\u045E\u040F\u045F\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E]/, E = h.StaticStyle.create({ position: "absolute", top: 0, right: 0, bottom: 0, left: 0, paddingLeft: 10, flexDirection: "row", zOffset: 10 }, "a81a1502:32:20"); function C(e, t, n) { return e < t ? t : e > n ? n : e; } !function(e) { e[e.LatinFull = 1] = "LatinFull", e[e.Numeric = 2] = "Numeric", e[e.Alphabet = 4] = "Alphabet", e[e.Gamertag = 8] = "Gamertag", e[e.Password = 16] = "Password", e[e.AlphabetSpace = 32] = "AlphabetSpace"; }(e = t.CharacterType || (t.CharacterType = {})), t.keepBetween = C; var I = function(t) { function n(e, n) { var r = t.call(this, e, n) || this; r.getTheme = b.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta, r.inputManager = null, r.onInputManager = function(e) { r.inputManager = e; }, r.getInput = function() { return !r.props.useVirtualKeyboard && r.state.isActive ? [ new u.Input({ label: __("ID_SPARTA_ACTION_CANCEL"), action: r.deactivate, key: r.props.cancelKey }) ] : r.focusItem.isFocusedOrHovered ? [ new u.Input({ label: __("ID_SPARTA_ACTION_SELECT"), action: r.props.useVirtualKeyboard ? r.showVirtualKeyboard : r.activate, key: r.props.editKey }) ] : void 0; }, r.onKeyDown = function(e) { switch (e) { case 9: r.onTab(); break; case 13: S.SpartaGlobals.bundleIsPC && (r.props.onEnter ? r.props.onEnter() : r.insertValue("\n")); break; case 27: r.props.useVirtualKeyboard || r.deactivate(); break; case 37: r.offsetCursor(-1); break; case 39: r.offsetCursor(1); break; case 8: r.deleteOffset(-1); break; case 46: r.deleteOffset(1); break; case 35: r.offsetCursor(r.value.length); break; case 36: r.offsetCursor(-r.value.length); break; case 65: r.isControlDown && r.setState({ cursorStart: 0, cursorEnd: r.value.length }); break; case 67: r.isControlDown && r.onCopy(); break; case 88: r.isControlDown && r.onCut(); break; case 86: r.isControlDown && r.onPaste(); } }, r.onModifierKeyDown = function(e) { switch (e) { case 160: r.isShiftDown = !0; break; case 162: r.isControlDown = !0; break; case 164: r.isAltDown = !0; } }, r.onModifierKeyUp = function(e) { switch (e) { case 160: r.isShiftDown = !1; break; case 162: r.isControlDown = !1; break; case 164: r.isAltDown = !1; } }, r.onClick = function() { r.state.isActive || r.activate(); }, r.onCharacterClicked = function(e) { r.state.isActive ? r.setState({ cursorStart: e, cursorEnd: e }) : r.activate(); }, r.onCharacterMouseEnter = function(e, t) { r.state.isActive && r.isMouseDown && (t.stopPropagation(), r.setState({ cursorEnd: e })); }, r.onCharacterMouseDown = function(e) { if (r.state.isActive) { switch (r.isMouseDown = !0, r.multiClickTimer ? (clearTimeout(r.multiClickTimer), r.numClicks += 1) : r.numClicks = 1, r.numClicks) { case 1: r.setState({ cursorStart: e, cursorEnd: e }); break; case 2: var t = r.value.lastIndexOf(" ", e) + 1, n = r.value.indexOf(" ", e); -1 === n && (n = r.value.length), r.setState({ cursorStart: t, cursorEnd: n }); break; case 3: r.setState({ cursorStart: 0, cursorEnd: r.value.length }); } r.multiClickTimer = setTimeout(function() { return r.multiClickTimer = 0; }, 300); } }, r.deactivate = function() { r.state.isActive && (r.props.useCursor && (r.inputManager && r.inputManager.releaseInputGroup(), l.setNavigationEnabled(!0), clearInterval(r.cursorVisibilityInterval), r.cursorOpacity.set(0)), r.unsubscribeFromEvents(), r.setState({ isActive: !1, cursorStart: r.value.length, cursorEnd: r.value.length }), r.props.onDeactivate && r.props.onDeactivate()); }, r.activate = function() { r.props.disabled || (r.state.isActive ? r.offsetCursor(r.value.length) : (r.props.useCursor && (r.inputManager && r.inputManager.isolateInputGroup(), l.setNavigationEnabled(!1), clearInterval(r.cursorVisibilityInterval), r.cursorVisibilityInterval = setInterval(r.toggleCursorVisibility, 500), r.cursorOpacity.set(1)), r.subscribeToEvents(), r.setState({ isActive: !0 }), r.props.onActivate && r.props.onActivate())); }, r.toggleCursorVisibility = function() { r.cursorOpacity.set(r.cursorOpacity.previousInstruction.to ? 0 : 1); }, r.showVirtualKeyboard = function() { var e = r.sparta.twinkle, t = e.inputHandler, n = e.frostbite; if (r.props.disabled) return !1; r.props.useVirtualKeyboard && r.eventSubscriptions.length < 1 && r.eventSubscriptions.push(t.onTypingInput.listen(function(e, t, n) { t && r.replaceValue(n); })), n.sendMessage("sparta.toggleVirtualKeyboard", { show: !0, title: r.props.title || "", description: r.props.description || "", defaultText: r.value, maxTextLength: r.props.maxLength, characterType: r.props.type }); }; var o = e.initialValue || e.value || ""; return r.state = { value: o, cursorStart: o.length, cursorEnd: o.length }, r.focusItem = r.props.focusItem || r.sparta.twinkle.focus.create(r, r.props.debugName || "inputfield"), r.focusItem.autoFocusCandidate = void 0 === e.autoFocusCandidate || e.autoFocusCandidate, r.props.useVirtualKeyboard ? (r.focusItem.onFocus(r.activate), r.focusItem.onBlur(r.deactivate)) : (r.focusItem.onFocus(function() { r.inputManager && r.inputManager.isolateInputGroup(), r.inputManager && r.inputManager.updateInput(); }), r.focusItem.onBlur(function() { r.inputManager && r.inputManager.releaseInputGroup(); })), r.eventSubscriptions = [], r.modifierKeySubscriptions = [], r.cursorOpacity = s.Animation.tween("a81a1502:196:46", 0), r; } var I; return r.__extends(n, t), I = n, Object.defineProperty(n.prototype, "value", { get: function() { return void 0 !== this.props.value ? this.props.value : this.state.value; }, enumerable: !0, configurable: !0 }), n.prototype.getFocusItem = function() { return this.focusItem; }, n.prototype.componentWillReceiveProps = function(e) { if (e.initialValue !== this.props.initialValue) { var t = e.initialValue || ""; this.setState({ value: t, cursorStart: t.length, cursorEnd: t.length }); } }, n.prototype.componentDidMount = function() { I.mountedInstances.push(this), this.subscribeToModifierEvents(); }, n.prototype.componentWillUnmount = function() { I.mountedInstances.splice(I.mountedInstances.indexOf(this), 1), this.deactivate(), this.cursorOpacity.destroy(), this.unsubscribeFromModifierEvents(); }, n.prototype.onTab = function() { var e = I.mountedInstances.indexOf(this), t = e + (this.isShiftDown ? -1 : 1); t < 0 ? t = I.mountedInstances.length - 1 : t > I.mountedInstances.length - 1 && (t = 0), t !== e && (this.deactivate(), I.mountedInstances[t].activate()); }, n.prototype.onCopy = function() { if (0 !== this.selectionSize()) { var e = this.value.substring(this.cursorMin(), this.cursorMax()); this.sparta.twinkle.nativeApi.setClipboardText(e); } }, n.prototype.onCut = function() { this.onCopy(), this.splice(this.cursorMin(), this.selectionSize()); }, n.prototype.onPaste = function() { var e = this.sparta.twinkle.nativeApi.getClipboardText(); "string" == typeof e && this.insertValue(e); }, n.prototype.cursorMin = function() { return Math.min(this.state.cursorStart, this.state.cursorEnd); }, n.prototype.cursorMax = function() { return Math.max(this.state.cursorStart, this.state.cursorEnd); }, n.prototype.selectionSize = function() { return this.cursorMax() - this.cursorMin(); }, n.prototype.subscribeToEvents = function() { var e = this; this.unsubscribeFromEvents(); var t = this.sparta.twinkle, n = t.inputHandler, r = t.frostbite; this.props.useVirtualKeyboard || (this.eventSubscriptions.push(n.onMouseEventBeforePropagation.listen(function(t) { return e.deactivateOnClickOutside(t); })), this.eventSubscriptions.push(n.onKeyDown.listen(this.onKeyDown)), this.eventSubscriptions.push(n.onTypingInput.listen(function(t, n, r) { return e.insertValue(r); })), r.sendMessage("sparta.toggleVirtualKeyboard", { show: !0 }), this.eventSubscriptions.push(function() { r.sendMessage("sparta.toggleVirtualKeyboard", { show: !1 }); }), this.eventSubscriptions.push(n.onMouseEventAfterPropagation.listen(function(t) { e.isMouseDown && t.button === v.MouseButton.Primary && t.event === v.MouseEventType.onMouseUp && (e.isMouseDown = !1); }))); }, n.prototype.subscribeToModifierEvents = function() { this.unsubscribeFromModifierEvents(); var e = this.sparta.twinkle.inputHandler; this.modifierKeySubscriptions.push(e.onKeyUp.listen(this.onModifierKeyUp)), this.modifierKeySubscriptions.push(e.onKeyDown.listen(this.onModifierKeyDown)); }, n.prototype.unsubscribeFromEvents = function() { this.eventSubscriptions.forEach(function(e) { return e(); }), this.eventSubscriptions = []; }, n.prototype.unsubscribeFromModifierEvents = function() { this.modifierKeySubscriptions.forEach(function(e) { return e(); }), this.modifierKeySubscriptions = []; }, n.prototype.deactivateOnClickOutside = function(e) { var t = this; if (e.event === v.MouseEventType.onClick && e.button <= v.MouseButton.Wheel) { if (this.focusItem.surfaceId) { var n = this.focusItem.getSurfaceElement(); if (n && e.surfaces.some(function(e) { var r = t.sparta.twinkle.reconciler.getSurfaceById(e.surfaceId); return !!r && n.isDescendantOf(r); })) return; } this.deactivate(); } }, n.prototype.insertValue = function(e) { var t = this, n = e.split("").filter(function(e) { return T.test(e) || S.SpartaGlobals.bundleIsPC && t.props.multiline && "\n" === e; }).join(""); n && this.splice(this.cursorMin(), this.selectionSize(), n); }, n.prototype.replaceValue = function(e) { var t = e.split("").filter(function(e) { return T.test(e); }).join(""); this.setState({ value: t, cursorStart: t.length, cursorEnd: t.length }), this.props.onValueChanged && this.props.onValueChanged(e); }, n.prototype.splice = function(e, t, n) { var r; e < 0 && (r = e + t, e = 0, t = r > 0 ? r : 0), (r = e + t) > this.value.length && (e >= this.value.length ? (e = this.value.length, t = 0) : t = this.value.length - e); var o = this.value.split(""); if (n && n.length > 0 && "number" == typeof this.props.maxLength) { var i = this.props.maxLength - (o.length - t); n = n.substring(0, i); } else n = ""; o.splice(e, t, n); var a = o.join(""), s = C(e + n.length, 0, a.length); this.setState({ value: a, cursorStart: s, cursorEnd: s }), this.props.onValueChanged && this.props.onValueChanged(a); }, n.prototype.deleteOffset = function(e) { var t = this.selectionSize(); if (t) this.splice(this.cursorMin(), t); else if (e > 0) this.splice(this.state.cursorStart, e); else if (e < 0) { var n = Math.abs(e); this.splice(this.state.cursorStart - n, n); } }, n.prototype.offsetCursor = function(e) { if (!e) return this.value.length; var t; if (this.isShiftDown || this.isMouseDown) t = C(this.state.cursorEnd + e, 0, this.value.length), this.setState({ cursorEnd: t }); else { var n = e < 0 ? this.cursorMin() : this.cursorMax(); t = this.selectionSize() ? n : C(n + e, 0, this.value.length), this.setState({ cursorStart: t, cursorEnd: t }); } }, n.prototype.renderPaddingChar = function(e, t, n) { var r = "padding-char-" + n; return " " === e ? o.createElement(p.Text, { key: r, value: "_", style: t, size: this.props.size, type: _.TextType.LIGHT }) : o.createElement(p.Text, { key: r, value: e, style: t, size: this.props.size, type: _.TextType.LIGHT }); }, n.prototype.render = function() { var t, n = this, r = this.value; if (this.props.type === e.Password && (r = "*".repeat(this.value.length)), this.props.multiline) return o.createElement(a.InputRegistration, { debugName: "a81a1502:750:47", getInput: this.getInput, group: S.SpartaGlobals.bundleIsPC }, o.createElement(f.TextArea, { onClick: this.onClick, onCharacterClicked: this.onCharacterClicked, onCharacterMouseEnter: this.onCharacterMouseEnter, onCharacterMouseDown: this.onCharacterMouseDown, selectionStart: this.cursorMin(), focusItem: this.focusItem, selectionEnd: this.cursorMax(), style: this.props.style, size: this.props.size, isActive: this.state.isActive, disabled: this.props.disabled, isInvalid: this.props.isInvalid, placeholder: this.props.placeholder, useCursor: this.props.useCursor, value: r })); if (this.props.useCursor && 0 === this.selectionSize()) { var i = r.substr(0, this.state.cursorStart), s = this.getTheme().getFonts(), u = (s.light || s.normal).fontStyle(this.props.size || m.TextSize.M).getStyleValue("textLetterSpacing") || 0, l = g.DynamicStyle.create(u > 0 ? { paddingLeft: u, opacity: 0 } : { opacity: 0 }, "a81a1502:783:30"), c = Array.from(i).map(function(e, t) { return n.renderPaddingChar(e, l, t); }); t = o.createElement("surface", { style: E }, c, o.createElement(p.Text, { type: _.TextType.LIGHT, value: "|", size: this.props.size, style: h.merge2(y.CommonStyles.color("#ffffff"), this.cursorOpacity.getStyleClass("opacity")) })); } return o.createElement(a.InputRegistration, { debugName: "a81a1502:806:43", getInput: this.getInput, group: S.SpartaGlobals.bundleIsPC }, o.createElement(d.TextField, { onClick: this.onClick, onCharacterClicked: this.onCharacterClicked, onCharacterMouseEnter: this.onCharacterMouseEnter, onCharacterMouseDown: this.onCharacterMouseDown, selectionStart: this.cursorMin(), focusItem: this.focusItem, selectionEnd: this.cursorMax(), style: g.DynamicStyle.maybeLegacyStyle(this.props.style, "a81a1502:815:28"), size: this.props.size, isActive: this.state.isActive, disabled: this.props.disabled, isInvalid: this.props.isInvalid, placeholder: this.props.placeholder, value: r }, t)); }, n.contextTypes = b.ThemeContext.contextTypes, n.defaultProps = { type: e.LatinFull, title: "", maxLength: 255, useVirtualKeyboard: S.SpartaGlobals.bundleIsConsole, useCursor: S.SpartaGlobals.bundleIsPC, initialValue: "", size: m.TextSize.M, isInvalid: !1, deactivateOnBlur: !0, disabled: !1, cancelKey: c.Keys.Decline, multiline: !1 }, n.mountedInstances = [], n = I = r.__decorate([ i.observer ], n); }(o.Component); t.InputField = I; }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = function() { return function e(t) { this.unlocked = !1, this.valueAcquired = 0, this.valueNeeded = 0, this.percentage = 0, t && (this.valueAcquired = t.valueAcquired || 0, this.valueNeeded = t.valueNeeded || 0, this.unlocked = !!t.unlocked), this.unlocked ? this.percentage = 1 : this.valueAcquired >= 0 && this.valueNeeded > 0 && (this.percentage = Math.min(this.valueAcquired / this.valueNeeded, 1)); }; }(); t.Progression = r; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(4), a = n(14), s = n(6), u = n(21), l = n(17).bbOfflineUrl("/sparta/jsclient/builds/assets/icon-scraps-white2-l-bb954c75.png"), c = n(20), p = n(23); t.ScrapIcon = function(e) { var t = e.color, n = e.iconSize; return o.createElement("surface", { key: "asset", style: { texture: l, color: t, textureMode: "contain", width: n, height: n, marginLeft: 4, marginRight: 4 } }); }; var d = function(e) { function n(t) { var n = e.call(this, t) || this; return n.scaleTween = a.Animation.tween("4519789d:50:34", 1), n.state = { animatedValue: t.animated ? t.value : null }, n; } return r.__extends(n, e), n.prototype.componentWillReceiveProps = function(e) { var t = this; e.animated && (e.value > this.props.value ? this.scaleTween.to(2, { delay: 1800, duration: 100, easing: p.Easing.CubicIn }, function() { t.scaleTween.isDestroyed() || t.setState({ animatedValue: e.value }, function() { t.scaleTween.to(1, { duration: 500, easing: p.Easing.CubicOut }); }); }) : this.setState({ animatedValue: e.value })); }, n.prototype.componentWillUnmount = function() { this.scaleTween.destroy(); }, n.prototype.render = function() { var e = this.props.color || (this.props.dark ? "#000000" : "#ffffff"), n = this.props.size ? u.LINE_HEIGHTS[this.props.size] : u.LINE_HEIGHTS.M, r = !!this.props.prefix && o.createElement(s.Text, { value: this.props.prefix.trim() + " ", key: "prefix", color: e, size: this.props.size, style: { marginRight: 8 } }), i = !!this.props.suffix && o.createElement(s.Text, { value: " " + this.props.suffix.trim(), key: "suffix", color: e, size: this.props.size, style: { marginLeft: 8 } }), a = (this.props.animated ? this.state.animatedValue : this.props.value) || 0; return o.createElement("surface", { style: [ { flexDirection: "row" }, this.props.style ] }, c.localeRearrange([ r, [ o.createElement(t.ScrapIcon, { key: "icon", color: e, iconSize: n }), o.createElement(s.Text, { key: "value", value: "" + a, color: e, size: this.props.size, style: { scaleX: this.scaleTween.getStyle(), scaleY: this.scaleTween.getStyle() } }) ], i ])); }, n = r.__decorate([ i.observer ], n); }(o.Component); t.TunguskaBattlepackScraps = d; }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(17); t.standard = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_white_flare-a3a0b83b.png"), t.special = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_white_flare-a3a0b83b.png"), t.distinguished = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_blue_flare-3f82da1b.png"), t.legendary = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_orange_flare-68d1e160.png"), t.mixed = e.bbUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_orange_flare-68d1e160.png"); var r = "fb://Sparta/UI/Movies/tunguskapack_enhanced_2", o = "fb://Sparta/UI/Movies/tunguskapack_superior_3"; t.videos = { 0: [ "fb://Sparta/UI/Movies/tunguskapack_standard_1", "fb://Sparta/UI/Movies/tunguskapack_standard_2", "fb://Sparta/UI/Movies/tunguskapack_standard_3" ], 1: [ r, r, "fb://Sparta/UI/Movies/tunguskapack_enhanced_3" ], 2: [ o, o, o ] }, t.level = { 0: t.special, 1: t.distinguished, 2: t.legendary, 3: t.mixed }, t.fade = { 0: e.bbUrl("/sparta/assets/tunguska/battlepacks/flare-white-grid-6df9d5a2.png"), 1: e.bbUrl("/sparta/assets/tunguska/battlepacks/flare-blue-grid-0712865c.png"), 2: e.bbUrl("/sparta/assets/tunguska/battlepacks/flare-orange-grid-55edbcfe.png"), width: 206, height: 170 }, t.flare = { 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-white-9297467d.jpg"), 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-blue-7e706f88.jpg"), 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-orange-0b2a170f.jpg"), 3: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-orange-0b2a170f.jpg"), width: 408, height: 1e3 }, t.sideFlare = { 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-white-46ef71e7.jpg"), 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-blue-627243c1.jpg"), 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-orange-84ff029e.jpg"), 3: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-orange-84ff029e.jpg"), width: 1782, height: 922 }, t.bottomGlow = { 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-white-db827b5b.jpg"), 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-blue-c1f2b771.jpg"), 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-orange-1e65fd65.jpg"), 3: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-orange-1e65fd65.jpg"), width: 1e3, height: 455 }, t.circleTexture = e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/CircleBoom-d69f3cbb.png"); var i = e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/Battlepack_TankSkin-e5669d14.wav"); t.openingAudio = { DEFAULT: i, VEHICLE: i, WEAPON: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/Battlepack_WeaponSkin_WHITE_Small_WITH_TAIL_STE-a70cab95.wav"), NUGGET: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/Battlepack_WeaponSkin_BLUE_Medium_WITH_TAIL_STE-1e40f11e.wav") }, t.backgroundEnd = e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/endframe-8d869f8a.jpg"), t.openingFrames = { 0: { frames: [ e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f1-5290508a.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f2-50222f29.dds") ], 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f3_0-39f4d8f9.dds"), 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f3_1-b21130e3.dds"), 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f3_2-e9f7c6bd.dds") }, 1: { frames: [ e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f1-c606bf16.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f2-1a493088.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f3-fb397a41.dds") ], 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f4_1-b21ed798.dds"), 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f4_2-fcce5e8b.dds") }, 2: { frames: [ e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f1-9eca1ab6.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f2-59efaf46.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f3-533da6a1.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f4-fc815f1c.dds") ], 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f5_2-50caedf7.dds") } }, t.frameSounds = { 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/tunguska_battlepack_open_standard-024d5c78.wav"), 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/tunguska_battlepack_open_enhanced-ded90293.wav"), 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/tunguska_battlepack_open_superior-b25bc55e.wav") }, t.rgb = { 0: "#ffffffee", 1: "#6baee5", 2: "#d48311", 3: "#d48311" }, t.getName = function a(e) { switch (e) { case 0: return __("ID_SPARTA_TUNGUSKA_BATTLEPACKS_RARITY_SPECIAL"); case 1: return __("ID_SPARTA_TUNGUSKA_BATTLEPACKS_RARITY_DISTINGUISHED"); case 2: case 3: return __("ID_SPARTA_TUNGUSKA_BATTLEPACKS_RARITY_LEGENDARY"); default: return ""; } }; }).call(this, n(3)); }, function(e, t, n) { "use strict"; var r = n(42); e.exports = function(e, t) { return !!e && r(function() { t ? e.call(null, function() {}, 1) : e.call(null); }); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = function() { function e() { this.callbacks = []; } return e.prototype.listen = function(e) { var t = this; return this.callbacks.push(e), function() { var n = t.callbacks.indexOf(e); n > -1 && t.callbacks.splice(n, 1); }; }, e.prototype.listenOnce = function(e) { var t = this.listen(function() { for (var n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r]; t(), e.apply(void 0, n); }); return t; }, e.prototype.trigger = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; for (var n = 0, r = this.callbacks.slice(); n < r.length; n++) { r[n].apply(null, e); } }, e.prototype.destroy = function() { this.callbacks.length = 0; }, e; }(); t.TwinkleEvent = r; var o = function() { function e() { this.callbacks = []; } return e.prototype.listen = function(e) { var t = this; return this.callbacks.push(e), function() { var n = t.callbacks.indexOf(e); n > -1 && t.callbacks.splice(n, 1); }; }, e.prototype.listenOnce = function(e) { var t = this.listen(function() { t(), e(); }); return t; }, e.prototype.trigger = function() { for (var e = 0, t = this.callbacks.slice(); e < t.length; e++) { (0, t[e])(); } }, e.prototype.destroy = function() { this.callbacks.length = 0; }, e; }(); t.TwinkleSignal = o; var i = function() { function e() { this.callbacks = []; } return e.prototype.listen = function(e) { var t = this; return this.callbacks.push(e), function() { var n = t.callbacks.indexOf(e); n > -1 && t.callbacks.splice(n, 1); }; }, e.prototype.listenOnce = function(e) { var t = this.listen(function(n) { t(), e(n); }); return t; }, e.prototype.trigger = function(e) { for (var t = 0, n = this.callbacks.slice(); t < n.length; t++) { (0, n[t])(e); } }, e.prototype.destroy = function() { this.callbacks.length = 0; }, e; }(); t.TwinkleTypedEvent = i; var a = function() { function e() { this.callbacks = []; } return e.prototype.listen = function(e) { var t = this; return this.callbacks.push(e), function() { var n = t.callbacks.indexOf(e); n > -1 && t.callbacks.splice(n, 1); }; }, e.prototype.listenOnce = function(e) { var t = this.listen(function(n, r) { t(), e(n, r); }); return t; }, e.prototype.trigger = function(e, t) { for (var n = 0, r = this.callbacks.slice(); n < r.length; n++) { (0, r[n])(e, t); } }, e.prototype.destroy = function() { this.callbacks.length = 0; }, e; }(); t.TwinkleTypedEvent2 = a; var s = function() { function e() { this.callbacks = []; } return e.prototype.listen = function(e) { var t = this; return this.callbacks.push(e), function() { var n = t.callbacks.indexOf(e); n > -1 && t.callbacks.splice(n, 1); }; }, e.prototype.listenOnce = function(e) { var t = this.listen(function(n, r, o) { t(), e(n, r, o); }); return t; }, e.prototype.trigger = function(e, t, n) { for (var r = 0, o = this.callbacks.slice(); r < o.length; r++) { (0, o[r])(e, t, n); } }, e.prototype.destroy = function() { this.callbacks.length = 0; }, e; }(); t.TwinkleTypedEvent3 = s; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0); !function(e) { e[e.NONE = 0] = "NONE", e[e.INVALID_SESSION = -32501] = "INVALID_SESSION", e[e.AUTHENTICATION_FAILED = -32502] = "AUTHENTICATION_FAILED", e[e.FIRST_PARTY_TOKEN_INVALID = -22300] = "FIRST_PARTY_TOKEN_INVALID", e[e.FIRST_PARTY_TOKEN_EXPIRED = -22301] = "FIRST_PARTY_TOKEN_EXPIRED", e[e.KILLSWITCH_SERVICE_DISABLED = -32800] = "KILLSWITCH_SERVICE_DISABLED", e[e.KILLSWITCH_SERVICE_RATE_LIMITED = -32801] = "KILLSWITCH_SERVICE_RATE_LIMITED", e[e.GAME_NOT_SUPPORTED = -32802] = "GAME_NOT_SUPPORTED", e[e.SERVICE_NOT_AVAILABLE = -32804] = "SERVICE_NOT_AVAILABLE", e[e.MAXIMUM_BOOKMARKS_REACHED = -32805] = "MAXIMUM_BOOKMARKS_REACHED", e[e.MISSING_PINGSITES = -34601] = "MISSING_PINGSITES", e[e.MM_ALREADY_IN_PROGRESS = -34602] = "MM_ALREADY_IN_PROGRESS", e[e.BLAZE_ERROR = -34600] = "BLAZE_ERROR"; }(t.GatewayErrorCodes || (t.GatewayErrorCodes = {})); var o = function(e) { function t(n, r, o) { var i = e.call(this, n) || this; return i.message = n, i.code = r, i.requestInfo = o, i.name = "GatewayRequestError", i.stack = "", Object.setPrototypeOf(i, t.prototype), i; } return r.__extends(t, e), t.is = function(e) { return "GatewayRequestError" === e.name; }, t; }(Error); t.GatewayRequestError = o; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), function(e) { e[e.Highlight = 1] = "Highlight", e[e.Select = 2] = "Select", e[e.Expand = 3] = "Expand", e[e.Collapse = 4] = "Collapse"; }(t.AudioEffect || (t.AudioEffect = {})), function(e) { e[e.Effect = 1] = "Effect", e[e.Track = 2] = "Track"; }(t.AudioType || (t.AudioType = {})), function(e) { e[e.Play = 1] = "Play", e[e.Stop = 2] = "Stop"; }(t.AudioAction || (t.AudioAction = {})); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(1); function r(e) { return function(t) { return "string" != typeof t && (t = String(t)), e(t); }; } t.isStateless = function o(t) { var n = t.type; return "string" == typeof n || !(n.prototype instanceof e.Component); }, t.formatPercent = r(function(e) { return __("ID_SPARTA_FORMAT_PERCENT").replace("[[value]]", e); }), t.formatSeconds = r(function(e) { return __("ID_SPARTA_FORMAT_SECONDS").replace("[[value]]", e); }), t.formatMinutes = r(function(e) { return __("ID_SPARTA_FORMAT_MINUTES").replace("[[value]]", e); }), t.isDefined = function i(e) { return null != e; }, t.useHasTimePassed = function a(t) { var n = e.useState(!!t && t.getTime() <= Date.now()), r = n[0], o = n[1]; return e.useEffect(function() { if (t) { var e = setTimeout(function() { return o(!0); }, t.getTime() - Date.now()); return function() { return clearTimeout(e); }; } }, [ t ]), r; }; }).call(this, n(3)); }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(145), o = n(1060), i = n(2), a = e.get("CopyStore"), s = function() { function e(e, t, n) { var o = this; this.localeState = e, this.coreEventStore = t, this.buildInfo = n, this.copy = {}, this.apiEnv = "live", this.threeLetterCountry = "usa", r.onReady.listen(function() { i.when(function() { return e.isReady && !!t.nativeClientReadyMessage; }, function() { o.setApiEnv(), o.setCountryAndCopy(); }); }); } return e.prototype.setCountryAndCopy = function() { var e = this; o.getJson({ url: "https://api1.origin.com/ecommerce2/ipToStoreFront", headers: "Accept: application/json", retry: 5, success: function(t) { e.threeLetterCountry = t.country || "usa", e.retrieveCopy(); }, failure: function() { e.retrieveCopy(); } }); }, e.prototype.retrieveCopy = function() { var e = this, t = "https://data1.origin.com/{apiEnv}/odc/messaging/sparta/{platform}.{locale}.{country}.xjson".replace("{apiEnv}", this.apiEnv).replace("{platform}", this.buildInfo.bundlePlatform.toLowerCase()).replace("{locale}", this.locale).replace("{country}", this.threeLetterCountry); a.debug("fetching copy from", t), o.getJson({ url: t, retry: 3, success: function(t) { e.copy = t, e.retrieveUrlData(); } }); }, e.prototype.retrieveUrlData = function() { var e = this, t = u(this.copy, "settings.url.accessTos", ""); t = t.replace("{country}", this.threeLetterCountry).replace("{lang}", this.getLanguage()); var n = u(this.copy, "settings.url.accessTosData", ""), r = u(this.copy, "settings.url.accessTosPrepend", ""), i = u(this.copy, "settings.url.accessTosDate", ""); "" !== i && (i = new Date(i).toLocaleDateString()), "" !== n ? (n = (n = r + n).replace("%accessTosDate%", i), l(this.copy, "settings.url.accessTosData", this.sanitizeUrlData(n))) : "" !== t && o.get({ url: t, retry: 3, success: function(t) { n = (n = r + t).replace("%accessTosDate%", i), l(e.copy, "settings.url.accessTosData", e.sanitizeUrlData(n)); } }); }, e.prototype.sanitizeUrlData = function(e) { return (e = (e = (e = (e = e.replace(new RegExp("
", "g"), "\n")).replace(new RegExp("\n\n", "g"), "\n")).trim()).replace(new RegExp(/<.*?>/g), "")).split(/\n/); }, e.prototype.strReplace = function(e, t, n) { return "string" != typeof e || "string" != typeof n ? e : e = (e = e.replace(t.toLowerCase(), n)).replace(t.toUpperCase(), n.toUpperCase()); }, e.prototype.updateCopyRecurse = function(e, t, n) { for (var r = "%" + t + "%", o = Object.keys(e), i = 0; i < o.length; i++) { var a = o[i]; "string" == typeof e[a] ? e[a] = this.strReplace(e[a], r, n) : "object" == typeof e[a] && (e[a] = this.updateCopyRecurse(e[a], t, n)); } return e; }, e.prototype.getCopyPage = function(e, t) { if ("object" != typeof this.copy) return {}; if ("object" != typeof this.copy[e]) return {}; var n = this.copy[e]; if ("object" == typeof t) for (var r = Object.keys(t), o = 0; o < r.length; o++) n = this.updateCopyRecurse(n, r[o], t[r[o]]); return n; }, e.prototype.getLanguage = function() { var e = this.locale.substr(0, 2); return -1 === [ "de", "es", "fr", "it", "ja", "ko", "pl", "pt", "ru", "zh" ].indexOf(e) && (e = "en"), e; }, e.prototype.setApiEnv = function() { var e = this.coreEventStore.nativeClientReadyMessage, t = e && e.nativeClientInformation.env.onlineEnvironment; this.apiEnv = "OnlineEnvironment_Production" === t ? "live" : "preview"; }, Object.defineProperty(e.prototype, "locale", { get: function() { var e = this.localeState.displayLocale; return "en" === e.substr(0, 2) ? "en-us" : e; }, enumerable: !0, configurable: !0 }), e; }(); function u(e, t, n) { return t.split(".").reduce(function(e, t) { return null == e ? e : e[t]; }, e) || n; } function l(e, t, n) { for (var r = t.split("."), o = 0; o < r.length; o++) { var i = r[o]; if (o === r.length - 1) { e[i] = n; break; } if (null !== e[i] && void 0 !== e[i] || (e[i] = {}), "object" != typeof e[i]) break; e = e[i]; } } t.CopyStore = s, t.getCopyProperty = u, t.setCopyProperty = l; }).call(this, n(15)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(2), a = n(4), s = n(48), u = n(35), l = n(8), c = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.sparta = l.SpartaContext.getFromComponent(t), t; } return r.__extends(t, e), t.prototype.expireFailedFragmentsOnReconnect = function() { var e = this, t = this.sparta.stores.presenceStateStore.isReady; this.reaction(function() { return e.sparta.stores.presenceStateStore.isReady; }, function(n) { n && n !== t && e.fragments.forEach(function(e) { e.failstate && !e.isLoading && e.expire(); }), t = n; }); }, t.prototype.componentWillMount = function() { this.expireFailedFragmentsOnReconnect(); }, Object.defineProperty(t.prototype, "fragments", { get: function() { return Array.isArray(this.props.load) ? this.props.load : [ this.props.load ]; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "isSuccessful", { get: function() { return this.fragments.every(function(e) { return !!e.value; }); }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "hasSomeLoading", { get: function() { return !this.props.disableLoadingState && this.fragments.some(function(e) { return e.isLoading; }); }, enumerable: !0, configurable: !0 }), Object.defineProperty(t.prototype, "hasSomeErrors", { get: function() { return this.fragments.some(function(e) { return e.isReady && !e.value; }); }, enumerable: !0, configurable: !0 }), t.prototype.render = function() { var e; if (this.isSuccessful) { var t = this.fragments.map(function(e) { return e.value; }); return (e = this.props).children.apply(e, t); } return this.hasSomeLoading ? o.createElement(s.EmptyState, null, o.createElement(u.Spinner, { large: !0 })) : this.hasSomeErrors ? o.createElement("surface", null) : null; }, t.contextTypes = l.SpartaContext.contextTypes, r.__decorate([ i.computed ], t.prototype, "fragments", null), r.__decorate([ i.computed ], t.prototype, "isSuccessful", null), r.__decorate([ i.computed ], t.prototype, "hasSomeLoading", null), r.__decorate([ i.computed ], t.prototype, "hasSomeErrors", null), t = r.__decorate([ a.observer ], t); }(o.Component); t.OptimisticFragmentLoader = c; }, function(e, t, n) { var r = n(279), o = n(161), i = n(103), a = n(160), s = n(97), u = n(450), l = Object.getOwnPropertyDescriptor; t.f = n(81) ? l : function e(t, n) { if (t = i(t), n = a(n, !0), u) try { return l(t, n); } catch (e) {} if (s(t, n)) return o(!r.f.call(t, n), t[n]); }; }, function(e, t, n) { var r = n(159), o = n(237), i = n(112), a = n(88), s = n(710); e.exports = function(e, t) { var n = 1 == e, u = 2 == e, l = 3 == e, c = 4 == e, p = 6 == e, d = 5 == e || p, f = t || s; return function(t, s, m) { for (var h, g, y = i(t), S = o(y), v = r(s, m, 3), b = a(S.length), _ = 0, T = n ? f(t, b) : u ? f(t, 0) : void 0; b > _; _++) if ((d || _ in S) && (g = v(h = S[_], _, y), e)) if (n) T[_] = g; else if (g) switch (e) { case 3: return !0; case 5: return h; case 6: return _; case 2: T.push(h); } else if (c) return !1; return p ? -1 : l || c ? c : T; }; }; }, function(e, t, n) { var r = n(16), o = n(51), i = n(42); e.exports = function(e, t) { var n = (o.Object || {})[e] || Object[e], a = {}; a[e] = t(n), r(r.S + r.F * i(function() { n(1); }), "Object", a); }; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(92), o = n(36), i = {}, a = r.globalScope.TwinkleNative ? void 0 : console, s = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.log, u = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.info, l = r.globalScope.TwinkleNative ? S.bind(void 0, 4) : console.warn, c = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.error, p = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.debug || u, d = 0; var f = {}, m = function() { function e() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; this.context = e, this.log = h("log", e), this.info = h("info", e), this.warn = h("warn", e), this.error = h("error", e), this.debug = h("debug", e); } return Object.defineProperty(e, "default", { get: function() { return e.get(); }, enumerable: !0, configurable: !0 }), e.prototype.extend = function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; var r = this.context.concat(t); return e.get.apply(e, r); }, e.get = function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; var r = t.join("_"); return i[r] || (i[r] = new (e.bind.apply(e, [ void 0 ].concat(t)))()); }, Object.defineProperty(e, "log", { get: function() { return e.default.log; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "info", { get: function() { return e.default.info; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "warn", { get: function() { return e.default.warn; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "error", { get: function() { return e.default.error; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "debug", { get: function() { return e.default.debug; }, enumerable: !0, configurable: !0 }), e; }(); function h(e, t) { var n, o = []; if (r.globalScope.isJSC) { var i = t.join(":") + " →"; o.push(i); } else { i = "%c" + t.join(":"); i += Array(Math.max(52 - i.length, 2)).join(" ") + "→", f[t[0]] || (f[t[0]] = function m() { return d += .618033988749895, 360 * (d %= 1); }()); var h = "color: hsl(" + f[t[0]] + ",99%,40%); font-weight: bold"; o.push(i, h); } return (n = function g(e) { switch (e) { case "log": return s; case "info": return u; case "warn": return l; case "error": return c; case "debug": return p; default: throw Error("Unknown Logger emitter type: " + e); } }(e)).bind.apply(n, [ a ].concat(o)); } t.__Logger = m; var g = 1e4, y = o.getBuildInfo().isEndUserBuild(); function S(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; if (!y) { var o = t[0]; try { t.length > 1 ? o = JSON.stringify(t) : "string" != typeof o && (o = JSON.stringify(o)); } catch (e) { o = "ERROR: Could not log object. JSON.stringify failed. " + e; } "string" == typeof o && o.length > g ? r.globalScope.TwinkleNative.handleCall("log", [ e, "[Following log message was cut in JS to " + g + " characters, original messsage was " + o.length + " characters] " + o.slice(0, g) ]) : r.globalScope.TwinkleNative.handleCall("log", [ e, o ]); } } }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(870), o = n(5), i = function() { function e(e, t, n, o, i, a) { void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === o && (o = 0), this.x = e, this.y = t, this.width = n, this.height = o, this.localX = i, this.localY = a, this.top = t, this.right = e + n, this.bottom = t + o, this.left = e, this.center = new r.Point(this.left + (this.right - this.left) / 2, this.top + (this.bottom - this.top) / 2), this.style = { left: this.left, top: this.top, width: this.width, height: this.height }; } return e.prototype.getStyleClass = function(e) { return o.DynamicStyle.wrapLegacyStyle(this.style, e); }, e.fromRaw = function(t) { return new e(t.x, t.y, t.width, t.height, t.localX, t.localY); }, e.prototype.equals = function(e, t) { void 0 === t && (t = !0); var n = !0; return t && (n = this.localX === e.localX && this.localY === e.localY), this.x === e.x && this.y === e.y && this.width === e.width && this.height === e.height && n; }, e.prototype.empty = function() { return 0 === this.width && 0 === this.height; }, e.prototype.intersects = function(e) { return e.x < this.x + this.width && this.x < e.x + e.width && e.y < this.y + this.height && this.y <= e.y + e.height; }, e.prototype.offset = function(t, n) { return void 0 === t && (t = 0), void 0 === n && (n = 0), new e(this.x - t, this.y - n, this.width, this.height); }, e.prototype.subtract = function(t) { var n = this.right, r = this.left, o = this.top, i = this.bottom; return t && (n = t.left < this.right && t.left > this.left ? t.left : this.right, r = t.right > this.left && t.right < this.right ? t.right : this.left, o = t.bottom > this.top && t.bottom < this.bottom ? t.bottom : this.top, i = t.top < this.bottom && t.top > this.top ? t.top : this.bottom), new e(r, o, n - r, i - o); }, e.prototype.edgeDistance = function(e) { var t = this.edgePoint(this.center.angle(e.center)), n = e.edgePoint(e.center.angle(this.center)); return t.distance(n); }, e.prototype.edgeDistanceSquared = function(e) { var t = this.edgePoint(this.center.angle(e.center)), n = e.edgePoint(e.center.angle(this.center)); return t.squaredDistance(n); }, e.prototype.centerDistanceSquared = function(e) { var t = this.center, n = e.center; return t.squaredDistance(n); }, e.prototype.edgePoint = function(e) { var t = Math.cos(e), n = Math.sin(e), o = Math.abs(t), i = Math.abs(n), a = this.width / 2 * i <= this.height / 2 * o ? this.width / 2 / (o || 1) : this.height / 2 / (i || 1); return new r.Point(this.center.x + t * a, this.center.y + n * a); }, e; }(); t.Bounds = i; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(371), i = n(488), a = function() { function e(t, n) { t = "string" == typeof t ? e.parse(t) : e.parse(t.path, t.args), this.path = t.path, this.args = t.args || e.defaultArgs, this.cause = n; } return Object.defineProperty(e.prototype, "section", { get: function() { return e.determineSection(this.path); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "queryString", { get: function() { return o.stringify(this.args); }, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "url", { get: function() { return this.queryString ? this.path + "?" + this.queryString : this.path; }, enumerable: !0, configurable: !0 }), e.prototype.equals = function(e) { return e.path === this.path && i.isEqual(e.args, this.args); }, e.prototype.extend = function(t, n) { return new e({ path: this.path, args: r.__assign({}, this.args, t) }, n || this.cause); }, e.prototype.toString = function() { return this.url; }, e.indexOfBestMatch = function(e, t, n) { for (var r = n ? this.testFullMatch : this.testPartialMatch, o = -1, i = Number.MAX_VALUE, a = 0; a < e.length; a++) { var s = e[a]; if (r(t, s)) { var u = Math.abs(s.path.length - t.path.length); u < i && (o = a, i = u); } } return -1 === o && t.path.length > 0 && (o = 0), o; }, e.testFullMatch = function(e, t) { return e.path === t.path; }, e.testPartialMatch = function(e, t) { return e.path.startsWith(t.path); }, e.determineSection = function(e) { "#/" === e.substr(0, 2) && (e = e.substr(2)), "/" === e[0] && (e = e.substr(1)); var t = e.indexOf("/", 1); return -1 !== t ? e.substr(0, t) : e; }, e.parse = function(e, t) { var n, i, a = e.indexOf("?"); if (-1 === a) n = e, i = r.__assign({}, t); else { var s = e.substr(a + 1); n = e.substr(0, a), i = r.__assign({}, o.parse(s), t); } return { path: n, args: i }; }, e.defaultArgs = {}, e; }(); t.Location = a; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(62); t.frostbiteAction = function o(e) { return function(t) { r.frostbite.sendMessage.call(this, e, t); }; }; }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(2), o = n(402), i = n(537), a = n(538); t.defaultPlatoonEmblem = "[BB_PREFIX]/sparta/jsclient/builds/assets/platoon_emblem_default_grey-e370d35d.png"; var s = function() { function n(n) { var r = e.__assign({}, n); r.displayMembers && (r.displayMembers = r.displayMembers.map(function(e) { return o.PlatoonMember.fromBackend(r.guid, e); })), r.emblem || (r.emblem = t.defaultPlatoonEmblem), r.description || (r.description = ""), this.name = r.name, this.emblem = r.emblem, this.size = r.size, this.guid = r.guid, this.description = r.description, this.tag = r.tag, this.verified = r.verified, this.creatorId = r.creatorId, this.dateCreated = r.dateCreated, this.joinConfig = r.joinConfig, this.displayMembers = r.displayMembers; } return n.fromBackend = function(e) { return e ? new n(e) : null; }, n.fromDummyData = function(e) { return new n(e); }, n.prototype.setTag = function(e) { this.tag = e; }, n.prototype.getTag = function() { return this.tag ? i.formatTag(this.tag) : ""; }, n.prototype.setGuid = function(e) { this.guid = e; }, n.prototype.setName = function(e) { this.name = e; }, n.prototype.getName = function() { return i.formatName(this.name); }, n.prototype.setDescription = function(e) { this.description = e; }, n.prototype.setEmblem = function(e) { this.emblem = e; }, Object.defineProperty(n.prototype, "accessType", { get: function() { return a.joinConfigToAccessType(this.joinConfig); }, enumerable: !0, configurable: !0 }), e.__decorate([ r.observable ], n.prototype, "name", void 0), e.__decorate([ r.observable ], n.prototype, "emblem", void 0), e.__decorate([ r.observable ], n.prototype, "size", void 0), e.__decorate([ r.observable ], n.prototype, "guid", void 0), e.__decorate([ r.observable ], n.prototype, "description", void 0), e.__decorate([ r.observable ], n.prototype, "tag", void 0), e.__decorate([ r.observable ], n.prototype, "verified", void 0), e.__decorate([ r.observable ], n.prototype, "creatorId", void 0), e.__decorate([ r.observable ], n.prototype, "dateCreated", void 0), e.__decorate([ r.observable ], n.prototype, "joinConfig", void 0), e.__decorate([ r.observable ], n.prototype, "displayMembers", void 0), e.__decorate([ r.action ], n.prototype, "setTag", null), e.__decorate([ r.action ], n.prototype, "setGuid", null), e.__decorate([ r.action ], n.prototype, "setName", null), e.__decorate([ r.action ], n.prototype, "setDescription", null), e.__decorate([ r.action ], n.prototype, "setEmblem", null), e.__decorate([ r.computed ], n.prototype, "accessType", null), n; }(); t.Platoon = s; var u = function() { function e(e) { this.displayMembers = [], this.guid = e.guid, this.name = e.name, this.tag = e.tag, this.size = e.size, this.emblem = e.emblem || t.defaultPlatoonEmblem, this.verified = e.verified, this.displayMembers = e.displayMembers ? e.displayMembers.map(function(t) { return o.PlatoonMember.fromBackend(e.guid, t); }) : []; } return e.fromBackend = function(t) { return new e(t); }, e.prototype.getTag = function() { return this.tag ? i.formatTag(this.tag) : ""; }, e.prototype.getName = function() { return this.name ? this.name : __("ID_SHARED_PLATOONS_NAME_HIDDEN").toUpperCase(); }, e; }(); t.LightPlatoon = u; }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(9), o = n(37), i = n(28); t.quicklinksGroup = i.focusSystem.createStaticGroup("quicklinks"), t.comcenterGroup = i.focusSystem.createStaticGroup("comcenter"), t.mainmenuGroup = i.focusSystem.createStaticGroup("mainmenu"), t.minimainmenuGroup = i.focusSystem.createStaticGroup("minimainmenu"), t.topmenuGroup = i.focusSystem.createStaticGroup("topmenu"), t.contextMenuGroup = i.focusSystem.createStaticGroup("contextmenu"), t.scoreboardTeamLeftGroup = i.focusSystem.createStaticGroup("teamleft"), t.scoreboardTeamRightGroup = i.focusSystem.createStaticGroup("teamright"), t.battlepackWinnersGroup = i.focusSystem.createStaticGroup("battlepackwinners"), t.handleIfNotTheSameGroup = function(e, t) { return function(n, r) { var a = i.focusSystem.findNextItem(n, r); return a && a.group === e ? { result: o.NavigationResultType.HIT, toItem: a } : t(n, r); }; }, t.stopIfNotTheSameGroup = function(e) { return t.handleIfNotTheSameGroup(e, function(e, t) { return { result: o.NavigationResultType.STOP }; }); }, t.comcenterGroup.handleDirection(o.Direction.Up, t.stopIfNotTheSameGroup(t.comcenterGroup)), t.comcenterGroup.handleDirection(o.Direction.Down, t.stopIfNotTheSameGroup(t.comcenterGroup)), t.quicklinksGroup.behavior = o.GroupBehavior.HORIZONTAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET, t.quicklinksGroup.handleDirection(o.Direction.Right, t.handleIfNotTheSameGroup(t.quicklinksGroup, function(e, n) { return t.comcenterGroup.navigateToGroup(e, n); })), t.quicklinksGroup.handleDirection(o.Direction.Left, t.handleIfNotTheSameGroup(t.quicklinksGroup, function(e, n) { return r.SpartaGlobals.bundleIsPC ? t.minimainmenuGroup.navigateToGroup(e, n) : t.mainmenuGroup.navigateToGroup(e, n); })), t.mainmenuGroup.behavior = o.GroupBehavior.VERTICAL, t.mainmenuGroup.handleDirection(o.Direction.Left, function(e, t) { return { result: o.NavigationResultType.STOP }; }), t.minimainmenuGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.WRAP_AROUND, t.minimainmenuGroup.handleDirection(o.Direction.Left, function(e, t) { return { result: o.NavigationResultType.STOP }; }), t.contextMenuGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET, t.contextMenuGroup.handleDirection(o.Direction.Left, function(e, t) { return { result: o.NavigationResultType.STOP }; }), t.contextMenuGroup.handleDirection(o.Direction.Right, function(e, t) { return { result: o.NavigationResultType.STOP }; }), t.contextMenuGroup.handleDirection(o.Direction.Up, t.stopIfNotTheSameGroup(t.contextMenuGroup)), t.contextMenuGroup.handleDirection(o.Direction.Down, t.stopIfNotTheSameGroup(t.contextMenuGroup)), t.scoreboardTeamLeftGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET, t.scoreboardTeamRightGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET, t.battlepackWinnersGroup.behavior = o.GroupBehavior.HORIZONTAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET; }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(45); t.joinMultiplayerServer = r.createTypedAction(), t.joinLanServer = r.createTypedAction(), t.joinMultiplayerFriend = r.createTypedAction(), t.continueSinglePlayer = r.createTypedAction(); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(1), o = n(69), i = n(67), a = n(4), s = n(2), u = n(17), l = n(14), c = n(73), p = n(7), d = n(1161), f = n(10), m = n(41), h = n(11), g = n(18), y = n(5), S = n(8), v = n(368), b = { position: "absolute", top: 0, right: 0, bottom: 0, left: 0 }, _ = y.StaticStyle.wrapLegacyStyle(b, "3132c7f8:137:18"), T = y.StaticStyle.wrapLegacyStyle({ position: "absolute", top: 0, right: 0, left: 0 }, "3132c7f8:138:21"); t.tweenInOptions = l.Animation.presets.focusables.enter.fast, t.tweenOutOptions = l.Animation.presets.focusables.leave; var E = p.GUTTER, C = y.StaticStyle.wrapLegacyStyleSheet({ top: { flex: 1 }, layer: { layer: !0, layerClip: !0 }, backgroundShade: { zOffset: 1, textureMode: "fill", texture: u.bbOfflineUrl("/sparta/jsclient/builds/assets/card-gradient-active-news-abc6b204.png") }, content: e.__assign({}, b, { flex: 1, zOffset: 3, padding: 3 * p.GUTTER }), highlight: { zOffset: 2, justifyContent: "flex-end" }, bottom: { padding: 3 * p.GUTTER }, blind: { position: "absolute", bottom: 0, left: 0, right: 0 }, overlay: e.__assign({}, b, { enableMouseEvents: !1, zOffset: 4 }), dimmer: e.__assign({}, b, { enableMouseEvents: !1, backgroundColor: "#000000", zOffset: 5 }) }, "3132c7f8:143:15"), I = y.StaticStyle.create({ flex: 1, justifyContent: "flex-end" }, "3132c7f8:628:45"), A = function(n) { function u(e, t) { var r = n.call(this, e, t) || this; return r.sparta = S.SpartaContext.getFromComponent(r), r.backgroundUrls = s.observable.array(), r.width = 0, r.height = 0, r.foldHeight = 0, r.bottomHeight = 0, r.isActiveOverride = !1, r.cardOpacityTween = l.Animation.componentTween(r, "3132c7f8:228:54", .01), r.contentTextColorTween = l.Animation.componentTween(r, "3132c7f8:229:59", "#ffffff"), r.bottomTextColorTween = l.Animation.componentTween(r, "3132c7f8:230:58", "#ffffff"), r.highlightColorTween = l.Animation.componentTween(r, "3132c7f8:232:14", r.props.inactiveHighlightColor ? r.props.inactiveHighlightColor : "#00000085"), r.contentTopTween = l.Animation.componentTween(r, "3132c7f8:236:53", 0), r.blindHeightTween = l.Animation.componentTween(r, "3132c7f8:237:54", 0), r.backgroundHeightTween = l.Animation.componentTween(r, "3132c7f8:238:59", 0), r.foldBottomTween = l.Animation.componentTween(r, "3132c7f8:239:53", 0), r.highlightHeightTween = l.Animation.componentTween(r, "3132c7f8:241:58", 0), r.foldSeparatorTween = l.Animation.componentTween(r, "3132c7f8:242:56", 0), r.dimmerTween = l.Animation.componentTween(r, "3132c7f8:243:49", 0), r.textureOffsetYTween = l.Animation.componentTween(r, "3132c7f8:244:57", 0), r.textureScaleTween = l.Animation.componentTween(r, "3132c7f8:246:14", r.props.backgroundScale ? r.props.backgroundScale : 1), r.getInput = function() { return r.props.input ? (Array.isArray(r.props.input) ? r.props.input : [ r.props.input ]).map(function(e) { return e.extend({ action: r.wrapCause(e.action), holdAction: r.wrapCause(e.holdAction), releaseAction: r.wrapCause(e.releaseAction) }); }) : r.props.onPress ? new h.Input({ label: __("ID_SPARTA_ACTION_SELECT"), action: r.wrapCause(r.props.onPress), blockInputFor: 500, key: f.Keys.Accept }) : void 0; }, r.onBottomBounds = s.action("Card onBottomBounds", function(e) { r.bottomHeight = e.height; }), r.onFoldBounds = s.action("Card onFoldBounds", function(e) { r.foldHeight = e.height; }), r.getActiveOverride = function() { return r.isActiveOverride; }, r.focusItem = e.focusItem || r.sparta.twinkle.focus.create(r, o.autoId("card")), r.focusItem.onFocus(function() { r.props.onFocus && r.props.onFocus(); }), r.focusItem.onBlur(function() { r.props.onBlur && r.props.onBlur(); }), r.setBackground(e.background), r.updateActiveOverride(e.forcedActive, e.enabled), r.setSize(e.size, e.style), r; } return e.__extends(u, n), Object.defineProperty(u.prototype, "isActive", { get: function() { return this.isActiveOverride || this.focusItem.isFocused || this.focusItem.isHovered; }, enumerable: !0, configurable: !0 }), Object.defineProperty(u.prototype, "scaleValues", { get: function() { var e = 2 * p.GUTTER; return { scaleX: { from: 1, to: 0 === this.width ? 1 : (this.width + e) / this.width }, scaleY: { from: 1, to: 0 === this.height ? 1 : (this.height + e) / this.height } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(u.prototype, "backgroundHeight", { get: function() { return this.height - this.bottomHeight; }, enumerable: !0, configurable: !0 }), Object.defineProperty(u.prototype, "hasBackground", { get: function() { return !(!this.backgroundUrls.length && void 0 === this.props.backgroundVideo); }, enumerable: !0, configurable: !0 }), u.prototype.componentDidMount = function() { var e = this; this.reaction(function() { return [ e.isActive, e.hasBackground, e.foldHeight, e.backgroundHeight ]; }, function() { return e.updateTweens(); }, { fireImmediately: !0 }), null !== this.focusItem.bounds ? this.cardOpacityTween.to(1, l.Animation.defaultTweenOptions) : this.when(function() { return null !== e.focusItem.bounds; }, function() { return e.cardOpacityTween.to(1, l.Animation.defaultTweenOptions); }); }, u.prototype.componentWillReceiveProps = function(e) { this.setBackground(e.background), this.updateActiveOverride(e.forcedActive, e.enabled), this.setSize(e.size, e.style); }, u.prototype.componentDidUpdate = function() { this.updateTweens(); }, u.prototype.updateActiveOverride = function(e, t) { this.isActiveOverride = !!t && !!e; }, u.prototype.wrapCause = function(e) { var t = this; if (e) return function() { t.sparta.stores.locationStore.injectLocationCause("cardInteraction"), e(), t.sparta.stores.locationStore.injectLocationCause(void 0); }; }, u.prototype.setBackground = function(e) { "string" == typeof e ? this.backgroundUrls.replace(e.length > 0 ? [ e ] : []) : this.backgroundUrls.replace(e || []); }, u.prototype.setSize = function(e, t) { if (e) { var n = Math.ceil(p.getWidth(m.CARD_WIDTH.cells[e])), r = Math.ceil(p.getHeight(m.CARD_HEIGHT.cells[e])); if (t) { var o = y.isStyleClass(t) ? t : y.DynamicStyle.create(t, "3132c7f8:405:65"); o.getNumericStyle && (o.getNumericStyle("width", 0) && (n = o.getNumericStyle("width", 0)), o.getNumericStyle("height", 0) && (r = o.getNumericStyle("height", 0))); } "number" == typeof n && "number" == typeof r && (this.width = n, this.height = r); } }, u.prototype.updateTweens = function() { var e = this.props.backgroundStyle, n = (e ? e.textureScale : void 0) || this.props.backgroundScale; if ("number" == typeof n) { if (this.backgroundUrls.length > 1 && (n += .1), this.isActive) { this.contentTextColorTween.to(this.hasBackground ? "#ffffff" : "#000000", t.tweenInOptions), this.bottomTextColorTween.to("#000000", t.tweenInOptions), this.foldBottomTween.to(0, t.tweenInOptions), this.textureOffsetYTween.to(-p.GUTTER, t.tweenInOptions); var r = this.sparta.twinkle.buildInfo.isConsole ? .05 : 0; if (this.textureScaleTween.to(n + r, t.tweenInOptions), this.highlightHeightTween.to(this.hasBackground ? E : 0, t.tweenInOptions), this.props.removeFoldSeparator && this.props.fold ? (this.contentTopTween.to(-(this.foldHeight - 2 * p.GUTTER) / 2, t.tweenInOptions), this.foldSeparatorTween.to(2 * p.GUTTER, t.tweenInOptions)) : this.props.fold && this.contentTopTween.to(-this.foldHeight / 2, t.tweenInOptions), this.sparta.twinkle.buildInfo.isConsole) { var o = this.foldHeight + this.bottomHeight || E; this.blindHeightTween.to(this.hasBackground ? o : this.height, t.tweenInOptions); } else { var i = this.props.activeHighlightColor; i && this.highlightColorTween.to(i, t.tweenInOptions); } } else { this.contentTextColorTween.to("#ffffff", t.tweenOutOptions), this.bottomTextColorTween.to("#ffffff", t.tweenOutOptions), this.foldBottomTween.to(-this.foldHeight, t.tweenOutOptions), this.textureOffsetYTween.to(0, t.tweenOutOptions), this.textureScaleTween.to(n, t.tweenOutOptions), this.highlightHeightTween.to(0, t.tweenOutOptions), this.foldSeparatorTween.to(0, t.tweenOutOptions), this.contentTopTween.to(0, t.tweenOutOptions); var a = this.props.inactiveHighlightColor; a && this.highlightColorTween.to(a, t.tweenOutOptions), this.sparta.twinkle.buildInfo.isConsole && this.blindHeightTween.to(0, t.tweenOutOptions); } this.backgroundHeightTween.set(this.backgroundHeight), this.dimmerTween.to(this.props.enabled ? 0 : .5, this.props.enabled ? t.tweenInOptions : t.tweenOutOptions); } }, u.prototype.renderBackground = function() { var e = this.backgroundUrls.length > 1, t = y.merge2(T, this.backgroundHeightTween.getStyleClass("height")), n = y.merge4(g.CommonStyles.textureModeCover, this.textureOffsetYTween.getStyleClass("textureOffsetY"), y.merge2(this.textureScaleTween.getStyleClass("textureScaleX"), this.textureScaleTween.getStyleClass("textureScaleY")), y.merge2(g.CommonStyles.grayScale(this.props.useGrayScale && !this.props.enabled ? 1 : 0), y.DynamicStyle.create({ textureAtlas: this.props.textureAtlas }, "3132c7f8:513:96"))); if (e) return r.createElement(d.TextureCrossfade, { style: t, textures: this.backgroundUrls, textureStyle: n }); var o = y.merge3(t, n, y.DynamicStyle.maybeLegacyStyle({ texture: this.backgroundUrls.length ? this.backgroundUrls[0] : void 0 }, "3132c7f8:527:26")); return void 0 !== this.props.backgroundVideo ? r.createElement(w, { style: o, getActiveOverride: this.getActiveOverride, focusItem: this.focusItem, source: this.props.backgroundVideo, option: this.props.backgroundVideoOption }) : r.createElement("surface", { style: o }); }, u.prototype.render = function() { var e = this.props.fold && r.createElement("surface", { style: { marginBottom: this.foldBottomTween.getStyle() }, onBounds: this.onFoldBounds }, this.props.fold), t = this.props.bottom && r.createElement("surface", { style: [ C.bottom, this.foldSeparatorTween.getStyleClass("translateY") ], onBounds: this.onBottomBounds }, this.props.bottom), n = this.hasBackground && this.props.backgroundShade && r.createElement("surface", { style: [ this.backgroundHeightTween.getStyleClass("height"), T, C.backgroundShade ] }), o = this.props.overlay && r.createElement("surface", { style: C.overlay }, this.props.overlay), i = this.sparta.twinkle.buildInfo.isConsole && r.createElement("surface", { style: [ C.blind, this.blindHeightTween.getStyleClass("height"), { backgroundColor: this.props.activeHighlightColor } ] }), a = [ C.top ], s = void 0, u = void 0; if (this.props.staticContentSize) { var l = this.height * (this.props.contentSize || 1); a = [ C.top, _, y.DynamicStyle.wrapLegacyStyle({ height: l }, "3132c7f8:587:47") ], s = y.merge2(y.DynamicStyle.create({ height: l }, "3132c7f8:588:35"), this.contentTopTween.getStyleClass("top")), u = g.CardStyles.children; } this.hasBackground && Array.isArray(a) && a.push(C.layer); var d = this.props.size; if (!d) return null; var f = { width: p.getWidth(m.CARD_WIDTH.cells[d]), height: p.getHeight(m.CARD_HEIGHT.cells[d]), opacity: this.cardOpacityTween.getStyle(), backgroundColor: this.highlightColorTween.getStyle(), layer: !!e || void 0, layerClip: !!e || void 0 }, h = y.merge3(y.DynamicStyle.wrapLegacyStyle(f, "3132c7f8:607:36"), g.CardStyles.container, y.DynamicStyle.maybeLegacyStyle(this.props.style, "3132c7f8:609:34")); return r.createElement(c.Pressable, { focusItem: this.focusItem, input: this.getInput(), scale: this.sparta.twinkle.buildInfo.isConsole && !this.props.dontScale, scaleValues: this.scaleValues, triggerMode: this.props.triggerMode, childrenStyle: u, style: h }, r.createElement("surface", { style: a }, this.renderBackground(), n, r.createElement(v.ColorContext.Provider, { value: this.contentTextColorTween.getStyleClass("color") }, r.createElement("surface", { style: [ C.content, s ] }, r.createElement("surface", { style: I }, "object" == typeof this.props.children ? this.props.children : null)))), r.createElement(v.ColorContext.Provider, { value: this.bottomTextColorTween.getStyleClass("color") }, r.createElement("surface", { style: [ C.highlight, this.highlightHeightTween.getStyleClass("minHeight") ] }, t, e)), i, o, r.createElement("surface", { style: [ C.dimmer, this.dimmerTween.getStyleClass("opacity") ] })); }, u.contextTypes = S.SpartaContext.contextTypes, u.defaultProps = { size: m.CardSize.M, enabled: !0, backgroundScale: 1, backgroundStyle: {}, backgroundShade: !0, backgroundVideoOption: "focus", activeHighlightColor: "#ffffff", inactiveHighlightColor: "#00000085", textureAtlas: i.SINGLE_TEXTURE }, e.__decorate([ s.observable ], u.prototype, "width", void 0), e.__decorate([ s.observable ], u.prototype, "height", void 0), e.__decorate([ s.observable ], u.prototype, "foldHeight", void 0), e.__decorate([ s.observable ], u.prototype, "bottomHeight", void 0), e.__decorate([ s.observable ], u.prototype, "isActiveOverride", void 0), e.__decorate([ s.computed ], u.prototype, "isActive", null), e.__decorate([ s.computed ], u.prototype, "scaleValues", null), e.__decorate([ s.computed ], u.prototype, "backgroundHeight", null), e.__decorate([ s.computed ], u.prototype, "hasBackground", null), e.__decorate([ s.action ], u.prototype, "updateActiveOverride", null), e.__decorate([ s.action ], u.prototype, "setBackground", null), e.__decorate([ s.action ], u.prototype, "setSize", null), u = e.__decorate([ a.observer ], u); }(r.Component); t.Card = A; var w = function(t) { function n() { var e = null !== t && t.apply(this, arguments) || this; return e.sparta = S.SpartaContext.getFromComponent(e), e.isPlaying = !1, e; } return e.__extends(n, t), n.prototype.componentWillMount = function() { var e = this; this.updateVideo(this.props.source); var t = this.sparta.twinkle.focus; this.reaction(function() { return e.props.getActiveOverride() || e.props.focusItem.isFocused && !t.hoveredItem && t.controllerMode || e.props.focusItem.isHovered; }, function(t) { t ? e.play() : e.video.isFullScreen || e.stop(); }); }, n.prototype.componentWillUpdate = function(e) { this.reactToChanges(this.props, e); }, n.prototype.componentWillUnmount = function() { this.stop(); }, n.prototype.reactToChanges = function(e, t) { t.source !== e.source && (this.stop(), this.updateVideo(t.source)); }, n.prototype.updateVideo = function(e) { this.video = "string" == typeof e ? this.sparta.twinkle.video.loadVideo(e) : e, this.video.setVolume(0), "auto" === this.props.option && this.play(); }, n.prototype.play = function() { this.video && !this.isPlaying && (this.isPlaying = !0, this.video.play()); }, n.prototype.stop = function() { this.video && (this.isPlaying = !1, this.video.stop()); }, n.prototype.render = function() { var e = { video: this.isPlaying ? this.video.id : void 0 }, t = Array.isArray(this.props.style) ? this.props.style.concat(e) : [ this.props.style, e ]; return r.createElement("surface", { style: t }); }, n.contextTypes = S.SpartaContext.contextTypes, e.__decorate([ s.observable ], n.prototype, "video", void 0), e.__decorate([ s.observable ], n.prototype, "isPlaying", void 0), e.__decorate([ s.action ], n.prototype, "updateVideo", null), e.__decorate([ s.action ], n.prototype, "play", null), e.__decorate([ s.action ], n.prototype, "stop", null), n = e.__decorate([ a.observer ], n); }(r.Component); }).call(this, n(3)); }, function(e, t, n) { "use strict"; (function(__) { Object.defineProperty(t, "__esModule", { value: !0 }); var e = n(0), r = n(1), o = n(6), i = n(4), a = n(8), s = n(2), u = function(t) { function n(e, n) { var r = t.call(this, e, n) || this; return r.sparta = a.SpartaContext.getFromComponent(r), r.nowStore = r.sparta.stores.nowStore, r.when(function() { return r.timeLeft <= 0; }, function() { r.props.onDone && r.props.onDone(); }), r; } return e.__extends(n, t), Object.defineProperty(n.prototype, "timeLeft", { get: function() { var e = this.props, t = e.targetTime, n = e.timeDelta, r = this.nowStore.seconds; return "function" == typeof n ? n() : "number" == typeof t ? t - 1e3 * r : 0; }, enumerable: !0, configurable: !0 }), Object.defineProperty(n.prototype, "text", { get: function() { var e = this.props, t = e.format, n = e.doneText, r = this.timeLeft; return r > 0 || !n ? t(r) : n; }, enumerable: !0, configurable: !0 }), n.prototype.render = function() { return r.createElement(o.Text, { value: this.text, type: this.props.type, size: this.props.size, color: this.props.color, style: this.props.style }); }, n.defaultProps = { format: c }, n.contextTypes = a.SpartaContext.contextTypes, e.__decorate([ s.computed ], n.prototype, "timeLeft", null), e.__decorate([ s.computed ], n.prototype, "text", null), n = e.__decorate([ i.observer ], n); }(r.Component); function l(e) { return e < 10 ? "0" + e : e; } function c(e) { if (e < 0) return "00:00:00"; e = Math.floor(e / 1e3); var t = Math.floor(e / 3600); if (t > 24) { var n = Math.round(t / 24); return __(n > 1 ? "ID_SPARTA_NUM_DAYS" : "ID_SPARTA_NUM_DAY").replace("[DAYS]", n + ""); } var r = Math.floor(e / 60) % 60, o = e % 60; return l(t) + ":" + l(r) + ":" + l(o); } t.Countdown = u, t.simpleTimeFormat = c; }).call(this, n(3)); }, function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(1), i = n(5), a = n(19), s = function(e) { function t() { var t = null !== e && e.apply(this, arguments) || this; return t.getTheme = a.ThemeContext.getFromComponent(t), t; } return r.__extends(t, e), t.prototype.render = function() { var e = this.props, t = e.value, n = e.style, r = this.getTheme().checkbox; return o.createElement("surface", { style: i.merge2(r.checkbox(t), n) }); }, t.contextTypes = a.ThemeContext.contextTypes, t; }(o.Component); t.Checkbox = s; }, function(e, t, n) { "use strict"; (function(e) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(0), o = n(110), i = n(190), a = n(13), s = n(2), u = function(t) { function n() { var n = t.call(this, {}) || this, i = e.get("WWCE SupportStore"); return o.updateSource.listen(function(e) { i.debug("source", e), n.setState(r.__assign({}, n.getState(), { source: e })); }), a.gameStateStoreLoader.onLoad(function(e) { var t = a.nativePropertiesStore.hostingGame; s.reaction(function() { return { isMultiplayer: e.isMultiplayer, isOnPlayableLevel: e.isOnPlayableLevel }; }, function(o) { var a, s = o.isOnPlayableLevel, u = o.isMultiplayer; t && t.getInGameHelpContext ? a = t.getInGameHelpContext(s, u) : a = s ? u ? "mp_" + (e.server ? e.server.mapName : "").replace("mp_", "") : "sp_" + (e.levelName || "").split("/")[2] : ""; i.debug("contextForInGame", a.toLowerCase()), n.setState(r.__assign({}, n.getState(), { contextForInGame: a.toLowerCase() })); }); }), o.updateCategories.listen(function(e) { i.debug("categories", e.map(function(e) { return e.name; })), n.setState(r.__assign({}, n.getState(), { categories: e })); }), o.updateSelectedCategory.listen(function(e) { i.debug("selectedCategory", e), n.setState(r.__assign({}, n.getState(), { selectedCategory: e })); }), o.updateArticleId.listen(function(e) { i.debug("articleId", e), n.setState(r.__assign({}, n.getState(), { articleId: e })); }), o.updateLocation.listen(function(e) { i.debug("userLocation", e), n.setState(r.__assign({}, n.getState(), { userLocation: e })); }), o.updateContactDetails.listen(function(e, t) { i.debug("countryCode", e, "phoneNumber", t), n.setState(r.__assign({}, n.getState(), { countryCode: e, phoneNumber: t })); }), o.updateSelectedChannel.listen(function(e) { i.debug("selectedChannel", e && e.name), n.setState(r.__assign({}, n.getState(), { selectedChannel: e })); }), o.resetContextDetails.listen(function() { i.debug("source", void 0), n.setState(r.__assign({}, n.getState(), { source: void 0 })); }), n; } return r.__extends(n, t), n; }(i.Store); t.WwceSupportStore = new u(); }).call(this, n(15)); }, function(e, t) { e.exports = function(e) { if ("function" != typeof e) throw TypeError(e + " is not a function!"); return e; }; }, function(e, t) { var n = Math.ceil, r = Math.floor; e.exports = function(e) { return isNaN(e = +e) ? 0 : (e > 0 ? r : n)(e); }; }, function(e, t, n) { var r = n(52), o = n(453), i = n(344), a = n(342)("IE_PROTO"), s = function() {}, u = function() { var e, t = n(451)("iframe"), r = i.length; for (t.style.display = "none", n(454).appendChild(t), t.src = "javascript:", (e = t.contentWindow.document).open(), e.write("