Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
lexos minified
/*! BvS-LexOS - v1.0.0 - built: Thursday, March 31st, 2016, 2:20:34 PM */ ! function a(b, c, d) {
function e(g, h) {
if (!c[g]) {
if (!b[g]) {
var i = "function" == typeof require && require;
if (!h && i) return i(g, !0);
if (f) return f(g, !0);
var j = new Error("Cannot find module '" + g + "'");
throw j.code = "MODULE_NOT_FOUND", j
}
var k = c[g] = {
exports: {}
};
b[g][0].call(k.exports, function(a) {
var c = b[g][1][a];
return e(c ? c : a)
}, k, k.exports, a, b, c, d)
}
return c[g].exports
}
for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]);
return e
}({
1: [function(a, b, c) {
"use strict";
function d() {
return new Promise(function(a, b) {
try {
FB.getLoginStatus(function(c) {
return i(c, a, b)
})
} catch (c) {
b(c.getMessage())
}
})
}
function e() {
return new Promise(function(a, b) {
try {
FB.login(function(c) {
return i(c, a, b)
}, {
scope: "user_photos"
})
} catch (c) {
b(c.getMessage())
}
})
}
function f() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? 50 : arguments[0],
b = arguments.length <= 1 || void 0 === arguments[1] ? "" : arguments[1];
return new Promise(function(c, d) {
try {
var e = {
limit: a,
fields: "id,name,cover_photo,count,picture"
};
"" !== b && (e.after = b), FB.api("/me/albums", "GET", e, function(a) {
return h(a, c, d)
})
} catch (f) {
d(f.getMessage())
}
})
}
function g(a) {
var b = arguments.length <= 1 || void 0 === arguments[1] ? 100 : arguments[1],
c = arguments.length <= 2 || void 0 === arguments[2] ? "" : arguments[2];
return new Promise(function(d, e) {
try {
var f = "photos.limit(" + b + "){id,picture,images}";
"" !== c && (f = "photos.limit(" + b + ").after(" + c + "){id,picture,images}");
var g = {
fields: f
};
FB.api("/" + a, "GET", g, function(a) {
return h(a, d, e)
})
} catch (i) {
e(i.getMessage())
}
})
}
function h(a, b, c) {
return !a || a.error ? c(a) : void b(a)
}
function i(a, b, c) {
"connected" === a.status ? FB.api("/me", function(d) {
if (!d || d.error) return c(d);
var e = babelHelpers._extends({
user: d
}, a);
b(e)
}) : c(a)
}
c.__esModule = !0, c.loginStatus = d, c.login = e, c.getAlbums = f, c.getPhotos = g
}, {}],
2: [function(a, b, c) {
"use strict";
var d = {
ON_NAVIGATE_TO: "onNavigateTo",
ON_NAVIGATED_TO_SECTION: "onNavigatedToSection",
ON_NAVIGATE_TO_MODAL: "onNavigateToModal",
ON_NAVIGATE_FROM_MODAL: "onNavigateFromModal",
ON_VIEW_ANIMATE_IN_STARTED: "onViewAnimateInStarted",
ON_VIEW_ANIMATE_IN_COMPLETED: "onViewAnimateInCompleted",
ON_VIEW_ANIMATE_OUT_STARTED: "onViewAnimateOutStarted",
ON_VIEW_ANIMATE_OUT_COMPLETED: "onViewAnimateOutCompleted",
ON_VIEW_TYPE_REGULAR: "regular",
ON_VIEW_TYPE_MODAL: "modal",
ON_APP_STARTED: "onAppStarted",
ON_APP_VISIBILITY_CHANGED: "onAppVisibilityChanged",
ON_PRELOAD_COMPLETED: "onPreloadCompleted"
};
b.exports = d
}, {}],
3: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("./AppDispatcher"),
e = a("./AppConstants"),
f = babelHelpers.interopRequireDefault(e),
g = void 0,
h = void 0,
i = void 0,
j = void 0,
k = void 0,
l = !1,
m = !1,
n = void 0,
o = function() {
function a() {
var b = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];
babelHelpers.classCallCheck(this, a);
var c = {
languageCode: "en_us",
cdnUrl: "",
appUrl: ""
};
this.DEBUG_ID = "AppCore -- ", this.settings = _.defaults(b, c), g = [], this._initDispatcher(), this.initVisibilityCheck()
}
return a.prototype.addSection = function(a, b) {
g.push({
id: a,
section: b
}), h = g.length
}, a.prototype.getSection = function(a) {
for (var b = 0; h > b; b++)
if (g[b].id == a) return g[b].section;
return null
}, a.prototype.getSections = function() {
return g
}, a.prototype.start = function(a) {
j = a, this._showNextSection(), d.dispatch(f["default"].ON_APP_STARTED, {})
}, a.prototype._initDispatcher = function() {
var a = this;
this.dispatchToken = d.register(function(b) {
switch (b.type) {
case f["default"].ON_NAVIGATE_TO:
a._navigateTo(b.id, b.viewType);
break;
case f["default"].ON_VIEW_ANIMATE_OUT_COMPLETED:
b.viewType == f["default"].ON_VIEW_TYPE_MODAL ? a._handleModalAnimateOutCompleted(b.id, b.sectionId) : a._handleSectionAnimateOutCompleted(b.id);
break;
case f["default"].ON_VIEW_ANIMATE_IN_COMPLETED:
a._handleSectionAnimateInCompleted(b.id);
break;
case f["default"].ON_NAVIGATE_TO_MODAL:
a._navigateToModal(b.id);
break;
case f["default"].ON_NAVIGATE_FROM_MODAL:
a._navigateFromModal(b.id)
}
})
}, a.prototype._navigateTo = function(a) {
arguments.length <= 1 || void 0 === arguments[1] ? f["default"].ON_VIEW_TYPE_REGULAR : arguments[1];
if (!m) {
if (a != i.id) {
m = !0;
var b = i ? i.id : null;
j = a, i ? this._hideCurrentSection() : this._showNextSection(), d.dispatch(f["default"].ON_NAVIGATED_TO_SECTION, {
id: a,
prevId: b
})
}
null != k && k.hide()
}
}, a.prototype._handleSectionAnimateOutCompleted = function(a) {
i.id == a && this._showNextSection()
}, a.prototype._handleSectionAnimateInCompleted = function() {
arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0];
m = !1
}, a.prototype._showNextSection = function() {
var a = this.getSection(j);
void 0 != a ? (i = a, i.show()) : i = null
}, a.prototype._hideCurrentSection = function() {
i.hide()
}, a.prototype._navigateToModal = function(a) {
k && k.hide(), k = this.getSection(a), k.show()
}, a.prototype._navigateFromModal = function() {
k && k.hide()
}, a.prototype._handleModalAnimateOutCompleted = function(a, b) {
k && k.id == a && (k = null), i.id == j && i.navigateFromModal && i.navigateFromModal()
}, a.prototype.initVisibilityCheck = function() {
function a(a) {
var d = "visible",
e = "hidden",
f = {
focus: d,
focusin: d,
pageshow: d,
blur: e,
focusout: e,
pagehide: e
};
a = a || window.event, a.type in f ? a.target == window && c._handleDocumentVisibilityChange(f[a.type]) : c._handleDocumentVisibilityChange(this[b] ? "hidden" : "visible")
}
var b = "hidden",
c = this;
b in document ? document.addEventListener("visibilitychange", a) : (b = "mozHidden") in document ? document.addEventListener("mozvisibilitychange", a) : (b = "webkitHidden") in document ? document.addEventListener("webkitvisibilitychange", a) : (b = "msHidden") in document ? document.addEventListener("msvisibilitychange", a) : "onfocusin" in document && (document.onfocusin = document.onfocusout = a), window.onpageshow = window.onpagehide = window.onfocus = window.onblur = a, void 0 !== document[b] && a({
type: document[b] ? "blur" : "focus"
})
}, a.prototype._handleDocumentVisibilityChange = function(a) {
d.dispatch(f["default"].ON_APP_VISIBILITY_CHANGED, {
visible: "visible" == a
}), "hidden" == a ? this.muteAudio() : l || this.unmuteAudio()
}, a.prototype.initAudioPlayer = function() {
null == n && (n = new AudioPlayer(!1))
}, a.prototype.muteAudio = function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? !1 : arguments[0];
a && (l = !0), n && (n.muteAudio(), d.dispatch("onAudioStatusUpdated", {
muted: !0
}))
}, a.prototype.unmuteAudio = function() {
arguments.length <= 0 || void 0 === arguments[0] ? !1 : arguments[0];
l = !1, n && (n.unmuteAudio(), d.dispatch("onAudioStatusUpdated", {
muted: !1
}))
}, babelHelpers.createClass(a, [{
key: "currentSectionId",
get: function() {
return i ? i.id : null
}
}, {
key: "currentSection",
get: function() {
return i
}
}, {
key: "audioPlayer",
get: function() {
return n
}
}]), a
}();
c["default"] = o, b.exports = c["default"]
}, {
"./AppConstants": 2,
"./AppDispatcher": 4
}],
4: [function(a, b, c) {
"use strict";
function d(a) {
return k.register(a)
}
function e(a) {
k.unregister(a)
}
function f(a) {
return k.waitFor(a)
}
function g(a) {
var b = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
if (!a) throw new Error("You forgot to specify type.");
k.dispatch(babelHelpers._extends({
type: a
}, b))
}
function h(a, b) {
var c = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2],
d = b.request,
e = b.success,
f = b.failure;
g(d, c), a.then(function(a) {
return g(e, babelHelpers._extends({}, c, {
response: a
}))
}, function(a) {
return g(f, babelHelpers._extends({}, c, {
error: a
}))
})
}
c.__esModule = !0, c.register = d, c.unregister = e, c.waitFor = f, c.dispatch = g, c.dispatchAsync = h;
var i = a("./Dispatcher"),
j = babelHelpers.interopRequireDefault(i),
k = new j["default"]
}, {
"./Dispatcher": 5
}],
5: [function(a, b, c) {
"use strict";
var d = 1,
e = "ID_",
f = function() {
function a() {
babelHelpers.classCallCheck(this, a), this._callbacks = {}, this._isPending = {}, this._isHandled = {}, this._isDispatching = !1, this._pendingPayload = null
}
return a.prototype.register = function(a) {
var b = e + d++;
return this._callbacks[b] = a, b
}, a.prototype.unregister = function(a) {
delete this._callbacks[a]
}, a.prototype.waitFor = function(a) {
for (var b = 0; b < a.length; b++) {
var c = a[b];
this._isPending[c] || this._invokeCallback(c)
}
}, a.prototype.dispatch = function(a) {
this._startDispatching(a);
try {
for (var b in this._callbacks) this._isPending[b] || this._invokeCallback(b)
} finally {
this._stopDispatching()
}
}, a.prototype.isDispatching = function() {
return this._isDispatching
}, a.prototype._invokeCallback = function(a) {
this._isPending[a] = !0, this._callbacks[a](this._pendingPayload), this._isHandled[a] = !0
}, a.prototype._startDispatching = function(a) {
for (var b in this._callbacks) this._isPending[b] = !1, this._isHandled[b] = !1;
this._pendingPayload = a, this._isDispatching = !0
}, a.prototype._stopDispatching = function() {
this._pendingPayload = null, this._isDispatching = !1
}, a
}();
b.exports = f
}, {}],
6: [function(a, b, c) {
"use strict";
function d(a) {
try {
var b = window[a],
c = "__storage__test";
return b.setItem(c, c), b.removeItem(c), b
} catch (d) {
return !1
}
}
c.__esModule = !0;
var e = "al_los",
f = void 0,
g = function() {
function a(b) {
var c = arguments.length <= 1 || void 0 === arguments[1] ? null : arguments[1];
babelHelpers.classCallCheck(this, a), f = null, f = d(b), null != c && (e = c)
}
return a.prototype.set = function(a, b) {
return f ? void f.setItem(e + "_" + a, b) : !1
}, a.prototype.get = function(a) {
return f ? f.getItem(e + "_" + a) : null
}, a.prototype.remove = function(a) {
f.removeItem(e + "_" + a)
}, a
}();
c["default"] = g, b.exports = c["default"]
}, {}],
7: [function(a, b, c) {
"use strict";
function d(a, b, c) {
c = "undefined" == typeof c ? "0" : c + "", a += "";
var d = "";
for ("-" === a.charAt(0) && (d = "-", a = a.slice(1)); a.length < b;) a = c + a;
return d + a
}
function e(a) {
var b = a.parent(),
c = b.outerHeight(!0),
d = b.outerWidth(!0),
e = 0,
f = a.height(),
g = 0,
h = 0,
i = 0,
j = 0;
void 0 != a.attr("data-og-width") ? e = a.attr("data-og-width") : (e = a.width(), a.attr("data-og-width", e)), void 0 != a.attr("data-og-height") ? f = a.attr("data-og-height") : (f = a.outerHeight(!0), a.attr("data-og-height", f));
var k = c / f,
l = d / e;
k > l ? (h = c, g = Math.ceil(k * e), i = Math.round((d - g) / 2)) : (g = d, h = Math.ceil(l * f), j = Math.round((c - h) / 2)), a.css({
width: g,
height: h,
top: j,
left: i
})
}
function f(a, b, c) {
if (c) {
var d = new Date;
d.setTime(d.getTime() + 24 * c * 60 * 60 * 1e3);
var e = "; expires=" + d.toGMTString()
} else {
var d = new Date;
d.setTime(d.getTime() + 1e4);
var e = "; expires=" + d.toGMTString()
}
document.cookie = a + "=" + b + e + "; path=/"
}
function g(a) {
for (var b = a + "=", c = document.cookie.split(";"), d = 0; d < c.length; ++d) {
for (var e = c[d];
" " == e.charAt(0);) e = e.substring(1, e.length);
if (0 == e.indexOf(b)) return e.substring(b.length, e.length)
}
return null
}
c.__esModule = !0, c.zeroFill = d, c.resizeBackground = e, c.createCookie = f, c.readCookie = g
}, {}],
8: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../AppDispatcher"),
e = a("../AppConstants"),
f = babelHelpers.interopRequireDefault(e),
g = function() {
function a() {
babelHelpers.classCallCheck(this, a), this._id = "AppViewController", this.DEBUG_ID = "AppViewController: ", this._mainView = null, this._viewType = f["default"].ON_VIEW_TYPE_REGULAR, this._animatingIn = !1, this._animatingOut = !1, createjs.EventDispatcher.initialize(this)
}
return a.prototype._init = function() {
this._mainView.hide(!1)
}, a.prototype._initListeners = function() {
var a = this;
this._avcToken && d.unregister(this._avcToken), this._avcToken = d.register(function(b) {
switch (b.type) {
case "onAnimateInCompleted":
a._handleMainViewAnimateInCompleted();
break;
case "onAnimateOutCompleted":
a._handleMainViewAnimateOutCompleted()
}
})
}, a.prototype._removeListeners = function() {
null != this._avcToken && (d.unregister(this._avcToken), this._avcToken = null)
}, a.prototype.show = function() {
this._initListeners(), this._mainView.show()
}, a.prototype._handleMainViewAnimateInCompleted = function(a) {
this._handleAnimateInCompleted()
}, a.prototype._handleAnimateInCompleted = function(a) {
d.dispatch(f["default"].ON_VIEW_ANIMATE_IN_COMPLETED, {
id: this._id,
viewType: this._viewType
})
}, a.prototype.hide = function() {
this._mainView.hide()
}, a.prototype._handleMainViewAnimateOutCompleted = function(a) {
this._removeListeners(), this._handleAnimateOutCompleted()
}, a.prototype._handleAnimateOutCompleted = function() {
d.dispatch(f["default"].ON_VIEW_ANIMATE_OUT_COMPLETED, {
id: this._id,
viewType: this._viewType
})
}, babelHelpers.createClass(a, [{
key: "id",
get: function() {
return this._id
}
}, {
key: "viewType",
get: function() {
return this._viewType
}
}, {
key: "mainView",
get: function() {
return this._mainView
}
}]), a
}();
c["default"] = g, b.exports = c["default"]
}, {
"../AppConstants": 2,
"../AppDispatcher": 4
}],
9: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../AppDispatcher"),
e = void 0,
f = void 0,
g = !1,
h = void 0,
i = void 0,
j = void 0,
k = void 0,
l = void 0,
m = void 0,
n = function() {
function a() {
var b = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];
babelHelpers.classCallCheck(this, a), e = this;
var c = {
sizeWidth: 640,
sizeHeight: 480,
top: 0,
left: 0,
callbacks: {},
uniquePrefix: (new Date).getTime()
};
f = _.defaults(b, c), Modernizr.getusermedia && (g = !0)
}
return a.prototype.init = function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0];
if (null != a) {
h = a, k = $('<div class="alHtmlWebcamContainer">');
var b = $('<video id="alHtmlWebcamVideo" width="' + f.sizeWidth + '" height="' + f.sizeHeight + '" autoplay></video>');
b.css({
transform: "scaleX(-1)",
"-webkit-transform": "scaleX(-1)",
"-ms-transform": "scaleX(-1)",
"-moz-transform": "scaleX(-1)",
"-o-transform": "scaleX(-1)"
}), k.append(b), k.css({
position: "absolute",
top: f.top,
left: f.left
}), i = b[0], a.append(k);
var c = {
video: !0
};
navigator.getUserMedia ? navigator.getUserMedia(c, function(a) {
j = a, i.src = a, i.play(), e._handleWebcamReady()
}, function(a) {
e._handleWebcamError()
}) : navigator.webkitGetUserMedia ? navigator.webkitGetUserMedia(c, function(a) {
j = a, i.src = window.URL.createObjectURL(a), i.play(), e._handleWebcamReady()
}, function(a) {
e._handleWebcamError()
}) : navigator.mozGetUserMedia && navigator.mozGetUserMedia(c, function(a) {
j = a, i.src = window.URL.createObjectURL(a), i.play(), e._handleWebcamReady()
}, function(a) {
e._handleWebcamError()
})
} else d.dispatch("onWebcamInitError")
}, a.prototype._handleWebcamReady = function() {}, a.prototype._handleWebcamError = function() {
d.dispatch("onWebcamInitError")
}, a.prototype.takePicture = function() {
Modernizr.canvas && (null == l ? (l = $('<canvas id="alWebcamCanvas" class="picture-canvas" width="' + f.sizeWidth + '" height="' + f.sizeHeight + '">'), l.css({
position: "absolute",
top: 0,
left: 0
}), h.append(l), m = l[0].getContext("2d"), l.hide()) : m.clearRect(0, 0, f.sizeWidth, f.sizeHeight), this._takeHtmlPicture(), this._onPictureTaken())
}, a.prototype._takeHtmlPicture = function() {
m.save(), m.setTransform(-1, 0, 0, 1, f.sizeWidth, 0), m.drawImage(i, 0, 0, f.sizeWidth, f.sizeHeight), m.restore()
}, a.prototype._onPictureTaken = function() {
d.dispatch("onWebcamPictureTaken")
}, a.prototype.stopWebcam = function() {
g && null != j && (j.getTracks && j.removeTrack ? (j.getTracks()[0].stop(), j.removeTrack(j.getTracks()[0])) : j.stop(), i.pause(), j = null)
}, babelHelpers.createClass(a, [{
key: "imageData",
get: function() {
return m.getImageData(0, 0, f.sizeWidth, f.sizeHeight)
}
}, {
key: "imageDataURL",
get: function() {
return l[0].toDataURL()
}
}]), a
}();
c["default"] = n, b.exports = c["default"]
}, {
"../AppDispatcher": 4
}],
10: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../AppDispatcher"),
e = function() {
function a() {
babelHelpers.classCallCheck(this, a), this._container = null, this._animatingIn = !1, this._animatingOut = !1, createjs.EventDispatcher.initialize(this)
}
return a.prototype.show = function() {
this._animatingIn || (this._container.show(), this._animateIn())
}, a.prototype._animateIn = function() {
d.dispatch("onAnimateInStarted"), this._animatingIn = !0
}, a.prototype._animateInCompleted = function() {
this._animatingIn = !1, d.dispatch("onAnimateInCompleted")
}, a.prototype.hide = function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0];
this._animatingOut || (a ? this._animateOut() : this._container.hide())
}, a.prototype._animateOut = function() {
d.dispatch("onAnimateOutStarted"), this._animatingOut = !0
}, a.prototype._animateOutCompleted = function() {
this._animatingOut = !1, this._container.hide(), d.dispatch("onAnimateOutCompleted")
}, babelHelpers.createClass(a, [{
key: "container",
get: function() {
return this._container
}
}, {
key: "animatingIn",
get: function() {
return this._animatingIn
}
}, {
key: "animatingOut",
get: function() {
return this._animatingOut
}
}]), a
}();
c["default"] = e, b.exports = c["default"]
}, {
"../AppDispatcher": 4
}],
11: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = (a("../AppDispatcher"), function() {
function a(b, c) {
var d = arguments.length <= 2 || void 0 === arguments[2] ? !0 : arguments[2],
e = arguments.length <= 3 || void 0 === arguments[3] ? !0 : arguments[3];
return babelHelpers.classCallCheck(this, a), this._video = $('<video width="100%" height="100%" ' + (d ? "autoPlay" : "") + " " + (e ? "loop" : "") + ' poster="' + b + c + '_poster.jpg">'), this._video.append('<source src="' + b + c + '.mp4" type="video/mp4">'), this._video.append('<source src="' + b + c + '.webm" type="video/webm; codecs\'vorbis,vp8\'">'), this._video
}
return babelHelpers.createClass(a, [{
key: "videoElement",
get: function() {
return this._video
}
}]), a
}());
c["default"] = d, b.exports = c["default"]
}, {
"../AppDispatcher": 4
}],
12: [function(a, b, c) {
"use strict";
var d = a("./site/SiteCore"),
e = babelHelpers.interopRequireDefault(d),
f = a("./site/SiteConstants"),
g = (babelHelpers.interopRequireDefault(f), a("./lib/core/Storage")),
h = babelHelpers.interopRequireDefault(g);
window.debugObject = {};
var i = new e["default"](appSettings),
j = new h["default"]("localStorage");
window.appCore = i, window.storage = j, $(document).ready(function() {
i.initApp()
})
}, {
"./lib/core/Storage": 6,
"./site/SiteConstants": 13,
"./site/SiteCore": 14
}],
13: [function(a, b, c) {
"use strict";
var d = a("./../lib/core/AppConstants"),
e = babelHelpers.interopRequireDefault(d),
f = {
SECTION_ID_GAME: "game",
SECTION_ID_HELP: "help",
SECTION_ID_FILES: "files",
SECTION_ID_LOGS: "logs",
SECTION_ID_HOME: "home",
SECTION_ID_USER: "user",
SECTION_ID_LEGAL: "legal",
SECTION_ID_START_UP: "startUp",
SECTION_ID_BACKGROUND: "background",
ON_PRELOAD_COMPLETED: "onPreloadCompleted",
PUZZLE_STATE_IN_PROGRESS: 0,
PUZZLE_STATE_SET_COMPLETED: 1,
PUZZLE_STATE_ALL_SOLVED: 2
};
b.exports = _.defaults(f, e["default"])
}, {
"./../lib/core/AppConstants": 2
}],
14: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../lib/core/AppDispatcher"),
e = a("../lib/core/Utils"),
f = a("../lib/core/AppCore"),
g = babelHelpers.interopRequireDefault(f),
h = a("./SiteConstants"),
i = babelHelpers.interopRequireDefault(h),
j = a("./controllers/GameViewController"),
k = babelHelpers.interopRequireDefault(j),
l = a("./controllers/StartUpViewController"),
m = babelHelpers.interopRequireDefault(l),
n = a("./controllers/HelpViewController"),
o = babelHelpers.interopRequireDefault(n),
p = a("./controllers/FilesViewController"),
q = babelHelpers.interopRequireDefault(p),
r = a("./controllers/FooterController"),
s = babelHelpers.interopRequireDefault(r),
t = a("./controllers/PreloaderController"),
u = babelHelpers.interopRequireDefault(t),
v = a("./controllers/BackgroundViewController"),
w = babelHelpers.interopRequireDefault(v),
x = a("./controllers/LogsViewController"),
y = babelHelpers.interopRequireDefault(x),
z = a("./controllers/UserViewController"),
A = babelHelpers.interopRequireDefault(z),
B = a("./controllers/LegalViewController"),
C = babelHelpers.interopRequireDefault(B),
D = a("../lib/core/Storage"),
E = (babelHelpers.interopRequireDefault(D), void 0),
F = void 0,
G = void 0,
H = void 0,
I = void 0,
J = void 0,
K = void 0,
L = void 0,
M = void 0,
N = void 0,
O = void 0,
P = void 0,
Q = void 0,
R = void 0,
S = !0,
T = null,
U = !1,
V = void 0,
W = void 0,
X = void 0,
Y = void 0,
Z = function(a) {
function b() {
var c = this,
e = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];
babelHelpers.classCallCheck(this, b), a.call(this, e), this.DEBUG_ID = "SiteCore: ", Q = this, this.dispatchToken = d.register(function(a) {
switch (a.type) {
case i["default"].ON_PRELOAD_COMPLETED:
Modernizr.touch || c.initAudioPlayer(), Q.start(i["default"].SECTION_ID_START_UP);
break;
case i["default"].ON_NAVIGATED_TO_SECTION:
a.prevId == i["default"].SECTION_ID_START_UP && (K.show(), M.show()), a.id == i["default"].SECTION_ID_GAME && K.deactivateActiveBtns(), K.setActiveBtn(a.id);
break;
case "onStartUpContinue":
S ? d.dispatch(i["default"].ON_NAVIGATE_TO, {
id: i["default"].SECTION_ID_HELP
}) : d.dispatch(i["default"].ON_NAVIGATE_TO, {
id: i["default"].SECTION_ID_GAME
});
break;
case "onAnimateToContainment":
d.dispatch(i["default"].ON_NAVIGATE_TO, {
id: i["default"].SECTION_ID_FILES
});
break;
case "onAudioTriggered":
c.audioPlayer && c.audioPlayer.playAudio(a.id, a.volume, a.vo, a.stopOtherVOs);
break;
case "onCognitivePercentUpdated":
K.updateCognitive(Math.floor(a.per / window.puzzleData.length * 100));
break;
case "onAudioStatusUpdatedByUser":
a.muted ? c.muteAudio(!0) : c.unmuteAudio();
break;
case "onLoggedM":
U = !0;
break;
case "onAnimateToContainment":
}
})
}
return babelHelpers.inherits(b, a), b.prototype.initApp = function() {
E = $(window), F = $("#wrapper"), V = $("#browserMessageView"), W = V.find(".unsupported-browser"), X = V.find(".rotate-device"), Y = V.find(".enlarge-browser");
var a = !1;
Detector.webgl && !appCore.settings.unsupportedBrowser || (a = !0, appCore.settings.unsupportedBrowser = !0), a && (V.show(), W.show()), E.on("orientationchange", function() {
this._detectOrientation()
}.bind(this)), this._detectOrientation(), this._initData()
}, b.prototype._initData = function() {
$.ajax({
url: "files/data/" + appSettings.languageCode + ".json",
dataType: "json"
}).done(function(a) {
R = a, this._initControllers()
}.bind(this))
}, b.prototype._initControllers = function() {
T = storage.get("user_id"), null == T && (T = e.zeroFill(Math.floor(1e4 * Math.random()), 6, "0"), storage.set("user_id", T)), this.resize(), H = new m["default"], G = new k["default"], I = new q["default"], P = new C["default"], O = new A["default"], J = new o["default"], K = new s["default"], L = new u["default"], M = new w["default"], N = new y["default"], this.addSection(i["default"].SECTION_ID_START_UP, H), this.addSection(i["default"].SECTION_ID_FILES, I), this.addSection(i["default"].SECTION_ID_USER, O), this.addSection(i["default"].SECTION_ID_GAME, G), this.addSection(i["default"].SECTION_ID_HELP, J), this.addSection(i["default"].SECTION_ID_LOGS, N), this.addSection(i["default"].SECTION_ID_LEGAL, P), this.resize(), $(window).on("throttledresize", this.resize.bind(this)), L.loadAssets()
}, b.prototype.initAudioPlayer = function() {
a.prototype.initAudioPlayer.call(this), this.audioPlayer.playBgLoop("audio_bg_ambience", 1)
}, b.prototype.resize = function() {
this.settings.windowWidth = E.width(), this.settings.windowHeight = E.height(), G && G.resize(), M && M.resize(), H && H.resize(), K && K.resize(), this.settings.unsupportedBrowser || "pc" != this.settings.device || (this.settings.windowWidth < 900 || this.settings.windowHeight < 600 ? (V.show(), Y.show()) : (V.hide(), Y.hide()))
}, b.prototype._detectOrientation = function() {
switch (window.orientation) {
case 0:
case 180:
this.settings.unsupportedBrowser || "mobile" != this.settings.device || (V.hide(), X.hide());
break;
case 90:
case -90:
this.settings.unsupportedBrowser || "mobile" != this.settings.device || (V.show(), X.show())
}
}, babelHelpers.createClass(b, [{
key: "userId",
get: function() {
return T
}
}, {
key: "languageData",
get: function() {
return R
}
}, {
key: "gameViewController",
get: function() {
return G
}
}, {
key: "backgroundViewController",
get: function() {
return M
}
}, {
key: "userViewController",
get: function() {
return O
}
}, {
key: "logsViewController",
get: function() {
return N
}
}]), b
}(g["default"]);
c["default"] = Z, b.exports = c["default"]
}, {
"../lib/core/AppCore": 3,
"../lib/core/AppDispatcher": 4,
"../lib/core/Storage": 6,
"../lib/core/Utils": 7,
"./SiteConstants": 13,
"./controllers/BackgroundViewController": 15,
"./controllers/FilesViewController": 16,
"./controllers/FooterController": 17,
"./controllers/GameViewController": 18,
"./controllers/HelpViewController": 19,
"./controllers/LegalViewController": 20,
"./controllers/LogsViewController": 21,
"./controllers/PreloaderController": 23,
"./controllers/StartUpViewController": 25,
"./controllers/UserViewController": 26
}],
15: [function(a, b, c) {
"use strict";
function d() {
$.ajax({
url: "http://api.openweathermap.org/data/2.5/weather?lat=" + l.latitude + "&lon=" + l.longitude + "&appid=3517f6b8707910fe43a2edc499da2eb1",
dataType: "json"
}).done(function(a) {
var b = a.main.temp,
c = Math.round(9 * b / 5 - 459.67),
d = 800;
a.weather[0] && (d = a.weather[0].id), m._mainView.setTemperature(c, d)
})
}
function e() {
var a = new Date;
m._mainView.setTime(a)
}
c.__esModule = !0;
var f = (a("../../lib/core/AppDispatcher"), a("../SiteConstants")),
g = babelHelpers.interopRequireDefault(f),
h = a("../../lib/core/controllers/AppViewController"),
i = babelHelpers.interopRequireDefault(h),
j = a("../views/BackgroundView"),
k = babelHelpers.interopRequireDefault(j),
l = {
latitude: 34.156943,
longitude: -118.480545
},
m = void 0,
n = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "BackgroundViewController: ", this._mainView = new k["default"], this._id = g["default"].SECTION_ID_BACKGROUND, m = this, "mobile" != appCore.settings.device && (d(), e()), this._init()
}
return babelHelpers.inherits(b, a), b.prototype.show = function() {
this._mainView.show(), "mobile" != appCore.settings.device && this.startAnimation()
}, b.prototype.startAnimation = function() {
this.render()
}, b.prototype.render = function() {
requestAnimationFrame(function() {
this.render()
}.bind(this)), e()
}, b.prototype.resize = function() {
m._mainView.resize()
}, b
}(i["default"]);
c["default"] = n, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../views/BackgroundView": 28
}],
16: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = a("../SiteConstants"),
f = babelHelpers.interopRequireDefault(e),
g = a("../../lib/core/controllers/AppViewController"),
h = babelHelpers.interopRequireDefault(g),
i = a("../views/FilesView"),
j = babelHelpers.interopRequireDefault(i),
k = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "FilesViewController: ", this._mainView = new j["default"], this._id = f["default"].SECTION_ID_FILES, this._init()
}
return babelHelpers.inherits(b, a), b.prototype._initListeners = function() {
a.prototype._initListeners.call(this), this._mainView.closeBtn.on("click", this._handleCloseBtnClicked.bind(this))
}, b.prototype._handleCloseBtnClicked = function() {
d.dispatch(f["default"].ON_NAVIGATE_TO, {
id: f["default"].SECTION_ID_GAME
})
}, b
}(h["default"]);
c["default"] = k, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../views/FilesView": 29
}],
17: [function(a, b, c) {
"use strict";
function d() {
i.dispatch("onAudioStatusUpdatedByUser", {
muted: !0
})
}
function e() {
i.dispatch("onAudioStatusUpdatedByUser", {
muted: !1
})
}
function f() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0];
a ? (E = !0, B.hide(), C.show()) : (E = !1, B.show(), C.hide())
}
function g() {
TweenMax.to(o, .4, {
top: 0
})
}
function h() {
"mobile" == appCore.settings.device && TweenMax.to(o, .4, {
top: "105%"
})
}
c.__esModule = !0;
var i = a("../../lib/core/AppDispatcher"),
j = a("../SiteConstants"),
k = babelHelpers.interopRequireDefault(j),
l = !1,
m = void 0,
n = void 0,
o = void 0,
p = void 0,
q = void 0,
r = void 0,
s = void 0,
t = void 0,
u = void 0,
v = void 0,
w = void 0,
x = void 0,
y = void 0,
z = void 0,
A = void 0,
B = void 0,
C = void 0,
D = void 0,
E = !1,
F = function() {
function a() {
if (babelHelpers.classCallCheck(this, a), m = $("#footer"), n = m.find("#footerUserInfo"), o = $("#footerButtons"), p = o.find("#footerLegalBtn"), q = o.find("#footerHelpBtn"), r = o.find("#footerFilesBtn"), s = o.find("#footerLogsBtn"), t = o.find("#footerUserBtn"), o.find(".footer-button").on("mouseenter", function() {
i.dispatch("onAudioTriggered", {
id: "audio_btn_over",
volume: 1
})
}), D = o.find(".footer-user-notification"), D.hide(), A = o.find("#footerAudioBtn"), B = A.find(".mute-btn"), C = A.find(".unmute-btn"), C.hide(), y = m.find(".fui-percentage-text"), z = m.find(".fui-cognition"), "mobile" == appCore.settings.device) {
TweenMax.set(o, {
top: "105%"
}), u = m.find("#footerMobileHomeBtn"), v = m.find("#footerMobileMenuBtn"), w = o.find("#footerCloseMenuBtn"), p.find(".footer-button-text").css("font-size", appCore.languageData.footer.legal.mobileSize), q.find(".footer-button-text").css("font-size", appCore.languageData.footer.help.mobileSize), r.find(".footer-button-text").css("font-size", appCore.languageData.footer.files.mobileSize), s.find(".footer-button-text").css("font-size", appCore.languageData.footer.logs.mobileSize), t.find(".footer-button-text").css("font-size", appCore.languageData.footer.user.mobileSize);
var b = p.height(),
c = Math.round((b - 31) / 2);
o.find(".footer-button-text").css("margin-top", c), o.find(".footer-button-icon").css("margin-top", Math.round((b - 49) / 2))
}
var d = p.height(),
e = p.find(".footer-button-text"),
f = e.height(),
g = Math.round((d - f) / 2);
e.css("margin-top", g);
var h = q.find(".footer-button-text");
f = h.height(), g = Math.round((d - f) / 2), h.css("margin-top", g);
var j = t.find(".footer-button-text");
f = j.height(), g = Math.round((d - f) / 2), j.css("margin-top", g);
var k = r.find(".footer-button-text");
f = k.height(), g = Math.round((d - f) / 2), k.css("margin-top", g);
var l = s.find(".footer-button-text");
f = l.height(), g = Math.round((d - f) / 2), l.css("margin-top", g), n.find(".fui-beta-tester").html(appCore.languageData.footer.betaTester.value.replace("%X%", appCore.userId)), this._initListeners(), this.hide()
}
return a.prototype._initListeners = function() {
p.on("click", function(a) {
h(), i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), i.dispatch(k["default"].ON_NAVIGATE_TO, {
id: k["default"].SECTION_ID_LEGAL
})
}), q.on("click", function(a) {
h(), i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), i.dispatch(k["default"].ON_NAVIGATE_TO, {
id: k["default"].SECTION_ID_HELP
})
}), r.on("click", function(a) {
h(), i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), i.dispatch(k["default"].ON_NAVIGATE_TO, {
id: k["default"].SECTION_ID_FILES
})
}), s.on("click", function(a) {
h(), i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), i.dispatch(k["default"].ON_NAVIGATE_TO, {
id: k["default"].SECTION_ID_LOGS
})
}), t.on("click", function(a) {
h(), i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), i.dispatch(k["default"].ON_NAVIGATE_TO, {
id: k["default"].SECTION_ID_USER
})
}), A.on("click", function(a) {
i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), E ? e() : d()
}), "mobile" == appCore.settings.device && (u.on("click", function(a) {
i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), i.dispatch(k["default"].ON_NAVIGATE_TO, {
id: k["default"].SECTION_ID_GAME
})
}), v.on("click", function(a) {
i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), g()
}), w.on("click", function(a) {
i.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), h()
})), i.register(function(a) {
switch (a.type) {
case "onAudioStatusUpdated":
f(a.muted);
break;
case "onShowUserNotification":
D.show();
break;
case "onHideUserNotification":
D.hide()
}
})
}, a.prototype.show = function() {
l || (l = !0, m.show(), TweenMax.fromTo(m, .4, {
y: "+=100",
immediateRender: !0
}, {
y: 0,
ease: Power3.easeOut
}))
}, a.prototype.hide = function() {
l = !1, TweenMax.fromTo(m, .4, {
y: 0,
immediateRender: !0
}, {
y: "+=100",
ease: Power3.easeOut,
onComplete: function() {
m.hide()
}
})
}, a.prototype.deactivateActiveBtns = function() {
x && x.removeClass("active")
}, a.prototype.setActiveBtn = function(a) {
x && x.removeClass("active");
var b = null;
switch (a) {
case k["default"].SECTION_ID_LEGAL:
b = p;
break;
case k["default"].SECTION_ID_HELP:
b = q;
break;
case k["default"].SECTION_ID_FILES:
b = r;
break;
case k["default"].SECTION_ID_LOGS:
b = s;
break;
case k["default"].SECTION_ID_USER:
b = t
}
null != b && (x = b, b.addClass("active"))
}, a.prototype.updateCognitive = function(a) {
y.html(a + "%")
}, a.prototype.resize = function() {
appCore.settings.windowWidth < 1100 ? z.hide() : z.show(), "mobile" == appCore.settings.device && "text" != $(document.activeElement).attr("type") && m.css("top", appCore.settings.windowHeight - 40)
}, a
}();
c["default"] = F, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../SiteConstants": 13
}],
18: [function(a, b, c) {
"use strict";
function d() {
$.ajax({
url: "puzzleData.php",
dataType: "json"
}).done(function(a) {
window.puzzleData = a.puzzleData, v = a.puzzleData, w = v.length;
for (var b = 0; w > b; b++) v[b].id = b, void 0 != v[b].tiles && x++;
h.dispatch("onPuzzleDataLoaded"), H = !0, t.checkIfPuzzlePiecesAreLoaded()
})
}
function e(a) {
for (var b = 0; w > b; b++)
if (Number(v[b].id) == Number(a)) return v[b];
return !1
}
function f(a) {
a >= w - 1 ? (z = !0, u = k["default"].PUZZLE_STATE_ALL_SOLVED) : a >= x - 1 && (u = k["default"].PUZZLE_STATE_SET_COMPLETED)
}
function g() {
B += (new Date).getTime() - A
}
c.__esModule = !0;
var h = a("../../lib/core/AppDispatcher"),
i = a("../../lib/core/Utils"),
j = a("../SiteConstants"),
k = babelHelpers.interopRequireDefault(j),
l = a("../../lib/core/controllers/AppViewController"),
m = babelHelpers.interopRequireDefault(l),
n = a("./SceneController"),
o = babelHelpers.interopRequireDefault(n),
p = a("../views/GameView"),
q = babelHelpers.interopRequireDefault(p),
r = a("../models/PuzzleData"),
s = (babelHelpers.interopRequireDefault(r), void 0),
t = void 0,
u = k["default"].PUZZLE_STATE_IN_PROGRESS,
v = void 0,
w = 0,
x = 0,
y = 0,
z = !1,
A = void 0,
B = void 0,
C = void 0,
D = !1,
E = !1,
F = !1,
G = !1,
H = !1,
I = function(a) {
function b() {
var c = this;
babelHelpers.classCallCheck(this, b), a.call(this), t = this, this.DEBUG_ID = "GameViewController: ", this._mainView = new q["default"], this._id = k["default"].SECTION_ID_GAME, s = new o["default"],
s.renderCallback = this._handleSceneRendered.bind(this), h.register(function(a) {
switch (a.type) {
case "onLoadPuzzleModelCompleted":
G = !0, c.checkIfPuzzlePiecesAreLoaded();
break;
case "onPuzzleStarted":
c._handlePuzzleStarted();
break;
case "onPuzzleInProgress":
c._handlePuzzleInProgress(a);
break;
case "onPuzzleSolved":
c._handlePuzzleSolved(a.id);
break;
case "onNewPuzzleBtnClicked":
if (u == k["default"].PUZZLE_STATE_SET_COMPLETED || u == k["default"].PUZZLE_STATE_ALL_SOLVED) h.dispatch(k["default"].ON_NAVIGATE_TO, {
id: k["default"].SECTION_ID_LOGS
});
else {
var b = y + 1;
c._mainView.hideGameSolved(), s.showNewPuzzle(e(b)), c._mainView.resetGameStatusMessage(), c._mainView.resetCounter()
}
break;
case "onShareTWClicked":
c._shareOnTwitter();
break;
case "onShareFBClicked":
c._shareOnFacebook();
break;
case "onSceneAnimateOutCompleted":
c._mainView.hide(!0);
break;
case "onSceneAnimateInCompleted":
F = !0, A = (new Date).getTime(), s.puzzleView.puzzleFinished || c._mainView.showCounter();
break;
case "onLogsViewItemClicked":
c._mainView.hideGameSolved(), s.showNewPuzzle(e(a.puzzleId)), c._mainView.resetGameStatusMessage();
break;
case "onPuzzleIdledTooLong":
a.idleMessage ? c._mainView.showGameStatusMessage(appCore.languageData.puzzleView.statusIdle.value, appCore.languageData.puzzleView.statusIdle.size) : c._showPuzzleTip();
break;
case "onMoveCountUpdated":
c._mainView.updateMoveCount(a.moveCount)
}
}), this._init()
}
return babelHelpers.inherits(b, a), b.prototype._init = function() {
a.prototype._init.call(this), d()
}, b.prototype._initCheat = function() {
$(document).on("keydown", function(a) {
a.shiftKey && 87 == a.which && s.puzzleView.showSolvedPuzzle()
}.bind(this))
}, b.prototype.checkIfPuzzlePiecesAreLoaded = function() {
G && H && this.initPuzzle()
}, b.prototype.initPuzzle = function() {
var a = storage.get("last_puzzle");
if (null != a && (a = Number(a)), null != a) {
w - 1 > a ? (y = Number(a), h.dispatch("onCognitivePercentUpdated", {
per: y + 1
})) : (z = !0, u = k["default"].PUZZLE_STATE_ALL_SOLVED, y = Math.floor(Math.random() * w), h.dispatch("onCognitivePercentUpdated", {
per: w
}));
var b = Number(y) + 1;
b > x - 1 && (b = x - 1), s.showNewPuzzle(e(b))
} else y = -1, s.showNewPuzzle(e(0)), h.dispatch("onCognitivePercentUpdated", {
per: 0
});
this._mainView.resetGameStatusMessage()
}, b.prototype.show = function() {
a.prototype.show.call(this), s.start(), s.show()
}, b.prototype.hide = function() {
F = !1, 0 == z && g(), s.hide()
}, b.prototype._handleMainViewAnimateOutCompleted = function(b) {
s.stop(), a.prototype._handleMainViewAnimateOutCompleted.call(this, b)
}, b.prototype.resize = function() {
s && s.resize()
}, b.prototype._showPuzzleTip = function() {
var a = "",
b = "18px";
"binary" == s.puzzleView.puzzleData.type ? (a = appCore.languageData.puzzleView.tipBinary.value, b = appCore.languageData.puzzleView.tipBinary.size) : "symbol" == s.puzzleView.puzzleData.type ? (a = appCore.languageData.puzzleView.tipSymbol.value, b = appCore.languageData.puzzleView.tipSymbol.size) : "color" == s.puzzleView.puzzleData.type ? (a = appCore.languageData.puzzleView.tipColor.value, b = appCore.languageData.puzzleView.tipColor.size) : (a = appCore.languageData.puzzleView.tipPattern.value, b = appCore.languageData.puzzleView.tipPattern.size), this._mainView.showGameStatusMessage(a, b, .5)
}, b.prototype._handlePuzzleStarted = function() {
A = (new Date).getTime(), B = 0, F = !0, D = !1, E = !1;
var a = appCore.languageData.puzzleView.systemStatus.value;
a = a.replace("%N%", appCore.languageData.puzzleView["puzzleName" + s.puzzleView.puzzleData.nameId].value), this._mainView.updateGameStatusHeader(a, appCore.languageData.puzzleView.systemStatus.size);
var b = s.puzzleView.puzzleData.id,
c = "",
d = "18px";
if (3 == b) {
c = appCore.languageData.puzzleView.puzzle4Begin.value, d = appCore.languageData.puzzleView.puzzle4Begin.size;
var e = new Date;
c = c.replace("%T%", e.getMonth() + 1 + "/" + e.getDate() + "/" + e.getFullYear() + " " + e.getHours() + ":" + e.getMinutes() + ":" + e.getSeconds())
}
if ("" != c && this._mainView.showGameStatusMessage(c, d), 4 >= b ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.statusStart.value, appCore.languageData.puzzleView.statusStart.size) : b >= 5 && 10 >= b ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.statusStart2.value, appCore.languageData.puzzleView.statusStart2.size) : b >= 11 && 16 >= b ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.statusStart3.value, appCore.languageData.puzzleView.statusStart3.size) : b >= 17 && this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.statusStart4.value, appCore.languageData.puzzleView.statusStart4.size), 5 == b || 11 == b || 17 == b) {
var f = Math.floor((y + 2) / w * 100),
g = appCore.languageData.puzzleView.statusOverallCognition.value;
g = g.replace("%X%", f + "%"), this._mainView.showGameStatusMessage(g, appCore.languageData.puzzleView.statusOverallCognition.size)
}
this._showPuzzleTip(), this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.statusBegin.value, appCore.languageData.puzzleView.statusBegin.size, .5), s.enable(), this._mainView.resetCounter(), s.puzzleView.puzzleFinished || this._mainView.showCounter()
}, b.prototype._handlePuzzleInProgress = function(a) {
var b = void 0,
c = void 0;
b = appCore.languageData.puzzleView.completionProgress.value, c = appCore.languageData.puzzleView.completionProgress.size, b = a.up ? b.replace("%X%", a.percent + "%") : b.replace("%X%", '<span class="percent-red">' + a.percent + "%</span>"), this._mainView.showGameStatusMessage(b, c);
var d = s.puzzleView.puzzleData.id;
a.percent > 73 && !D && (D = !0, 1 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle2Mid.value, appCore.languageData.puzzleView.puzzle2Mid.size) : 4 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle5Mid.value, appCore.languageData.puzzleView.puzzle5Mid.size) : 5 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle6Mid.value, appCore.languageData.puzzleView.puzzle6Mid.size) : 6 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle7Mid.value, appCore.languageData.puzzleView.puzzle7Mid.size) : 7 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle8Mid.value, appCore.languageData.puzzleView.puzzle8Mid.size) : 10 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle11Mid.value, appCore.languageData.puzzleView.puzzle11Mid.size) : 11 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle2Mid.value, appCore.languageData.puzzleView.puzzle2Mid.size) : 13 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle6Mid.value, appCore.languageData.puzzleView.puzzle6Mid.size) : 14 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle15Mid.value, appCore.languageData.puzzleView.puzzle15Mid.size) : 15 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle16Mid.value, appCore.languageData.puzzleView.puzzle16Mid.size) : 16 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle17Mid.value, appCore.languageData.puzzleView.puzzle17Mid.size) : 17 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle18Mid.value, appCore.languageData.puzzleView.puzzle18Mid.size) : 18 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle11Mid2.value, appCore.languageData.puzzleView.puzzle11Mid2.size) : 20 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle21Mid.value, appCore.languageData.puzzleView.puzzle21Mid.size) : 21 == d && this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle22Mid.value, appCore.languageData.puzzleView.puzzle22Mid.size)), a.percent > 88 && !E && (E = !0, 10 == d ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle11Mid2.value, appCore.languageData.puzzleView.puzzle11Mid2.size) : 20 == d && this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle15Mid.value, appCore.languageData.puzzleView.puzzle15Mid.size))
}, b.prototype._handlePuzzleSolved = function(a) {
s.disable(), this._mainView.hideCounter(), F = !1, g(), C = B, f(y > a ? y : a), s.stopIdleTimer();
var b = !1;
if (z ? this._mainView.showGameSolved(u, s.puzzleView.moveCount, B) : this._mainView.showGameSolved(u, s.puzzleView.moveCount, B), a > y && (3 == y || 9 == y || 15 == y || 20 == y)) {
var c = 1;
3 == y ? c = 2 : 9 == y ? c = 3 : 15 == y ? c = 4 : 20 == y && (c = 5), h.dispatch("onBadgeLevelUpdated", {
badgeLevel: c
}), h.dispatch("onShowUserNotification")
}
a > y && (b = !0, y = a, storage.set("last_puzzle", a), h.dispatch("onCognitivePercentUpdated", {
per: y + 1
}), x - 1 > y && h.dispatch("onPuzzleUnlocked", {
id: a
}));
var d = s.puzzleView.puzzleData.id,
e = s.puzzleView.puzzleData.nameId,
i = appCore.languageData.puzzleView["puzzleName" + e].value,
j = appCore.languageData.puzzleView.levelComplete.value,
l = appCore.languageData.puzzleView.levelComplete.size;
if (8 != d && 17 != d || (j = appCore.languageData.puzzleView.levelBinaryComplete.value, l = appCore.languageData.puzzleView.levelBinaryComplete.size), j = j.replace("%N%", i).replace("%I%", appCore.userId), this._mainView.showGameStatusMessage(j, l), b && (4 == y || 10 == y || 16 == y ? this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle5Complete.value, appCore.languageData.puzzleView.puzzle5Complete.size) : 21 == y && this._mainView.showGameStatusMessage(appCore.languageData.puzzleView.puzzle22Complete.value, appCore.languageData.puzzleView.puzzle22Complete.size)), u == k["default"].PUZZLE_STATE_IN_PROGRESS) {
var m = y + 1,
n = appCore.languageData.puzzleView["puzzleName" + puzzleData[m].nameId].value,
o = appCore.languageData.puzzleView.levelCompleteProceed.value;
this._mainView.showGameStatusMessage(o.replace("%X%", n), appCore.languageData.puzzleView.levelCompleteProceed.size)
}
}, b.prototype._handleSceneRendered = function() {
if (F && !s.puzzleView.puzzleFinished) {
var a = B + (new Date).getTime() - A;
this._mainView.updateTotalTime(a)
}
}, b.prototype._generateShareText = function() {
var a = Math.round(C / 1e3),
b = 0,
c = 0;
a >= 60 && (b = Math.floor(a / 60), a -= 60 * b), b >= 60 && (c = Math.floor(b / 60), b -= 60 * c);
var d = i.zeroFill(c, 2, "0") + ":" + i.zeroFill(b, 2, "0") + ":" + i.zeroFill(a, 2, "0"),
e = s.puzzleView.puzzleData.nameId,
f = appCore.languageData.puzzleView["puzzleName" + e].value,
g = (appCore.languageData.meta.appUrl, appCore.languageData.puzzleView.shareText);
return g = g.replace("%N%", f).replace("%T%", d).replace("%M%", s.puzzleView.moveCount)
}, b.prototype._shareOnFacebook = function() {
var a = appCore.languageData.meta.appUrl;
FB.ui({
method: "share",
href: a
}, function(a) {})
}, b.prototype._shareOnTwitter = function() {
var a = appCore.languageData.meta.appUrl,
b = this._generateShareText();
window.open("http://twitter.com/intent/tweet?url=" + a + "&text=" + encodeURI(b), "twitterwindow", "height=450, width=550, top=" + ($(window).height() / 2 - 225) + ", left=" + $(window).width() / 2 + ", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0")
}, babelHelpers.createClass(b, [{
key: "sceneController",
get: function() {
return s
}
}, {
key: "lastPuzzleId",
get: function() {
return y
}
}, {
key: "totalTime",
get: function() {
return B
}
}, {
key: "puzzleState",
get: function() {
return u
}
}]), b
}(m["default"]);
c["default"] = I, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/Utils": 7,
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../models/PuzzleData": 27,
"../views/GameView": 30,
"./SceneController": 24
}],
19: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = a("../SiteConstants"),
f = babelHelpers.interopRequireDefault(e),
g = a("../../lib/core/controllers/AppViewController"),
h = babelHelpers.interopRequireDefault(g),
i = a("../views/HelpView"),
j = babelHelpers.interopRequireDefault(i),
k = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "HelpViewController: ", this._mainView = new j["default"], this._id = f["default"].SECTION_ID_HELP, this._init()
}
return babelHelpers.inherits(b, a), b.prototype._initListeners = function() {
a.prototype._initListeners.call(this), this._mainView.closeBtn.on("mouseenter", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_over",
volume: 1
})
}).on("click touchend", function(a) {
a.preventDefault(), this._handleCloseBtnClicked()
}.bind(this))
}, b.prototype._handleCloseBtnClicked = function() {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), this._mainView.animatingIn || this._mainView.animatingOut || d.dispatch(f["default"].ON_NAVIGATE_TO, {
id: f["default"].SECTION_ID_GAME
})
}, b
}(h["default"]);
c["default"] = k, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../views/HelpView": 31
}],
20: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = a("../SiteConstants"),
f = babelHelpers.interopRequireDefault(e),
g = a("../../lib/core/controllers/AppViewController"),
h = babelHelpers.interopRequireDefault(g),
i = a("../views/LegalView"),
j = babelHelpers.interopRequireDefault(i),
k = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "LegalViewController: ", this._mainView = new j["default"], this._id = f["default"].SECTION_ID_LEGAL, this._init()
}
return babelHelpers.inherits(b, a), b.prototype._initListeners = function() {
a.prototype._initListeners.call(this), this._mainView.closeBtn.on("mouseenter", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_over",
volume: 1
})
}).on("click touchend", function(a) {
a.preventDefault(), this._handleCloseBtnClicked()
}.bind(this)), this._mainView.legalLinks.on("click", function(a) {
a.preventDefault(), window.open($(this).attr("data-href"), "_blank")
})
}, b.prototype._removeListeners = function() {
a.prototype._removeListeners.call(this), this._mainView.legalLinks.off("click"), this._mainView.closeBtn.off("mouseenter").off("click touchend")
}, b.prototype._handleCloseBtnClicked = function() {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), this._mainView.animatingIn || this._mainView.animatingOut || d.dispatch(f["default"].ON_NAVIGATE_TO, {
id: f["default"].SECTION_ID_GAME
})
}, b
}(h["default"]);
c["default"] = k, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../views/LegalView": 32
}],
21: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = a("../SiteConstants"),
f = babelHelpers.interopRequireDefault(e),
g = a("../../lib/core/controllers/AppViewController"),
h = babelHelpers.interopRequireDefault(g),
i = a("../views/LogsView"),
j = babelHelpers.interopRequireDefault(i),
k = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "LogsViewController: ", this._mainView = new j["default"], this._id = f["default"].SECTION_ID_LOGS, this._init()
}
return babelHelpers.inherits(b, a), b.prototype._initListeners = function() {
a.prototype._initListeners.call(this), this._mainView.closeBtn.on("mouseenter", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_over",
volume: 1
})
}).on("click touchend", function(a) {
a.preventDefault(), this._handleCloseBtnClicked()
}.bind(this))
}, b.prototype._handleCloseBtnClicked = function() {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), d.dispatch(f["default"].ON_NAVIGATE_TO, {
id: f["default"].SECTION_ID_GAME
})
}, b
}(h["default"]);
c["default"] = k, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../views/LogsView": 33
}],
22: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = function() {
function a() {
babelHelpers.classCallCheck(this, a)
}
return a.prototype.upload = function(a) {
var b = arguments.length <= 1 || void 0 === arguments[1] ? null : arguments[1];
if (void 0 !== window.FormData) {
var c = new FileReader,
e = !1;
a.target.files.length > 0 && ("image/png" != a.target.files[0].type && "image/jpeg" != a.target.files[0].type && "image/jpg" != a.target.files[0].type || (e = !0), a.target.files[0].size > 8192e3 ? d.dispatch("onUploadImageTooBig") : e ? c.readAsDataURL(a.target.files[0]) : d.dispatch("onUploadImageNotAllowed"), c.onload = function(a) {
var c = new Image;
c.src = a.target.result, c.onload = function() {
null != b && b(c.src)
}
})
} else d.dispatch("onUploadImageError")
}, a
}();
c["default"] = e, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4
}],
23: [function(a, b, c) {
"use strict";
function d(a) {
var b = Math.round(100 * a.loaded);
n._mainView.showPercentage(b)
}
function e(a) {
n._mainView.hide(), f.dispatch(h["default"].ON_PRELOAD_COMPLETED, {})
}
c.__esModule = !0;
var f = a("../../lib/core/AppDispatcher"),
g = a("../SiteConstants"),
h = babelHelpers.interopRequireDefault(g),
i = a("../../lib/core/controllers/AppViewController"),
j = babelHelpers.interopRequireDefault(i),
k = a("../views/PreloaderView"),
l = babelHelpers.interopRequireDefault(k),
m = void 0,
n = void 0,
o = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), n = this, this.DEBUG_ID = "PreloaderController: ", this._mainView = new l["default"], m = new createjs.LoadQueue(!0), m.addEventListener("complete", e), m.addEventListener("progress", d), this._initListener()
}
return babelHelpers.inherits(b, a), b.prototype._initListener = function() {
var a = this;
this.token = f.register(function(b) {
switch (b.type) {
case "onShowNetworkAccessDenied":
a._mainView.showNetworkAccessDeniedDelay();
break;
case "onShowNetworkTerminal":
a._mainView.showNetworkTerminalDelay()
}
})
}, b.prototype.loadAssets = function() {
this.show();
var a = [];
a.push({
id: "help_instruction_01",
src: appCore.settings.cdnUrl + "files/images/help/instruction_01.png"
}), a.push({
id: "help_instruction_02",
src: appCore.settings.cdnUrl + "files/images/help/instruction_02.png"
}), a.push({
id: "help_instruction_03",
src: appCore.settings.cdnUrl + "files/images/help/instruction_03.png"
}), a.push({
id: "shared_x",
src: appCore.settings.cdnUrl + "files/images/shared/x.png"
}), a.push({
id: "puzzle_circuit_01",
src: appCore.settings.cdnUrl + "files/models/lexos_puzzle_circuit_01_small.jpg"
}), a.push({
id: "puzzle_color_01",
src: appCore.settings.cdnUrl + "files/models/lexos_puzzle_color_01_small.jpg"
}), a.push({
id: "puzzle_math_01",
src: appCore.settings.cdnUrl + "files/models/lexos_puzzle_math_01_small.jpg"
}), a.push({
id: "puzzle_symbol_01",
src: appCore.settings.cdnUrl + "files/models/lexos_puzzle_symbol_01_small.jpg"
}), a.push({
id: "puzzle_symbol_02",
src: appCore.settings.cdnUrl + "files/models/lexos_puzzle_symbol_02_small.jpg"
}), a.push({
id: "video_poster",
src: appCore.settings.cdnUrl + "files/video/lexos_background_loop_poster.jpg"
}), a.push({
id: "audio_access_denied",
src: "files/audio/access_denied.ogg"
}), a.push({
id: "audio_bg_ambience",
src: "files/audio/bg_ambience.ogg"
}), a.push({
id: "audio_btn_click",
src: "files/audio/btn_click.ogg"
}), a.push({
id: "audio_btn_over",
src: "files/audio/btn_over.ogg"
}), a.push({
id: "audio_element_in",
src: "files/audio/element_in.ogg"
}), a.push({
id: "audio_os_launch",
src: "files/audio/os_launch.ogg"
}), a.push({
id: "audio_piece_click",
src: "files/audio/piece_click.ogg"
}), a.push({
id: "audio_piece_rotate_left",
src: "files/audio/piece_rotate_left.ogg"
}), a.push({
id: "audio_piece_rotate_right",
src: "files/audio/piece_rotate_right.ogg"
}), a.push({
id: "audio_puzzle_in",
src: "files/audio/puzzle_in.ogg"
}), a.push({
id: "audio_puzzle_moves",
src: "files/audio/puzzle_moves.ogg"
}), a.push({
id: "audio_puzzle_solved",
src: "files/audio/puzzle_solved.ogg"
}), a.push({
id: "audio_window_in",
src: "files/audio/window_in.ogg"
}), a.push({
id: "audio_window_out",
src: "files/audio/window_out.ogg"
}), createjs.Sound.alternateExtensions = ["mp3"], m.installPlugin(createjs.Sound), m.loadManifest(a)
}, b.prototype.showTempLoading = function() {}, b
}(j["default"]);
c["default"] = o, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../views/PreloaderView": 35
}],
24: [function(a, b, c) {
"use strict";
function d(a) {
if (Modernizr.touch) {
var b = a.originalEvent.touches[0] || a.originalEvent.changedTouches[0];
return {
x: b.pageX,
y: b.pageY
}
}
return {
x: a.clientX,
y: a.clientY
}
}
c.__esModule = !0;
var e = a("../../lib/core/AppDispatcher"),
f = a("../views/PuzzleView"),
g = babelHelpers.interopRequireDefault(f),
h = a("../models/PuzzleData"),
i = babelHelpers.interopRequireDefault(h),
j = void 0,
k = void 0,
l = void 0,
m = void 0,
n = void 0,
o = void 0,
p = void 0,
q = void 0,
r = void 0,
s = 0,
t = 0,
u = void 0,
v = 0,
w = 0,
x = void 0,
y = void 0,
z = void 0,
A = void 0,
B = !1,
C = !1,
D = !1,
E = void 0,
F = !1,
G = null,
H = !0,
I = function() {
function a() {
var b = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0];
babelHelpers.classCallCheck(this, a), this.DEBUG_ID = "SceneController: ", this.initScene(), this.initObject(b), D && this.initStats()
}
return a.prototype.initStats = function() {
y = new Stats, y.domElement.style.position = "absolute", y.domElement.style.left = "50%", y.domElement.style.top = "0px", document.body.appendChild(y.domElement)
}, a.prototype.initScene = function() {
z = $(document), j = $("#threeContainer"), m = new THREE.Scene, l = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 1e4), l.position.y = 0, l.position.z = 200, k = new THREE.WebGLRenderer({
alpha: !0,
antialias: !1
}), k.setSize(window.innerWidth, window.innerHeight), r = {
x: 0,
y: 0,
active: !1
}, u = {
x: 0,
y: 0
}, q = {
x: 1,
y: 1,
userClicked: !1
}, p = new THREE.Raycaster;
var a = new THREE.DirectionalLight(16777215, 1);
a.position.set(0, 0, 100), m.add(a);
var b = new THREE.DirectionalLight(16777215);
b.position.set(0, 0, 100), m.add(b), j.append(k.domElement), n = appCore.settings.windowWidth / 2, o = appCore.settings.windowHeight / 2
}, a.prototype.initObject = function(a) {
A = new THREE.LoadingManager(this._handleLoadingManagerOnLoad.bind(this), this._handleLoadingManagerOnProgress.bind(this), this._handleLoadingManagerOnError.bind(this)), x = new g["default"](m, A, a)
}, a.prototype._handleLoadingManagerOnLoad = function() {}, a.prototype._handleLoadingManagerOnProgress = function(a, b, c) {}, a.prototype._handleLoadingManagerOnError = function(a) {}, a.prototype.addListeners = function() {
B || (B = !0, j.on("click", function(a) {
a.preventDefault(), x.checkOnClick()
}.bind(this)), Modernizr.touch ? (z.on("touchend", this._handleDocumentTouchEnded.bind(this)), z.on("touchstart", this._handleDocumentTouchStarted.bind(this)), z.on("touchmove", this._handleDocumentTouchMoved.bind(this))) : (z.on("mousemove", this._handleDocumentMouseMoved.bind(this)), z.on("mousedown", this._handleDocumentMouseDowned.bind(this))))
}, a.prototype.removeListeners = function() {
j.off("click"), Modernizr.touch ? (z.off("touchend"), z.off("touchstart"), z.off("touchmove")) : (z.off("mousemove"), z.off("mousedown")), B = !1
}, a.prototype.show = function() {
x.show(function() {
this.startIdleTimer(), e.dispatch("onSceneAnimateInCompleted")
}.bind(this)), this.enable()
}, a.prototype.hide = function() {
this.stopIdleTimer(), this.disable(), x.hide(function() {
e.dispatch("onSceneAnimateOutCompleted")
}.bind(this))
}, a.prototype.showNewPuzzle = function(a) {
x.reset(), H = !0;
var b = new i["default"](a);
x.initPuzzle(b), this.startIdleTimer(), e.dispatch("onPuzzleActivated", {
id: a.id
})
}, a.prototype.enable = function() {
this.addListeners(), this.startIdleTimer()
}, a.prototype.disable = function() {
this.removeListeners()
}, a.prototype.resize = function() {
n = appCore.settings.windowWidth / 2, o = appCore.settings.windowHeight / 2, l.aspect = appCore.settings.windowWidth / appCore.settings.windowHeight, l.updateProjectionMatrix(), k.setSize(appCore.settings.windowWidth, appCore.settings.windowHeight)
}, a.prototype._startTileInteraction = function(a, b) {
this.stopIdleTimer(), r.x = a - n, r.y = b - o, r.angle = 180 * Math.atan2(r.x, r.y) / Math.PI, r.active = !0
}, a.prototype._stopTileInteraction = function() {
r.active = !1;
var a = x.stopTileRotation();
a !== !1 && e.dispatch("onMoveCountUpdated", {
moveCount: a
}), this.startIdleTimer()
}, a.prototype.startIdleTimer = function() {
x.puzzleFinished || F || (F = !0, E = 0, this._updateIdleTimer())
}, a.prototype.stopIdleTimer = function() {
F = !1
}, a.prototype._updateIdleTimer = function() {
F && (requestAnimationFrame(function() {
this._updateIdleTimer()
}.bind(this)), E++, E > 1800 && (e.dispatch("onPuzzleIdledTooLong", {
idleMessage: H
}), H = !H, this.stopIdleTimer()))
}, a.prototype._handleDocumentTouchStarted = function(a) {
var b = d(a);
q.x = b.x / window.innerWidth * 2 - 1, q.y = 2 * -(b.y / window.innerHeight) + 1, p.setFromCamera(q, l), x.render(p), x.startTileRotation(), this._startTileInteraction(b.x, b.y)
}, a.prototype._handleDocumentTouchMoved = function(a) {
if (a.preventDefault(), x.activeTile) {
var b = d(a);
s = b.x - n, t = b.y - o;
var c = 180 * Math.atan2(s, t) / Math.PI,
e = c - r.angle;
x.rotateActiveTile(e)
}
}, a.prototype._handleDocumentTouchEnded = function(a) {
q.x = -1, q.y = -1, this._stopTileInteraction()
}, a.prototype._handleDocumentMouseDowned = function(a) {
if (null != x.activeTile) {
this._addDocumentMouseMoveListeners(), x.startTileRotation();
var b = d(a);
this._startTileInteraction(b.x, b.y), u.x = v, u.y = w
}
}, a.prototype._handleDocumentMouseMoved = function(a) {
var b = d(a);
if (r.active) {
s = b.x - n, t = b.y - o;
var c = 180 * Math.atan2(s, t) / Math.PI,
e = c - r.angle;
x.rotateActiveTile(e)
}
q.x = b.x / window.innerWidth * 2 - 1, q.y = 2 * -(b.y / window.innerHeight) + 1
}, a.prototype._handleDocumentMouseUp = function(a) {
this._stopTileInteraction(), this._removeDocumentMouseMoveListeners()
}, a.prototype._handleDocumentMouseOut = function(a) {
this._stopTileInteraction(), this._removeDocumentMouseMoveListeners()
}, a.prototype._addDocumentMouseMoveListeners = function() {
z.on("mouseup", this._handleDocumentMouseUp.bind(this)), z.on("mouseout", this._handleDocumentMouseOut.bind(this))
}, a.prototype._removeDocumentMouseMoveListeners = function() {
z.off("mouseup"), z.off("mouseout")
}, a.prototype.start = function() {
C = !0, this.animate()
}, a.prototype.stop = function() {
C = !1
}, a.prototype.animate = function() {
C && (requestAnimationFrame(function() {
this.animate()
}.bind(this)), D && y.begin(), this.render(), D && y.end())
}, a.prototype.render = function() {
p.setFromCamera(q, l), x.render(p), k.render(m, l), null != G && G()
}, babelHelpers.createClass(a, [{
key: "scene",
get: function() {
return m
}
}, {
key: "camera",
get: function() {
return l
}
}, {
key: "puzzleView",
get: function() {
return x
}
}, {
key: "renderCallback",
set: function(a) {
G = a
}
}]), a
}();
c["default"] = I, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../models/PuzzleData": 27,
"../views/PuzzleView": 36
}],
25: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../SiteConstants"),
e = babelHelpers.interopRequireDefault(d),
f = a("../../lib/core/controllers/AppViewController"),
g = babelHelpers.interopRequireDefault(f),
h = a("../views/StartUpView"),
i = babelHelpers.interopRequireDefault(h),
j = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "StartUpViewController: ", this._mainView = new i["default"], this._id = e["default"].SECTION_ID_START_UP, this._init()
}
return babelHelpers.inherits(b, a), b.prototype.resize = function() {
this._mainView.resize()
}, b
}(g["default"]);
c["default"] = j, b.exports = c["default"]
}, {
"../../lib/core/controllers/AppViewController": 8,
"../SiteConstants": 13,
"../views/StartUpView": 37
}],
26: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = a("../../lib/clients/Facebook"),
f = a("../SiteConstants"),
g = babelHelpers.interopRequireDefault(f),
h = a("../../lib/core/controllers/AppViewController"),
i = babelHelpers.interopRequireDefault(h),
j = a("../views/UserView"),
k = babelHelpers.interopRequireDefault(j),
l = a("./PhotoController"),
m = babelHelpers.interopRequireDefault(l),
n = a("../../lib/core/controllers/WebcamController"),
o = babelHelpers.interopRequireDefault(n),
p = void 0,
q = void 0,
r = 1,
s = !1,
t = null,
u = void 0,
v = !1,
w = null,
x = void 0,
y = void 0,
z = void 0,
A = !1,
B = !1,
C = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), u = this, this.DEBUG_ID = "UserViewController: ", this._mainView = new k["default"], this._id = g["default"].SECTION_ID_USER, p = new m["default"], this._init()
}
return babelHelpers.inherits(b, a), b.prototype._init = function() {
var b = this;
a.prototype._init.call(this);
var c = storage.get("user_badge_legal_accepted");
null != c && "1" == c && (s = !0);
var e = storage.get("user_badge_image"),
f = storage.get("user_badge_image_scale"),
g = storage.get("user_badge_image_top"),
h = storage.get("user_badge_image_left"),
i = storage.get("user_badge_level"),
j = storage.get("user_badge_name");
j ? this._mainView.setBadgeName(j) : this._mainView.setBadgeName(null), i && (r = i), this._mainView.setBadgeLevel(r), null != e && null != f && null != g && null != h ? this._mainView.addBadgeImage(e, Number(f), Number(g), Number(h), !1, !1) : this._mainView.setDefaultBadgeImage(), this._mainView.uvEditUploadInputBtn.on("change", function(a) {
p.upload(a, this._handlePhotoInputUploaded.bind(this))
}.bind(this)).on("click", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), s || (a.preventDefault(), this._checkLegal("upload"))
}.bind(this)), Modernizr.getusermedia && (this._mainView.uvEditWebcamBtn.on("click", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), s ? this._showWebcam() : this._checkLegal("webcam")
}.bind(this)), this._mainView.uvTakeWebcamPictureBtn.on("click", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), q.takePicture()
}.bind(this))), this._mainView.uvEditFacebookBtn.on("click", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), s ? this._showFacebook() : this._checkLegal("facebook")
}.bind(this)), d.register(function(a) {
switch (a.type) {
case "onBadgeLevelUpdated":
r = a.badgeLevel, storage.set("user_badge_level", r), b._mainView.setBadgeLevel(r);
break;
case "onUserImageSaved":
b._saveUserImageData(), q && q.stopWebcam();
break;
case "onLegalAccepted":
storage.set("user_badge_legal_accepted", 1), b._handleLegalAccepted(), b._mainView.hideLegal();
break;
case "onLegalRejected":
b._mainView.hideLegal();
break;
case "onUploadImageTooBig":
b._mainView.showImageTooBigError();
break;
case "onUploadImageNotAllowed":
case "onUploadImageError":
b._mainView.showInvalidImageError();
break;
case "onWebcamInitError":
b._mainView.hideEditWebcamOnError();
break;
case "onWebcamPictureTaken":
b._handleWebcamPictureTaken();
break;
case "onFacebookAlbumClicked":
b._facebookGetPhotos(a.id);
break;
case "onFacebookPhotoClicked":
b._mainView.hideFacebookContainer(), b._mainView.addBadgeImage(a.url, 1, null, null, !0, !1);
break;
case "onBadgeEditFinished":
break;
case "onBadgeShareFB":
b._shareOnFb();
break;
case "onBadgeShareTW":
b._shareOnTw();
break;
case "onBadgeDownload":
b._downloadBadge()
}
})
}, b.prototype._initListeners = function() {
a.prototype._initListeners.call(this), this._mainView.closeBtn.on("mouseenter", function(a) {
d.dispatch("onAudioTriggered", {
id: "audio_btn_over",
volume: 1
})
}).on("click touchend", function(a) {
a.preventDefault(), this._handleCloseBtnClicked()
}.bind(this))
}, b.prototype._removeListeners = function() {
a.prototype._removeListeners.call(this), this._mainView.closeBtn.off("click")
}, b.prototype.show = function() {
a.prototype.show.call(this), d.dispatch("onHideUserNotification")
}, b.prototype._handleCloseBtnClicked = function() {
d.dispatch("onAudioTriggered", {
id: "audio_btn_click",
volume: .6
}), d.dispatch(g["default"].ON_NAVIGATE_TO, {
id: g["default"].SECTION_ID_GAME
})
}, b.prototype._handlePhotoInputUploaded = function(a) {
this._mainView.addBadgeImage(a, 1, null, null, !0, !1)
}, b.prototype._checkLegal = function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0];
t = a, 1 != s && this._mainView.showLegal()
}, b.prototype._handleLegalAccepted = function() {
if (s = !0, "upload" == t) {
var a = document.createEvent("MouseEvents");
a.initEvent("click", !0, !1), this._mainView.uvEditUploadInputBtn[0].dispatchEvent(a)
} else "facebook" == t ? this._showFacebook() : "webcam" == t && this._showWebcam()
}, b.prototype._showWebcam = function() {
Modernizr.getusermedia && (q = new o["default"]({
sizeWidth: 198,
sizeHeight: 153,
top: 0,
left: -48
}), q.init(this._mainView.uvBadgeWebcamContainer), this._mainView.showEditWebcam())
}, b.prototype._handleWebcamInitError = function() {}, b.prototype._handleWebcamPictureTaken = function() {
q.stopWebcam(), this._mainView.addBadgeImage(q.imageDataURL, 1, null, null, !0, !1), this._mainView.hideEditWebcam()
}, b.prototype._saveUserImageData = function() {
this._mainView.defaultUserImage ? storage.remove("user_badge_image") : storage.set("user_badge_image", this._mainView.fabricUserImage.toDataURL()), storage.set("user_badge_image_scale", this._mainView.fabricUserImageScale), storage.set("user_badge_image_top", this._mainView.fabricUserImageOffset.top), storage.set("user_badge_image_left", this._mainView.fabricUserImageOffset.left), storage.set("user_badge_name", this._mainView.uvBadgeNameVal)
}, b.prototype._showFacebook = function() {
v ? this._facebookGetAlbums() : this._facebookLogin()
}, b.prototype._facebookLogin = function() {
e.login().then(function(a) {
"connected" == a.status && (v = !0), u._facebookGetAlbums()
}, function(a) {})
}, b.prototype._facebookGetAlbums = function() {
u._mainView.showFacebookLoading(), e.getAlbums().then(function(a) {
u._mainView.populateFacebookAlbums(a.data), u._mainView.showFacebookAlbums()
}, function(a) {})
}, b.prototype._facebookGetPhotos = function(a, b) {
u._mainView.showFacebookLoading(), e.getPhotos(a).then(function(a) {
u._mainView.populateFacebookPhotos(a.photos.data), u._mainView.showFacebookPhotos()
}, function(a) {});
}, b.prototype._checkFacebookLogin = function() {}, b.prototype._createImage = function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0];
w = this._mainView.uvBadgeImageTimestamp, A = !0, B = !0, $.ajax({
url: "files/php/upload/aws.php",
type: "POST",
dataType: "json",
data: {
image: this._mainView.fabricTempCanvas.toDataURL()
}
}).done(function(b) {
200 == b.status && (x = b.url, A = !1, A || B || null != a && a())
}.bind(this)), $.ajax({
url: "files/php/upload/aws.php",
type: "POST",
dataType: "json",
data: {
image: this._mainView.fabricTempCanvasShare.toDataURL()
}
}).done(function(b) {
200 == b.status && (z = b.url, y = b.id, B = !1, A || B || null != a && a())
}.bind(this))
}, b.prototype._shareOnFb = function() {
if (w != this._mainView.uvBadgeImageTimestamp) this._createImage(this._shareOnFb.bind(this));
else {
var a = appCore.languageData.meta.appUrl + "?id=" + y;
FB.ui({
method: "share",
href: a
}, function(a) {})
}
}, b.prototype._shareOnTw = function() {
if (w != this._mainView.uvBadgeImageTimestamp) this._createImage(this._shareOnTw.bind(this));
else {
var a = appCore.languageData.meta.appUrl + "?id=" + y,
b = appCore.languageData.userView.shareTwitter.value;
b = b.replace("%L%", r), window.open("http://twitter.com/intent/tweet?url=" + a + "&text=" + encodeURI(b), "twitterwindow", "height=450, width=550, top=" + ($(window).height() / 2 - 225) + ", left=" + $(window).width() / 2 + ", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0")
}
}, b.prototype._downloadBadge = function() {
w != this._mainView.uvBadgeImageTimestamp ? this._createImage(this._downloadBadge.bind(this)) : window.open(x)
}, b
}(i["default"]);
c["default"] = C, b.exports = c["default"]
}, {
"../../lib/clients/Facebook": 1,
"../../lib/core/AppDispatcher": 4,
"../../lib/core/controllers/AppViewController": 8,
"../../lib/core/controllers/WebcamController": 9,
"../SiteConstants": 13,
"../views/UserView": 38,
"./PhotoController": 22
}],
27: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = "files/models/lexos_tilePuzzle_template_test.jpg",
e = "files/models/lexos_tilePuzzle_template_test_back.jpg",
f = [{
id: 3
}],
g = [{
id: 18
}],
h = 0,
i = 1,
j = "pattern",
k = function() {
function a(b) {
babelHelpers.classCallCheck(this, a), null == b.id || void 0 == b.id ? this.id = h : this.id = b.id, null == b.frontTexture || void 0 == b.frontTexture ? this.frontTextureImage = d : this.frontTextureImage = b.frontTexture, null == b.backTexture || void 0 == b.backTexture ? this.backTextureImage = e : this.backTextureImage = b.backTexture, null == b.tiles || void 0 == b.tiles ? this.modifiedTiles = f : this.modifiedTiles = b.tiles, null == b.unusedTiles || void 0 == b.unusedTiles ? this.unusedTiles = g : this.unusedTiles = b.unusedTiles, null == b.type || void 0 == b.type ? this.type = j : this.type = b.type, null == b.nameId || void 0 == b.nameId ? this.nameId = i : this.nameId = b.nameId
}
return a.prototype.checkIfCompleted = function() {}, a
}();
c["default"] = k, b.exports = c["default"]
}, {}],
28: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = (a("../../lib/core/AppDispatcher"), a("../../lib/core/Utils")),
e = a("../SiteConstants"),
f = (babelHelpers.interopRequireDefault(e), a("../../lib/core/views/AppView")),
g = babelHelpers.interopRequireDefault(f),
h = a("../../lib/core/views/BackgroundVideoView"),
i = babelHelpers.interopRequireDefault(h),
j = void 0,
k = void 0,
l = void 0,
m = void 0,
n = void 0,
o = void 0,
p = void 0,
q = void 0,
r = void 0,
s = void 0,
t = void 0,
u = void 0,
v = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "BackgroundView: ", this._container = $("#backgroundView"), j = this._container.find(".bgv-motion-bg"), k = this._container.find(".bgv-weather-time"), l = this._container.find(".bgv-weather"), m = l.find(".bgv-weather-temp"), n = l.find(".bgv-weather-degree"), o = l.find(".bgv-weather-icon"), r = l.find(".bgv-weather-icon-svg"), p = l.find(".bgv-weather-temp-unit"), q = this._container.find(".bgv-time"), s = this._container.find(".bgv-system-status"), t = s.find(".bgv-system-status-log"), u = s.find(".bgv-system-status-log-viewport"), r.hide(), Modernizr.touch || (this._video = new i["default"]("files/video/", "lexos_background_loop"), j.html(this._video))
}
return babelHelpers.inherits(b, a), b.prototype.hide = function() {
arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0];
this._animatingOut || TweenMax.set([l, q], {
opacity: 0
})
}, b.prototype._animateIn = function() {
a.prototype._animateIn.call(this);
var b = new TimelineMax({
paused: !0
});
b.add(TweenMax.fromTo(l, .4, {
opacity: 0,
x: "-=100%",
immediateRender: !0
}, {
x: "0%",
opacity: 1,
ease: Power3.easeOut
})), b.add(TweenMax.fromTo(q, .4, {
opacity: 0,
x: "-=100%",
immediateRender: !0
}, {
x: "0%",
opacity: 1,
ease: Power3.easeOut
})), b.restart()
}, b.prototype._animateOut = function() {
a.prototype._animateOut.call(this);
var b = new TimelineMax({
paused: !0
});
b.add(TweenMax.fromTo(l, .4, {
opacity: 1,
immediateRender: !0
}, {
opacity: 0
})), b.add(TweenMax.fromTo(q, .4, {
opacity: 1,
immediateRender: !0
}, {
opacity: 0
})), b.add(TweenMax.fromTo(s, .4, {
opacity: 1,
immediateRender: !0
}, {
opacity: 0
})), b.restart()
}, b.prototype.setTemperature = function(a) {
var b = arguments.length <= 1 || void 0 === arguments[1] ? 800 : arguments[1];
m.html(a);
var c = String(b);
"2" == c[0] ? (b = 200, o.find(".thunderstorm").show()) : "3" == c[0] || "5" == c[0] ? (b = 500, o.find(".rainstorm").show()) : "6" == c[0] ? (b = 600, o.find(".snowstorm").show()) : "8" == c[0] ? (b = 801, o.find(".cloudy").show()) : o.find(".sunny").show()
}, b.prototype.setTime = function(a) {
var b = a.getHours(),
c = a.getMinutes(),
e = "",
f = "AM";
b > 12 ? (f = "PM", e = b - 12) : e = b, e += ":" + d.zeroFill(c, 2, "0") + ' <span class="bgv-time-period">' + f + "</span>", q.html(e)
}, b.prototype.addLineToLog = function(a) {
var b = arguments.length <= 1 || void 0 === arguments[1] ? !0 : arguments[1],
c = u.height();
u.append(a + "<br>");
var d = u.height();
b && TweenLite.to(u, .2, {
top: "-=" + (d - c) + "px"
})
}, b.prototype.resize = function() {
d.resizeBackground(j)
}, b
}(g["default"]);
c["default"] = v, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/Utils": 7,
"../../lib/core/views/AppView": 10,
"../../lib/core/views/BackgroundVideoView": 11,
"../SiteConstants": 13
}],
29: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = a("../SiteConstants"),
f = (babelHelpers.interopRequireDefault(e), a("../../lib/core/views/AppView")),
g = babelHelpers.interopRequireDefault(f),
h = a("./OSPanelView"),
i = babelHelpers.interopRequireDefault(h),
j = void 0,
k = void 0,
l = void 0,
m = void 0,
n = function(a) {
function b() {
if (babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "FilesView: ", this._container = $("#filesView"), l = this._container.find(".lexos-panel-body-subheader-content"), m = this._container.find(".lexos-panel-body-content"), "mobile" == appCore.settings.device) {
var c = this._container.find(".lexos-panel-header").outerHeight(!0),
e = appCore.settings.windowHeight - c - this._container.find(".lexos-panel-body-subheader-content").outerHeight(!0) - 107;
this._container.find(".lexos-panel-body-content").height(e)
}
k = new i["default"](this._container.find(".lexos-panel")), j = k.body.find(".lexos-panel-body-close-btn"), d.register(function(a) {
switch (a.type) {
case "onLoggedMUpdateFiles":
if ("3" == appCore.settings.sitePhase && 0 == ImageSequenceController.getIsInitialized()) {
for (var b, c = "", d = 61, e = 0; d >= e; e++) b = 10 > e ? "0" + e : e, c += '<img id="turnaround_' + b + '" class="active" data-source="' + window.appSettings.cdnUrl + "files/images/files/ship/ship_final_" + b + '.png" width="100%" height="100%" />';
var f = $("#filesView").find(".lexos-panel-body-footer").html();
$("#filesView").find(".lexos-panel-body-footer").remove();
var g = $("#filesView").find(".lexos-panel-body-subheader").html();
$("#filesView").find(".lexos-panel-body-subheader").remove(), $("#filesView").find(".lexos-panel-body-subheader-content").html("mgraves://containmentcenter/lab/analysis..."), $("#filesView").find(".lexos-panel-body-content").html('<div class="fv-containment"><div class="fv-containment-images">' + c + "</div></div>" + g + f), ImageSequenceController.setContainer($("#filesView").find(".fv-containment-images")), ImageSequenceController.setPreloader($("#filesView").find(".lexos-panel-preloader")), ImageSequenceController.setFooter($("#filesView").find(".fv-containment-footer")), ImageSequenceController.init(), Countdown.setDiv($("#filesView").find(".fv-containment-footer-countdown-value")), Countdown.init()
}
}
})
}
return babelHelpers.inherits(b, a), b.prototype._animateInCompleted = function() {
a.prototype._animateInCompleted.call(this), "3" == appCore.settings.sitePhase && (ImageSequenceController.enable(), Countdown.enable())
}, b.prototype._animateOut = function() {
a.prototype._animateOut.call(this), "3" == appCore.settings.sitePhase && (ImageSequenceController.disable(), Countdown.disable())
}, b.prototype.show = function() {
a.prototype.show.call(this), k.show(function() {
this._animateInCompleted()
}.bind(this))
}, b.prototype.hide = function() {
var b = arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0];
a.prototype.hide.call(this, b), b ? k.hide(function() {
this._animateOutCompleted()
}.bind(this)) : a.prototype.hide.call(this, !1)
}, babelHelpers.createClass(b, [{
key: "closeBtn",
get: function() {
return j
}
}]), b
}(g["default"]);
c["default"] = n, b.exports = c["default"]
}, {
"../../lib/core/AppDispatcher": 4,
"../../lib/core/views/AppView": 10,
"../SiteConstants": 13,
"./OSPanelView": 34
}],
30: [function(a, b, c) {
"use strict";
c.__esModule = !0;
var d = a("../../lib/core/AppDispatcher"),
e = a("../SiteConstants"),
f = babelHelpers.interopRequireDefault(e),
g = a("../../lib/core/views/AppView"),
h = babelHelpers.interopRequireDefault(g),
i = a("../controllers/SceneController"),
j = (babelHelpers.interopRequireDefault(i), a("../views/PuzzleView")),
k = (babelHelpers.interopRequireDefault(j), a("../../lib/core/Utils")),
l = void 0,
m = void 0,
n = void 0,
o = void 0,
p = void 0,
q = void 0,
r = void 0,
s = void 0,
t = void 0,
u = void 0,
v = void 0,
w = void 0,
x = void 0,
y = void 0,
z = void 0,
A = void 0,
B = void 0,
C = void 0,
D = void 0,
E = void 0,
F = void 0,
G = void 0,
H = void 0,
I = void 0,
J = 0,
K = !1,
L = 0,
M = 0,
N = void 0,
O = void 0,
P = void 0,
Q = void 0,
R = void 0,
S = void 0,
T = void 0,
U = void 0,
V = void 0,
W = null,
X = void 0,
Y = null,
Z = !1,
_ = !0,
aa = [],
ba = void 0,
ca = !1,
da = function(a) {
function b() {
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "GameView: ", this._container = $("#gameView"), l = this._container.find("#gameSolvedView"), m = l.find(".gsv-test-complete"), n = l.find(".gsv-share"), o = n.find(".gsv-share-text"), p = n.find(".gsv-share-fb"), q = n.find(".gsv-share-tw"), r = l.find(".gsv-counter"), s = r.find(".gsv-counter-moves"), t = s.find(".gsv-counter-value"), u = r.find(".gsv-counter-time"), v = u.find(".gsv-counter-value"), w = l.find(".gsv-messaging"), x = w.find(".gsv-messaging-header"), y = w.find(".gsv-messaging-body"), z = l.find(".gsv-play-icon"), B = this._container.find("#gameStatusMessageView"), C = B.find(".gsmv-system-status"), D = B.find(".gsmv-system-status-text"), E = B.find(".gsmv-panel-content"), G = B.find(".gsmv-panel-content-top-shadow"), H = B.find(".gsmv-panel-content-viewport"), F = B.find(".gsmv-panel-line"), L = C.outerHeight(!0), M = E.outerHeight(!0), N = this._container.find("#gameCounterView"), O = N.find(".gcv-moves"), R = O.find(".gcv-label"), S = O.find(".gcv-value"), Q = N.find(".gcv-time"), T = Q.find(".gcv-label"), U = Q.find(".gcv-value"), P = N.find(".gcv-separator"), TweenMax.set(N, {
autoAlpha: 0
}), TweenMax.set(B, {
opacity: 0,
display: "none"
}), V = new TimelineMax({
paused: !0,
onComplete: function() {
!this.animatingIn && !ba && aa.length > 0 && this.animateStatusLine(), W && (W(), W = null)
}.bind(this)
}), V.add(TweenMax.to(B, .5, {
opacity: 1
})), V.add(TweenMax.fromTo(F, .3, {
left: "50%",
width: "0%",
immediateRender: !0
}, {
left: "0%",
width: "100%",
ease: Power3.easeOut
})), V.add(TweenMax.fromTo(C, .3, {
height: 0,
immediateRender: !0
}, {
height: L,
ease: Power3.easeOut
})), V.add(TweenMax.fromTo(G, .2, {
opacity: 0,
immediateRender: !0
}, {
opacity: 1,
ease: Power3.easeOut
})), V.add(TweenMax.fromTo(E, .3, {
height: 0,
immediateRender: !0
}, {
height: M,
ease: Power3.easeOut
})), V.add(TweenMax.fromTo(D, .2, {
opacity: 0,
immediateRender: !0
}, {
opacity: 1,
ease: Power3.easeOut
})), V.add(TweenMax.fromTo(H, .2, {
opacity: 0,
immediateRender: !0
}, {
opacity: 1,
ease: Power3.easeOut
})), X = new TimelineMax({
paused: !0,
onComplete: function() {
Z ? V.restart(!0) : this._animateOutCompleted(), Z = !1, Y && (Y(), Y = null)
}.bind(this)
}), X.add(TweenMax.to(H, .1, {
opacity: 0,
ease: Power3.easeOut
})), X.add(TweenMax.to(D, .1, {
opacity: 0,
ease: Power3.easeOut
})), X.add(TweenMax.to(E, .2, {
height: 0,
ease: Power3.easeOut,
delay: 0
})), X.add(TweenMax.to(G, .1, {
opacity: 0,
ease: Power3.easeOut
})), X.add(TweenMax.to(C, .2, {
height: 0,
ease: Power3.easeOut,
delay: 0
})), X.add(TweenMax.to(F, .1, {
left: "50%",
width: "0%",
ease: Power3.easeOut,
delay: 0
})), X.add(TweenMax.to(N, .2, {
autoAlpha: 0,
ease: Power3.easeOut
}), "-=0.5"), z.on("click", function(a) {
a.preventDefault(), this._handleNewPuzzleBtnClicked()
}.bind(this)), q.on("click", function(a) {
a.preventDefault(), d.dispatch("onShareTWClicked")
}.bind(this)), p.on("click", function(a) {
a.preventDefault(), d.dispatch("onShareFBClicked")
}.bind(this)), this._container.hide(), l.hide()
}
return babelHelpers.inherits(b, a), b.prototype.showGameSolved = function(a, b, c) {
l.show(), A = l, _ = !0;
var d = Math.round(c / 1e3),
e = 0,
g = 0;
d >= 60 && (e = Math.floor(d / 60), d -= 60 * e), e >= 60 && (g = Math.floor(e / 60), e -= 60 * g), v.html(k.zeroFill(g, 2, "0") + ":" + k.zeroFill(e, 2, "0") + ":" + k.zeroFill(d, 2, "0")), t.html(k.zeroFill(b, 3, "0")), a == f["default"].PUZZLE_STATE_IN_PROGRESS ? (x.css("font-size", appCore.languageData.puzzleView.pleaseContinue.size), x.html(appCore.languageData.puzzleView.pleaseContinue.value), y.html("")) : a == f["default"].PUZZLE_STATE_SET_COMPLETED ? (x.css("font-size", appCore.languageData.puzzleView.additionalTestAvailable1.size), x.html(appCore.languageData.puzzleView.additionalTestAvailable1.value), y.css("font-size", appCore.languageData.puzzleView.pleaseReturn.size), y.html(appCore.languageData.puzzleView.pleaseReturn.value)) : (x.css("font-size", appCore.languageData.puzzleView.cognitionComplete.size), x.html(appCore.languageData.puzzleView.cognitionComplete.value), y.css("font-size", appCore.languageData.puzzleView.lexThanks.size), y.html(appCore.languageData.puzzleView.lexThanks.value)), TweenLite.fromTo(A, .2, {
autoAlpha: 0
}, {
autoAlpha: 1
})
}, b.prototype.hideGameSolved = function(a) {
A && (A.hide(), A = null), a && a()
}, b.prototype.show = function() {
a.prototype.show.call(this), ca = !0, aa.length > 0 && this.animateStatusLine(), K || (K = !0, TweenMax.set(B, {
display: "block",
immediateRender: !0
})), X.kill(), null != A && TweenLite.to(A, .2, {
autoAlpha: 1
}), V.restart(!0), this._animateInCompleted()
}, b.prototype.hide = function() {
var b = arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0];
a.prototype.hide.call(this), ca = !1, b ? (V.kill(), X.restart(!0), null != A && TweenLite.to(A, .2, {
autoAlpha: 0
})) : this._animateOutCompleted()
}, b.prototype._handleNewPuzzleBtnClicked = function(a) {
_ = !1, this.clearGameStatusMessage(), d.dispatch("onAudioTriggered", {
id: "audio_piece_click",
volume: .6
})
}, b.prototype._handleShareFBClicked = function() {
d.dispatch("onShareFBClicked")
}, b.prototype._handleShareTWClicked = function() {}, b.prototype.resetGameStatusMessage = function() {
ba && TweenLite.killTweensOf(H), ca = !1, ba = !1, aa = [];
var a = 75;
"mobile" == appCore.settings.device && (a = 69), H.children().remove(), H.css({
top: a
}), J = 0, D.html(""), ca = !0, H.css({
top: a
})