Created
July 5, 2016 23:26
-
-
Save SchizoDuckie/3032402de017d222c1a2ef971224188c to your computer and use it in GitHub Desktop.
lexos minified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! 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 | |
}) | |
}, b.prototype.updateGameStatusHeader = function(a, b) { | |
D.css({ | |
fontSize: b | |
}), TweenLite.to(D, 2, { | |
scrambleText: { | |
text: a, | |
delimiter: " " | |
}, | |
delay: .4 | |
}) | |
}, b.prototype.showGameStatusMessage = function(a) { | |
var b = arguments.length <= 1 || void 0 === arguments[1] ? "20px" : arguments[1], | |
c = arguments.length <= 2 || void 0 === arguments[2] ? 0 : arguments[2], | |
d = arguments.length <= 3 || void 0 === arguments[3] ? null : arguments[3]; | |
X.kill(); | |
for (var e = a.split("<br>"), f = 0, g = e.length; g > f; f++) aa.push({ | |
text: e[f], | |
fontSize: b, | |
delay: c | |
}); | |
this.animatingIn || ba || this.animateStatusLine(d) | |
}, b.prototype.animateStatusLine = function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0]; | |
if (ca) { | |
ba = !0; | |
var a = aa.splice(0, 1)[0], | |
b = $('<div class="gsmv-panel-content-line new" style="font-size:' + a.fontSize + '">' + a.text + "</div>"); | |
H.append(b); | |
var c = b.height(); | |
J += c, b.text(""), TweenLite.to(H, .2, { | |
top: "-=" + c + "px", | |
delay: a.delay, | |
onCompleteParams: [b, a.text], | |
onComplete: function(a, c) { | |
I && I.removeClass("new"), I = b; | |
var d = .2; | |
c.length > 45 ? d = 2 : c.length > 30 ? d = 1.5 : c.length > 20 ? d = 1 : c.length > 10 && (d = .5), TweenLite.to(a, d, { | |
text: c, | |
ease: Linear.easeNone, | |
onComplete: function() { | |
ca && (aa.length > 0 ? this.animateStatusLine() : ba = !1) | |
}.bind(this) | |
}) | |
}.bind(this) | |
}) | |
} | |
}, b.prototype.clearGameStatusMessage = function() { | |
TweenLite.to(H, .3, { | |
top: "-=100" | |
}), TweenLite.to(D, .5, { | |
scrambleText: { | |
text: " ", | |
revealDelay: .3 | |
}, | |
onComplete: function() { | |
this.resetGameStatusMessage(), d.dispatch("onNewPuzzleBtnClicked") | |
}.bind(this) | |
}) | |
}, b.prototype.hideGameStatusMessage = function() { | |
V.kill(), X.restart(!0), K = !1 | |
}, b.prototype._handleNextPuzzleBtnMouseEnter = function(a, b, c) { | |
_ && (TweenMax.fromTo(a, .3, { | |
scale: 1, | |
transformOrigin: "50% 50%", | |
immediateRender: !0 | |
}, { | |
scale: .97, | |
transformOrigin: "50% 50%", | |
ease: Power3.easeOut | |
}), TweenMax.to(b, .3, { | |
fill: "#d63f00" | |
}), "ie" != appCore.settings.browser && TweenMax.to(c, .3, { | |
fill: "#d63f00" | |
})) | |
}, b.prototype._handleNextPuzzleBtnMouseLeave = function(a, b, c) { | |
_ && (TweenMax.fromTo(a, .3, { | |
scale: .97, | |
transformOrigin: "50% 50%", | |
immediateRender: !0 | |
}, { | |
scale: 1, | |
transformOrigin: "50% 50%", | |
ease: Power3.easeOut | |
}), TweenMax.to(b, .3, { | |
fill: "#8d7f6e" | |
}), "ie" != appCore.settings.browser && TweenMax.to(c, .3, { | |
fill: "#8d7f6e" | |
})) | |
}, b.prototype.updateTotalTime = function(a) { | |
var b = Math.round(a / 1e3), | |
c = 0, | |
d = 0; | |
b >= 60 && (c = Math.floor(b / 60), b -= 60 * c), c >= 60 && (d = Math.floor(c / 60), c -= 60 * d), d > 0 ? U.html(k.zeroFill(d, 2, "0") + ":" + k.zeroFill(c, 2, "0") + ":" + k.zeroFill(b, 2, "0")) : U.html(k.zeroFill(c, 2, "0") + ":" + k.zeroFill(b, 2, "0")) | |
}, b.prototype.updateMoveCount = function(a) { | |
S.html(k.zeroFill(a, 3, "0")) | |
}, b.prototype.resetCounter = function() { | |
U.html("00:00"), S.html("000") | |
}, b.prototype.showCounter = function() { | |
TweenMax.fromTo(N, .5, { | |
autoAlpha: 0 | |
}, { | |
autoAlpha: 1 | |
}) | |
}, b.prototype.hideCounter = function() { | |
TweenMax.to(N, .3, { | |
autoAlpha: 0 | |
}) | |
}, b | |
}(h["default"]); | |
c["default"] = da, b.exports = c["default"] | |
}, { | |
"../../lib/core/AppDispatcher": 4, | |
"../../lib/core/Utils": 7, | |
"../../lib/core/views/AppView": 10, | |
"../SiteConstants": 13, | |
"../controllers/SceneController": 24, | |
"../views/PuzzleView": 36 | |
}], | |
31: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0; | |
var d = a("../SiteConstants"), | |
e = (babelHelpers.interopRequireDefault(d), a("../../lib/core/views/AppView")), | |
f = babelHelpers.interopRequireDefault(e), | |
g = a("./OSPanelView"), | |
h = babelHelpers.interopRequireDefault(g), | |
i = void 0, | |
j = void 0, | |
k = void 0, | |
l = function(a) { | |
function b() { | |
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "HelpView: ", this._container = $("#helpView"), j = new h["default"](this._container.find(".lexos-panel")), i = j.body.find(".lexos-panel-body-close-btn"), k = this._container.find(".lexos-panel-header-content-text"), k.html(k.html().replace("%X%", window.appCore.userId)) | |
} | |
return babelHelpers.inherits(b, a), b.prototype.show = function() { | |
a.prototype.show.call(this), j.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 ? j.hide(function() { | |
this._animateOutCompleted() | |
}.bind(this)) : a.prototype.hide.call(this, !1) | |
}, babelHelpers.createClass(b, [{ | |
key: "closeBtn", | |
get: function() { | |
return i | |
} | |
}]), b | |
}(f["default"]); | |
c["default"] = l, b.exports = c["default"] | |
}, { | |
"../../lib/core/views/AppView": 10, | |
"../SiteConstants": 13, | |
"./OSPanelView": 34 | |
}], | |
32: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0; | |
var d = a("../SiteConstants"), | |
e = (babelHelpers.interopRequireDefault(d), a("../../lib/core/views/AppView")), | |
f = babelHelpers.interopRequireDefault(e), | |
g = a("./OSPanelView"), | |
h = babelHelpers.interopRequireDefault(g), | |
i = void 0, | |
j = void 0, | |
k = void 0, | |
l = function(a) { | |
function b() { | |
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "LegalView: ", this._container = $("#legalView"); | |
var c = 0; | |
"mobile" == appCore.settings.device && (c = appCore.settings.windowHeight - this._container.find(".lexos-panel-header").outerHeight(!0) - 100, this._container.find(".lexos-panel-body-content").height(c), this._container.find(".legal-billing").css("margin-top", (c - 146) / 2)), j = new h["default"](this._container.find(".lexos-panel")), i = j.body.find(".lexos-panel-body-close-btn"), this.legalLinks = this._container.find(".legal-link"), k = this._container.find(".lexos-panel-header-content-text"), k.html(k.html().replace("%X%", window.appCore.userId)) | |
} | |
return babelHelpers.inherits(b, a), b.prototype.show = function() { | |
a.prototype.show.call(this), j.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 ? j.hide(function() { | |
this._animateOutCompleted() | |
}.bind(this)) : a.prototype.hide.call(this, !1) | |
}, babelHelpers.createClass(b, [{ | |
key: "closeBtn", | |
get: function() { | |
return i | |
} | |
}]), b | |
}(f["default"]); | |
c["default"] = l, b.exports = c["default"] | |
}, { | |
"../../lib/core/views/AppView": 10, | |
"../SiteConstants": 13, | |
"./OSPanelView": 34 | |
}], | |
33: [function(a, b, c) { | |
"use strict"; | |
function d() { | |
var a = void 0, | |
b = void 0, | |
c = storage.get("last_puzzle"); | |
c = null != c ? Number(c) : -1; | |
for (var d = 0, f = window.puzzleData.length; f > d; d++) b = $('<div class="lv-list-item-icon"></div>'), a = $('<div class="lv-list-item" data-id="' + window.puzzleData[d].id + '"></div>'), a.append(b), a.append('<div class="lv-list-item-text">' + appCore.languageData.puzzleView["puzzleName" + window.puzzleData[d].nameId].value + "</div>"), d > c + 1 || void 0 == puzzleData[d].tiles ? (a.addClass("locked"), b.append(z)) : (a.addClass("unlocked"), b.append(A)), s.append(a), t.push(a); | |
s.find(".lv-list-item").on("click", function(a) { | |
$(this).hasClass("unlocked") && e($(this).attr("data-id")) | |
}) | |
} | |
function e(a) { | |
y || (y = !0, h.dispatch("onLogsViewItemClicked", { | |
puzzleId: a | |
}), h.dispatch(l["default"].ON_NAVIGATE_TO, { | |
id: l["default"].SECTION_ID_GAME | |
})) | |
} | |
function f(a) { | |
a + 1 < t.length && (t[a + 1].find(".lv-list-item-icon").html(A), t[a + 1].removeClass("locked").addClass("unlocked")) | |
} | |
function g(a) { | |
v && v.removeClass("active"), v = t[a], v.addClass("active") | |
} | |
c.__esModule = !0; | |
var h = a("../../lib/core/AppDispatcher"), | |
i = a("../../lib/core/views/AppView"), | |
j = babelHelpers.interopRequireDefault(i), | |
k = a("../SiteConstants"), | |
l = babelHelpers.interopRequireDefault(k), | |
m = a("./OSPanelView"), | |
n = babelHelpers.interopRequireDefault(m), | |
o = void 0, | |
p = void 0, | |
q = void 0, | |
r = void 0, | |
s = void 0, | |
t = [], | |
u = void 0, | |
v = void 0, | |
w = void 0, | |
x = !0, | |
y = !1, | |
z = void 0, | |
A = void 0, | |
B = void 0, | |
C = function(a) { | |
function b() { | |
babelHelpers.classCallCheck(this, b), a.call(this), o = this, this.DEBUG_ID = "LogsView: ", this._container = $("#logsView"); | |
var c = 0; | |
"mobile" == appCore.settings.device && (c = appCore.settings.windowHeight - this._container.find(".lexos-panel-header").outerHeight(!0) - 100, this._container.find(".lexos-panel-body-content").height(c)), q = new n["default"](this._container.find(".lexos-panel")), r = q.body.find(".lv-list"), s = r.find(".viewport .overview"), "mobile" == appCore.settings.device && r.height(c - 20), u = s.find(".lv-list-logs"), u.find(".lv-list-logs-text").html(appCore.languageData.logsView.logsCompletion.value.replace("%X%", appCore.userId)), r.tinyscrollbar({ | |
touchLock: !1 | |
}), w = r.data("plugin_tinyscrollbar"), z = this._container.find(".lv-list-item-icon-samples").find(".lv-list-item-icon.locked").html(), A = this._container.find(".lv-list-item-icon-samples").find(".lv-list-item-icon.unlocked").html(), p = q.body.find(".lexos-panel-body-close-btn"), h.register(function(a) { | |
switch (a.type) { | |
case "onPuzzleDataLoaded": | |
d(), B.add(TweenMax.staggerFromTo(t, .5, { | |
y: "+=10", | |
opacity: 0, | |
immediateRender: !0 | |
}, { | |
y: 0, | |
opacity: 1, | |
ease: Power3.easeOut | |
}, .1)); | |
break; | |
case "onPuzzleUnlocked": | |
f(a.id); | |
break; | |
case "onPuzzleActivated": | |
g(a.id) | |
} | |
}), B = new TimelineMax({ | |
paused: !0 | |
}) | |
} | |
return babelHelpers.inherits(b, a), b.prototype.show = function() { | |
a.prototype.show.call(this), y = !1, TweenMax.set(s, { | |
autoAlpha: 0 | |
}), q.show(function() { | |
B.play(), this._animateInCompleted() | |
}.bind(this), [{ | |
tweens: TweenMax.fromTo(s, .1, { | |
autoAlpha: 0 | |
}, { | |
autoAlpha: 1, | |
onStart: function() { | |
x ? (x = !1, w.update(0)) : w.update(w.contentPosition) | |
} | |
}), | |
position: "+=0" | |
}]) | |
}, b.prototype.hide = function() { | |
var b = arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0]; | |
a.prototype.hide.call(this, b), b ? q.hide(function() { | |
this._animateOutCompleted() | |
}.bind(this)) : a.prototype.hide.call(this, !1) | |
}, babelHelpers.createClass(b, [{ | |
key: "closeBtn", | |
get: function() { | |
return p | |
} | |
}, { | |
key: "scrollbarData", | |
get: function() { | |
return w | |
} | |
}]), b | |
}(j["default"]); | |
c["default"] = C, b.exports = c["default"] | |
}, { | |
"../../lib/core/AppDispatcher": 4, | |
"../../lib/core/views/AppView": 10, | |
"../SiteConstants": 13, | |
"./OSPanelView": 34 | |
}], | |
34: [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), function() { | |
function a(b) { | |
babelHelpers.classCallCheck(this, a), this._container = b, this._panelTransitioning = !1, this._panelInTLCompleteCallback = null, this._panelOutCompleteCallback = null, this._curHeaderHeight = 40, this._curBodyHeight = 0, this._line = this._container.find(".lexos-panel-line"), this._header = this._container.find(".lexos-panel-header"), this._headerContent = this._container.find(".lexos-panel-header-content"), this._body = this._container.find(".lexos-panel-body"), this._bodyContent = this._container.find(".lexos-panel-body-content"), this._bodySubHeaderContent = this._container.find(".lexos-panel-body-subheader-content"), this._curHeaderHeight = this._headerContent.children().length > 0 ? this._headerContent.outerHeight(!0) : 20, this._curBodySubHeaderHeight = this._bodySubHeaderContent.length > 0 ? this._bodySubHeaderContent.height() : 0, this._curBodySubHeaderHeightOuter = this._bodySubHeaderContent.length > 0 ? this._bodySubHeaderContent.outerHeight(!0) : 0, this._curBodyHeight = this._bodyContent.children().length > 0 ? this._bodyContent.outerHeight(!0) + 2 : 0, this._curBodyHeight += this._curBodySubHeaderHeightOuter, this._bodyVisible = !1, this._headerContent.attr("og-height", this._curHeaderHeight), this._bodyContent.attr("og-height", this._curBodyHeight), this._bodySubHeaderContent.attr("og-height", this._curBodySubHeaderHeight), this._body.css({ | |
visibility: "hidden", | |
height: 0, | |
opacity: 0 | |
}), this._panelInTL = new TimelineMax({ | |
paused: !0, | |
onComplete: function() { | |
this._panelTransitioning = !1, "function" == typeof this._panelInTLCompleteCallback && (this._panelInTLCompleteCallback(), this._panelInTLCompleteCallback = null) | |
}.bind(this) | |
}), this._panelOutTL = new TimelineMax({ | |
paused: !0, | |
onComplete: function() { | |
this._panelTransitioning = !1, "function" == typeof this._panelOutTLCompleteCallback && (this._panelOutTLCompleteCallback(), this._panelOutTLCompleteCallback = null), "function" == typeof this._panelOutCompleteCallback && (this._panelOutCompleteCallback(), this._panelOutCompleteCallback = null) | |
}.bind(this) | |
}) | |
} | |
return a.prototype.show = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0], | |
b = arguments.length <= 1 || void 0 === arguments[1] ? [] : arguments[1]; | |
if (!this._panelTransitioning) { | |
if (this._panelInTLCompleteCallback = a, this._panelTransitioning = !0, this._panelInTL.clear(), this._animateHeaderIn(this._panelInTL), this._animateBodyIn(this._panelInTL), b.length > 0) | |
for (var c = 0, d = b.length; d > c; c++) this._panelInTL.add(b[c].tweens, b[c].position); | |
this._panelInTL.play() | |
} | |
}, a.prototype._animateHeaderIn = function(a) { | |
this._curHeaderHeight = this._headerContent.attr("og-height"), d.dispatch("onAudioTriggered", { | |
id: "audio_element_in", | |
volume: .6 | |
}), a.add(TweenMax.set(this._header, { | |
visibility: "visible" | |
})), a.add(TweenMax.fromTo(this._line, .4, { | |
left: "50%", | |
width: "0%", | |
immediateRender: !0 | |
}, { | |
left: "0%", | |
width: "100%", | |
ease: Power3.easeOut | |
})), a.add([TweenMax.fromTo(this._header, .25, { | |
height: 0, | |
immediateRender: !0 | |
}, { | |
height: this._curHeaderHeight, | |
ease: Circ.easeOut | |
}), TweenMax.staggerFromTo(this._headerContent.children(), .5, { | |
opacity: 0, | |
y: "+=5", | |
immediateRender: !0 | |
}, { | |
opacity: 1, | |
y: 0, | |
ease: Power3.easeOut, | |
delay: .4 | |
}, .1)], "-=0", "start") | |
}, a.prototype._animateBodyIn = function(a) { | |
a.add(TweenMax.set(this._body, { | |
visibility: "visible" | |
})); | |
var b = this._bodyContent.attr("og-height"); | |
this._bodyVisible || (this._curBodyHeight = 0), a.add([TweenMax.fromTo(this._body, .6, { | |
height: this._curBodyHeight, | |
immediateRender: !0 | |
}, { | |
height: b, | |
ease: Power3.easeOut, | |
onStart: function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_window_in", | |
volume: .6 | |
}) | |
} | |
}), TweenMax.to(this._body, .6, { | |
opacity: 1, | |
onComplete: function() { | |
this._curBodyHeight = b | |
}.bind(this) | |
}), TweenMax.fromTo(this._bodySubHeaderContent, .6, { | |
height: 0, | |
immediateRender: !0 | |
}, { | |
height: this._curBodySubHeaderHeight, | |
ease: Power3.easeOut | |
}), TweenMax.staggerFromTo(this._bodyContent.children(), .6, { | |
opacity: 0, | |
y: "+=5", | |
immediateRender: !0 | |
}, { | |
opacity: 1, | |
y: 0, | |
ease: Power3.easeOut, | |
delay: .4 | |
}, .2, function() {}.bind(this))], "-=0.4") | |
}, a.prototype.showHeaderOnly = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0], | |
b = arguments.length <= 1 || void 0 === arguments[1] ? [] : arguments[1]; | |
if (!this._panelTransitioning) { | |
if (this._panelInTLCompleteCallback = a, this._panelTransitioning = !0, this._panelInTL.clear(), this._curHeaderHeight = this._headerContent.children().length > 0 ? this._headerContent.outerHeight(!0) : 40, this._animateHeaderIn(this._panelInTL), b.length > 0) | |
for (var c = 0, d = b.length; d > c; c++) this._panelInTL.add(b[c].tweens, b[c].position); | |
this._panelInTL.play() | |
} | |
}, a.prototype._animateHeaderOut = function(a) { | |
a.add([TweenMax.staggerFromTo(this._headerContent.children(), .3, { | |
opacity: 1, | |
immediateRender: !0 | |
}, { | |
opacity: 0, | |
ease: Power3.easeOut | |
}), TweenMax.fromTo(this._header, .3, { | |
height: this._curHeaderHeight, | |
y: 0, | |
immediateRender: !0 | |
}, { | |
height: 0, | |
y: "-=10", | |
clearProps: "y", | |
delay: .3, | |
ease: Power3.easeOut | |
}), TweenMax.to(this._line, .3, { | |
height: 0, | |
clearProps: "height", | |
onCompleteParams: this._line, | |
ease: Power3.easeOut, | |
delay: .3, | |
onComplete: function(a) { | |
a && TweenMax.set(a, { | |
left: "50%", | |
width: "0%" | |
}) | |
} | |
})], 0, "normal") | |
}, a.prototype._animateBodyOut = function(a) { | |
a.add([TweenMax.staggerFromTo(this._bodyContent.children(), .3, { | |
opacity: 1, | |
immediateRender: !0 | |
}, { | |
opacity: 0, | |
ease: Power3.easeOut | |
}), TweenMax.to(this._bodyContent, .3, { | |
scaleY: 0, | |
y: .5 * -this._curBodyHeight, | |
ease: Power3.easeOut, | |
delay: .2, | |
clearProps: "scaleY, y" | |
}), TweenMax.to(this._bodySubHeaderContent, .3, { | |
height: 0, | |
ease: Power3.easeOut, | |
delay: .2, | |
onStart: function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_window_out", | |
volume: .6 | |
}) | |
} | |
}), TweenMax.to(this._body, .3, { | |
opacity: 0, | |
delay: .3, | |
ease: Power3.easeOut, | |
onComplete: function() { | |
this._bodyVisible = !1 | |
}.bind(this) | |
})], 0, "normal") | |
}, a.prototype.hide = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0], | |
b = arguments.length <= 1 || void 0 === arguments[1] ? [] : arguments[1]; | |
if (!this._panelTransitioning) { | |
if (this._panelOutCompleteCallback = a, this._panelTransitioning = !0, this._panelOutTL.clear(), b.length > 0) | |
for (var c = 0, d = b.length; d > c; c++) this._panelOutTL.add(b[c].tweens, b[c].position); | |
this._animateBodyOut(this._panelOutTL), this._animateHeaderOut(this._panelOutTL), this._panelOutTL.play() | |
} | |
}, a.prototype.hideHeaderOnly = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0], | |
b = arguments.length <= 1 || void 0 === arguments[1] ? [] : arguments[1]; | |
if (!this._panelTransitioning) { | |
if (this._panelOutTLCompleteCallback = a, this._panelTransitioning = !0, this._panelOutTL.clear(), b.length > 0) | |
for (var c = 0, d = b.length; d > c; c++) this._panelOutTL.add(b[c].tweens, b[c].position); | |
this.setNewHeaderContent(), this._panelOutTL.play() | |
} | |
}, a.prototype.setNewHeaderContent = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? "" : arguments[0]; | |
return this._headerContent.children().length > 0 ? void TweenMax.to(this._headerContent.children(), .1, { | |
opacity: 0, | |
onCompleteParams: [a], | |
onComplete: function(a) { | |
this._headerContent.children().remove(), this.setNewHeaderContent(a) | |
}.bind(this) | |
}) : (this._headerContent.append(a), TweenMax.set(this._headerContent.children(), { | |
opacity: 0 | |
}), void setTimeout(function() { | |
this._headerContent.css("height", "auto"); | |
var a = 0 != this._headerContent.children().length ? this._headerContent.outerHeight(!0) : 40; | |
TweenMax.fromTo(this._header, .5, { | |
height: this._curHeaderHeight, | |
immediateRender: !0 | |
}, { | |
height: a, | |
ease: Power3.easeOut, | |
onComplete: function() { | |
this._curHeaderHeight = a | |
}.bind(this) | |
}), TweenMax.staggerFromTo(this._headerContent.children(), .5, { | |
opacity: 0, | |
x: "+=20", | |
immediateRender: !0 | |
}, { | |
opacity: 1, | |
x: 0, | |
ease: Power3.easeOut, | |
delay: .4 | |
}, .2) | |
}.bind(this), 100)) | |
}, a.prototype.setNewPanelContent = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? "" : arguments[0], | |
b = arguments.length <= 1 || void 0 === arguments[1] ? null : arguments[1]; | |
return this._bodyContent.children().length > 0 ? void TweenMax.to(this._bodyContent.children(), .1, { | |
opacity: 0, | |
onCompleteParams: [a], | |
onComplete: function(a) { | |
this._bodyContent.children().remove(), this.setNewPanelContent(a) | |
}.bind(this) | |
}) : (this._bodyContent.append(a), void setTimeout(function() { | |
this._bodyVisible || (TweenMax.set(this._body, { | |
height: 0, | |
visibility: "visible" | |
}), this._bodyVisible = !0); | |
var a = this._bodyContent.outerHeight(!0); | |
d.dispatch("onAudioTriggered", { | |
id: "audio_window_in", | |
volume: .6 | |
}), TweenMax.fromTo(this._body, .6, { | |
height: this._curBodyHeight, | |
immediateRender: !0 | |
}, { | |
height: a, | |
ease: Power3.easeOut, | |
delay: .4 | |
}), TweenMax.to(this._body, .6, { | |
opacity: 1, | |
delay: .4, | |
onComplete: function() { | |
this._curBodyHeight = a, b && b() | |
}.bind(this) | |
}), TweenMax.staggerFromTo(this._bodyContent.children(), .6, { | |
opacity: 0, | |
y: "+=20", | |
immediateRender: !0 | |
}, { | |
opacity: 1, | |
y: 0, | |
ease: Power3.easeOut, | |
delay: .4 | |
}, .2, function() {}.bind(this)) | |
}.bind(this), 100)) | |
}, babelHelpers.createClass(a, [{ | |
key: "container", | |
get: function() { | |
return this._container | |
} | |
}, { | |
key: "header", | |
get: function() { | |
return this._header | |
} | |
}, { | |
key: "body", | |
get: function() { | |
return this._body | |
} | |
}, { | |
key: "panelTransitioning", | |
get: function() { | |
return this._panelTransitioning | |
} | |
}]), a | |
}()); | |
c["default"] = g, b.exports = c["default"] | |
}, { | |
"../../lib/core/AppDispatcher": 4, | |
"../../lib/core/views/AppView": 10, | |
"../SiteConstants": 13 | |
}], | |
35: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0; | |
var d = a("../../lib/core/AppDispatcher"), | |
e = a("../../lib/core/views/AppView"), | |
f = babelHelpers.interopRequireDefault(e), | |
g = void 0, | |
h = void 0, | |
i = void 0, | |
j = void 0, | |
k = function(a) { | |
function b() { | |
babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "PreloaderView: ", this._container = $("#preloaderView"), g = this._container.find(".preloader-percentage"), h = this._container.find(".preloader-bg"), i = this._container.find(".preloader-hex"), j = new TimelineMax({ | |
paused: !0, | |
onComplete: function() { | |
this._animateOutCompleted() | |
}.bind(this) | |
}), j.add(TweenMax.to(this._container, .3, { | |
autoAlpha: 0 | |
})) | |
} | |
return babelHelpers.inherits(b, a), b.prototype.showPercentage = function(a) { | |
g.html(a + "%") | |
}, b.prototype._animateOut = function() { | |
a.prototype._animateOut.call(this), j.restart(!0) | |
}, b.prototype.animateHexDelay = function(a) { | |
g.hide(), TweenLite.set(h, { | |
opacity: .8 | |
}), this._container.show(), a.add(TweenLite.to(this._container, .2, { | |
autoAlpha: 1 | |
})), a.add(TweenLite.fromTo(i, .3, { | |
scaleX: .7, | |
scaleY: .7, | |
transformOrigin: "50% 50%", | |
opacity: 0, | |
immediateRender: !0 | |
}, { | |
scaleX: 1, | |
scaleY: 1, | |
opacity: 1 | |
})), a.add(TweenLite.to(i, .2, { | |
scaleX: .2, | |
scaleY: .2, | |
opacity: 0 | |
}), "+=0.6"), a.add(TweenLite.to(this._container, .1, { | |
autoAlpha: 0 | |
})) | |
}, b.prototype.showNetworkAccessDeniedDelay = function() { | |
var a = new TimelineLite({ | |
paused: !0, | |
onComplete: function() { | |
a.kill(), this._container.hide(), d.dispatch("onNetworkAccessDeniedDelayFinished") | |
}.bind(this) | |
}); | |
this.animateHexDelay(a), a.restart() | |
}, b.prototype.showNetworkTerminalDelay = function() { | |
var a = new TimelineLite({ | |
paused: !0, | |
onComplete: function() { | |
a.kill(), this._container.hide(), d.dispatch("onNetworkTerminalDelayFinished") | |
}.bind(this) | |
}); | |
this.animateHexDelay(a), a.restart() | |
}, b | |
}(f["default"]); | |
c["default"] = k, b.exports = c["default"] | |
}, { | |
"../../lib/core/AppDispatcher": 4, | |
"../../lib/core/views/AppView": 10 | |
}], | |
36: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0; | |
var d = a("../../lib/core/AppDispatcher"), | |
e = a("../models/PuzzleData"), | |
f = (babelHelpers.interopRequireDefault(e), void 0), | |
g = void 0, | |
h = void 0, | |
i = void 0, | |
j = void 0, | |
k = null, | |
l = null, | |
m = [], | |
n = void 0, | |
o = void 0, | |
p = void 0, | |
q = void 0, | |
r = !1, | |
s = 60 / 180 * Math.PI, | |
t = void 0, | |
u = [], | |
v = .6, | |
w = void 0, | |
x = void 0, | |
y = null, | |
z = !0, | |
A = !1, | |
B = void 0, | |
C = null, | |
D = void 0, | |
E = null, | |
F = void 0, | |
G = !1, | |
H = !1, | |
I = void 0, | |
J = !1, | |
K = [], | |
L = !1, | |
M = void 0, | |
N = function() { | |
function a(b, c) { | |
var e = arguments.length <= 2 || void 0 === arguments[2] ? null : arguments[2]; | |
babelHelpers.classCallCheck(this, a), this.DEBUG_ID = "PuzzleView: ", p = b, q = c, null != e && (y = e), B = new TimelineLite({ | |
delay: .5, | |
paused: !0, | |
onComplete: function() { | |
H || (H = !0, d.dispatch("onPuzzleStarted", { | |
id: Number(w.id) + 1 | |
})), C && (C(), C = null), L = !1, A = !0 | |
}.bind(this) | |
}), D = new TimelineLite({ | |
paused: !0, | |
onComplete: function() { | |
E && (E(), E = null), L = !1 | |
}.bind(this) | |
}), I = new TimelineMax({ | |
delay: 1, | |
paused: !0, | |
repeat: -1, | |
repeatDelay: 2 | |
}), this.initObject() | |
} | |
return a.prototype.initObject = function() { | |
var a = new THREE.VRMLLoader(q); | |
a.load("files/models/LexSphere_staticTiles_production.wrl", function(a) { | |
this._handleObjectLoaded(a) | |
}.bind(this)) | |
}, a.prototype._handleObjectLoaded = function(a) { | |
"mobile" == appCore.settings.device && (v = .48, appCore.settings.windowHeight < 550 && (v = .46), a.position.y = -15), a.rotation.y = .5 * Math.PI, a.scale.set(v, v, v), a.traverse(function(a) { | |
if (a instanceof THREE.Object3D && "Tiles" == a.name) k = a, l = k.children, o = l.length, n = k.position.clone(); | |
else if (a instanceof THREE.Object3D && null != a.name.match(/_front/)) { | |
null == x && (x = a.children[0].material.clone()), m.push(a); | |
var b = new THREE.LineBasicMaterial({ | |
color: 3896715, | |
transparent: !0, | |
linewidth: 1 | |
}), | |
c = new THREE.Geometry; | |
c.vertices.push(a.children[0].geometry.vertices[0]), c.vertices.push(a.children[0].geometry.vertices[1]), c.vertices.push(a.children[0].geometry.vertices[2]), c.vertices.push(a.children[0].geometry.vertices[3]), c.vertices.push(a.children[0].geometry.vertices[4]), c.vertices.push(a.children[0].geometry.vertices[5]), c.vertices.push(a.children[0].geometry.vertices[0]); | |
var d = new THREE.Line(c, b); | |
a.add(d) | |
} else a instanceof THREE.Object3D && (null != a.name.match(/_back/) || null != a.name.match(/_side/)) && (a.visible = !1) | |
}), p.add(a), this._handleLoadModelCommpleted() | |
}, a.prototype.initPuzzle = function(a) { | |
var b = arguments.length <= 1 || void 0 === arguments[1] ? !0 : arguments[1]; | |
z = b, w = _.clone(a), A ? this.animateOut(function() { | |
this._loadNewPuzzleTexture() | |
}.bind(this)) : this._loadNewPuzzleTexture() | |
}, a.prototype._loadNewPuzzleTexture = function() { | |
var a = new THREE.TextureLoader(q); | |
a.load(w.frontTextureImage, this._handleLoadTextureCompleted.bind(this)) | |
}, a.prototype._handleLoadTextureCompleted = function(a) { | |
var b = 60; | |
G = !1, H = !1, M = 0; | |
for (var c = 0; o > c; c++) l[c].rotation.x = 0, l[c].usedInPuzzle = !0; | |
for (var c = 0; c < w.modifiedTiles.length; c++) b = 60 * (Math.floor(5 * Math.random()) + 1), l[w.modifiedTiles[c].id].rotation.x = b / 180 * Math.PI; | |
for (var c = 0; c < w.unusedTiles.length; c++) l[w.unusedTiles[c].id].usedInPuzzle = !1; | |
F = 100 - Math.floor(w.modifiedTiles.length / o * 100); | |
for (var c = 0; o > c; c++) { | |
var d = x.clone(); | |
d.map = a, d.opacity = 0, m[c].children[0].material = d | |
} | |
A ? this.animateIn() : this._hidePuzzle() | |
}, a.prototype._handleLoadModelCommpleted = function() { | |
d.dispatch("onLoadPuzzleModelCompleted") | |
}, a.prototype.checkPuzzle = function() { | |
var a = 0 === this.checkPuzzleProgress(); | |
a && this.showSolvedPuzzle() | |
}, a.prototype.checkPuzzleProgress = function() { | |
for (var a = 0, b = 0; o > b; b++) l[b].usedInPuzzle && 0 != l[b].rotation.x && Math.round(180 * l[b].rotation.x / Math.PI) % 360 != 0 && a++; | |
var c = 100 - Math.floor(a / o * 100); | |
if (F != c) { | |
var e = c > F; | |
F = c, d.dispatch("onPuzzleInProgress", { | |
percent: c, | |
up: e | |
}) | |
} | |
return a | |
}, a.prototype.show = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0]; | |
C = a, this.animateIn() | |
}, a.prototype.animateIn = function() { | |
L = !0, d.dispatch("onAudioTriggered", { | |
id: "audio_puzzle_in", | |
volume: .6 | |
}), B.kill().clear(), D.kill().clear(); | |
for (var a = 0; o > a; a++) B.add([TweenMax.fromTo(l[a].children[0].children[2].children[1].material, 1, { | |
opacity: 0, | |
immediateRender: !0 | |
}, { | |
opacity: 1, | |
ease: Power4.easeOut | |
}), TweenMax.fromTo(l[a].children[0].children[2].children[1].position, 1, { | |
x: 50, | |
immediateRender: !0 | |
}, { | |
x: 0, | |
ease: Power4.easeOut | |
}), TweenMax.fromTo(l[a].children[0].children[2].children[1].scale, 1, { | |
x: .5, | |
y: .5, | |
z: .5, | |
immediateRender: !0 | |
}, { | |
x: 1, | |
y: 1, | |
z: 1, | |
ease: Power4.easeOut | |
})], .05 * a, "normal"), G || B.add([TweenMax.fromTo(l[a].children[0].children[2].children[0].position, 1, { | |
x: 50, | |
immediateRender: !0 | |
}, { | |
x: 0, | |
delay: .3, | |
ease: Power4.easeOut | |
}), TweenMax.fromTo(l[a].children[0].children[2].children[0].scale, 1, { | |
x: .5, | |
y: .5, | |
z: .5, | |
immediateRender: !0 | |
}, { | |
x: 1, | |
y: 1, | |
z: 1, | |
delay: .3, | |
ease: Power4.easeOut | |
}), TweenMax.fromTo(l[a].children[0].children[2].children[0].material, 1, { | |
opacity: 0, | |
immediateRender: !0 | |
}, { | |
opacity: 1, | |
delay: .3 | |
})], .05 * a, "normal"); | |
B.restart() | |
}, a.prototype.hide = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0]; | |
E = a, A = !1, this.animateOut() | |
}, a.prototype.animateOut = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0]; | |
null != a && (E = a), i && this._removeEmissiveColor(i), this._stopWrongTilesAnimation(), L = !0, D.kill().clear(), B.kill().clear(); | |
for (var b = 0; o > b; b++) D.add([TweenMax.fromTo(l[b].children[0].children[2].children[1].material, .5, { | |
opacity: 1, | |
immediateRender: !0 | |
}, { | |
opacity: 0, | |
delay: .2, | |
ease: Power4.easeIn | |
}), TweenMax.fromTo(l[b].children[0].children[2].children[1].position, .5, { | |
x: 0, | |
immediateRender: !0 | |
}, { | |
x: 50, | |
delay: .2, | |
ease: Power4.easeIn | |
}), TweenMax.fromTo(l[b].children[0].children[2].children[1].scale, .5, { | |
x: 1, | |
y: 1, | |
z: 1, | |
immediateRender: !0 | |
}, { | |
x: .5, | |
y: .5, | |
z: .5, | |
delay: .2, | |
ease: Power4.easeIn | |
})], .02 * (o - 1 - b), "normal"), G || D.add([TweenMax.fromTo(l[b].children[0].children[2].children[0].position, .5, { | |
x: 0, | |
immediateRender: !0 | |
}, { | |
x: 50, | |
ease: Power3.easeIn | |
}), TweenMax.fromTo(l[b].children[0].children[2].children[0].scale, .5, { | |
x: 1, | |
y: 1, | |
z: 1, | |
immediateRender: !0 | |
}, { | |
x: .5, | |
y: .5, | |
z: .5, | |
ease: Power3.easeIn | |
}), TweenMax.fromTo(l[b].children[0].children[2].children[0].material, .5, { | |
opacity: 1, | |
immediateRender: !0 | |
}, { | |
opacity: 0 | |
})], .02 * (o - 1 - b), "normal"); | |
D.restart() | |
}, a.prototype._hidePuzzle = function() { | |
for (var a = 0; o > a; a++) TweenMax.set(l[a].children[0].children[2].children[0].material, { | |
opacity: 0 | |
}), TweenMax.set(l[a].children[0].children[2].children[1].material, { | |
opacity: 0 | |
}) | |
}, a.prototype.reset = function() { | |
for (var a = 0; o > a; a++) l[a].rotation.x = 0, l[a].children[0].rotation.z = 0; | |
null != h && this.moveToNormal(!1) | |
}, a.prototype.showSolvedPuzzle = function() { | |
if (!G) { | |
G = !0, d.dispatch("onAudioTriggered", { | |
id: "audio_puzzle_solved", | |
volume: .6 | |
}), D.kill().clear(), D.pause(); | |
for (var a = 0; o > a; a++) D.add([TweenMax.fromTo(l[a].children[0].children[2].children[0].position, .5, { | |
x: 0, | |
immediateRender: !0 | |
}, { | |
x: 50, | |
ease: Power3.easeIn | |
}), TweenMax.fromTo(l[a].children[0].children[2].children[0].scale, .5, { | |
x: 1, | |
y: 1, | |
z: 1, | |
immediateRender: !0 | |
}, { | |
x: .5, | |
y: .5, | |
z: .5, | |
ease: Power3.easeIn | |
}), TweenMax.fromTo(l[a].children[0].children[2].children[0].material, .5, { | |
opacity: 1, | |
immediateRender: !0 | |
}, { | |
opacity: 0 | |
})], .02 * (o - 1 - a), "normal"); | |
setTimeout(function() { | |
D.restart(), d.dispatch("onPuzzleSolved", { | |
id: w.id | |
}) | |
}, 250) | |
} | |
}, a.prototype._removeEmissiveColor = function(a) { | |
TweenMax.to(a.scale, .2, { | |
x: 1, | |
y: 1, | |
z: 1 | |
}), TweenMax.to(a.material.emissive, .2, { | |
r: 0, | |
g: 0, | |
b: 0 | |
}) | |
}, a.prototype._addEmissiveColor = function(a) { | |
TweenMax.to(a.material.emissive, .3, { | |
r: .2, | |
g: .2, | |
b: .2 | |
}) | |
}, a.prototype._addWrongTileAnimation = function(a, b) { | |
I.add([TweenMax.fromTo(a.scale, .3, { | |
x: 1, | |
y: 1, | |
z: 1 | |
}, { | |
x: .95, | |
y: .95, | |
z: .95 | |
}), TweenMax.fromTo(a.material.emissive, .3, { | |
r: 0, | |
g: 0, | |
b: 0 | |
}, { | |
r: .06, | |
g: .06, | |
b: .04 | |
})]), I.add([TweenMax.to(a.scale, .3, { | |
x: 1, | |
y: 1, | |
z: 1 | |
}), TweenMax.to(a.material.emissive, .3, { | |
r: 0, | |
g: 0, | |
b: 0, | |
delay: .1 | |
})]), K.push(a) | |
}, a.prototype._startWrongTilesAnimation = function() { | |
J || (J = !0, I.clear(), K = [], this._checkWrongTiles(), I.restart(!0)) | |
}, a.prototype._stopWrongTilesAnimation = function() { | |
if (J) { | |
I.kill(), J = !1; | |
for (var a = 0; a < K.length; a++) TweenMax.to(K[a].scale, .3, { | |
x: 1, | |
y: 1, | |
z: 1 | |
}), TweenMax.set(K[a].material.emissive, { | |
r: 0, | |
g: 0, | |
b: 0 | |
}) | |
} | |
}, a.prototype._checkWrongTiles = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? -1 : arguments[0]; | |
if (a >= 0 && l[a].usedInPuzzle && 0 != l[a].rotation.x) this._animateWrongTile(m[a].children[0]); | |
else | |
for (var b = 0, c = 0; o > c; c++) l[c].usedInPuzzle && 0 != l[c].rotation.x && Math.round(180 * l[c].rotation.x / Math.PI) % 360 != 0 && (this._addWrongTileAnimation(m[c].children[0], b), b += .5) | |
}, a.prototype.checkOnClick = function() { | |
r || (f ? (d.dispatch("onAudioTriggered", { | |
id: "audio_piece_click", | |
volume: .6 | |
}), h == f ? this.moveToNormal() : (h && (TweenLite.to(h.children[0].position, .2, { | |
x: 0 | |
}), this._removeEmissiveColor(i), TweenLite.to(h.children[0].children[2].children[1].material, .2, { | |
linewidth: 1 | |
}), this.checkPuzzleProgress()), h = f, i = g, this.moveTo(f.position), this._removeEmissiveColor(i), TweenLite.to(h.children[0].children[2].children[1].material, .2, { | |
linewidth: 5 | |
}), h.traverse(function(a) { | |
a instanceof THREE.Mesh && null != a.parent.name.match(/_front/) && (i = a) | |
}.bind(this)))) : null != h && this.moveToNormal()) | |
}, a.prototype.resetIntersectObject = function() { | |
null != f && null == h && (this._removeEmissiveColor(g), g = null) | |
}, a.prototype.render = function(a) { | |
if (null != k && A && !G) { | |
var b = a.intersectObjects(k.children, !0); | |
b.length > 0 ? (f != b[0].object.parent.parent.parent && (this.resetIntersectObject(), f = b[0].object.parent.parent.parent, null == h && f.traverse(function(a) { | |
a instanceof THREE.Mesh && null != a.parent.name.match(/_front/) && (g = a, this._addEmissiveColor(g)) | |
}.bind(this))), this._stopWrongTilesAnimation()) : (this.resetIntersectObject(), f = null, h || this._startWrongTilesAnimation()) | |
} | |
}, a.prototype.moveTo = function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_puzzle_moves", | |
volume: .6 | |
}), r = !0; | |
var b = new TimelineLite({ | |
onComplete: function() { | |
r = !1 | |
}.bind(this) | |
}); | |
b.add(TweenLite.to(k.position, .5, { | |
y: -a.y, | |
z: -a.z | |
})), b.add(TweenLite.to(h.children[0].position, .2, { | |
x: -30 | |
})) | |
}, a.prototype.moveToNormal = function(a, b) { | |
if (void 0 === a && (a = !0), r = !0, a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_puzzle_moves", | |
volume: .6 | |
}); | |
var c = new TimelineLite({ | |
onComplete: function() { | |
r = !1, b && "function" == typeof b && b(), this.checkPuzzle() | |
}.bind(this) | |
}); | |
c.add(TweenLite.to(h.children[0].position, .2, { | |
x: 0 | |
})), c.add(TweenLite.to(k.position, .2, { | |
x: n.x, | |
y: n.y, | |
z: n.z | |
})) | |
} else h.children[0].position.x = 0, k.position.x = n.x, k.position.y = n.y, k.position.z = n.z, r = !1; | |
this._removeEmissiveColor(i), TweenLite.to(h.children[0].children[2].children[1].material, .2, { | |
linewidth: 1 | |
}), h = null, i = null | |
}, a.prototype.startTileRotation = function() { | |
h && (j = h.rotation.clone(), t = j.x, u = [Math.round(180 * t / Math.PI)]) | |
}, a.prototype.stopTileRotation = function() { | |
if (null == h) return !1; | |
var a = 0, | |
b = 0, | |
c = h.rotation.x; | |
if (0 > c) { | |
for (; a > c;) b = a - c, a -= s; | |
c - a > b && (a += s) | |
} else if (c > 0) { | |
for (; c > a;) b = a - c, a += s; | |
b > c - a && (a -= s) | |
} | |
c < j.x, b = Math.abs(a - c), u.push(Math.round(180 * a / Math.PI)); | |
for (var d = 0, e = 0, f = u.length; f - 1 > e; e++) u[e] != u[e + 1] && (u[e] < u[e + 1] ? d++ : d--); | |
return d = Math.abs(d), M += d, TweenLite.to(h.rotation, .2, { | |
x: a, | |
onComplete: function() { | |
r = !1 | |
}.bind(this) | |
}), h.usedInPuzzle ? M : !1 | |
}, a.prototype.rotateActiveTile = function(a) { | |
r = !0; | |
var b = j.x - a / 180 * Math.PI, | |
c = h.rotation.x, | |
e = Math.abs(b - t); | |
e > 1.5707963267948966 && (b > c ? b -= 6.283185307179586 : b += 6.283185307179586), b > c ? (Math.abs(b - t) > s && (t += s, u.push(Math.round(180 * t / Math.PI))), d.dispatch("onAudioTriggered", { | |
id: "audio_piece_rotate_right", | |
volume: .6, | |
vo: !0, | |
stopOtherVOs: !1 | |
})) : (d.dispatch("onAudioTriggered", { | |
id: "audio_piece_rotate_left", | |
volume: .6, | |
vo: !0, | |
stopOtherVOs: !1 | |
}), Math.abs(t - b) > s && (t -= s, u.push(Math.round(180 * t / Math.PI)))), h.rotation.x = b | |
}, babelHelpers.createClass(a, [{ | |
key: "tilesParent", | |
get: function() { | |
return k | |
} | |
}, { | |
key: "tilesObjects", | |
get: function() { | |
return l | |
} | |
}, { | |
key: "intersectObject", | |
get: function() { | |
return f | |
} | |
}, { | |
key: "activeTile", | |
get: function() { | |
return h | |
} | |
}, { | |
key: "defaultTileMaterial", | |
get: function() { | |
return x | |
} | |
}, { | |
key: "wrongTilesAnimationTL", | |
get: function() { | |
return I | |
} | |
}, { | |
key: "puzzleFinished", | |
get: function() { | |
return G | |
} | |
}, { | |
key: "puzzleData", | |
get: function() { | |
return w | |
} | |
}, { | |
key: "moveCount", | |
get: function() { | |
return M | |
} | |
}]), a | |
}(); | |
c["default"] = N, b.exports = c["default"] | |
}, { | |
"../../lib/core/AppDispatcher": 4, | |
"../models/PuzzleData": 27 | |
}], | |
37: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0; | |
var d = a("../../lib/core/AppDispatcher"), | |
e = a("../../lib/core/Utils"), | |
f = a("../SiteConstants"), | |
g = (babelHelpers.interopRequireDefault(f), a("../../lib/core/views/AppView")), | |
h = babelHelpers.interopRequireDefault(g), | |
i = a("./OSPanelView"), | |
j = babelHelpers.interopRequireDefault(i), | |
k = a("./FilesView"), | |
l = (babelHelpers.interopRequireDefault(k), 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 = 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 = void 0, | |
W = void 0, | |
X = void 0, | |
Y = void 0, | |
Z = void 0, | |
_ = void 0, | |
aa = void 0, | |
ba = void 0, | |
ca = [], | |
da = void 0, | |
ea = 0, | |
fa = 0, | |
ha = !1, | |
ia = void 0, | |
ja = 0, | |
ka = "trying 192", | |
la = 3, | |
ma = 5, | |
na = 0, | |
oa = function(a) { | |
function b() { | |
babelHelpers.classCallCheck(this, b), a.call(this), ia = this, this.DEBUG_ID = "StartUpView: ", this._container = $("#startUpView"), n = this._container.find(".suv-bg"), l = this._container.find("#bootUpSequence"), y = l.find(".suv-authentication"), z = y.find(".suv-authentication-header"), A = y.find(".suv-authentication-body"), B = y.find(".suv-login-username"), D = y.find(".suv-login-password"), F = y.find(".suv-login-btn"), G = y.find(".suv-login-error"), H = y.find(".suv-authentication-or"), I = y.find(".suv-guest-btn"), C = new InputText({ | |
container: B.find("input") | |
}), E = new InputText({ | |
container: D.find("input") | |
}), J = y.outerHeight(!0), TweenMax.set(G, { | |
autoAlpha: 0 | |
}), TweenMax.set(y, { | |
height: 0, | |
autoAlpha: 0 | |
}), m = new j["default"](l.find(".lexos-panel")), x = l.find("#lexos_svg"), o = l.find(".lexos-panel-header"), p = l.find(".lexos-panel-header-button"), q = p.find(".hex-outer"), r = p.find(".hex-inner"), s = p.find(".x-icon"), t = l.find(".boot-up-panel-body"), u = t.find(".boot-up-lexos-beta"), v = u.find(".boot-up-lexos-beta-line.left"), w = u.find(".boot-up-lexos-beta-line.right"), K = l.find(".lexos-panel-body-continue-btn"), L = K.find(".lexos-panel-body-continue-btn-bg"), M = L.find(".lexos-panel-body-continue-btn-bg-left"), N = L.find(".lexos-panel-body-continue-btn-bg-center"), O = L.find(".lexos-panel-body-continue-btn-bg-right"); | |
var c = t.find(".boot-up-lexos").width(), | |
d = t.find(".boot-up-lexos-beta").textWidth(); | |
t.find(".boot-up-lexos-beta-line").width((c - d - 20) / 2); | |
var e = K.find(".lexos-panel-body-continue-text").textWidth(), | |
f = Math.round(e + 50); | |
K.find(".lexos-panel-body-continue-btn-bg-center-container").width(f - 20), K.width(f + 20), N[0].setAttribute("viewBox", "0 0 " + (f - 20) + " 40"), P = this._container.find(".suv-access-denied"), Q = P.find(".suv-access-denied-bg"), R = P.find(".suv-access-denied-msg"), S = R.find(".suv-access-denied-msg-bg"), U = R.find(".suv-access-denied-mark-bottom"), T = R.find(".suv-access-denied-mark-top"), V = R.find(".suv-access-denied-header"), W = R.find(".suv-access-denied-attempt"), X = R.find(".suv-access-denied-try-again-btn"), TweenMax.set(P, { | |
autoAlpha: 0 | |
}), Z = this._container.find(".suv-network-terminal"), _ = Z.find(".suv-network-terminal-viewport"), aa = Z.find(".suv-network-terminal-content"), ba = Z.find(".lexos-panel-body-close-btn"), Y = new j["default"](Z), ba.on("click", function(a) { | |
ia.hideNetworkTerminal() | |
}).bind(this); | |
var g = appCore.languageData.startUpView.networkErrorLog.value; | |
ca = g.split("<br/>"), da = ca.length, this._initListeners(), l.hide() | |
} | |
return babelHelpers.inherits(b, a), b.prototype._initListeners = function() { | |
var a = this; | |
I.on("click", function(a) { | |
this._handleGuestBtnClicked() | |
}.bind(this)).on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}), F.on("click", function(a) { | |
this._handleLoginBtnClicked() | |
}.bind(this)).on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}), X.on("mouseenter", function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}).on("click", function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), TweenMax.to(P, .2, { | |
autoAlpha: 0 | |
}) | |
}).bind(this), this.token = d.register(function(b) { | |
switch (b.type) { | |
case "onNetworkAccessDeniedDelayFinished": | |
a.showAccessDenied(); | |
break; | |
case "onNetworkTerminalDelayFinished": | |
a.showNetworkTerminal() | |
} | |
}) | |
}, b.prototype.show = function() { | |
a.prototype.show.call(this), l.show(), this._animateBootUpSequenceIn(), this.resize() | |
}, b.prototype.hide = function() { | |
var b = arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0]; | |
b ? m.hide(function() { | |
a.prototype.hide.call(this, b), this._animateOutCompleted() | |
}.bind(this)) : a.prototype.hide.call(this, !1) | |
}, b.prototype._animateOut = function() { | |
a.prototype._animateOut.call(this) | |
}, b.prototype._animateBootUpSequenceIn = function() { | |
var a = !1; | |
d.dispatch("onAudioTriggered", { | |
id: "audio_window_in", | |
volume: .6 | |
}), m.showHeaderOnly(this._handleOSPanelBootUpAnimateInCompleted.bind(this), [{ | |
tweens: TweenMax.staggerFromTo(x.find("path"), 1.5, { | |
drawSVG: "0% 0%", | |
stroke: "rgba(255,255,255,1)", | |
fill: "rgba(255,255,255,0)", | |
immediateRender: !0 | |
}, { | |
drawSVG: "0% 100%", | |
ease: Power2.easeOut, | |
onCompleteParams: ["{self}"], | |
onComplete: function(a) { | |
TweenMax.to(a.target, 1, { | |
stroke: "rgba(255,255,255,0)", | |
fill: "rgba(255,255,255,1)", | |
clearProps: "strokeWidth, stroke", | |
ease: Power0.easeNone | |
}) | |
}.bind(this), | |
onStart: function() { | |
a || (a = !0, d.dispatch("onAudioTriggered", { | |
id: "audio_os_launch", | |
volume: .6 | |
})) | |
}.bind(this) | |
}, .1), | |
position: "-=0.5" | |
}, { | |
tweens: TweenMax.fromTo(q, .6, { | |
scale: 0, | |
transformOrigin: "50% 50%", | |
immediateRender: !0 | |
}, { | |
scale: 1, | |
transformOrigin: "50% 50%", | |
ease: Power3.easeOut, | |
onStart: function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_element_in", | |
volume: .6 | |
}) | |
} | |
}), | |
position: "-=0.5" | |
}, { | |
tweens: TweenMax.fromTo(r, .6, { | |
scale: 0, | |
transformOrigin: "50% 50%", | |
immediateRender: !0 | |
}, { | |
scale: 1, | |
transformOrigin: "50% 50%", | |
ease: Power3.easeOut | |
}), | |
position: "-=0.4" | |
}, { | |
tweens: TweenMax.fromTo(s, .6, { | |
scale: .5, | |
opacity: 0, | |
transformOrigin: "50% 50%", | |
immediateRender: !0 | |
}, { | |
scale: 1, | |
opacity: 1, | |
transformOrigin: "50% 50%", | |
ease: Power3.easeOut | |
}), | |
position: "-=0.3" | |
}]) | |
}, b.prototype._handleOSPanelBootUpAnimateInCompleted = function() { | |
this._animateInCompleted(), setTimeout(this._animateAuthenticationIn, 1e3) | |
}, b.prototype._animateAuthenticationIn = function() { | |
var a = new TimelineLite({ | |
paused: !0 | |
}); | |
a.add(TweenMax.to(o, .2, { | |
height: "+=" + J | |
})), a.add(TweenMax.to(y, .4, { | |
height: J, | |
autoAlpha: 1 | |
})), a.play() | |
}, b.prototype._animateAuthenticationOut = function() {}, b.prototype._handleOSPanelBootUpAnimateOutCompleted = function() { | |
var a = m.body.find(".lexos-panel-body-continue-btn"); | |
a.off("click").off("mouseenter").off("mouseleave"); | |
var b = a.find(".lexos-panel-body-continue-icon"); | |
a.on("mouseenter", function() { | |
TweenLite.to(b, .2, { | |
x: "+=4" | |
}), d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}).on("mouseleave", function() { | |
TweenLite.to(b, .2, { | |
x: "0" | |
}) | |
}).on("click", this._handleCloseBtnClicked.bind(this)) | |
}, b.prototype._handlePanelHeaderButtonClicked = function(a) { | |
TweenMax.to(n, .5, { | |
opacity: .2 | |
}); | |
var b = null; | |
"mobile" == appCore.settings.device && (b = Math.round(appCore.settings.windowHeight / 2), l.find(".boot-up-panel-body").find(".boot-up-scroller").height(b)), m.setNewPanelContent(l.find(".boot-up-panel-body").html(), function() { | |
"mobile" == appCore.settings.device && l.find(".boot-up-scroller").tinyscrollbar({ | |
scrollInvert: !0 | |
}) | |
}), m.hideHeaderOnly(this._handleOSPanelBootUpAnimateOutCompleted.bind(this), [{ | |
tweens: [TweenMax.to(p, .5, { | |
scale: 0, | |
ease: Back.easeIn | |
}), TweenMax.to(s, .3, { | |
scale: 0, | |
opacity: 0, | |
transformOrigin: "50% 50%" | |
}), TweenMax.to(r, .3, { | |
scale: 0, | |
opacity: 0, | |
transformOrigin: "50% 50%" | |
}), TweenMax.to(q, .3, { | |
scale: 0, | |
opacity: 0, | |
transfromOrigin: "50% 50%" | |
})], | |
position: "+=0" | |
}]) | |
}, b.prototype._handleCloseBtnClicked = function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), d.dispatch("onStartUpContinue") | |
}, b.prototype._handleGuestBtnClicked = function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), this._handlePanelHeaderButtonClicked(null) | |
}, b.prototype._handleLoginBtnClicked = function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}); | |
var a = !1; | |
if (TweenMax.set(G, { | |
autoAlpha: 0 | |
}), C.validate() && E.validate()) { | |
var b = C.getValue(), | |
c = E.getValue(), | |
e = md5(b + "x1"), | |
f = md5(c + "os11"); | |
"13d436d99a18e7909a84fae6a5edc916" == e && "3f5b40613a49e7970b445e53eaedd060" == f && (a = !0) | |
} | |
a ? (d.dispatch("onLoggedM"), d.dispatch("onLoggedMUpdateFiles"), $.ajax({ | |
type: "POST", | |
url: "files/php/tracker.php", | |
data: { | |
action: "write" | |
}, | |
success: function(a) {} | |
}), ga("send", "event", "login", "click", "mgraves"), "3" == appCore.settings.sitePhase ? this.animateOutToContainment() : "2" == appCore.settings.sitePhase ? d.dispatch("onShowNetworkTerminal") : d.dispatch("onShowNetworkAccessDenied")) : TweenMax.set(G, { | |
autoAlpha: 1 | |
}) | |
}, b.prototype.showPreloader = function() {}, b.prototype.showAccessDenied = function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_access_denied", | |
volume: .6 | |
}); | |
var a = new TimelineLite; | |
TweenMax.set([V, W, X], { | |
autoAlpha: 0 | |
}), TweenMax.set([T, U], { | |
opacity: 0 | |
}), a.add(TweenMax.to(P, .1, { | |
autoAlpha: 1 | |
})), a.add(TweenMax.fromTo(S, .2, { | |
scaleX: .9, | |
scaleY: .9, | |
autoAlpha: 0, | |
immediateRender: !0 | |
}, { | |
scaleX: 1, | |
scaleY: 1, | |
autoAlpha: 1 | |
})), a.add(TweenMax.to(V, .2, { | |
autoAlpha: 1 | |
})), a.add(TweenMax.to(W, .2, { | |
autoAlpha: 1 | |
})), a.add(TweenMax.to(X, .2, { | |
autoAlpha: 1 | |
})), a.add(TweenMax.to(T, .05, { | |
opacity: .5 | |
}), "-=0.5"), a.add(TweenMax.to(T, .1, { | |
opacity: 1 | |
}), "-=0.45"), a.add(TweenMax.to(T, .05, { | |
opacity: .5 | |
}), "-=0.35"), a.add(TweenMax.to(T, .1, { | |
opacity: 1 | |
}), "-=0.3"), a.add(TweenMax.to(T, .05, { | |
opacity: .5 | |
}), "-=0.2"), a.add(TweenMax.to(U, .05, { | |
opacity: .5 | |
}), "-=0.3"), a.add(TweenMax.to(U, .1, { | |
opacity: 1 | |
}), "-=0.25"), a.add(TweenMax.to(U, .05, { | |
opacity: .5 | |
}), "-=0.15"), a.add(TweenMax.to(U, .1, { | |
opacity: 1 | |
}), "-=0.1"), a.add(TweenMax.to(U, .05, { | |
opacity: .5 | |
})) | |
}, b.prototype.hideAccessDenied = function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_window_out", | |
volume: .6 | |
}), TweenMax.to(P, .2, { | |
autoAlpha: 0 | |
}) | |
}, b.prototype.showMarkAnimation = function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}); | |
var a = new TimelineLite; | |
a.add(TweenMax.to(T, .05, { | |
opacity: .5 | |
})), a.add(TweenMax.to(T, .1, { | |
opacity: 1 | |
})), a.add(TweenMax.to(T, .05, { | |
opacity: .5 | |
})), a.add(TweenMax.to(T, .1, { | |
opacity: 1 | |
})), a.add(TweenMax.to(T, .05, { | |
opacity: .5 | |
})), a.add(TweenMax.to(U, .05, { | |
opacity: .5 | |
}), "-=0.3"), a.add(TweenMax.to(U, .1, { | |
opacity: 1 | |
}), "-=0.25"), a.add(TweenMax.to(U, .05, { | |
opacity: .5 | |
}), "-=0.3"), a.add(TweenMax.to(U, .1, { | |
opacity: 1 | |
}), "-=0.2"), a.add(TweenMax.to(U, .05, { | |
opacity: .5 | |
})) | |
}, b.prototype.showNetworkTerminal = function() { | |
ha = !0, Z.show(), Y.show(), aa.children().remove(), ea = 0, fa = 0, TweenLite.set(aa.css("top", 422)), this.animateNetworkLine() | |
}, b.prototype.hideNetworkTerminal = function() { | |
ha = !1, Y.hide(function() { | |
Z.hide() | |
}) | |
}, b.prototype.animateNetworkLine = function() { | |
var a = ca[ea], | |
b = $('<div class="suv-network-terminal-line">' + a + "</div>"); | |
aa.append(b); | |
var c = b.height(); | |
fa += c, b.text(""); | |
var d = ja; | |
ja = a.indexOf(ka) > 0 ? la : 0, ea++, TweenLite.to(aa, .2, { | |
top: "-=" + c + "px", | |
delay: d, | |
onCompleteParams: [b, a], | |
onComplete: function(a, b) { | |
TweenLite.to(a, .2, { | |
text: b, | |
ease: Linear.easeNone, | |
onComplete: function() { | |
ha && (da - 1 > ea ? this.animateNetworkLine() : (na += 1, na >= ma ? (na = 0, ia.hideNetworkTerminal()) : (ea = 0, this.animateNetworkLine()))) | |
}.bind(this) | |
}) | |
}.bind(this) | |
}) | |
}, b.prototype.animateOutToContainment = function() { | |
TweenMax.to(n, .5, { | |
opacity: .2 | |
}), m.hideHeaderOnly(this._handleAnimateOutToContainmentCompleted.bind(this), [{ | |
tweens: [TweenMax.to(p, .5, { | |
scale: 0, | |
ease: Back.easeIn | |
}), TweenMax.to(s, .3, { | |
scale: 0, | |
opacity: 0, | |
transformOrigin: "50% 50%" | |
}), TweenMax.to(r, .3, { | |
scale: 0, | |
opacity: 0, | |
transformOrigin: "50% 50%" | |
}), TweenMax.to(q, .3, { | |
scale: 0, | |
opacity: 0, | |
transfromOrigin: "50% 50%" | |
})], | |
position: "+=0" | |
}]) | |
}, b.prototype._handleAnimateOutToContainmentCompleted = function() { | |
d.dispatch("onAnimateToContainment") | |
}, b.prototype.resize = function() { | |
e.resizeBackground(Q) | |
}, b.prototype.enableAudio = function() { | |
d.dispatch("onAudioStatusUpdatedByUser", { | |
muted: !1 | |
}) | |
}, b.prototype.disableAudio = function() { | |
d.dispatch("onAudioStatusUpdatedByUser", { | |
muted: !0 | |
}) | |
}, b | |
}(h["default"]); | |
c["default"] = oa, b.exports = c["default"] | |
}, { | |
"../../lib/core/AppDispatcher": 4, | |
"../../lib/core/Utils": 7, | |
"../../lib/core/views/AppView": 10, | |
"../SiteConstants": 13, | |
"./FilesView": 29, | |
"./OSPanelView": 34 | |
}], | |
38: [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 = a("../controllers/PhotoController"), | |
k = (babelHelpers.interopRequireDefault(j), void 0), | |
l = void 0, | |
m = void 0, | |
n = { | |
DEFAULT_IMAGE: 0, | |
WEBCAM: 1, | |
USER_IMAGE: 2 | |
}, | |
o = n.DEFAULT_IMAGE, | |
p = 1, | |
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 = !1, | |
G = void 0, | |
H = void 0, | |
I = void 0, | |
J = void 0, | |
K = void 0, | |
L = void 0, | |
M = void 0, | |
N = { | |
top: 0, | |
left: 0 | |
}, | |
O = !1, | |
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, | |
_ = void 0, | |
aa = void 0, | |
ba = void 0, | |
ca = void 0, | |
da = void 0, | |
ea = void 0, | |
fa = void 0, | |
ga = void 0, | |
ha = void 0, | |
ia = void 0, | |
ja = void 0, | |
ka = void 0, | |
la = void 0, | |
ma = void 0, | |
na = void 0, | |
oa = void 0, | |
pa = void 0, | |
qa = void 0, | |
ra = void 0, | |
sa = void 0, | |
ta = void 0, | |
ua = void 0, | |
va = void 0, | |
wa = void 0, | |
xa = void 0, | |
ya = void 0, | |
za = void 0, | |
Aa = void 0, | |
Ba = void 0, | |
Ca = void 0, | |
Da = void 0, | |
Ea = void 0, | |
Fa = void 0, | |
Ga = void 0, | |
Ha = void 0, | |
Ia = null, | |
Ja = void 0, | |
Ka = 0, | |
La = void 0, | |
Ma = function(a) { | |
function b() { | |
if (babelHelpers.classCallCheck(this, b), a.call(this), this.DEBUG_ID = "UserView: ", this._container = $("#userView"), "mobile" == appCore.settings.device) { | |
var c = this._container.find(".lexos-panel-body-content"); | |
La = Number(c.css("padding-top").replace("px", "")) + Number(c.css("padding-bottom").replace("px", "")), Ka = appCore.settings.windowHeight - this._container.find(".lexos-panel-header").outerHeight(!0) - 40 - La, this._container.find(".lexos-panel-body-content").height(Ka) | |
} | |
m = this._container.find(".lexos-panel"), l = new i["default"](m), k = l.body.find(".lexos-panel-body-close-btn"), r = this._container.find(".uv-id-container"), s = r.find(".uv-badge"), t = r.find(".uv-badge-actions"), u = r.find(".uv-badge-action-buttons"), Q = r.find(".uv-badge-name"), R = Q.find("#uvBadgeNameInput"), S = Q.find(".uv-badge-name-clear-btn"), T = r.find(".uv-badge-title"), S.hide(), this._initBadge(), this._initBadgeButtons(), this._initEditButtons(), this._initLegal(), this._initFacebookViews(), q = this._container.find(".lexos-panel-header-content-text"), q.html(q.html().replace("%X%", window.appCore.userId)), P = (new Date).getTime() | |
} | |
return babelHelpers.inherits(b, a), b.prototype.show = function() { | |
a.prototype.show.call(this), l.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 ? l.hide(function() { | |
this._animateOutCompleted() | |
}.bind(this)) : a.prototype.hide.call(this, !1) | |
}, b.prototype._initBadge = function() { | |
V = r.find(".uv-badge-holder"), W = V.find(".level-1"), X = V.find(".level-2"), Y = V.find(".level-3"), Z = V.find(".level-4"), _ = V.find(".level-5"), W.hide(), X.hide(), Y.hide(), Z.hide(), _.hide(), I = r.find(".uv-badge-canvas"); | |
r.find("#uvBadgeImageCanvas"); | |
H = new fabric.Canvas("uvBadgeImageCanvas"), J = H.width, K = H.height, this.uvBadgeWebcamContainer = I.find(".uv-badge-webcam-container"), this.uvBadgeWebcamContainer.hide(), oa = r.find(".uv-temp-canvas-container"), pa = oa.find("#uvTempCanvas"), qa = pa[0].getContext("2d"), ra = pa.width(), sa = pa.height(), ta = new fabric.Canvas("uvTempCanvas"), ua = new fabric.Canvas("uvTempCanvasShare") | |
}, b.prototype._initBadgeButtons = function() { | |
v = t.find(".uv-badge-button.download"), w = t.find(".uv-badge-button.share-fb"), x = t.find(".uv-badge-button.share-tw"), y = t.find(".uv-badge-button.edit"), z = t.find("#uvBadgeDownloadLink"), t.on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}), z.on("click", function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), "ie" == appCore.settings.browser && (a.preventDefault(), d.dispatch("onBadgeDownload")) | |
}), y.on("click", function(a) { | |
a.preventDefault(), d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), this._showEdit() | |
}.bind(this)), w.on("click", function(a) { | |
a.preventDefault(), d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), d.dispatch("onBadgeShareFB") | |
}.bind(this)), x.on("click", function(a) { | |
a.preventDefault(), d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), d.dispatch("onBadgeShareTW") | |
}.bind(this)) | |
}, b.prototype._initEditButtons = function() { | |
A = this._container.find(".uv-edit-container"), B = A.find(".uv-edit-btn"), G = A.outerHeight(!0), ea = A.find(".uv-top-buttons"), fa = A.find(".uv-bottom-buttons"), ga = A.find(".uv-photo-select-buttons"), ha = A.find(".uv-photo-webcam-buttons"), ia = A.find(".uv-photo-control-buttons"), ka = ga.find(".uv-step-description.add-image"), la = ga.find(".uv-step-description.webcam-error"), ma = ga.find(".uv-step-description.invalid-image"), na = ga.find(".uv-step-description.image-too-big"), TweenMax.set(la, { | |
autoAlpha: 0 | |
}), TweenMax.set(ma, { | |
autoAlpha: 0 | |
}), TweenMax.set(na, { | |
autoAlpha: 0 | |
}), ja = ia.find(".uvpc-scale-slider"), ja.slider({ | |
value: 50, | |
slide: function(a, b) { | |
M = .5 + b.value / 100, L.scale(M), H.renderAll() | |
} | |
}), A.find(".uv-edit-btn").on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}), C = A.find(".uv-edit-btn.upload"), this.uvEditUploadInputBtn = A.find(".uv-edit-btn.upload input"), this.uvEditWebcamBtn = A.find(".uv-edit-btn.webcam"), this.uvEditFacebookBtn = A.find(".uv-edit-btn.facebook"), D = A.find(".uv-edit-btn.remove"), E = A.find(".uv-edit-btn.done"), "mobile" == appCore.settings.device ? TweenMax.set(A, { | |
autoAlpha: 0 | |
}) : (A.hide(), TweenMax.set(m, { | |
y: "+=" + G | |
})), this.uvTakeWebcamPictureBtn = ha.find(".uv-edit-btn.take-picture"), TweenMax.set(D, { | |
autoAlpha: 0 | |
}), Modernizr.getusermedia ? this.uvEditWebcamBtn.show() : (this.uvEditWebcamBtn.hide(), C.addClass("wide"), this.uvEditFacebookBtn.addClass("wide")), void 0 === window.FormData && C.hide(), S.on("click", function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), R.val("") | |
}.bind(this)), D.on("click", function(a) { | |
a.preventDefault(), d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), this.removeBadgeImage() | |
}.bind(this)), E.on("click", function(a) { | |
a.preventDefault(), d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), this._handleEditDoneBtnClicked() | |
}.bind(this)) | |
}, b.prototype._initFacebookViews = function() { | |
va = this._container.find(".uv-facebook-container"), wa = va.find(".uvfc-albums"), | |
Aa = va.find(".uvfc-photos"), xa = wa.find(".uvfc-list"), Ba = Aa.find(".uvfc-list"), "mobile" == appCore.settings.device && va.height(appCore.settings.windowHeight - 40), xa.tinyscrollbar(), za = xa.data("plugin_tinyscrollbar"), ya = xa.find(".overview"), Ba.tinyscrollbar(), Da = Ba.data("plugin_tinyscrollbar"), Ca = Ba.find(".overview"), Fa = Aa.find(".uvfc-btn.submit"), Ga = Aa.find(".uvfc-btn.back-to-albums"), Ea = va.find(".lexos-panel-close-btn"), Ja = va.find(".uvfc-loading"), Ja.hide(), va.hide(), TweenMax.set([wa, Aa], { | |
autoAlpha: 0 | |
}), Ea.on("click", function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), this.hideFacebookContainer() | |
}.bind(this)).on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}), Fa.on("click", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), null != Ia && d.dispatch("onFacebookPhotoClicked", { | |
url: Ia | |
}) | |
}).on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}), Ga.on("click", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), this.showFacebookAlbums() | |
}.bind(this)).on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}) | |
}, b.prototype._initLegal = function() { | |
aa = this._container.find(".uv-legal"), ba = aa.find(".uv-legal-text"), ca = aa.find(".uv-legal-btn.agree"), da = aa.find(".uv-legal-btn.cancel"), aa.hide(), ca.on("click", function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), d.dispatch("onLegalAccepted") | |
}.bind(this)).on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}), da.on("click", function(a) { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_click", | |
volume: .6 | |
}), d.dispatch("onLegalRejected") | |
}.bind(this)).on("mouseenter", function() { | |
d.dispatch("onAudioTriggered", { | |
id: "audio_btn_over", | |
volume: 1 | |
}) | |
}) | |
}, b.prototype.showLegal = function() { | |
aa.show() | |
}, b.prototype.hideLegal = function() { | |
aa.hide() | |
}, b.prototype._hideEditRemoveBtn = function() { | |
TweenMax.to(D, .25, { | |
autoAlpha: 0 | |
}) | |
}, b.prototype._showEditRemoveBtn = function() { | |
TweenMax.to(D, .25, { | |
autoAlpha: 1 | |
}) | |
}, b.prototype._showEdit = function() { | |
F = !0, "mobile" == appCore.settings.device ? TweenMax.to(A, .3, { | |
autoAlpha: 1 | |
}) : (A.show(), TweenMax.to(m, .2, { | |
y: "0" | |
})), y.addClass("active"), Q.addClass("edit"), I.addClass("edit"), R.attr("disabled", null), S.show(), O ? o = n.DEFAULT_IMAGE : (L.selectable = !0, o = n.USER_IMAGE), this._toggleEditButtons(), H.renderAll(), this.uvEditUploadInputBtn.val("") | |
}, b.prototype._hideEdit = function() { | |
F = !1, "mobile" == appCore.settings.device ? TweenMax.to(A, .3, { | |
autoAlpha: 0 | |
}) : (A.hide(), TweenMax.to(m, .2, { | |
y: "+=" + G | |
})), y.removeClass("active"), Q.removeClass("edit"), I.removeClass("edit"), R.attr("disabled", "disabled"), S.hide(), this.uvBadgeWebcamContainer.hide(), L.selectable = !1, N.top = L.top, N.left = L.left, d.dispatch("onUserImageSaved"), H.renderAll(), this.createBadgeImage() | |
}, b.prototype._toggleEditButtons = function() { | |
o == n.DEFAULT_IMAGE ? (TweenMax.to(ga, .5, { | |
autoAlpha: 1 | |
}), TweenMax.to([ha, ia], .2, { | |
autoAlpha: 0 | |
}), this._hideEditRemoveBtn()) : o == n.WEBCAM ? (TweenMax.to(ha, .5, { | |
autoAlpha: 1 | |
}), TweenMax.to([ga, ia], .2, { | |
autoAlpha: 0 | |
}), this._hideEditRemoveBtn()) : (TweenMax.to(ia, .5, { | |
autoAlpha: 1 | |
}), TweenMax.to([ha, ga], .2, { | |
autoAlpha: 0 | |
}), this._showEditRemoveBtn()) | |
}, b.prototype.showEditWebcam = function() { | |
o = n.WEBCAM, this.uvBadgeWebcamContainer.show(), this._toggleEditButtons() | |
}, b.prototype.hideEditWebcam = function() { | |
this.uvBadgeWebcamContainer.hide(), this._toggleEditButtons() | |
}, b.prototype.hideEditWebcamOnError = function() { | |
o = n.DEFAULT_IMAGE, TweenMax.set(la, { | |
autoAlpha: 1 | |
}), TweenMax.set(ka, { | |
autoAlpha: 0 | |
}), TweenMax.to(la, .2, { | |
autoAlpha: 0, | |
delay: .7 | |
}), TweenMax.to(ka, .2, { | |
autoAlpha: 1, | |
delay: 1 | |
}), this._toggleEditButtons() | |
}, b.prototype.showImageTooBigError = function() { | |
TweenMax.set(na, { | |
autoAlpha: 1 | |
}), TweenMax.set(ka, { | |
autoAlpha: 0 | |
}), TweenMax.to(na, .2, { | |
autoAlpha: 0, | |
delay: .7 | |
}), TweenMax.to(ka, .2, { | |
autoAlpha: 1, | |
delay: 1 | |
}) | |
}, b.prototype.showInvalidImageError = function() { | |
TweenMax.set(ma, { | |
autoAlpha: 1 | |
}), TweenMax.set(ka, { | |
autoAlpha: 0 | |
}), TweenMax.to(ma, .2, { | |
autoAlpha: 0, | |
delay: .7 | |
}), TweenMax.to(ka, .2, { | |
autoAlpha: 1, | |
delay: 1 | |
}) | |
}, b.prototype.addBadgeImage = function(a) { | |
var b = arguments.length <= 1 || void 0 === arguments[1] ? 1 : arguments[1], | |
c = arguments.length <= 2 || void 0 === arguments[2] ? null : arguments[2], | |
d = arguments.length <= 3 || void 0 === arguments[3] ? null : arguments[3], | |
e = arguments.length <= 4 || void 0 === arguments[4] ? !1 : arguments[4], | |
f = arguments.length <= 5 || void 0 === arguments[5] ? !0 : arguments[5]; | |
H.clear(), H.renderAll(), O = f, o = O ? n.DEFAULT_IMAGE : n.USER_IMAGE; | |
var g = this, | |
h = "anonymous"; | |
O && (h = "Use-Credentials"); | |
fabric.Image.fromURL(a, function(a) { | |
var f = g._resizeBadgeImage(a); | |
L = a, a.selectable = e, M = b, ja.slider("option", "value", 100 * (M - .5)), a.set({ | |
hasBorders: !1, | |
hasControls: !1, | |
hasRotatingPoint: !1, | |
width: f.width, | |
height: f.height, | |
originX: "center", | |
originY: "center" | |
}), a.scale(M), null != c && null != d ? (N.top = c, N.left = d, a.top = N.top, a.left = N.left) : H.centerObject(a), H.add(a), H.setActiveObject(a), a.setCoords(), H.renderAll(), H.calcOffset(), g.createBadgeImage() | |
}, { | |
crossOrigin: h | |
}); | |
this._toggleEditButtons() | |
}, b.prototype._resizeBadgeImage = function(a) { | |
var b, c, d = a._element.naturalHeight, | |
e = a._element.naturalWidth, | |
f = J / e, | |
g = K / d; | |
return f > g ? (b = J, c = f * d) : (b = g * e, c = K), { | |
width: b, | |
height: c | |
} | |
}, b.prototype.removeBadgeImage = function() { | |
H.clear(), H.renderAll(), this.setDefaultBadgeImage() | |
}, b.prototype.setDefaultBadgeImage = function() { | |
O = !0, this.addBadgeImage("files/images/user/badge_default_image.png", 1, null, null, !1) | |
}, b.prototype.setBadgeLevel = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? 1 : arguments[0]; | |
p = a, 5 == a ? (_.show(), W.hide(), X.hide(), Y.hide(), Z.hide()) : 4 == a ? (Z.show(), W.hide(), X.hide(), Y.hide(), _.hide()) : 2 == a ? (X.show(), W.hide(), Y.hide(), Z.hide(), _.hide()) : 3 == a ? (Y.show(), W.hide(), X.hide(), Z.hide(), _.hide()) : (W.show(), X.hide(), Y.hide(), Z.hide(), _.hide()), this.createBadgeImage() | |
}, b.prototype.setBadgeName = function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0]; | |
null == a && (null == U && (U = R.attr("data-default-value") + appCore.userId), a = U), R.val(a) | |
}, b.prototype.createBadgeImage = function() { | |
P = (new Date).getTime(), ta.clear(), ua.clear(); | |
var a = W; | |
2 == p ? a = X : 3 == p ? a = Y : 4 == p ? a = Z : 5 == p && (a = _), fabric.Image.fromURL(a.find("img").attr("src"), function(a) { | |
a.selectable = !1, ta.add(a), fabric.Image.fromURL(H.toDataURL(), function(a) { | |
a.top = 80, a.left = 0, a.selectable = !1, ta.add(a); | |
var b = new fabric.Text(R.val(), { | |
top: 241, | |
left: 11, | |
fontFamily: "industry", | |
fontSize: 13, | |
fontWeight: 100, | |
stroke: "#dadcc7", | |
selectable: !1 | |
}), | |
c = new fabric.Text(T.text(), { | |
top: 258, | |
left: 11, | |
fontFamily: "industry", | |
fontSize: 13, | |
fontWeight: 100, | |
stroke: "#fd4f00", | |
selectable: !1 | |
}); | |
ta.add(b), ta.add(c), ta.renderAll(), z.attr("href", ta.toDataURL()) | |
}, { | |
crossOrigin: "anonymous" | |
}) | |
}.bind(this), { | |
crossOrigin: "Use-Credentials" | |
}), fabric.Image.fromURL(a.find("img").attr("src"), function(a) { | |
a.selectable = !1, a.left = 236, ua.add(a), fabric.Image.fromURL(H.toDataURL(), function(a) { | |
a.top = 80, a.left = 236, a.selectable = !1, ua.add(a); | |
var b = new fabric.Text(R.val(), { | |
top: 241, | |
left: 247, | |
fontFamily: "industry", | |
fontSize: 13, | |
fontWeight: 100, | |
stroke: "#dadcc7", | |
selectable: !1 | |
}), | |
c = new fabric.Text(T.text(), { | |
top: 258, | |
left: 247, | |
fontFamily: "industry", | |
fontSize: 13, | |
fontWeight: 100, | |
stroke: "#fd4f00", | |
selectable: !1 | |
}); | |
ua.add(b), ua.add(c), ua.renderAll() | |
}, { | |
crossOrigin: "anonymous" | |
}) | |
}.bind(this), { | |
crossOrigin: "Use-Credentials" | |
}) | |
}, b.prototype.createBadgeShareImage = function() {}, b.prototype._handleEditDoneBtnClicked = function() { | |
P = (new Date).getTime(), this._hideEdit(), d.dispatch("onBadgeEditFinished") | |
}, b.prototype.showFacebookLoading = function() { | |
Ja.show() | |
}, b.prototype.hideFacebookLoading = function() { | |
Ja.hide() | |
}, b.prototype.populateFacebookAlbums = function(a, b, c) { | |
ya.children().remove(), ya.find("div").off("click"); | |
for (var e = 0, f = a.length; f > e; e++) { | |
var g = $('<div class="uvfc-list-photo" data-id="' + a[e].id + '"><img src="' + a[e].picture.data.url + '" width="100%" /></div>'); | |
ya.append(g), g.on("click", function(a) { | |
d.dispatch("onFacebookAlbumClicked", { | |
id: $(this).attr("data-id") | |
}) | |
}) | |
} | |
this.hideFacebookLoading() | |
}, b.prototype.populateFacebookPhotos = function(a, b, c) { | |
Ca.children().remove(), Ca.find("div").off("click"), Ia = null, Ha = null, Fa.addClass("disabled"); | |
for (var d = 0, e = a.length; e > d; d++) { | |
var f = a[d].images.length, | |
g = 2; | |
g > f - 1 && (g = f - 1); | |
var h = $('<div class="uvfc-list-photo" data-image-url="' + a[d].images[g].source + '"><img src="' + a[d].images[g].source + '" width="100%" /></div>'); | |
Ca.append(h), h.on("click", function(a) { | |
Ha && Ha.removeClass("selected"), Ha = $(this), Ha.addClass("selected"), Fa.removeClass("disabled"), Ia = $(this).attr("data-image-url") | |
}) | |
} | |
this.hideFacebookLoading() | |
}, b.prototype.populateList = function() {}, b.prototype.showFacebookAlbums = function() { | |
TweenMax.to(Aa, .3, { | |
autoAlpha: 0 | |
}), TweenMax.fromTo(wa, .5, { | |
autoAlpha: 0 | |
}, { | |
delay: .3, | |
autoAlpha: 1, | |
onStart: function() { | |
za.update(0) | |
} | |
}), va.show() | |
}, b.prototype.showFacebookPhotos = function() { | |
TweenMax.to(wa, .3, { | |
autoAlpha: 0 | |
}), TweenMax.fromTo(Aa, .5, { | |
autoAlpha: 0 | |
}, { | |
autoAlpha: 1, | |
delay: .3, | |
onStart: function() { | |
Da.update(0) | |
} | |
}) | |
}, b.prototype.hideFacebookContainer = function() { | |
TweenMax.set([wa, Aa], { | |
autoAlpha: 0 | |
}), va.hide() | |
}, babelHelpers.createClass(b, [{ | |
key: "closeBtn", | |
get: function() { | |
return k | |
} | |
}, { | |
key: "uvBadgeImageCanvas", | |
get: function() { | |
return H | |
} | |
}, { | |
key: "defaultUserImage", | |
get: function() { | |
return O | |
} | |
}, { | |
key: "fabricUserImage", | |
get: function() { | |
return L | |
} | |
}, { | |
key: "fabricUserImageScale", | |
get: function() { | |
return M | |
} | |
}, { | |
key: "fabricUserImageOffset", | |
get: function() { | |
return N | |
} | |
}, { | |
key: "uvBadgeNameVal", | |
get: function() { | |
return R.val() | |
} | |
}, { | |
key: "uvBadgeImageTimestamp", | |
get: function() { | |
return P | |
} | |
}, { | |
key: "fabricTempCanvas", | |
get: function() { | |
return ta | |
} | |
}, { | |
key: "fabricTempCanvasShare", | |
get: function() { | |
return ua | |
} | |
}]), b | |
}(g["default"]); | |
c["default"] = Ma, b.exports = c["default"] | |
}, { | |
"../../lib/core/AppDispatcher": 4, | |
"../../lib/core/views/AppView": 10, | |
"../SiteConstants": 13, | |
"../controllers/PhotoController": 22, | |
"./OSPanelView": 34 | |
}] | |
}, {}, [12]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment