-
-
Save sundathel/668a1f48a4a1f34044ea8d2e173500a3 to your computer and use it in GitHub Desktop.
Faptitans Cheats
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
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, | |
and distribution as defined by Sections 1 through 9 of this document. | |
"Licensor" shall mean the copyright owner or entity authorized by | |
the copyright owner that is granting the License. | |
"Legal Entity" shall mean the union of the acting entity and all | |
other entities that control, are controlled by, or are under common | |
control with that entity. For the purposes of this definition, | |
"control" means (i) the power, direct or indirect, to cause the | |
direction or management of such entity, whether by contract or | |
otherwise, or (ii) ownership of fifty percent (50%) or more of the | |
outstanding shares, or (iii) beneficial ownership of such entity. | |
"You" (or "Your") shall mean an individual or Legal Entity | |
exercising permissions granted by this License. | |
"Source" form shall mean the preferred form for making modifications, | |
including but not limited to software source code, documentation | |
source, and configuration files. | |
"Object" form shall mean any form resulting from mechanical | |
transformation or translation of a Source form, including but | |
not limited to compiled object code, generated documentation, | |
and conversions to other media types. | |
"Work" shall mean the work of authorship, whether in Source or | |
Object form, made available under the License, as indicated by a | |
copyright notice that is included in or attached to the work | |
(an example is provided in the Appendix below). | |
"Derivative Works" shall mean any work, whether in Source or Object | |
form, that is based on (or derived from) the Work and for which the | |
editorial revisions, annotations, elaborations, or other modifications | |
represent, as a whole, an original work of authorship. For the purposes | |
of this License, Derivative Works shall not include works that remain | |
separable from, or merely link (or bind by name) to the interfaces of, | |
the Work and Derivative Works thereof. | |
"Contribution" shall mean any work of authorship, including | |
the original version of the Work and any modifications or additions | |
to that Work or Derivative Works thereof, that is intentionally | |
submitted to Licensor for inclusion in the Work by the copyright owner | |
or by an individual or Legal Entity authorized to submit on behalf of | |
the copyright owner. For the purposes of this definition, "submitted" | |
means any form of electronic, verbal, or written communication sent | |
to the Licensor or its representatives, including but not limited to | |
communication on electronic mailing lists, source code control systems, | |
and issue tracking systems that are managed by, or on behalf of, the | |
Licensor for the purpose of discussing and improving the Work, but | |
excluding communication that is conspicuously marked or otherwise | |
designated in writing by the copyright owner as "Not a Contribution." | |
"Contributor" shall mean Licensor and any individual or Legal Entity | |
on behalf of whom a Contribution has been received by Licensor and | |
subsequently incorporated within the Work. | |
2. Grant of Copyright License. Subject to the terms and conditions of | |
this License, each Contributor hereby grants to You a perpetual, | |
worldwide, non-exclusive, no-charge, royalty-free, irrevocable | |
copyright license to reproduce, prepare Derivative Works of, | |
publicly display, publicly perform, sublicense, and distribute the | |
Work and such Derivative Works in Source or Object form. | |
3. Grant of Patent License. Subject to the terms and conditions of | |
this License, each Contributor hereby grants to You a perpetual, | |
worldwide, non-exclusive, no-charge, royalty-free, irrevocable | |
(except as stated in this section) patent license to make, have made, | |
use, offer to sell, sell, import, and otherwise transfer the Work, | |
where such license applies only to those patent claims licensable | |
by such Contributor that are necessarily infringed by their | |
Contribution(s) alone or by combination of their Contribution(s) | |
with the Work to which such Contribution(s) was submitted. If You | |
institute patent litigation against any entity (including a | |
cross-claim or counterclaim in a lawsuit) alleging that the Work | |
or a Contribution incorporated within the Work constitutes direct | |
or contributory patent infringement, then any patent licenses | |
granted to You under this License for that Work shall terminate | |
as of the date such litigation is filed. | |
4. Redistribution. You may reproduce and distribute copies of the | |
Work or Derivative Works thereof in any medium, with or without | |
modifications, and in Source or Object form, provided that You | |
meet the following conditions: | |
(a) You must give any other recipients of the Work or | |
Derivative Works a copy of this License; and | |
(b) You must cause any modified files to carry prominent notices | |
stating that You changed the files; and | |
(c) You must retain, in the Source form of any Derivative Works | |
that You distribute, all copyright, patent, trademark, and | |
attribution notices from the Source form of the Work, | |
excluding those notices that do not pertain to any part of | |
the Derivative Works; and | |
(d) If the Work includes a "NOTICE" text file as part of its | |
distribution, then any Derivative Works that You distribute must | |
include a readable copy of the attribution notices contained | |
within such NOTICE file, excluding those notices that do not | |
pertain to any part of the Derivative Works, in at least one | |
of the following places: within a NOTICE text file distributed | |
as part of the Derivative Works; within the Source form or | |
documentation, if provided along with the Derivative Works; or, | |
within a display generated by the Derivative Works, if and | |
wherever such third-party notices normally appear. The contents | |
of the NOTICE file are for informational purposes only and | |
do not modify the License. You may add Your own attribution | |
notices within Derivative Works that You distribute, alongside | |
or as an addendum to the NOTICE text from the Work, provided | |
that such additional attribution notices cannot be construed | |
as modifying the License. | |
You may add Your own copyright statement to Your modifications and | |
may provide additional or different license terms and conditions | |
for use, reproduction, or distribution of Your modifications, or | |
for any such Derivative Works as a whole, provided Your use, | |
reproduction, and distribution of the Work otherwise complies with | |
the conditions stated in this License. | |
5. Submission of Contributions. Unless You explicitly state otherwise, | |
any Contribution intentionally submitted for inclusion in the Work | |
by You to the Licensor shall be under the terms and conditions of | |
this License, without any additional terms or conditions. | |
Notwithstanding the above, nothing herein shall supersede or modify | |
the terms of any separate license agreement you may have executed | |
with Licensor regarding such Contributions. | |
6. Trademarks. This License does not grant permission to use the trade | |
names, trademarks, service marks, or product names of the Licensor, | |
except as required for reasonable and customary use in describing the | |
origin of the Work and reproducing the content of the NOTICE file. | |
7. Disclaimer of Warranty. Unless required by applicable law or | |
agreed to in writing, Licensor provides the Work (and each | |
Contributor provides its Contributions) on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | |
implied, including, without limitation, any warranties or conditions | |
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | |
PARTICULAR PURPOSE. You are solely responsible for determining the | |
appropriateness of using or redistributing the Work and assume any | |
risks associated with Your exercise of permissions under this License. | |
8. Limitation of Liability. In no event and under no legal theory, | |
whether in tort (including negligence), contract, or otherwise, | |
unless required by applicable law (such as deliberate and grossly | |
negligent acts) or agreed to in writing, shall any Contributor be | |
liable to You for damages, including any direct, indirect, special, | |
incidental, or consequential damages of any character arising as a | |
result of this License or out of the use or inability to use the | |
Work (including but not limited to damages for loss of goodwill, | |
work stoppage, computer failure or malfunction, or any and all | |
other commercial damages or losses), even if such Contributor | |
has been advised of the possibility of such damages. | |
9. Accepting Warranty or Additional Liability. While redistributing | |
the Work or Derivative Works thereof, You may choose to offer, | |
and charge a fee for, acceptance of support, warranty, indemnity, | |
or other liability obligations and/or rights consistent with this | |
License. However, in accepting such obligations, You may act only | |
on Your own behalf and on Your sole responsibility, not on behalf | |
of any other Contributor, and only if You agree to indemnify, | |
defend, and hold each Contributor harmless for any liability | |
incurred by, or claims asserted against, such Contributor by reason | |
of your accepting any such warranty or additional liability. | |
END OF TERMS AND CONDITIONS | |
APPENDIX: How to apply the Apache License to your work. | |
To apply the Apache License to your work, attach the following | |
boilerplate notice, with the fields enclosed by brackets "{}" | |
replaced with your own identifying information. (Don't include | |
the brackets!) The text should be enclosed in the appropriate | |
comment syntax for the file format. We also recommend that a | |
file or class name and description of purpose be included on the | |
same "printed page" as the copyright notice for easier | |
identification within third-party archives. | |
Copyright {yyyy} {name of copyright owner} | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. |
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
webpackJsonp([ 0 ], [ function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
var o = s(1), r = n(o), i = s(3), a = s(4), l = n(a), u = s(19), c = n(u), y = s(14), d = n(y); | |
s(406), s(408), s(410), (0, c.default)(document).ready(function() { | |
function t(t) {} | |
d.default.init(), (0, i.render)(r.default.createElement(l.default, { | |
ref: t, | |
app: d.default | |
}), document.getElementById("root")); | |
}); | |
}, function(t, e, s) { | |
t.exports = s(2)(2); | |
}, , function(t, e, s) { | |
t.exports = s(2)(32); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(5), c = n(u), y = s(144), d = n(y), p = s(154), x = n(p), f = s(174), h = n(f), m = s(274), g = n(m), v = s(277), b = n(v), _ = s(284), k = n(_), w = s(285), C = n(w), E = s(290), S = n(E), T = s(293), N = n(T), P = s(294), O = n(P), M = s(339), B = n(M), R = s(340), j = n(R), I = s(344), U = n(I), A = s(346), L = n(A), D = s(351), F = n(D), H = s(360), V = n(H), q = s(364), W = n(q), Q = s(368), G = n(Q), K = s(372), z = n(K), X = s(376), Y = n(X), $ = s(377), J = n($), Z = s(378), tt = n(Z), et = s(353), st = n(et), nt = s(355), ot = n(nt), rt = s(357), it = n(rt), at = s(379), lt = n(at), ut = s(386), ct = n(ut), yt = s(389), dt = n(yt), pt = s(390), xt = n(pt), ft = s(393), ht = n(ft), mt = s(401), gt = n(mt), vt = s(14), bt = n(vt), _t = s(68), kt = n(_t), wt = s(343), Ct = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onActivateWorked = !1, s.onUserActivate = s.onUserActivate.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
bt.default.initProgressIncrement(), window.addEventListener("mousemove", this.onUserActivate); | |
}, e.prototype.onUserActivate = function() { | |
this.onActivateWorked || (this.onActivateWorked = !0, window.removeEventListener("mousemove", this.onUserActivate), | |
kt.default.callMethod("upsells.get", { | |
mobile: /Mobi/i.test(navigator.userAgent) | |
}).then(function(t) { | |
t.offer && bt.default.show({ | |
popup: { | |
type: "upsell", | |
data: t.offer, | |
queued: !0 | |
} | |
}); | |
})); | |
}, e.prototype.render = function() { | |
bt.default.initProgressIncrement(); | |
var t = bt.default.getUser(), e = t.get("itemSale").isItemStarted() ? "sale" : "items", s = l.default.createElement(wt.Route, { | |
path: "/", | |
component: j.default | |
}, l.default.createElement(wt.Route, { | |
component: z.default | |
}, l.default.createElement(wt.IndexRoute, { | |
component: x.default | |
}), l.default.createElement(wt.Route, { | |
path: "achievments", | |
component: U.default | |
}), l.default.createElement(wt.Route, { | |
path: "stats", | |
component: L.default | |
})), l.default.createElement(wt.Route, { | |
path: "bank", | |
component: F.default | |
}, l.default.createElement(wt.IndexRedirect, { | |
to: e | |
}), l.default.createElement(wt.Route, { | |
path: "sale", | |
component: st.default | |
}), l.default.createElement(wt.Route, { | |
path: "vip", | |
component: ot.default | |
}), l.default.createElement(wt.Route, { | |
path: "items", | |
component: it.default | |
}), l.default.createElement(wt.Route, { | |
path: "heroes", | |
component: lt.default | |
}), l.default.createElement(wt.Route, { | |
path: "top-up", | |
component: ct.default | |
})), l.default.createElement(wt.Route, { | |
path: "guild", | |
component: V.default | |
}), l.default.createElement(wt.Route, { | |
path: "galery", | |
component: W.default | |
}), l.default.createElement(wt.Route, { | |
path: "super-heroes", | |
component: G.default | |
}), l.default.createElement(wt.Route, { | |
path: "master-guild", | |
component: gt.default | |
}, l.default.createElement(wt.IndexRedirect, { | |
to: "stats" | |
}), l.default.createElement(wt.Route, { | |
path: "stats", | |
component: ht.default | |
}), l.default.createElement(wt.Route, { | |
path: "abilities", | |
component: xt.default | |
}))); | |
return l.default.createElement("div", null, l.default.createElement("div", { | |
className: "main lang-" + bt.default.locale | |
}, l.default.createElement(J.default, null), l.default.createElement(c.default, null), l.default.createElement("div", { | |
className: "right-side" | |
}, l.default.createElement(O.default, null), l.default.createElement(N.default, null), l.default.createElement(dt.default, null), l.default.createElement(B.default, null), l.default.createElement(d.default, null), l.default.createElement(Y.default, null)), l.default.createElement(wt.Router, { | |
history: bt.default.history | |
}, s), l.default.createElement(h.default, null), l.default.createElement(C.default, null), l.default.createElement(S.default, null), l.default.createElement(g.default, null), l.default.createElement(b.default, null), l.default.createElement(tt.default, null)), l.default.createElement(k.default, null)); | |
}, e; | |
}(a.Component); | |
e.default = Ct; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(6), c = n(u), y = s(141), d = n(y), p = s(26), x = s(8), f = n(x), h = s(14), m = n(h), g = s(9), v = s(142), b = n(v), _ = s(143), k = n(_), w = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onSignClick = s.onSignClick.bind(s), s.__update = s.__update.bind(s), s.onOpenShop = s.onOpenShop.bind(s), | |
s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
m.default.events.on("reborn", this.__update), m.default.getUser().get("counters").on("change:MBGMS", this.__update), | |
m.default.getUser().get("counters").on("change:SW_SP", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
m.default.events.off("reborn", this.__update), m.default.getUser().get("counters").off("change:MBGMS", this.__update), | |
m.default.getUser().get("counters").off("change:SW_SP", this.__update); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.onLangClick = function() { | |
m.default.show({ | |
popup: { | |
type: "lang" | |
} | |
}); | |
}, e.prototype.onSignClick = function() { | |
m.default.getUser().get("registered") ? window.location = "/logout/" : m.default.show({ | |
popup: { | |
type: "signin" | |
} | |
}); | |
}, e.prototype.onOpenShop = function() { | |
window.location.assign("#/bank"); | |
}, e.prototype.render = function() { | |
var t = this, e = (0, f.default)(m.default.getUser().get("counters").get("SW_SP")), s = parseInt(m.default.getUser().get("counters").get("MBGMS")), n = s ? 100 : 25, o = m.default.getUser(), r = o.get("resources"), i = o.get("multipliers"), a = o.get("registered"), u = (0, | |
p._tr)("This is Gold, is obtained by killing monsters and used to upgrade heroes level and to buy their skills."), y = (0, | |
p._tr)("These are Memory shards, obtained by killing monsters and used to open new pictures."), x = l.default.createElement("span", null, l.default.createElement("span", null, (0, | |
p._tr)("These are Gems, used to build guild base, obtained by world Reborn and by killing bosses at level 100 and above with ")), l.default.createElement("span", { | |
className: "spec" | |
}, (0, p._tr)("{chance}% chance", { | |
chance: n | |
}))), h = o.get("username"), v = null, _ = m.default.locale; | |
return l.default.createElement("div", { | |
className: "header" | |
}, v, l.default.createElement("div", { | |
className: "res-panel" | |
}, l.default.createElement(c.default, { | |
resources: r, | |
multipliers: i, | |
resClass: "gold", | |
addButton: !0, | |
tooltipText: u | |
}), l.default.createElement(c.default, { | |
resources: r, | |
multipliers: i, | |
resClass: "shards", | |
addButton: !0, | |
tooltipText: y | |
}), l.default.createElement(c.default, { | |
resources: r, | |
multipliers: i, | |
resClass: "gems", | |
addButton: !1, | |
tooltipText: x | |
})), (0, g.IF)(e.gte(1))(function() { | |
return l.default.createElement("div", null, l.default.createElement(d.default, { | |
resources: r | |
}), l.default.createElement("div", { | |
className: "shop-btn" | |
}, l.default.createElement("div", { | |
className: "btn-add", | |
onClick: t.onOpenShop | |
}), l.default.createElement("div", { | |
className: "icon", | |
onClick: t.onOpenShop | |
}))); | |
}), l.default.createElement("div", { | |
className: "opt-panel" | |
}, l.default.createElement(b.default, { | |
className: "btn " + (a ? "logout" : "login"), | |
onClick: this.onSignClick, | |
tooltipText: a ? (0, p._tr)("Hello, {username}!", { | |
username: h | |
}) : (0, p._tr)("Sign In") | |
}), l.default.createElement(b.default, { | |
className: "btn feedback", | |
onClick: k.default, | |
tooltipText: (0, p._tr)("Feedback") | |
}), l.default.createElement(b.default, { | |
className: "btn lang-icon " + _, | |
onClick: this.onLangClick, | |
tooltipText: (0, p._tr)("Language") | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = w; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(7), c = s(9), y = s(13), d = n(y), p = s(14), x = n(p), f = s(19), h = n(f), m = s(140), g = n(m), v = "animationend animationEnd webkitAnimationEnd msAnimationEnd", b = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s.checkMultiplier = s.checkMultiplier.bind(s), | |
s.addResource = s.addResource.bind(s), s.onAddResource = s.onAddResource.bind(s), | |
s.onSpendResource = s.onSpendResource.bind(s), s.setRef = s.setRef.bind(s), s.state = {}, | |
s.isAnimation = !1, s; | |
} | |
return i(e, t), e.prototype.onAddResource = function(t) { | |
var e = this; | |
if (!this.isAnimation) { | |
var s = t.name, n = this.props.resClass, o = (0, h.default)(this.el); | |
if (n == s) { | |
var r = {}; | |
this.isAnimation = !0, r[n + "_play_in"] = !0, this.setState(r), o.on(v, function() { | |
o.off(v), r[n + "_play_in"] = !1, r[n + "_flip"] = !0, e.setState(r), o.on(v, function() { | |
o.off(v), r[n + "_flip"] = !1, e.setState(r), e.isAnimation = !1; | |
}); | |
}); | |
} | |
} | |
}, e.prototype.onSpendResource = function(t) { | |
var e = this; | |
if (!this.isAnimation) { | |
var s = t.name, n = this.props.resClass, o = (0, h.default)(this.el); | |
if (n == s) { | |
this.isAnimation = !0; | |
var r = {}; | |
r[n + "_play_out"] = !0, this.setState(r), o.on(v, function() { | |
o.off(v), r[n + "_play_out"] = !1, r[n + "_anim_out"] = !0, e.setState(r), o.on(v, function() { | |
o.off(v), r[n + "_anim_out"] = !1, e.setState(r), e.isAnimation = !1; | |
}); | |
}); | |
} | |
} | |
}, e.prototype.addResource = function() { | |
x.default.show({ | |
popup: { | |
type: "addresource", | |
data: { | |
type: this.props.resClass | |
} | |
} | |
}); | |
}, e.prototype.componentDidMount = function() { | |
this.props.resources.on("change:" + this.props.resClass, this.__update), this.props.multipliers.on("add change", this.checkMultiplier); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
this.componentWillUnmount(), t.resources.on("change:" + this.props.resClass, this.__update), | |
t.multipliers.on("add change", this.checkMultiplier); | |
}, e.prototype.componentWillUnmount = function() { | |
this.props.resources.off("change:" + this.props.resClass, this.__update), this.props.multipliers.off("add change ", this.checkMultiplier); | |
}, e.prototype.checkMultiplier = function(t) { | |
t == this.props.resClass && this.forceUpdate(); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.setRef = function(t) { | |
this.props.setRef(t), t && (this.el = t); | |
}, e.prototype.render = function() { | |
var t = this, e = this.props, s = e.resources, n = e.multipliers, o = e.resClass, r = e.addButton, i = e.onMouseLeave, a = e.onMouseEnter, y = e.tooltipText, p = (0, | |
u.formatBig)(s.get(o)), x = n.get(o), f = x.value.round(2, 3).minus(1).times(100), h = x.validTill, m = this.state[o + "_flip"], g = this.state[o + "_anim_out"], v = this.state[o + "_play_in"], b = this.state[o + "_play_out"]; | |
return l.default.createElement("div", { | |
ref: this.setRef, | |
className: "res " + o + " " + (m ? "anim-in" : g ? "anim-out" : ""), | |
onMouseEnter: function() { | |
return a({ | |
tooltipText: y | |
}); | |
}, | |
onMouseLeave: i | |
}, l.default.createElement("div", { | |
className: "value" | |
}, p), l.default.createElement("div", { | |
className: "mlt-prm" | |
}, (0, c.IF)(f && f.gt(0))(function() { | |
return l.default.createElement("span", null, "+" + (0, u.formatBig)(f) + "%"); | |
})), (0, c.IF)(h > 0)(function() { | |
return l.default.createElement("div", { | |
className: "mlt-tmp open" | |
}, l.default.createElement("div", { | |
className: "v" | |
}, "+" + (0, u.formatBig)(f) + "%"), l.default.createElement(d.default, { | |
time: h | |
})); | |
}), (0, c.IF)(r)(function() { | |
return l.default.createElement("div", { | |
className: "btn-add", | |
onClick: t.addResource | |
}); | |
}, function() { | |
return l.default.createElement("div", { | |
className: "btn-none" | |
}); | |
}), l.default.createElement("div", { | |
className: "anim-in-p " + o + " " + (v ? "play-in" : b ? "play-out" : "") | |
})); | |
}, e; | |
}(a.Component); | |
b = (0, g.default)(b), e.default = b; | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c; | |
n = s(8), o = 3, r = 3, i = 39, u = { | |
3: "K", | |
6: "M", | |
9: "B", | |
12: "T", | |
15: "q", | |
18: "Q", | |
21: "s", | |
24: "S", | |
27: "O", | |
30: "N", | |
33: "d", | |
36: "U", | |
39: "D" | |
}, l = function(t) { | |
return function(t) { | |
return Math.floor(t / o) * o; | |
}; | |
}(this), c = function(t) { | |
return function(t, e) { | |
return new Array(e + 1).join(t); | |
}; | |
}(this), a = function(t, e, s) { | |
var a, y, d, p, x, f, h, m, g, v; | |
if (null == e && (e = 3), null == s && (s = !1), !(t instanceof n)) try { | |
t = n(t); | |
} catch (t) { | |
return void (a = t); | |
} | |
return y = t.e, v = l(y), h = i + o, x = v > h ? Math.floor((v - h) / i + 1) : Math.floor(v / h), | |
x >= r ? 1 + c("D", r) : v ? (f = v > h ? Math.floor((v - h) % i + o) : Math.floor(v % h + o * x), | |
t = t.div("1e" + v), d = t, s && (t = t.round(0, 0)), e === o ? (p = u[f] || "e+" + f, | |
parseFloat(t.toPrecision(e)) + p + c("D", x)) : e > o ? (m = e - o, t.gte(Math.pow(10, m)) ? (p = u[f] || "e+" + f, | |
parseFloat(t.toPrecision(e)) + p + c("D", x)) : (g = f - o, p = u[g] || "", t = d.times(Math.pow(10, o)), | |
s && (t = t.round(0, 0)), parseFloat(t.toPrecision(e)) + p + c("D", x))) : parseFloat(t.toPrecision(3)) + ("e+" + f)) : (s && (t = t.round(0, 0)), | |
t.toString()); | |
}, t.exports = { | |
formatBig: a | |
}; | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f = {}.hasOwnProperty; | |
o = s(10), r = s(12), n = /^https?\:\/\//i, x = r.template(o.staticUrl), u = r.template(o.cdnUrl), | |
e.staticPath = y = function(t) { | |
return !t || n.test(t) ? t : o.staticPath + t; | |
}, e.staticURLBase = p = function(t) { | |
var e; | |
return !t || n.test(t) ? "" : (e = c(t, o.numStaticBuckets), x({ | |
bucket: e | |
}) + o.staticPath); | |
}, e.staticURL = d = function(t) { | |
var e; | |
return !t || n.test(t) ? t : (e = c(t, o.numStaticBuckets), t = y(t), x({ | |
bucket: e | |
}) + t); | |
}, e.cdnURLBase = l = function(t) { | |
var e; | |
return !t || n.test(t) ? "" : (e = c(t, o.numStaticBuckets), u({ | |
bucket: e | |
}) + o.staticPath); | |
}, e.cdnURL = a = function(t) { | |
var e; | |
return !t || n.test(t) ? t : (e = c(t, o.numStaticBuckets), t = y(t), u({ | |
bucket: e | |
}) + t); | |
}, c = function(t, e) { | |
var s, n, o, r, i; | |
if (!t) return 0; | |
for (t = t.toString(), n = 0, o = r = 0, i = t.length - 1; 0 <= i ? r <= i : r >= i; o = 0 <= i ? ++r : --r) n += t.charCodeAt(o); | |
return n = n.toString(), n = parseInt(n.substr(n.length - 1)), s = 10 / e, Math.min(e, Math.max(1, Math.ceil(n / s))); | |
}, i = function(t) { | |
return "function" == typeof t ? t() : t; | |
}, e.IF = function(t) { | |
return function(e, s) { | |
return null == s && (s = null), i(t ? e : s); | |
}; | |
}, e.transitionEndName = function() { | |
var t, e, s; | |
t = document.createElement("div"), s = { | |
transition: "transitionend", | |
OTransition: "otransitionend", | |
MozTransition: "transitionend", | |
WebkitTransition: "webkitTransitionEnd" | |
}; | |
for (e in s) if (f.call(s, e) && void 0 !== t.style[e]) return s[e]; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r; | |
n = s(11), r = {}, o = {}, t.exports = { | |
itemsDirectory: new n(r), | |
heroesDirectory: new n(o), | |
staticPath: "undefined" != typeof STATIC_PATH && null !== STATIC_PATH ? STATIC_PATH : "", | |
numStaticBuckets: 3, | |
staticUrl: "undefined" != typeof STATIC_URL && null !== STATIC_URL ? STATIC_URL : "", | |
cdnUrl: "undefined" != typeof CDN_URL && null !== CDN_URL ? CDN_URL : "", | |
registrationPixels: "undefined" != typeof REGISTRATION_PIXELS && null !== REGISTRATION_PIXELS ? REGISTRATION_PIXELS : null | |
}; | |
}, function(t, e) { | |
var s, n = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
t.exports = s = function() { | |
function t(t) { | |
this.get = n(this.get, this); | |
var e, s, o, r, i; | |
for (this.descriptors = t, e = {}, s = 0, i = t.length; s < i; s++) r = t[s], o = "id" in r ? "id" : "typeId", | |
e[r[o]] = r, "function" == typeof Object.freeze && Object.freeze(r); | |
this.byId = e; | |
} | |
return t.prototype.get = function(t) { | |
return this.byId[t]; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
t.exports = s(2)(233); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.cls = s.props.cls || "t", s.state = { | |
time: s.getCurrentTimeDelta() | |
}, s.onFinished = s.onFinished.bind(s), s.untilTimerEnd = s.untilTimerEnd.bind(s), | |
s; | |
} | |
return i(e, t), e.prototype.getCurrentTimeDelta = function(t) { | |
t = t || this.props.time; | |
var e = t - c.default.getTime(); | |
return e > 0 ? e : 0; | |
}, e.prototype.timeFormat = function(t) { | |
var e = new Date(t + 60 * new Date().getTimezoneOffset() * 1e3), s = Math.floor(t / 864e5), n = 24 * s + e.getHours(); | |
n = n > 9 ? n : "0" + n; | |
var o = e.getMinutes() > 9 ? e.getMinutes() : "0" + e.getMinutes(), r = e.getSeconds() > 9 ? e.getSeconds() : "0" + e.getSeconds(); | |
return n + ":" + o + ":" + r; | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
this.getCurrentTimeDelta(t.time) > 0 && this.setTimer(); | |
}, e.prototype.setTimer = function() { | |
var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]; | |
t ? this.isTimerOn || (c.default.timer.on("second", this.untilTimerEnd), this.isTimerOn = !0) : (c.default.timer.off("second", this.untilTimerEnd), | |
this.isTimerOn = !1); | |
}, e.prototype.componentDidMount = function() { | |
this.setTimer(); | |
}, e.prototype.onFinished = function() { | |
this.props.onComplete && this.props.onComplete(), this.setTimer(!1); | |
}, e.prototype.componentWillUnmount = function() { | |
c.default.timer.off("second", this.untilTimerEnd); | |
}, e.prototype.untilTimerEnd = function() { | |
var t = this.getCurrentTimeDelta(); | |
t > 0 ? this.setState({ | |
time: t | |
}) : this.onFinished(); | |
}, e.prototype.render = function() { | |
return l.default.createElement("div", { | |
className: this.cls | |
}, this.timeFormat(this.state.time)); | |
}, e; | |
}(a.Component); | |
e.default = y; | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g = {}.hasOwnProperty; | |
r = s(15), u = s(12), i = s(16), a = s(17), m = s(18), n = s(19), l = s(20), c = s(26)._tr, | |
s(29), p = s(30).parseBigNumberObj, y = s(31), h = s(32), d = s(33).createHashHistory, | |
x = s(48), o = { | |
init: function() { | |
var t, e, n, l, c, y, x, g, v, b, _; | |
return this.checkBrowser(), o.initProgressIncrement(), this.locale = window.LOCALE || "en", | |
this.context = new i(), v = this.context.push(), this.events = u.extend({}, r.Events), | |
x = s(62), _ = new x(), v.user = _, b = JSON.parse(window.userData, p), o._startTime = b.addedTime, | |
this.timer = new a(), this.timer.add("second", 1e3), e = s(133), this.analytics = new e(), | |
_.init(b), n = s(134), this.battleController = new n(), u.defer(this.battleController.start), | |
y = s(135), this.statsController = new y(), this.statsController.init(), c = s(136), | |
this.resourcesController = new c(), this.resourcesController.init(), t = s(137), | |
this.achievmentController = new t(), this.achievmentController.init(), l = s(138), | |
this.inputController = new l(), this.inputController.init(), g = s(139), this.vipModel = new g(), | |
document.addEventListener(m.visibilityChange, function() { | |
return o.tabActive = !document[m.hidden], o.events.trigger("tabActiveChanged", o.tabActive); | |
}), o.tabActive = !document[m.hidden], o.events.on("addMarker", o.addMarker), o.debug = {}, | |
o.history = h(d)({ | |
queryKey: !1 | |
}), o.initProgressIncrement(), f(); | |
}, | |
_startTime: new Date().getTime(), | |
_lastTime: 0, | |
startTime: function() { | |
return o._startTime; | |
}, | |
getTime: function() { | |
return new Date().getTime() - o._startTime; | |
}, | |
checkBrowser: function() { | |
var t, e, s, n; | |
s = document.getElementById("root"), e = []; | |
for (t in y) g.call(y, t) && (n = y[t], n ? e.push(s.className += " " + t) : e.push(void 0)); | |
return e; | |
}, | |
getUser: function() { | |
return o.context.current().user; | |
}, | |
show: function(t) { | |
if (t) { | |
if (t.popup) return o.events.trigger("showPopup", t.popup); | |
if (t.dialog) return o.events.trigger("showDialog", t.dialog); | |
if (t.slider) return o.events.trigger("showSlider", t.slider); | |
if (t.event) return o.events.trigger(t.event.name, t.event.data); | |
} else ; | |
}, | |
showError: function(t) { | |
return null == t && (t = {}), o.show({ | |
dialog: { | |
type: "alert", | |
data: { | |
title: t.title || c("Error!"), | |
text: t.text || c("An error occured. Need to reload the game to continue"), | |
style: "warning", | |
onExit: function(t) { | |
return function() { | |
return window.location.reload(); | |
}; | |
}(this), | |
onOk: function(t) { | |
return function() { | |
return window.location.reload(); | |
}; | |
}(this) | |
} | |
} | |
}); | |
}, | |
addMarker: function(t) { | |
return function(t) { | |
var e, s, n, r, i, a, c; | |
if (c = o.getUser(), t) for (a = u.isArray(t) ? t : [ t ], s = 0, r = a.length; s < r; s++) if (i = a[s], | |
u.isString(i)) n = new Image(), n.src = i; else if (i.src) { | |
if (i.condition && (e = new l(i.condition), !e.isDoneFor(c))) continue; | |
n = new Image(), n.src = i.src; | |
} | |
return null; | |
}; | |
}(this), | |
initProgressIncrement: function(t) { | |
return function() { | |
return x.appInitProgressIncrement(); | |
}; | |
}(this), | |
getDevicePixelRatio: function(t) { | |
return function() { | |
return window.devicePixelRatio < 2 ? Math.ceil(window.devicePixelRatio) : 2; | |
}; | |
}(this) | |
}, f = function() { | |
return o.events.on("monsterLoaded", function() { | |
return x.monsterLoaded(); | |
}), o.events.on("startLoadMonsters", function(t) { | |
return o.events.off("startLoadMonsters"), x.startLoadMonsters(t); | |
}), o.events.on("stageInitialized", function(t) { | |
return function() { | |
return o.events.off("stageInitialized"), x.reactLoaded(n); | |
}; | |
}(this)); | |
}, null === { | |
DEBUG: !1 | |
} && void 0 && (window.getApp = function(t) { | |
return function() { | |
return o; | |
}; | |
}(this), window.jquery = s(19)), t.exports = o; | |
}, function(t, e, s) { | |
t.exports = s(2)(234); | |
}, function(t, e) { | |
var s, n = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
t.exports = s = function() { | |
function t() { | |
this.pop = n(this.pop, this), this.push = n(this.push, this), this.current = n(this.current, this), | |
this.top = n(this.top, this), this.stack = []; | |
} | |
return t.prototype.stack = null, t.prototype.top = function() { | |
var t; | |
return t = this.stack, t.length ? t[0] : this.push(); | |
}, t.prototype.current = function() { | |
var t; | |
return t = this.stack, t.length ? t[t.length - 1] : this.push(); | |
}, t.prototype.push = function(t) { | |
return t || (t = {}), this.stack.push(t), t; | |
}, t.prototype.pop = function() { | |
var t; | |
return t = this.stack, t.length ? 1 === t.length ? t[0] : t.pop() : null; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(15), r = s(12), t.exports = o = function() { | |
function t() { | |
this.remove = i(this.remove, this), this.add = i(this.add, this), r.extend(this, n.Events), | |
this.timers = {}; | |
} | |
return t.prototype.add = function(t, e, s) { | |
var n; | |
return null == s && (s = !1), !this.timers[t] && (n = s ? setTimeout : setInterval, | |
this.timers[t] = { | |
name: t, | |
once: s, | |
interval: e, | |
id: n(function(t) { | |
return function(e, s) { | |
return function() { | |
if (t.trigger(e), s) return t.remove(e); | |
}; | |
}; | |
}(this)(t, s), e) | |
}); | |
}, t.prototype.remove = function(t) { | |
var e, s; | |
return e = this.timers[t], e && (delete this.timers[t], s = e.once ? clearTimeout : clearInterval, | |
s(e.id), this.off(t)), e; | |
}, t; | |
}(); | |
}, function(t, e) { | |
var s; | |
s = { | |
hidden: "visibilitychange", | |
mozHidden: "mozvisibilitychange", | |
msHidden: "msvisibilitychange", | |
webkitHidden: "webkitvisibilitychange" | |
}, t.exports = function() { | |
var t, e; | |
for (t in s) if (e = s[t], "undefined" != typeof document[t]) return { | |
hidden: t, | |
visibilityChange: e | |
}; | |
return { | |
hidden: hidden, | |
visibilityChange: visibilityChange | |
}; | |
}(); | |
}, function(t, e, s) { | |
t.exports = s(2)(1); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, a = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) l.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, l = {}.hasOwnProperty; | |
n = s(21), r = s(12), t.exports = o = function(t) { | |
function e() { | |
return this.onQuestAdded = i(this.onQuestAdded, this), this.onQuestFinished = i(this.onQuestFinished, this), | |
this.getUnwatchers = i(this.getUnwatchers, this), this.unwatchQuests = i(this.unwatchQuests, this), | |
this.unwatchVars = i(this.unwatchVars, this), this.unwatchCounters = i(this.unwatchCounters, this), | |
this.getWatchers = i(this.getWatchers, this), this.watchQuests = i(this.watchQuests, this), | |
this.watchVars = i(this.watchVars, this), this.watchCounters = i(this.watchCounters, this), | |
this.getTests = i(this.getTests, this), this.testQuests = i(this.testQuests, this), | |
this.testVars = i(this.testVars, this), this.testCounters = i(this.testCounters, this), | |
e.__super__.constructor.apply(this, arguments); | |
} | |
return a(e, t), e.schema({ | |
attributes: { | |
counters: Object, | |
vars: Object, | |
quests: Array | |
} | |
}), e.prototype.testCounters = function(t) { | |
var e, s, n, o; | |
if (s = this.get("counters")) { | |
if (n = t.get("counters"), !n) return !1; | |
for (e in s) if (l.call(s, e)) { | |
if (o = s[e], o && !n.get(e)) return !1; | |
if (this.compare("lt", n.get(e), o)) return !1; | |
} | |
} | |
return !0; | |
}, e.prototype.testVars = function(t) { | |
var e, s, n, o, r; | |
if (r = this.get("vars")) { | |
if (e = t.get("vars"), !e) return !1; | |
for (o in r) if (l.call(r, o) && (n = r[o], s = e.lookup(o), !this._checkValue(s, n))) return !1; | |
} | |
return !0; | |
}, e.prototype.testQuests = function(t) { | |
var e, s, n, o, r, i; | |
if (r = this.get("quests")) { | |
if (i = t.get("quests"), !i) return !1; | |
for (e = 0, s = r.length; e < s; e++) if (o = r[e], n = i.get(o), !n || !n.get("finished")) return !1; | |
} | |
return !0; | |
}, e.prototype.getTests = function() { | |
return e.__super__.getTests.call(this).concat([ this.testCounters, this.testVars, this.testQuests ]); | |
}, e.prototype.watchCounters = function(t) { | |
var e, s, n, o, r; | |
if (s = this.get("counters"), o = t.get("counters"), s && o) { | |
n = []; | |
for (e in s) l.call(s, e) && (r = s[e], this.compare("lt", o.get(e), r) ? n.push(o.on("change:" + e, this.onChange)) : n.push(void 0)); | |
return n; | |
} | |
}, e.prototype.watchVars = function(t) { | |
var e, s, n, o, r, i; | |
if (i = this.get("vars"), n = t.get("vars"), i && n) { | |
s = []; | |
for (e in i) l.call(i, e) && (r = i[e], o = n.lookup(e), this._checkValue(o, r) ? s.push(void 0) : s.push(n.on("change:" + n.getVarName(e), this.onChange))); | |
return s; | |
} | |
}, e.prototype.watchQuests = function(t) { | |
var e, s, n, o, r, i, a; | |
if (r = this.get("quests"), i = t.get("quests"), r && i) { | |
for (a = !1, e = 0, s = r.length; e < s; e++) o = r[e], n = i.get(o), n ? n.get("finished") || n.on("change:finished", this.onQuestFinished) : a = !0; | |
if (a) return i.on("add", this.onQuestAdded); | |
} | |
}, e.prototype.getWatchers = function() { | |
return e.__super__.getWatchers.call(this).concat([ this.watchCounters, this.watchVars, this.watchQuests ]); | |
}, e.prototype.unwatchCounters = function(t) { | |
var e, s, n, o; | |
if (s = this.get("counters"), o = t.get("counters"), s && o) { | |
n = []; | |
for (e in s) l.call(s, e) && n.push(o.off("change:" + e, this.onChange)); | |
return n; | |
} | |
}, e.prototype.unwatchVars = function(t) { | |
var e, s, n, o; | |
if (o = this.get("vars"), n = t.get("vars"), o && n) { | |
s = []; | |
for (e in o) l.call(o, e) && s.push(n.off("change:" + n.getVarName(e), this.onChange)); | |
return s; | |
} | |
}, e.prototype.unwatchQuests = function(t) { | |
var e, s, n, o, r, i; | |
if (r = this.get("quests"), i = t.quests, r && i) { | |
for (e = 0, s = r.length; e < s; e++) o = r[e], n = i.get(o), n && n.off("change:finished", this.onQuestFinished); | |
return i.off("add", this.onQuestAdded); | |
} | |
}, e.prototype.getUnwatchers = function() { | |
return e.__super__.getUnwatchers.call(this).concat([ this.unwatchCounters, this.unwatchVars, this.unwatchQuests ]); | |
}, e.prototype.onQuestFinished = function(t) { | |
return t.off("change:finished", this.onQuestFinished), this.checkComplete(); | |
}, e.prototype.onQuestAdded = function(t, e) { | |
var s, n; | |
if (s = t.get("id"), n = this.get("quests"), r.indexOf(n, s)) return t.get("finished") ? r.delay(this.checkComplete, 100) : t.on("change:finished", this.onQuestFinished); | |
}, e; | |
}(n); | |
}, function(t, e, s) { | |
var n, o, r, i, a = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, l = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) u.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, u = {}.hasOwnProperty, c = [].indexOf || function(t) { | |
for (var e = 0, s = this.length; e < s; e++) if (e in this && this[e] === t) return e; | |
return -1; | |
}; | |
r = s(22), n = s(8), i = s(12), t.exports = o = function(t) { | |
function e() { | |
this.onChange = a(this.onChange, this), this.checkComplete = a(this.checkComplete, this), | |
this.unwatchAttrs = a(this.unwatchAttrs, this), this.getUnwatchers = a(this.getUnwatchers, this), | |
this.unwatch = a(this.unwatch, this), this.watchEither = a(this.watchEither, this), | |
this.watchAttrs = a(this.watchAttrs, this), this.getWatchers = a(this.getWatchers, this), | |
this.watch = a(this.watch, this), this._checkAttr = a(this._checkAttr, this), this.testAttrs = a(this.testAttrs, this), | |
this.testEither = a(this.testEither, this), this.testNegate = a(this.testNegate, this), | |
this.getTests = a(this.getTests, this), this.isDoneFor = a(this.isDoneFor, this), | |
this.test = a(this.test, this), e.__super__.constructor.apply(this, arguments), | |
this._tests = this.getTests(), this._watchers = this.getWatchers(), this._unwatchers = this.getUnwatchers(); | |
} | |
var s; | |
return l(e, t), e.schema({ | |
attributes: { | |
attrs: Object, | |
negate: Object, | |
either: Object, | |
failText: String | |
} | |
}), e.prototype.test = function(t, e) { | |
return null == e && (e = !0), this.isDoneFor(t) ? (this.unwatch(), !0) : (e && this.watch(t), | |
!1); | |
}, e.prototype.isDoneFor = function(t) { | |
var e, s, n, o; | |
for (o = this._tests, s = 0, n = o.length; s < n; s++) if (e = o[s], !e(t)) return !1; | |
return !0; | |
}, e.prototype.getTests = function() { | |
return [ this.testNegate, this.testEither, this.testAttrs ]; | |
}, e.prototype.testNegate = function(t) { | |
var e, s, n, o, r; | |
if (r = this.get("negate")) for (n = 0, o = r.length; n < o; n++) if (s = r[n], | |
e = new this.constructor(s), e.isDoneFor(t)) return !1; | |
return !0; | |
}, e.prototype.testEither = function(t) { | |
var e, s, n, o, r, i; | |
if (n = this.get("either")) { | |
for (i = !1, o = 0, r = n.length; o < r; o++) if (s = n[o], e = new this.constructor(s), | |
e.isDoneFor(t)) { | |
i = !0; | |
break; | |
} | |
if (!i) return !1; | |
} | |
return !0; | |
}, e.prototype.testAttrs = function(t) { | |
var e, s, n; | |
if (n = this.get("attrs")) for (s in n) if (u.call(n, s) && (e = n[s], !this._checkAttr(t, s, e))) return !1; | |
return !0; | |
}, e.prototype._checkAttr = function(t, e, s) { | |
var n; | |
return n = t.get(e), this._checkValue(n, s); | |
}, s = { | |
eq: function(t, e) { | |
return t === e; | |
}, | |
ne: function(t, e) { | |
return t !== e; | |
}, | |
lt: function(t, e) { | |
return t < e; | |
}, | |
gt: function(t, e) { | |
return t > e; | |
}, | |
lte: function(t, e) { | |
return t <= e; | |
}, | |
gte: function(t, e) { | |
return t >= e; | |
} | |
}, e.prototype.compare = function(t, e, o) { | |
return e instanceof n ? e[t](o) : s[t](e, o); | |
}, e.prototype._checkValue = function(t, e) { | |
var n, o; | |
if (i.isObject(e)) { | |
if (e.isSet && !t) return !1; | |
if (e.value && (!t || !this.compare("eq", t, e.value))) return !1; | |
for (n in s) if (u.call(s, n) && e[n] && !this.compare(n, t, e[n])) return !1; | |
if (e.in && (o = !t, c.call(e.in, o) >= 0)) return !1; | |
if (e.of && !t in e.of) return !1; | |
} else if (!this.compare("eq", e, t)) return !1; | |
return !0; | |
}, e.prototype.watched = null, e.prototype.subConditions = null, e.prototype.watch = function(t) { | |
var e, s, n, o; | |
if (this.watched !== t) { | |
if (this.unwatch(), t) for (this.watched = t, o = this._watchers, s = 0, n = o.length; s < n; s++) (e = o[s])(t); | |
return null; | |
} | |
}, e.prototype.getWatchers = function() { | |
return [ this.watchAttrs, this.watchEither ]; | |
}, e.prototype.watchAttrs = function(t) { | |
var e, s, n, o; | |
if (n = this.get("attrs")) { | |
o = []; | |
for (s in n) u.call(n, s) && (e = n[s], this._checkAttr(t, s, e) ? o.push(void 0) : o.push(t.on("change:" + s, this.onChange))); | |
return o; | |
} | |
}, e.prototype.watchEither = function(t) { | |
var e, s, n, o, r, i, a; | |
if (n = this.get("either")) { | |
for (i = [], o = 0, r = n.length; o < r; o++) s = n[o], e = new this.constructor(s), | |
a = function(t) { | |
return function(e) { | |
return e.unwatch(), t.checkComplete(); | |
}; | |
}(this)(e), e.test(t, a, !0) ? i.push(void 0) : (e.on("complete", this.checkComplete), | |
this.subConditions || (this.subConditions = []), i.push(this.subConditions.push({ | |
cond: e, | |
watcher: a | |
}))); | |
return i; | |
} | |
}, e.prototype.unwatch = function() { | |
var t, e, s, n, o, r, i, a, l, u, c; | |
if (this.watched) { | |
for (i = this.watched, a = this._unwatchers, s = 0, o = a.length; s < o; s++) (t = a[s])(i); | |
if (this.subConditions) { | |
for (l = this.subConditions, n = 0, r = l.length; n < r; n++) u = l[n], e = u.cond, | |
c = u.watcher, e.off("complete", this.checkComplete), e.unwatch(); | |
this.subConditions = null; | |
} | |
return this.watched = null; | |
} | |
}, e.prototype.getUnwatchers = function() { | |
return [ this.unwatchAttrs ]; | |
}, e.prototype.unwatchAttrs = function(t) { | |
var e, s, n; | |
if (s = this.get("attrs")) { | |
n = []; | |
for (e in s) u.call(s, e) && n.push(t.off("change:" + e, this.onChange)); | |
return n; | |
} | |
}, e.prototype.checkComplete = function() { | |
if (this.watched) return this.isDoneFor(this.watched) ? (this.unwatch(), this.trigger("complete", this)) : void 0; | |
}, e.prototype.onChange = function() { | |
return this.checkComplete(); | |
}, e; | |
}(r); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, u = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) c.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, c = {}.hasOwnProperty; | |
n = s(15), o = s(23), a = s(12), r = s(24), t.exports = i = function(t) { | |
function e() { | |
return this._prepareModelAttribute = l(this._prepareModelAttribute, this), this._prepareCollectionAttribute = l(this._prepareCollectionAttribute, this), | |
this._prepareClassInstanceAttribute = l(this._prepareClassInstanceAttribute, this), | |
this._prepareAttribute = l(this._prepareAttribute, this), this.set = l(this.set, this), | |
this.get = l(this.get, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return u(e, t), e.schema = function(t) { | |
var e; | |
if (t) return e = { | |
attributes: {} | |
}, this.__schema__ && a.extend(e.attributes, this.__schema__.attributes), a.extend(e.attributes, t.attributes || {}), | |
this.__schema__ = e; | |
}, e.prototype.get = function(t) { | |
return e.__super__.get.call(this, t); | |
}, e.prototype.set = function(t, s, n) { | |
var o, r, i; | |
if (a.isObject(t)) { | |
i = {}, n = s || n; | |
for (o in t) c.call(t, o) && (r = t[o], i[o] = this._prepareAttribute(o, r, n)); | |
t = i; | |
} else s = this._prepareAttribute(t, s, n); | |
return e.__super__.set.call(this, t, s, n); | |
}, e.prototype._prepareAttribute = function(t, e, s) { | |
var n, o, i, l, u, c, y; | |
c = null, s = s ? a.clone(s) : {}; | |
try { | |
if (y = null != (u = this.constructor.__schema__) ? u.attributes : void 0, n = null != y ? y[t] : void 0) if (a.isFunction(n)) switch (o = n) { | |
case Number: | |
case Boolean: | |
case String: | |
case Object: | |
case Array: | |
c = e; | |
break; | |
default: | |
c = this._prepareClassInstanceAttribute(t, e, o, s); | |
} else a.isObject(n) ? (o = n.cls, l = n.options ? a.extend(s, n.options) : s, c = this._prepareClassInstanceAttribute(t, e, o, l)) : c = e; else c = e; | |
} catch (t) { | |
i = t, r.log("Error in _prepareAttribute:", i), c = e; | |
} | |
return c; | |
}, e.prototype._prepareClassInstanceAttribute = function(t, s, n, r) { | |
var i; | |
return i = n === e || n.prototype instanceof e ? this._prepareModelAttribute(t, s, n, r) : n === o || n.prototype instanceof o ? this._prepareCollectionAttribute(t, s, n, r) : new n(s); | |
}, e.prototype._prepareCollectionAttribute = function(t, e, s, n) { | |
var r, i; | |
return n = n ? a.clone(n) : {}, r = this.get(t), r instanceof s ? (i = e instanceof o ? e.models : e, | |
r.set(i, n)) : e instanceof s ? r = e : (n.add = !0, r = new s(e, n)), r; | |
}, e.prototype._prepareModelAttribute = function(t, e, s, n) { | |
var o; | |
return o = e instanceof s ? e : new s(e, n); | |
}, e; | |
}(n.Model); | |
}, function(t, e, s) { | |
var n, o, r = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) i.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, i = {}.hasOwnProperty; | |
n = s(15), t.exports = o = function(t) { | |
function e() { | |
return e.__super__.constructor.apply(this, arguments); | |
} | |
return r(e, t), e; | |
}(n.Collection); | |
}, function(t, e, s) { | |
var n, o; | |
n = s(25), o = s(12), t.exports = { | |
log: function() { | |
var t; | |
if (t = "undefined" != typeof console && null !== console ? console.log : void 0) return null == (null != t ? t.apply : void 0) && (t = o.bind(t, console)), | |
t.apply(console, arguments); | |
}, | |
getPromise: function(t, e) { | |
return null == e && (e = 100), new n(function(s, n) { | |
return o.delay(s, e, t); | |
}); | |
} | |
}; | |
}, function(t, e, s) { | |
t.exports = s(2)(235); | |
}, , , , function(t, e, s) { | |
var n, o, r; | |
n = s(8), o = s(25), r = s(30).bigToDesc, o.config({ | |
cancellation: !0 | |
}), n.prototype.toJSON = function() { | |
return r.call(this, this); | |
}; | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u; | |
n = s(8), o = s(12), i = function(t) { | |
return { | |
__dec__: 1, | |
val: t.toString() | |
}; | |
}, r = function(t) { | |
return t && "object" == typeof t && t.__dec__ ? new n(t.val || 0) : t; | |
}, u = function(t, e) { | |
return r(e); | |
}, l = function(t, e) { | |
var s; | |
return s = String(e), t.substring(0, t.length - s.length) + s; | |
}, a = function(t) { | |
return function(t, e) { | |
var s, n, r, i, l; | |
return s = t.indexOf("."), s === -1 ? e[t] : (r = [ t.slice(0, +(s - 1) + 1 || 9e9), t.slice(s + 1) ], | |
n = r[0], i = r[1], l = e[n], l && o.isObject(l) ? a(i, l) : i ? void 0 : l); | |
}; | |
}(this), t.exports = { | |
parseBigNumberObj: u, | |
bigFromDesc: r, | |
bigToDesc: i, | |
pad: l, | |
lookup: a | |
}; | |
}, function(t, e) { | |
var s, n, o, r, i, a, l, u; | |
a = !!window.opr && !!opr.addons || !!window.opera || navigator.userAgent.indexOf(" OPR/") >= 0, | |
r = "undefined" != typeof InstallTrigger, u = !window.safari || safari.pushNotification, | |
l = Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") > 0 || function(t) { | |
return "[object SafariRemoteNotification]" === t.toString(); | |
}(u), i = !!document.documentMode, o = !i && !!window.StyleMedia, n = !!window.chrome && !!window.chrome.webstore, | |
s = (n || a) && !!window.CSS, t.exports = { | |
opera: a, | |
firefox: r, | |
safari: l, | |
ie: i, | |
edge: o, | |
chrome: n | |
}; | |
}, function(t, e, s) { | |
t.exports = s(2)(227); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
e.__esModule = !0; | |
var o = s(34), r = n(o), i = s(35), a = n(i), l = s(36), u = n(l); | |
e.createHistory = u.default; | |
var c = s(37), y = n(c); | |
e.createHashHistory = y.default; | |
var d = s(38), p = n(d); | |
e.createMemoryHistory = p.default; | |
var x = s(39), f = n(x); | |
e.useBasename = f.default; | |
var h = s(40), m = n(h); | |
e.useBeforeUnload = m.default; | |
var g = s(44), v = n(g); | |
e.useQueries = v.default; | |
var b = s(45), _ = n(b); | |
e.Actions = _.default; | |
var k = s(46), w = n(k); | |
e.enableBeforeUnload = w.default; | |
var C = s(47), E = n(C); | |
e.enableQueries = E.default; | |
var S = r.default(a.default, "Using createLocation without a history instance is deprecated; please use history.createLocation instead"); | |
e.createLocation = S; | |
}, function(t, e, s) { | |
t.exports = s(2)(195); | |
}, function(t, e, s) { | |
t.exports = s(2)(193); | |
}, function(t, e, s) { | |
t.exports = s(2)(230); | |
}, function(t, e, s) { | |
t.exports = s(2)(180); | |
}, function(t, e, s) { | |
t.exports = s(2)(226); | |
}, function(t, e, s) { | |
t.exports = s(2)(225); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t) { | |
function e(e) { | |
var s = t(); | |
if ("string" == typeof s) return (e || window.event).returnValue = s, s; | |
} | |
return u.addEventListener(window, "beforeunload", e), function() { | |
u.removeEventListener(window, "beforeunload", e); | |
}; | |
} | |
function r(t) { | |
return function(e) { | |
function s() { | |
for (var t = void 0, e = 0, s = d.length; null == t && e < s; ++e) t = d[e].call(); | |
return t; | |
} | |
function n(t) { | |
return d.push(t), 1 === d.length && l.canUseDOM && (c = o(s)), function() { | |
d = d.filter(function(e) { | |
return e !== t; | |
}), 0 === d.length && c && (c(), c = null); | |
}; | |
} | |
function r(t) { | |
l.canUseDOM && d.indexOf(t) === -1 && (d.push(t), 1 === d.length && (c = o(s))); | |
} | |
function a(t) { | |
d.length > 0 && (d = d.filter(function(e) { | |
return e !== t; | |
}), 0 === d.length && c()); | |
} | |
var u = t(e), c = void 0, d = []; | |
return i({}, u, { | |
listenBeforeUnload: n, | |
registerBeforeUnloadHook: y.default(r, "registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead"), | |
unregisterBeforeUnloadHook: y.default(a, "unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead") | |
}); | |
}; | |
} | |
e.__esModule = !0; | |
var i = Object.assign || function(t) { | |
for (var e = 1; e < arguments.length; e++) { | |
var s = arguments[e]; | |
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]); | |
} | |
return t; | |
}, a = s(41), l = (n(a), s(42)), u = s(43), c = s(34), y = n(c); | |
e.default = r, t.exports = e.default; | |
}, function(t, e, s) { | |
t.exports = s(2)(181); | |
}, function(t, e, s) { | |
t.exports = s(2)(184); | |
}, function(t, e, s) { | |
t.exports = s(2)(185); | |
}, function(t, e, s) { | |
t.exports = s(2)(196); | |
}, function(t, e, s) { | |
t.exports = s(2)(182); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
e.__esModule = !0; | |
var o = s(34), r = n(o), i = s(40), a = n(i); | |
e.default = r.default(a.default, "enableBeforeUnload is deprecated, use useBeforeUnload instead"), | |
t.exports = e.default; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
e.__esModule = !0; | |
var o = s(34), r = n(o), i = s(44), a = n(i); | |
e.default = r.default(a.default, "enableQueries is deprecated, use useQueries instead"), | |
t.exports = e.default; | |
}, , , , , , , , , , , , , , , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, _ = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) k.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, k = {}.hasOwnProperty; | |
f = s(12), y = s(25), u = s(22), i = s(23), r = s(8), p = s(63), d = s(66), l = s(72), | |
c = s(74), m = s(65), g = s(75).getRebornReward, h = s(26)._tr, a = s(24), n = s(68), | |
o = s(14), v = s(30).parseBigNumberObj, t.exports = x = function(t) { | |
function e() { | |
return this.onBuyError = b(this.onBuyError, this), this.onBought = b(this.onBought, this), | |
this.beforeReborn = b(this.beforeReborn, this), this.canRebornForCrowns = b(this.canRebornForCrowns, this), | |
this.reborn = b(this.reborn, this), this.getRebornReward = b(this.getRebornReward, this), | |
this.init = b(this.init, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return _(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
name: String, | |
heroes: s(77), | |
resources: s(82), | |
counters: s(83), | |
vars: s(84), | |
multipliers: c, | |
skills: s(85), | |
battle: s(99), | |
items: l, | |
album: s(103), | |
rooms: s(108), | |
stats: s(111), | |
quests: d, | |
itemSale: s(113), | |
dailyQuest: s(115), | |
starterPack: s(117), | |
superChestQuest: s(119), | |
welcomeBack: s(121), | |
superHeroes: s(122), | |
superChest: s(126), | |
chest: s(128), | |
tabs: s(130) | |
} | |
}), e.prototype.init = function(t, e) { | |
var n, o, r; | |
return t = f.clone(t), null == e && (e = {}), e.parse = !0, e.silent = !0, null == t.counters && (t.counters = "{}"), | |
this.set("counters", JSON.parse(t.counters, v), e), delete t.counters, null == t.vars && (t.vars = "{}"), | |
this.set("vars", JSON.parse(t.vars, v), e), delete t.vars, null == t.itemSale && (t.itemSale = {}), | |
null == t.dailyQuest && (t.dailyQuest = {}), null == t.starterPack && (t.starterPack = {}), | |
null == t.superChestQuest && (t.superChestQuest = {}), null == t.chest && (t.chest = {}), | |
null == t.tabs && (t.tabs = {}), null == t.welcomeBack && (t.welcomeBack = {}), | |
null == t.superHeroes && (t.superHeroes = []), null == t.superChest && (t.superChest = {}), | |
this.set(t, e), this.get("battle").init(), this.get("album").init(), this.get("skills").init(), | |
this.get("itemSale").start(), this.get("starterPack").start(), this.get("superChestQuest").start(), | |
this.get("welcomeBack").init(), this.get("superChest").init(), this.get("chest").init(), | |
o = s(65), this.set("items", o, e), n = s(71), r = new d(), r.reset(n, e), this.set("quests", r, e), | |
t.quests && this.get("quests").setState(t.quests, e), this.get("quests").init(), | |
this.get("dailyQuest").start(); | |
}, e.prototype.getRebornReward = function() { | |
var t, e, s; | |
return t = o.getUser().get("counters"), e = t.get("C::HLVL"), s = t.get("REBORN"), | |
g(e, s); | |
}, e.prototype.reborn = function(t) { | |
var e; | |
return null == t && (t = !0), t && o.events.trigger("stopFight"), e = n.callMethod("user.reborn", { | |
clearAll: t | |
}), e.then(function(e) { | |
return function(s) { | |
return e.onBought(s, t); | |
}; | |
}(this)).catch(this.onBuyError); | |
}, e.prototype.canRebornForCrowns = function() { | |
var t, e; | |
return e = o.getUser(), t = e.get("resources").get("crowns"), t.gte(this.getRebornPrice()); | |
}, e.prototype.beforeReborn = function() { | |
return this.get("dailyQuest").beforeReborn(); | |
}, e.prototype.onBought = function(t, e) { | |
var n, r, i, a, l, u; | |
if (n = o.getUser().get("counters"), a = this.getRebornReward(), o = s(14), e) for (this.beforeReborn(), | |
l = [ "counters", "heroes", "resources", "multipliers", "skills", "quests", "rooms", "items", "dailyQuest", "superHeroes", "stats" ], | |
r = 0, i = l.length; r < i; r++) u = l[r], this.get(u).reborn(); | |
return new p(a).claim(o.getUser()), setTimeout(function(t) { | |
return function() { | |
return o.show({ | |
popup: { | |
type: "rebornReward", | |
data: a | |
} | |
}); | |
}; | |
}(this), 0), t.reward && new p(t.reward).claim(o.getUser()), n.increment("REBORN", 1), | |
e && (this.get("battle").onReborn(), o.events.trigger("reborn")), o.analytics.dtd_custom_event("reborn", { | |
times: n.get("REBORN") | |
}); | |
}, e.prototype.onBuyError = function(t) { | |
return a.log(t); | |
}, e; | |
}(u); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g = {}.hasOwnProperty, v = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
r = s(64), n = s(14), a = s(12), o = s(8), m = { | |
claim: !0 | |
}, u = function(t, e) { | |
var s, n, o, r, i; | |
if (r = t.counters) { | |
o = []; | |
for (s in r) g.call(r, s) && (i = r[s], o.push(null != (n = e.get("counters")) ? n.increment(s, i) : void 0)); | |
return o; | |
} | |
}, h = function(t, e) { | |
var s, n, o, r, i; | |
if (o = t.vars) { | |
n = []; | |
for (i in o) r = o[i], n.push(null != (s = e.get("vars")) ? s.setVar(i, r) : void 0); | |
return n; | |
} | |
}, y = function(t, e) { | |
var s, n, o, i, a, l, u, c, y, d; | |
if (d = t.items) { | |
if (o = e.get("items"), !o) return; | |
for (c = [], i = 0, a = d.length; i < a; i++) u = d[i], y = u[0], l = u[1], c.push(function() { | |
var t, i, a; | |
for (a = [], s = t = 1, i = l; 1 <= i ? t <= i : t >= i; s = 1 <= i ? ++t : --t) n = r.createByTypeId(y), | |
n.get("virtual") || o.add(n), a.push(n.onCreatedBy(e)); | |
return a; | |
}()); | |
return c; | |
} | |
}, c = function(t, e) { | |
var s, o, r, i, l; | |
if (l = t.event) { | |
for (a.isArray(l) || (l = [ l ]), i = [], o = 0, r = l.length; o < r; o++) s = l[o], | |
s.name ? i.push(n.events.trigger(s.name, s.data)) : i.push(void 0); | |
return i; | |
} | |
}, x = function(t, e) { | |
var s, n, o, r, i; | |
if (r = t.res) { | |
n = e.get("resources"), o = []; | |
for (s in r) i = r[s], o.push(n.add(s, i || 0)); | |
return o; | |
} | |
}, d = function(t, e) { | |
var s, o, r, i, a, l, u, c, y, d, p, x, f; | |
if (p = t.mults) { | |
try { | |
u = e.get("multipliers"); | |
} catch (t) { | |
return void (o = t); | |
} | |
for (d = [], a = 0, l = p.length; a < l; a++) c = p[a], r = c[0], y = c[1], f = y.value, | |
s = y.actionTime, i = y.isMult, x = s ? n.getTime() + 1e3 * s : 0, d.push(u.add(r, { | |
value: f, | |
validTill: x, | |
isMult: i | |
})); | |
return d; | |
} | |
}, f = function(t, e) { | |
var s, o, r; | |
if (r = t.timeskip, r && (s = r.res, o = r.time, t = n.getUser().get("battle").getTimeskipReward(r.res, r.time))) return new i(t).claim(n.getUser()); | |
}, p = function(t, e) { | |
var s; | |
if (s = t.reborn) return n.getUser().onBought(!1); | |
}, l = function(t, e) { | |
var s, n, r, i, a; | |
if (r = e.res) { | |
if (t.res) { | |
n = t.res, i = []; | |
for (s in r) g.call(r, s) && (a = r[s], n[s] ? n[s] instanceof o ? i.push(n[s] = n[s].plus(a)) : a instanceof o ? i.push(n[s] = o(n[s]).plus(a)) : i.push(n[s] = n[s] + a) : i.push(n[s] = a)); | |
return i; | |
} | |
return t.res = r; | |
} | |
}, t.exports = i = function() { | |
function t(t) { | |
this.claimMultipliers = v(this.claimMultipliers, this), this.add = v(this.add, this), | |
this.claim = v(this.claim, this); | |
var e, s; | |
if (t) for (e in t) g.call(t, e) && (s = t[e], this[e] = s); | |
} | |
return t.prototype.claimFuncs = [ u, h, x, d, c, f, p ], t.prototype.addFuncs = [ l ], | |
t.prototype.claim = function(t) { | |
var e, s, n, o; | |
for (o = this.claimFuncs, s = 0, n = o.length; s < n; s++) (e = o[s])(this, t); | |
return this; | |
}, t.prototype.add = function(t) { | |
var e, s, n, o; | |
for (o = this.addFuncs, s = 0, n = o.length; s < n; s++) (e = o[s])(this, t); | |
return this; | |
}, t.prototype.claimMultipliers = function(t) { | |
return d(this, t); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, y = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) d.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, d = {}.hasOwnProperty; | |
l = s(12), i = s(22), a = s(10), u = s(65), o = s(8), n = s(14), t.exports = r = function(t) { | |
function e() { | |
return this.shopPopup = c(this.shopPopup, this), this.onCreatedBy = c(this.onCreatedBy, this), | |
this.onBoughtBy = c(this.onBoughtBy, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return y(e, t), e.prototype.onBoughtBy = function(t) { | |
return this.onCreatedBy(t); | |
}, e.prototype.onCreatedBy = function(t) { | |
var e, o, r, i; | |
if (null == t && (t = n.getUser()), r = this.get("qty"), t.get("counters").increment("I:" + this.get("typeId"), r), | |
o = this.get("cTypeId"), o && t.get("counters").increment("I:" + o, r), i = this.get("reward"), | |
this.shopPopup(), i) return e = s(63), i = new e(i), i.claim(t); | |
}, e.prototype.shopPopup = function() { | |
if ("timeskip" === this.get("tag")) return n.show({ | |
popup: { | |
type: "timeskipReward", | |
data: this | |
} | |
}); | |
}, e.getDescriptor = function(t) { | |
var e, s, r, i, a, c, y; | |
if (c = n.getUser(), r = o(c.get("counters").get("FLDSC")), e = l.clone(l.find(u, function(e) { | |
return e.typeId === t; | |
})), (e.discount || e.saleLabel) && (e.sale = !0), r.gt(0)) { | |
s = { | |
price: {} | |
}, i = e.price; | |
for (a in i) y = i[a], s.price[a] = o(y).times(o(1).minus(r)).round(0, 3); | |
e = l.extend({}, e, s); | |
} | |
return e; | |
}, e.getStateDescriptor = function(t) { | |
var e; | |
return e = l.find(u, function(e) { | |
return e.typeId === t; | |
}); | |
}, e.createByTypeId = function(t) { | |
return this.createFromDescriptor(this.getDescriptor(t)); | |
}, e.createFromDescriptor = function(t) { | |
var s; | |
return t && (s = new e(t)), s; | |
}, e.createFromState = function(t) { | |
var s; | |
return s = e.createByTypeId(null != t ? t.typeId : void 0), s && s.set(t), s; | |
}, e; | |
}(i); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, y = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) d.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, d = {}.hasOwnProperty; | |
r = s(23), i = s(67), n = s(68), o = s(14), l = s(12), u = s(30).parseBigNumberObj, | |
t.exports = a = function(t) { | |
function e(t, s) { | |
this.reborn = c(this.reborn, this), this.onQuestLockChanged = c(this.onQuestLockChanged, this), | |
this.onQuestFinished = c(this.onQuestFinished, this), this.onQuestStarted = c(this.onQuestStarted, this), | |
this.checkComplete = c(this.checkComplete, this), this.init = c(this.init, this), | |
this.setState = c(this.setState, this), null == s && (s = {}), null == s.comparator && (s.comparator = r), | |
this.syncQuest = l.throttle(this.syncQuest, 100, { | |
leading: !1 | |
}), e.__super__.constructor.call(this, t, s); | |
} | |
var r; | |
return y(e, t), e.prototype.model = i, e.prototype.setState = function(t, e) { | |
return l(t).each(function(t) { | |
return function(s) { | |
var n, o; | |
if (o = t.get(s.id), o && (s.started && o.set("started", s.started, e), s.finished && o.set("finished", s.finished, e), | |
s.obj_state)) return n = JSON.parse(s.obj_state, u), o.get("objectives").each(function(t, s) { | |
var o; | |
if (o = n[s]) return t.setState(n[s], e); | |
}); | |
}; | |
}(this)); | |
}, e.prototype.init = function() { | |
return this.each(function(t) { | |
return function(e) { | |
if (e.init(), e.get("started") || e.on("change:started", t.onQuestStarted), e.get("finished") || e.on("change:finished", t.onQuestFinished), | |
e.get("locked")) return e.on("change:locked", t.onQuestLockChanged); | |
}; | |
}(this)); | |
}, e.prototype.checkComplete = function(t) { | |
return this.each(function(e) { | |
return e.checkComplete(t); | |
}); | |
}, e.prototype.onQuestStarted = function(t) { | |
return t.off("change:started", this.onQuestStarted), t.set("isNew", !0), this.trigger("questStarted", t), | |
l.defer(this.syncQuest, t); | |
}, e.prototype.onQuestFinished = function(t) { | |
return t.off("change:finished", this.onQuestFinished), this.trigger("questComplete", t), | |
l.defer(this.syncQuest, t); | |
}, e.prototype.syncQuest = function(t) { | |
return o.analytics.event("Quest", "done", t.id), n.callMethod("quests.sync"); | |
}, e.prototype.onQuestLockChanged = function(t) { | |
return t.off("change:locked", this.onQuestLockChanged), this.trigger("questUnlocked", t); | |
}, r = function(t, e) { | |
var s, n; | |
return s = t.get("priority") || 10, n = e.get("priority") || 10, s - n || t.get("id") - e.get("id"); | |
}, e.prototype.reborn = function() { | |
var t; | |
return t = s(71), l.each(t, function(t) { | |
return function(e) { | |
var s; | |
if (s = t.get(e.id), s.isFinished()) return s.get("reward").claimMultipliers(o.getUser()); | |
}; | |
}(this)); | |
}, e; | |
}(r); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, u = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) c.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, c = {}.hasOwnProperty; | |
i = s(22), o = s(14), n = s(68), r = s(24), t.exports = a = function(t) { | |
function e() { | |
return this.onClaimError = l(this.onClaimError, this), this.isTimedOut = l(this.isTimedOut, this), | |
this.getTimeLimit = l(this.getTimeLimit, this), this.getObjectiveIndex = l(this.getObjectiveIndex, this), | |
this.isLocked = l(this.isLocked, this), this.isFinished = l(this.isFinished, this), | |
this.onObjectiveComplete = l(this.onObjectiveComplete, this), this.claimNonAutoReward = l(this.claimNonAutoReward, this), | |
this.onClaimNonAutoReward = l(this.onClaimNonAutoReward, this), this.isNonClaimedFinishedQuest = l(this.isNonClaimedFinishedQuest, this), | |
this.getNonClaimedQuests = l(this.getNonClaimedQuests, this), this.finish = l(this.finish, this), | |
this.checkComplete = l(this.checkComplete, this), this.listenObjectives = l(this.listenObjectives, this), | |
this.showPopup = l(this.showPopup, this), this.start = l(this.start, this), this.onUnlocked = l(this.onUnlocked, this), | |
this._prepareCollectionAttribute = l(this._prepareCollectionAttribute, this), this.init = l(this.init, this), | |
e.__super__.constructor.apply(this, arguments); | |
} | |
return u(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
title: String, | |
description: String, | |
endDescription: String, | |
icon: String, | |
type: String, | |
reward: s(63), | |
lock: s(20), | |
objectives: { | |
cls: s(23), | |
options: { | |
model: s(70) | |
} | |
}, | |
started: Number, | |
finished: Number, | |
hidden: Boolean, | |
isNew: Boolean, | |
timeLimit: Number, | |
nonautoReward: Boolean, | |
noStart: Boolean, | |
popup: String | |
} | |
}), e.prototype.varName = "__NON_CLAIMED_Q", e.prototype.init = function() { | |
var t, e, s, n, r, i, a; | |
return a = o.getUser(), r = [ this.get("started"), this.get("finished"), this.get("noStart") ], | |
i = r[0], t = r[1], n = r[2], t || n || (i || (e = this.get("lock"), s = !!e && !e.test(a, this.onUnlocked), | |
this.set("locked", s, { | |
silent: !0 | |
}), s ? e.on("complete", function(t) { | |
return function() { | |
if (i = t.start(), i && !t.checkComplete({ | |
silent: !0 | |
})) return t.listenObjectives(); | |
}; | |
}(this)) : i = this.start()), i && (this.checkComplete({ | |
silent: !0 | |
}) || this.listenObjectives())), this; | |
}, e.prototype._prepareCollectionAttribute = function(t, s, n, o) { | |
return s = e.__super__._prepareCollectionAttribute.apply(this, arguments), "objectives" === t && s && s.each(function(t) { | |
return function(e) { | |
return e.quest = t; | |
}; | |
}(this)), s; | |
}, e.prototype.onUnlocked = function() { | |
var t; | |
return t = this.get("lock"), t.off("complete", this.onUnlocked), this.set("locked", !1), | |
this.start(), this.checkComplete(); | |
}, e.prototype.start = function(t) { | |
var e, s, n; | |
return null == t && (t = !1), n = this.get("started"), !(n && !t) && (e = o.getTime(), | |
!this.isTimedOut() && (s = this.get("objectives"), s.each(function(t) { | |
return function(e) { | |
if (e.start(), !e.isFinished()) return t.listenTo(e, "complete", t.onObjectiveComplete); | |
}; | |
}(this)), this.set("started", e), this.checkComplete(), this.trigger("started"), | |
this.showPopup(), e)); | |
}, e.prototype.showPopup = function(t) { | |
var e; | |
if (null == t && (t = !0), e = this.get("popup")) return o.show({ | |
popup: { | |
type: e, | |
data: this, | |
queued: t | |
} | |
}); | |
}, e.prototype.listenObjectives = function() { | |
var t; | |
return t = this.get("objectives"), t.each(function(t) { | |
return function(e) { | |
if (!e.isFinished()) return t.listenTo(e, "complete", t.onObjectiveComplete), e.ensureCondition(); | |
}; | |
}(this)); | |
}, e.prototype.checkComplete = function(t) { | |
var e, s; | |
return !!(e = this.get("finished")) || !this.isTimedOut() && (s = this.get("objectives"), | |
e = s.every(function(t) { | |
return function(e) { | |
var s; | |
return s = e.checkComplete(), s && t.stopListening(e, "complete", t.onObjectiveComplete), | |
s; | |
}; | |
}(this)), !!e && (this.finish(t), !0)); | |
}, e.prototype.finish = function(t) { | |
var e, s, n, r, i, a; | |
if (i = [ this.get("nonautoReward"), this.get("reward"), this.get("id") ], r = i[0], | |
a = i[1], n = i[2], !this.finished) return s = o.getTime(), r ? (e = this.getNonClaimedQuests(), | |
e.indexOf(n) === -1 && e.push(n), o.getUser().get("vars").set(this.varName, e)) : a && a.claim(o.getUser()), | |
this.showPopup(), this.set("finished", s, t), this.trigger("finished"), o.analytics.dtd_custom_event("quest:finish", { | |
id: this.get("id") | |
}), s; | |
}, e.prototype.getNonClaimedQuests = function() { | |
return o.getUser().get("vars").get(this.varName) || []; | |
}, e.prototype.isNonClaimedFinishedQuest = function() { | |
var t, e; | |
return e = this.get("nonautoReward"), t = this.getNonClaimedQuests(), t.indexOf(this.get("id")) > -1 && e; | |
}, e.prototype.onClaimNonAutoReward = function(t) { | |
var e, s; | |
if (t) return this.isNonClaimedFinishedQuest() ? (s = this.get("reward"), s && s.claim(o.getUser()), | |
t = this.getNonClaimedQuests(), e = t.indexOf(this.get("id")), e > -1 && t.splice(e, 1), | |
o.getUser().get("vars").set(this.varName, t), o.analytics.dtd_custom_event("start:quest:claim", { | |
id: this.get("id") | |
}), this.trigger("claimed")) : void 0; | |
}, e.prototype.claimNonAutoReward = function() { | |
var t; | |
return t = n.callMethod("quest.claim.nonauto", { | |
questId: this.get("id") | |
}), t.then(this.onClaimNonAutoReward).catch(this.onClaimError); | |
}, e.prototype.onObjectiveComplete = function(t) { | |
if (this.stopListening(t, "complete", this.onObjectiveComplete), this.checkComplete(), | |
!this.isFinished()) return this.trigger("objectiveComplete", this, t); | |
}, e.prototype.isFinished = function() { | |
return this.get("finished"); | |
}, e.prototype.isLocked = function() { | |
return !this.get("lock").test(o.getUser()); | |
}, e.prototype.getObjectiveIndex = function(t) { | |
return this.get("objectives").indexOf(t); | |
}, e.prototype.getTimeLimit = function() { | |
var t; | |
return t = this.get("timeLimit"), t ? 1e3 * t : 0; | |
}, e.prototype.isTimedOut = function() { | |
var t; | |
return t = this.getTimeLimit(), t && t <= o.getTime(); | |
}, e.prototype.onClaimError = function(t) { | |
return r.log(t); | |
}, e; | |
}(i); | |
}, function(t, e, s) { | |
var n, o, r, i, a; | |
i = s(69), r = s(25), o = s(14), a = s(30).parseBigNumberObj, t.exports = n = function() { | |
function t() {} | |
var e; | |
return t.callInProgress = null, t.queue = [], e = function() { | |
return !0; | |
}, t.batch = [], t.addToBatch = function(e, s) { | |
return t.batch.length < 20 ? (t.batch.push({ | |
method: e, | |
args: s | |
}), r.resolve()) : t.callMethod(e, s); | |
}, t.callMethod = function(e, s) { | |
var n, l, u, c, y, d; | |
return null == s && (s = {}), u = { | |
method: e, | |
args: s | |
}, o.events.trigger("beforeSendBatch"), t.batch && (u.batch = t.batch.concat(), | |
t.batch = []), uniqueSid && (u.uniqueSid = uniqueSid), d = new i({ | |
type: "POST", | |
url: "/api/", | |
data: { | |
data: JSON.stringify(u) | |
} | |
}), l = n = null, y = new r(function(t, e) { | |
return l = t, n = e, null; | |
}), c = function() { | |
return d.makeRequest().then(function(e) { | |
return e = JSON.parse(e, a), "ok" === e.result ? l(e.response) : n(new Error(e.error)), | |
t.contunueCalls(), null; | |
}, function(e) { | |
return n(new Error(e)), t.contunueCalls(), null; | |
}).catch(function(e) { | |
var o, r; | |
if (e instanceof Error) n(o); else try { | |
r = e[0], s = e[1], o = new Error(), o.data = e, o.message = r + ": " + s[0], n(r); | |
} catch (t) { | |
o = t, n(new Error(e)); | |
} | |
return t.contunueCalls(); | |
}); | |
}, t.callInProgress ? t.queue.push(c) : t.callInProgress = c(), y; | |
}, t.contunueCalls = function() { | |
var e; | |
return t.queue.length ? (e = t.queue.shift(), t.callInProgress = e()) : t.callInProgress = null; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(25), i = s(12), n = s(19), t.exports = r = function() { | |
function t(t) { | |
this.options = t, this.beforeSend = a(this.beforeSend, this), this.makeRequest = a(this.makeRequest, this), | |
this.options || (this.options = {}), this.csrftoken = this.getCookie("csrftoken"), | |
this.options.beforeSend = this.beforeSend; | |
} | |
return t.prototype.csrftoken = "", t.prototype.makeRequest = function(t) { | |
var e; | |
return e = i({}).extend(this.options, t), o.resolve(Backbone.ajax(e)); | |
}, t.prototype.getCookie = function(t) { | |
var e, s, o, r, i; | |
if (i = null, document.cookie && "" !== document.cookie) for (s = document.cookie.split(";"), | |
o = 0, r = s.length; o < r; o++) if (e = s[o], e = n.trim(e), e.substring(0, t.length + 1) === t + "=") { | |
i = decodeURIComponent(e.substring(t.length + 1)); | |
break; | |
} | |
return i; | |
}, t.prototype.isSameOrigin = function(t) { | |
var e, s, n, o; | |
return e = document.location.host, n = document.location.protocol, o = "//" + e, | |
s = n + o, t === s || t.slice(0, s.length + 1) === s + "/" || t === o || t.slice(0, o.length + 1) === o + "/" || !/^(\/\/|http:|https:).*/.test(t); | |
}, t.prototype.beforeSend = function(t) { | |
if (this.csrftoken && this.isSameOrigin(this.options.url)) return t.setRequestHeader("X-CSRFToken", this.csrftoken); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, c = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) y.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, y = {}.hasOwnProperty; | |
i = s(22), l = s(20), o = s(14), n = s(68), r = s(8), t.exports = a = function(t) { | |
function e() { | |
return this.isFinished = u(this.isFinished, this), this.finish = u(this.finish, this), | |
this.skip = u(this.skip, this), this.onComplete = u(this.onComplete, this), this.checkComplete = u(this.checkComplete, this), | |
this.getProgressValue = u(this.getProgressValue, this), this.getGoalValue = u(this.getGoalValue, this), | |
this.getCompletedValue = u(this.getCompletedValue, this), this.getCurrentValue = u(this.getCurrentValue, this), | |
this.updateConditionOnReborn = u(this.updateConditionOnReborn, this), this.ensureCondition = u(this.ensureCondition, this), | |
this.start = u(this.start, this), this.setState = u(this.setState, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return c(e, t), e.prototype.quest = null, e.prototype.conditon = null, e.schema({ | |
attributes: { | |
counter: String, | |
initialValue: Number, | |
value: Number, | |
isAbsolute: Boolean, | |
condition: l, | |
unlockPrice: Object, | |
finished: Boolean, | |
description: String, | |
icon: String, | |
show: String | |
} | |
}), e.prototype.setState = function(t, e) { | |
var s; | |
if (t) { | |
if (t.fin) return this.set("finished", !0); | |
if (this.ensureCondition(), s = this.get("condition"), s && (t.con && s.set(t.con, e), | |
s.isDoneFor(o.getUser()))) return this.onComplete(); | |
} | |
}, e.prototype.start = function() { | |
return this.ensureCondition(); | |
}, e.prototype.ensureCondition = function() { | |
var t, e, s, n, i, a, u, c, y, d; | |
if (!this.isFinished() && !this.onCondionComplete) return y = o.getUser(), this.get("condition") || (s = this.get("counter"), | |
c = !1, s && (n = this.get("initialValue") || 0, n || this.get("isAbsolute") ? n = 0 : (n = y.get("counters").get(s), | |
this.set("initialValue", n)), d = this.get("value"), u = y.get("counters").get(s), | |
(d instanceof r && !(u instanceof r) || !(d instanceof r) && u instanceof r) && (d = r(d), | |
u = r(u)), d instanceof r ? (n = r(n), a = n.plus(d), i = u.lt(a)) : (a = n + d, | |
i = u < n + d), i ? (t = {}, t[s] = a, e = new l({ | |
counters: t | |
}, { | |
silent: !0 | |
}), this.set("condition", e)) : c = !0)), e = this.get("condition"), e && (e.test(y) ? c = !0 : this.onCondionComplete = e.on("complete", this.onComplete)), | |
c ? this.finish() : void 0; | |
}, e.prototype.updateConditionOnReborn = function(t) { | |
var e, s, n, i, a, u, c, y, d, p; | |
if (!this.isFinished()) return d = o.getUser(), null != (c = this.get("condition")) && c.off("complete", this.onComplete), | |
n = this.get("counter"), y = !1, n && 0 === n.indexOf("C::") && (p = r(this.get("value")), | |
u = r(0), a = p.minus(t), i = u.lt(a), i ? (e = {}, e[n] = a, s = new l({ | |
counters: e | |
}, { | |
silent: !0 | |
}), this.set("condition", s)) : y = !0), s = this.get("condition"), s && (s.test(d) ? y = !0 : this.onCondionComplete = s.on("complete", this.onComplete)), | |
y ? this.finish() : void 0; | |
}, e.prototype.getCurrentValue = function() { | |
var t, e; | |
return e = o.getUser(), t = this.get("counter"), t ? e.get("counters").get(t) : 0; | |
}, e.prototype.getCompletedValue = function() { | |
return this.getCurrentValue() - (this.get("initialValue") || 0) || 0; | |
}, e.prototype.getGoalValue = function() { | |
var t, e, s, n, o; | |
e = this.get("condition").get("counters"), t = null, n = null; | |
for (s in e) o = e[s], t = s, n = o; | |
return n; | |
}, e.prototype.getProgressValue = function() { | |
var t, e, s, n, o, i, a, l, u; | |
return a = [ this.get("condition"), this.get("value"), this.get("counter") ], t = a[0], | |
u = a[1], e = a[2], t ? (s = t.get("counters"), o = s[e], s[e] || (o = this.getGoalValue(s)), | |
l = r(o).minus(u), i = r(this.getCurrentValue()), n = i.minus(l), n = n.gt(u) ? u : n) : u; | |
}, e.prototype.checkComplete = function() { | |
var t, e; | |
return t = this.get("finished"), t || (t = null != (e = this.get("condition")) ? e.isDoneFor(o.getUser()) : void 0), | |
t; | |
}, e.prototype.onComplete = function() { | |
return this.finish(); | |
}, e.prototype.skip = function() { | |
var t, e, s; | |
return e = this.get("unlockPrice"), s = o.getUser(), !(!e || !s.get("resources").spend(e)) && (t = n.callMethod("quests.objective.unlock", { | |
questId: this.quest.get("id"), | |
objectiveIndex: this.quest.getObjectiveIndex(this) | |
}), t.then(function(t) { | |
return function() { | |
return t.finish(), null; | |
}; | |
}(this))); | |
}, e.prototype.finish = function() { | |
var t; | |
return t = this.get("condition"), t && t.off("complete", this.onComplete), this.set("finished", !0), | |
this.trigger("complete", this); | |
}, e.prototype.isFinished = function() { | |
return this.get("finished"); | |
}, e; | |
}(i); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
x = s(12), r = s(8), a = s(64), p = s(10), i = s(23), y = s(25), u = s(22), c = s(73), | |
n = s(68), h = s(24).log, f = s(65), o = s(14), d = s(63), t.exports = l = function() { | |
function t(t) { | |
this.printItemsList = m(this.printItemsList, this), this.reborn = m(this.reborn, this), | |
this.getMultipliers = m(this.getMultipliers, this), this.buyLocal = m(this.buyLocal, this), | |
this.buy = m(this.buy, this), this._prepareItem = m(this._prepareItem, this), this.isEnough = m(this.isEnough, this), | |
this.getNotEnough = m(this.getNotEnough, this), this.getQuantity = m(this.getQuantity, this), | |
this.spend = m(this.spend, this), this.remove = m(this.remove, this), this.set = m(this.set, this), | |
this.add = m(this.add, this), this.get = m(this.get, this); | |
var e, s, n, o; | |
if (this.items = {}, o = { | |
silent: 1 | |
}, t) for (s = 0, n = t.length; s < n; s++) e = t[s], this.add(e, o); | |
} | |
return x.extend(t.prototype, Backbone.Events), t.prototype.items = null, t.prototype.get = function(t) { | |
return this.items[t]; | |
}, t.prototype.getStateDescriptor = function(t) { | |
return a.getStateDescriptor(t); | |
}, t.prototype.getDescriptor = function(t) { | |
return a.getDescriptor(t); | |
}, t.prototype.add = function(t, e) { | |
var s, n, o, r, i; | |
return e || (e = {}), o = this.items, t = this._prepareItem(t, e), t && (s = t.get("cTypeId"), | |
i = s ? s : t.get("typeId"), n = o[i], n ? (r = n.get("qty"), n.set("qty", r + t.get("qty"))) : (s && s !== t.get("typeId") ? (n = a.createByTypeId(s), | |
n.set("qty", t.get("qty"))) : n = t, o[i] = n), e.silent || this.trigger("add", n)), | |
n; | |
}, t.prototype.set = function(t, e, s) { | |
var n, o, r; | |
n = null, x.isObject(t) ? (t.typeId ? (n = {}, n[t.typeId] = t.qty) : n = t, s = e) : (n = {}, | |
n[t] = e), o = []; | |
for (r in n) e = n[r], r = parseInt(r), t = this.get(r), t || (t = a.createByTypeId(r), | |
t && this.add(t, s)), t ? (t.set("qty", e, s), o.push(this.trigger("change", t))) : o.push(void 0); | |
return o; | |
}, t.prototype.remove = function(t) { | |
var e, s, n; | |
try { | |
return n = t.get("typeId"), s = this.items[n], delete this.items[n], this.trigger("remove", s), | |
!0; | |
} catch (t) { | |
e = t, h("Items.remove", e); | |
} | |
return !1; | |
}, t.prototype.spend = function(t, e, s) { | |
var n, o; | |
return null == s && (s = !0), e <= 0 || !!this.isEnough(t, e, s) && (o = this.items[t], | |
n = o.get("qty"), e < n ? (o.set("qty", n - e), this.trigger("change", o)) : (o.set("qty", 0), | |
this.remove(o)), !0); | |
}, t.prototype.getQuantity = function(t) { | |
var e; | |
return e = this.items[t], e ? e.get("qty") : 0; | |
}, t.prototype.getNotEnough = function(t, e) { | |
var s, n, o, r, i, l, u, c, y; | |
for (null == e && (e = !1), l = [], r = 0, i = t.length; r < i; r++) c = t[r], y = c[0], | |
u = c[1], u <= 0 || (n = this.items[y], n && (u -= n.get("qty"), u <= 0) || (o = a.getDescriptor(y), | |
s = [ o, Math.ceil(u / o.qty) ], l.push(s))); | |
return l; | |
}, t.prototype.isEnough = function(t, e, s, n) { | |
var o; | |
return x.isArray(t) || (t = [ [ t, e ] ]), o = this.getNotEnough(t), !o.length || (s && this.trigger("notEnough", o, n), | |
!1); | |
}, t.prototype._prepareItem = function(t, e) { | |
var s; | |
return t ? t instanceof a ? t : t.typeId && (s = a.createByTypeId(t.typeId)) ? s : void 0 : null; | |
}, t.prototype.buy = function(t, e, s, r) { | |
var i, l, u, d, p; | |
if (null == e && (e = "another_place"), null == s && (s = 1), null == r && (r = !1), | |
i = a.getDescriptor(t)) return i.maxQty && this.getQuantity(t) >= i.maxQty ? y.resolve() : (p = o.getUser(), | |
l = r && i.altPrice || i.price, u = new c(l), u.multiply(s), p.get("resources").spend(u) ? (d = n.callMethod("user.items.buy", { | |
typeId: t, | |
count: s, | |
useAltPrice: r, | |
source: e | |
}).catch(function(t) { | |
return function(t) { | |
return o.showError(), h("Network error", t); | |
}; | |
}(this)), d.then(function(t) { | |
return function(n) { | |
var r, l, u, c, y; | |
for (o.analytics.amp_event("shopitem", { | |
name: i.name, | |
price: i.price.crowns, | |
sale: !!i.sale, | |
buttonname: e | |
}), o.analytics.dtd_event("inAppPurchase", [ i.typeId.toString(), i.clarification || "none", 1, [ { | |
currency: "crowns", | |
amount: i.price.crowns | |
} ] ]), u = function() { | |
var t, e, n; | |
for (n = [], r = t = 1, e = s; 1 <= e ? t <= e : t >= e; r = 1 <= e ? ++t : --t) n.push(a.createFromDescriptor(i)); | |
return n; | |
}(), c = 0, y = u.length; c < y; c++) l = u[c], l.get("virtual") || t.add(l), l.onBoughtBy(p); | |
return n; | |
}; | |
}(this))) : y.resolve()); | |
}, t.prototype.buyLocal = function(t, e) { | |
var s, n, r; | |
return null == e && (e = !1), isNaN(t) || (s = a.getDescriptor(t), t = a.createFromDescriptor(s)), | |
r = o.getUser(), n = e && s.altPrice || s.price, r.get("resources").spend(n), t.get("virtual") || this.add(t), | |
t.onBoughtBy(r); | |
}, t.prototype.getMultipliers = function() { | |
var t, e; | |
return e = [ "gold", "dps", "dpc" ], x.reduce(x.values(this.items), function(t, s) { | |
var n, o, r, i; | |
for (n = 0, r = e.length; n < r; n++) o = e[n], i = s.get("m_" + o) || 0, i && (t[o] = t[o].plus(i)); | |
return t; | |
}, x.object(function() { | |
var s, n, o; | |
for (o = [], s = 0, n = e.length; s < n; s++) t = e[s], o.push([ t, new r(0) ]); | |
return o; | |
}())); | |
}, t.prototype.reborn = function() { | |
var t, e, s, n, i, a, l; | |
for (l = o.getUser(), a = [], n = 0, i = f.length; n < i; n++) s = f[n], t = l.get("counters").get("I:" + s.typeId), | |
r(t).gt(0) && "mult_temporal" !== s.tag ? (e = 0, a.push(function() { | |
var n; | |
for (n = []; e < t; ) new d(s.reward).claimMultipliers(l), n.push(e++); | |
return n; | |
}())) : a.push(void 0); | |
return a; | |
}, t.prototype.printItemsList = function() { | |
var t, e, s, n, r, i, a, l, u, c; | |
r = o.getUser().get("items").items, l = []; | |
for (s in r) e = r[s], n = e.get("name") || e.get("res_name"), c = s + " - " + n, | |
i = e.get("mult"), i && (c += " " + i + "%"), u = e.get("saleLabel"), t = e.get("discount"), | |
u ? c += " on sale(" + u + ")" : t && (c += " on sale(" + t + "%)"), a = e.get("price"), | |
a.crowns ? c += " " + a.crowns + " crowns" : a.real && (c += " " + a.real + "$"), | |
l.push(console.log(c)); | |
return l; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, a = {}.hasOwnProperty; | |
r = s(12), n = s(8), t.exports = o = function() { | |
function t(e) { | |
this.discount = i(this.discount, this), this.deduct = i(this.deduct, this), this.add = i(this.add, this), | |
this.multiply = i(this.multiply, this); | |
var s, o, l; | |
if (e) for (o in e) if (a.call(e, o)) if (l = e[o], !l instanceof n) { | |
if (r.isFunction(l)) continue; | |
if (r.isObject(l) && l.__dec__ && (l = l.val || 0), r.isString(l)) try { | |
l = new n(l); | |
} catch (t) { | |
s = t; | |
continue; | |
} | |
if ("old" === o) { | |
this.old = new t(l); | |
continue; | |
} | |
this[o] = parseFloat(l); | |
} else this[o] = l; | |
} | |
return t.prototype.multiply = function(e) { | |
var s, o, i, l; | |
if (1 === e || e instanceof n && e.eq(1)) return this; | |
o = {}, i = this; | |
for (s in i) if (a.call(i, s)) if (l = i[s], !l instanceof n) { | |
if (r.isFunction(l)) continue; | |
if ("old" === s) { | |
l instanceof t && (o.old = l.multiply(e)); | |
continue; | |
} | |
l && (o[s] = l * e); | |
} else o[s] = l.times(e); | |
return new t(o); | |
}, t.prototype.add = function(e) { | |
var s, o, i; | |
o = {}; | |
for (s in e) if (a.call(e, s)) if (i = e[s], !this[s] instanceof n) { | |
if (r.isFunction(this[s])) continue; | |
if ("old" === s) { | |
this.old ? (this.old instanceof t || (this.old = new t(this.old)), o.old = this.old.add(i)) : o.old = i; | |
continue; | |
} | |
!i instanceof n ? o[s] = (this[s] || 0) + i : o[s] = new n(this[s] || 0).plus(i); | |
} else o[s] = this[s].plus(i); | |
return new t(o); | |
}, t.prototype.deduct = function(e) { | |
var s, o, i, l; | |
o = {}; | |
for (s in e) if (a.call(e, s)) if (l = e[s], !this[s] instanceof n) { | |
if (r.isFunction(this[s])) continue; | |
if ("old" === s) { | |
this.old && (this.old instanceof t || (this.old = new t(this.old)), o = this.old.deduct(l)); | |
continue; | |
} | |
!l instanceof n ? o[s] = Math.max(this[s] - l, 0) : (i = new n(this[s] || 0).minus(l), | |
o[s] = i.gte(0) ? i : new n(0)); | |
} else i = this[s].minus(l), o[s] = i.gte(0) ? i : new n(0); | |
return new t(o); | |
}, t.prototype.discount = function() { | |
var t, e, s, n, o, i; | |
if (!this.old) return 0; | |
s = 0, t = 0, o = this; | |
for (n in o) a.call(o, n) && (i = o[n], r.isFunction(i) || "old" !== n && i && (t += 1, | |
this.old[n] && (e = 100 - i / this.old[n] * 100, e > 0 && (!s || e < s) && (s = e)))); | |
return Math.floor(s); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, y = {}.hasOwnProperty; | |
l = s(12), o = s(15), n = s(14), r = s(8), u = s(75).roundUp, i = function() { | |
function t(t) { | |
var e, s; | |
this.value = t.value, this.validTill = null != (e = t.validTill) ? e : 0, this.isMult = null != (s = t.isMult) && s; | |
} | |
return t; | |
}(), t.exports = a = function() { | |
function t(t) { | |
this.reborn = c(this.reborn, this), this.cleanup = c(this.cleanup, this), this.getMultipliersValue = c(this.getMultipliersValue, this), | |
this.getMultipliedValue = c(this.getMultipliedValue, this), this.get = c(this.get, this), | |
this.drop = c(this.drop, this), this.add = c(this.add, this); | |
var e, s, n, o, r, i; | |
if (this.data = e = {}, r = this, t) for (s in t) if (y.call(t, s)) if (n = t[s], | |
Array.isArray(n)) l.each(n, function(t) { | |
return t.validTill && (t.validTill *= 1e3), r.add(s, t, !1); | |
}); else for (i in n) y.call(n, i) && (o = n[i], l.each(o, function(t) { | |
return t.validTill && (t.validTill *= 1e3), r.add(s, t, !1, i); | |
})); | |
} | |
return l.extend(t.prototype, o.Events), t.prototype.add = function(t, e, s, o) { | |
var a, l, u, c, y, d, p, x, f, h; | |
for (h = e.value, f = e.validTill, u = e.isMult, null == s && (s = !0), null == o && (o = "default"), | |
d = this.data[t], d || (this.data[t] = d = {}), x = d[o], x || (this.data[t][o] = x = []), | |
y = new i({ | |
value: h, | |
validTill: f, | |
isMult: u | |
}), a = !1, l = 0, c = x.length; l < c; l++) if (p = x[l], y.validTill === p.validTill && y.isMult === p.isMult) { | |
y.isMult ? p.value = r(p.value).times(y.value) : p.value = r(p.value).plus(y.value), | |
a = !0; | |
break; | |
} | |
return a || (x.push(y), x.sort(function(t, e) { | |
return (t.validTill || 0) - (e.validTill || 0); | |
}), y.validTill && setTimeout(function(e) { | |
return function() { | |
return x.splice(x.indexOf(y), 1), e.trigger("change", t); | |
}; | |
}(this), y.validTill - n.getTime())), s && this.trigger("add", t, y), null; | |
}, t.prototype.drop = function(t, e, s) { | |
var n, o, a, l, u, c, y, d, p, x; | |
for (x = e.value, p = e.validTill, o = e.isMult, null == s && (s = "default"), u = this.data[t], | |
u || (this.data[t] = u = {}), y = u[s], y || (this.data[t][s] = y = []), l = new i({ | |
value: x, | |
validTill: p, | |
isMult: o | |
}), d = [], n = 0, a = y.length; n < a; n++) { | |
if (c = y[n], l.validTill === c.validTill && l.isMult === c.isMult) { | |
l.isMult ? c.value = r(c.value).div(l.value) : c.value = r(c.value).minus(l.value), | |
this.trigger("change", t); | |
break; | |
} | |
d.push(void 0); | |
} | |
return d; | |
}, t.prototype.get = function(t, e) { | |
var s, o, i, a, u, c, y, d, p; | |
return null == e && (e = "default"), o = n.getTime(), (a = this.data[t]) ? (u = a[e], | |
(null != u ? u.length : void 0) ? (d = l.map(l.filter(u, function(t) { | |
return t.validTill > o; | |
}), function(t) { | |
return t.validTill; | |
}), y = d.length ? l.min(d) : 0, c = l.reduce(u, function(t, e) { | |
return e.isMult ? t.mult = t.mult.times(e.value) : t.add = t.add.plus(e.value), | |
t; | |
}, { | |
add: r(0), | |
mult: r(1) | |
}), s = c.add, i = c.mult, p = i.plus(s), { | |
value: p, | |
validTill: y | |
}) : { | |
value: r(1) | |
}) : { | |
value: r(1) | |
}; | |
}, t.prototype.getMultipliedValue = function(t, e, s) { | |
var n, o, i, a, l; | |
if (null == s && (s = []), e || r(0), a = this.get(t).value, l = r(e).times(a), | |
s.length > 0) for (n = 0, o = s.length; n < o; n++) i = s[n], l = l.times(i); | |
return u(l); | |
}, t.prototype.getMultipliersValue = function(t, e) { | |
var s, n, o, r; | |
null == e && (e = null), r = {}; | |
for (n in t) y.call(t, n) && (o = t[n], s = (null != e ? e[n] : void 0) || [], r[n] = this.getMultipliedValue(n, o, s)); | |
return r; | |
}, t.prototype.cleanup = function(t) { | |
return this.data[t] = l.without(multipliers, l.findWhere(multipliers, { | |
validTill: this.get(t).validTill | |
})); | |
}, t.prototype.reborn = function() { | |
var t, e, s, o, r, i, a, l, u, c; | |
i = n.getUser().get("multipliers").data, u = {}; | |
for (e in i) if (y.call(i, e)) { | |
r = i[e], u[e] = {}; | |
for (c in r) { | |
if (a = r[c], l = [ { | |
value: 0 | |
} ], "DPS" !== e) for (t = 0, s = a.length; t < s; t++) o = a[t], o.validTill > 0 && (o.validTill /= 1e3, | |
l.push(o)); | |
u[e][c] = l; | |
} | |
} | |
return this.constructor(u); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b, _, k, w, C, E, S, T, N, P, O, M, B, R, j, I, U, A, L, D, F, H, V, q, W, Q, G, K, z, X, Y, $, J, Z, tt, et, st; | |
n = s(8), r = s(12), st = s(76).weightedChoice, i = function(t) { | |
return function(t, e, s) { | |
var o; | |
return null == e && (e = 0), null == s && (s = 9), n.RM = e, t = n(t), o = n(t.toPrecision(s)), | |
n.RM = 1, o; | |
}; | |
}(this), A = function(t) { | |
var e, s; | |
return e = 10, s = 9, t >= s ? e + 2 * Math.floor(t / 10) : t + 1; | |
}, U = function(t, e) { | |
var s; | |
return s = {}, s["" + t] = A(e), s; | |
}, tt = { | |
strength: 8, | |
charisma: 25, | |
intelligence: 5, | |
luck: 25 | |
}, Z = { | |
strength: 1, | |
charisma: 10, | |
intelligence: 1, | |
luck: 10 | |
}, F = function(t, e) { | |
var s, n, o, r; | |
return e < 1 ? 0 : 1 === e ? tt[t] / 100 : (n = 4, o = 1.3, s = Z[t], r = s + n * e, | |
"intelligence" === t ? r / 100 : Math.round(Math.pow(r, o)) / 100); | |
}, D = function(t, e) { | |
switch (t) { | |
case "strength": | |
return { | |
mults: [ [ "DPC", { | |
value: e | |
} ] ] | |
}; | |
case "charisma": | |
return { | |
mults: [ [ "DPS", { | |
value: e | |
} ] ] | |
}; | |
case "intelligence": | |
return { | |
counters: { | |
SKILL_POWER: 100 * e | |
} | |
}; | |
case "luck": | |
return { | |
mults: [ [ "gold", { | |
value: e | |
} ], [ "shards", { | |
value: e | |
} ] ] | |
}; | |
} | |
}, H = function(t, e) { | |
var s; | |
return s = Math.round(100 * F(t, e)) / 100, D(t, s); | |
}, L = function(t, e) { | |
var s, n, o; | |
return s = F(t, e), n = F(t, e - 1), o = Math.round(100 * (s - n)) / 100, D(t, o); | |
}, j = function(t, e) { | |
return e - 1 / (Math.log(t) / Math.log(100)); | |
}, a = function(t) { | |
var e, s, n, o, r; | |
for (e = 85, s = n = 3, r = t; 3 <= r ? n <= r : n >= r; s = 3 <= r ? ++n : --n) e = j(s, e); | |
return o = Math.ceil(100 / e); | |
}, I = function(t, e) { | |
return t < 1 ? null : "charisma" === e && 1 === t ? 2 : t < 3 ? t : 2 < t && t < 39 ? a(t) : 7; | |
}, $ = function(t) { | |
var e, s, n; | |
if (t = t.slice(), e = t.length, !t) return t; | |
for (;--e > 0; ) s = Math.floor(Math.random() * (e + 1)), n = t[s], t[s] = t[e], | |
t[e] = n; | |
return t; | |
}, Y = function(t) { | |
return function(t, e) { | |
return null == e && (e = 0), i(n(t).round(e, 3), 3); | |
}; | |
}(this), X = function(t) { | |
return function(t, e) { | |
return null == e && (e = 0), i(n(t).round(e, 0), 0); | |
}; | |
}(this), d = function(t, e) { | |
var s; | |
if (null == e && (e = 1), !(e < 1)) return s = y(t), X(s.times(Math.pow(1.075, e))); | |
}, G = { | |
1: 0, | |
2: 1, | |
3: 3, | |
4: 7, | |
5: 11 | |
}, f = function(t) { | |
var e, s, n; | |
n = 1, t = parseInt(t); | |
for (s in G) { | |
if (e = G[s], !(t >= e)) break; | |
n = s; | |
} | |
return parseInt(n); | |
}, K = function(t) { | |
return t = parseInt(t), t > 5 || t < 1 ? null : G[t]; | |
}, q = function(t) { | |
if (!(t < 1)) return i(5 * (t + 4) / 1.48 - 1).round(); | |
}, u = function(t, e) { | |
return Math.log(t) / Math.log(e); | |
}, M = function(t) { | |
var e; | |
return e = Math.pow(t, u(t, 1e3)), e = 1 === e ? 2 : e, X(n(e), 2); | |
}, B = function(t, e, s) { | |
var o, r, i, a; | |
return null == s && (s = !1), "gems" === e ? a = Y(n(Math.ceil(Math.pow(t, 1.5)))) : (o = [ [ 500, 4500 ], [ 1e3, 9e3 ], [ 2e3, 18e3 ], [ 4e3, 36e3 ] ], | |
i = t < 50 ? o[0] : t < 100 ? o[1] : t < 150 ? o[2] : o[3], r = s ? i[1] / 160 : i[0] / 16, | |
n(r)); | |
}, N = function(t) { | |
return n(Math.floor(t / 1e3)); | |
}, Q = {}, y = function(t) { | |
var e, s, o; | |
if (!isNaN(t)) return Q[t] ? Q[t] : t !== Math.floor(t) ? (e = Math.floor(t), o = t % e, | |
y(e + 1).times(o)) : Q[t] = 1 === t ? new n(10) : r.reduce(function() { | |
var e, n; | |
for (n = [], s = e = 1; e <= 4; s = ++e) n.push(d(t - 1, s)); | |
return n; | |
}(), function(t, e) { | |
return t.plus(e); | |
}, new n(0)); | |
}, function(t) { | |
return function() { | |
var t, e, s; | |
for (s = [], t = e = 1; e <= 50; t = ++e) s.push(y(t)); | |
return s; | |
}; | |
}(this)(), p = function(t, e, s) { | |
var n, o, r; | |
return null == s && (s = 1), n = y(t), o = Y(n.div(10).times(Math.pow(1 - .0188 * Math.min(t, 14), t))), | |
r = e <= 200 ? o.times(e) : o.times(e * Math.pow(4, Math.floor((e - 175) / 25))), | |
Y(r.times(s)); | |
}, c = function(t, e) { | |
return d(t, e).times(5); | |
}, x = function(t) { | |
return { | |
crowns: n(300) | |
}; | |
}, h = function() { | |
return { | |
crowns: n(450) | |
}; | |
}, g = function(t) { | |
var e, s, o, r; | |
return e = n(10), s = 1.6, o = 140, r = 1.15, Y(1 <= t && t < 140 ? e.times(Math.pow(s, t - 1) + 10 * (t - 1)).times((t % 5 ? 0 : 9) + 1) : 140 <= t && t < 1e3 ? e.times(Math.pow(s, o - 1)).plus(10 * (o - 1)).times(Math.pow(r, t - o)).times((t % 5 ? 0 : 9) + 1) : e.times(Math.pow(s, Math.min(t - 1, o - 1))).plus(10 * Math.min(t - 1, o - 1)).times(Math.pow(r, Math.max(0, t - o))).times((t % 5 ? 0 : 9) + 1)); | |
}, w = function(t, e) { | |
return 1 === t ? n(1) : (null == e && (e = g(t)), Y(e.div(15))); | |
}, E = function(t) { | |
return X(n(2 * Math.pow(1.05, t))); | |
}, k = function(t, e) { | |
var s; | |
return t % 5 || t < 100 ? n(0) : (s = e || .25, n(Math.random() <= s ? 1 : 0)); | |
}, _ = function(t) { | |
var e; | |
return e = t % 5 ? [ [ .7, 0 ], [ .24, 1 ], [ .06, 2 ] ] : [ [ .7, 1 ], [ .2, 2 ], [ .1, 3 ] ], | |
st(e); | |
}, o = 15, z = function(t, e) { | |
return t < o && 0 === e; | |
}, S = function(t, e, s) { | |
var o; | |
return z(t, e) || !s ? n(0) : t % 5 ? (o = .1, n(Math.random() <= o ? 2 : 0)) : n(0); | |
}, C = function(t, e, s) { | |
var o; | |
return z(t, e) ? n(0) : t % 5 || s ? n(0) : (o = .1, n(Math.random() <= o ? 10 : 0)); | |
}, b = function(t, e, s, r) { | |
var i; | |
return z(t, e) ? n(0) : t % 5 || s ? n(0) : t > o && !r ? n(10) : (i = t === o && 0 === e ? 1 : .1, | |
n(Math.random() <= i ? 10 : 0)); | |
}, O = function(t) { | |
return n(t).plus(1).times(20); | |
}, et = { | |
common: 60, | |
uncommon: 25, | |
rare: 10, | |
epic: 5 | |
}, W = function(t) { | |
return et[t] || 0; | |
}, v = function(t, e, s, n, o, r, i) { | |
return null == n && (n = 0), null == o && (o = !1), null == r && (r = !1), null == i && (i = 0), | |
{ | |
res: { | |
gold: w(t, e), | |
shards: E(t), | |
gems: k(t, n), | |
essence: _(t), | |
strength_res: S(t, s, i), | |
charisma_res: b(t, s, o, i), | |
intelligence_res: C(t, s, r) | |
} | |
}; | |
}, P = function(t, e) { | |
return { | |
res: { | |
luck_res: O(e), | |
gems: N(t) | |
} | |
}; | |
}, l = [ [ [ 10, 20, 30 ], [ 50, 100, 150 ] ], [ [ 15, 30, 45 ], [ 51, 102, 153 ] ], [ [ 20, 40, 60 ], [ 52, 104, 156 ] ] ], | |
J = { | |
0: 0, | |
1: 1, | |
2: 2, | |
3: 4, | |
4: 6, | |
5: 9, | |
6: 12, | |
7: 15, | |
8: 19, | |
9: 25, | |
10: 30 | |
}, V = function(t, e, s) { | |
var o, r, i, a; | |
if (s) return o = t.baseValue, r = t.lvlProgress, i = n(R(s)), a = i.times(n(e).times(r).plus(o)); | |
}, R = function(t) { | |
return t < 0 || t > 10 ? 0 : J[t]; | |
}, T = function(t, e) { | |
var s, o, i, a, u; | |
if (null == e && (e = 0), t && t > 0 && 0 <= e && e < 3) return t <= l.length ? (u = l[t - 1], | |
[ { | |
shards: n(u[0][e]) | |
}, { | |
crowns: n(u[1][e]) | |
} ]) : (s = [ t, t + 1, t + 2 ], a = r.reduce(s, function(t, e) { | |
var s; | |
return s = e < 100 ? E(e).times(10) : 10 * Math.floor(Math.pow(2, Math.floor(e / 10))), | |
t.plus(s); | |
}, n(0)), o = n(1.25).plus(n(t - 1).div(15)), a = X(a.times(o)), i = n(50).plus(X(a.sqrt().sqrt())), | |
[ { | |
shards: a.times(e + 1) | |
}, { | |
crowns: i.times(e + 1) | |
} ]); | |
}, m = function(t, e) { | |
return e[Math.floor(t % (10 * e.length) / 10)]; | |
}, t.exports = { | |
getSuperHeroBonus: V, | |
getStarsMultiplicator: R, | |
getRebornReward: P, | |
getRoomBonus: M, | |
getRoomPrice: B, | |
getHeroCost: d, | |
getHeroBaseCost: y, | |
getHeroDPS: p, | |
getHeroAbilityCost: c, | |
getSuperHeroCost: q, | |
getHeroPromotionCost: x, | |
getMobHP: g, | |
getMobReward: v, | |
getMobRewardGold: w, | |
getMobRewardShards: E, | |
getPicPrice: T, | |
getLocationById: m, | |
bigRound: i, | |
roundDown: X, | |
roundUp: Y, | |
getHeroStar: f, | |
needPromotesForStar: K, | |
heroStars: G, | |
shuffle: $, | |
getHeroesPromotionRandomCost: h, | |
getStatPrice: U, | |
getStatMaxAttempts: I, | |
getStatReward: L, | |
getStatSumReward: H, | |
getStatRewardValue: F | |
}, "undefined" != typeof window && (window.gameMath = t.exports); | |
}, function(t, e, s) { | |
var n, o, r, i; | |
n = s(12), r = function(t, e) { | |
var s; | |
return s = t + Math.random() * (e + 1 - t), Math.floor(s); | |
}, o = function(t, e) { | |
return t + Math.random() * (e - t); | |
}, i = function(t) { | |
var e, s, r, i, a, l, u, c; | |
for (l = n.reduce(t, function(t, e) { | |
return t + e[0]; | |
}, 0), r = o(0, l), u = 0, e = 0, s = t.length; e < s; e++) { | |
if (i = t[e], c = i[0], a = i[1], u + c > r) return a; | |
u += c; | |
} | |
}, t.exports = { | |
weightedChoice: i, | |
randomInteger: r, | |
randomFloat: o | |
}; | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, g = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) v.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, v = {}.hasOwnProperty; | |
i = s(23), r = s(8), l = s(78), a = s(24), c = s(25), o = s(14), n = s(68), y = s(12), | |
f = s(81), d = s(26)._tr, h = s(75), p = h.getHeroStar, x = h.getHeroesPromotionRandomCost, | |
t.exports = u = function(t) { | |
function e(t, s) { | |
this.onBuyError = m(this.onBuyError, this), this.updateHeroesOnPromote = m(this.updateHeroesOnPromote, this), | |
this.onBoughtRandomAscend = m(this.onBoughtRandomAscend, this), this.buyRandomAscend = m(this.buyRandomAscend, this), | |
this.addHero = m(this.addHero, this), this.buy = m(this.buy, this), this._getDPS = m(this._getDPS, this), | |
this.getDPS = m(this.getDPS, this), this.reborn = m(this.reborn, this), null == s && (s = {}), | |
null == s.comparator && (s.comparator = function(t, e) { | |
return e.get("id") - t.get("id"); | |
}), e.__super__.constructor.call(this, t, s), this.on("add change", function(t) { | |
return function() { | |
return t._dpsCache = null; | |
}; | |
}(this)); | |
} | |
return g(e, t), e.prototype.model = l, e.prototype._dpsCache = null, e.prototype.reborn = function() { | |
var t, e; | |
return e = [], this.each(function(t) { | |
return function(t) { | |
if (t.get("special")) return e.push(t.get("id")); | |
}; | |
}(this)), this.reset(), t = null, this._dpsCache = null, y.each(e, function(t) { | |
return function(e) { | |
return t.addHero(e); | |
}; | |
}(this)); | |
}, e.prototype.getDPS = function() { | |
var t; | |
return t = this._dpsCache, null === t && (t = this._dpsCache = this._getDPS()), | |
t; | |
}, e.prototype._getDPS = function() { | |
return this.reduce(function(t, e) { | |
return t.plus(e.getDPS()); | |
}, r(0)); | |
}, e.prototype.buy = function(t, e, s) { | |
var n; | |
return (n = this.get(t)) ? c.resolve(n) : l.getDescriptor(t) ? (n = new l({ | |
id: t | |
}), n.buy(e, s).then(function(t) { | |
return function() { | |
return t.add(n); | |
}; | |
}(this))) : promise.reject(d("No such hero")); | |
}, e.prototype.addHero = function(t) { | |
var e; | |
return (e = this.get(t)) ? c.resolve(e) : l.getDescriptor(t) ? (e = new l({ | |
id: t | |
}), e.upgrade(), this.add(e)) : promise.reject(d("No such hero")); | |
}, e.prototype.buyRandomAscend = function() { | |
var t, e, s; | |
return s = o.getUser(), t = x(), s.get("resources").have(t) ? (e = n.callMethod("heroes.promote.random"), | |
e.then(function(e) { | |
return function(s) { | |
return e.onBoughtRandomAscend(s, t); | |
}; | |
}(this)).catch(this.onBuyError)) : c.reject(new Error(d("Don't have enough: {resource}", { | |
resource: d("Crowns") | |
}))); | |
}, e.prototype.onBoughtRandomAscend = function(t, e) { | |
var s, n, r; | |
return n = o.getUser(), s = n.get("resources"), r = n.get("vars"), s.spend(e), this.updateHeroesOnPromote(t), | |
r.set("lastPromotedHeroes", t), o.analytics.amp_event("promote", { | |
buttonname: "threerandom" | |
}), o.analytics.dtd_custom_event("threerandom", { | |
heroIds: t.toString() | |
}), o.events.trigger("heroesRandomAscended", t), t; | |
}, e.prototype.updateHeroesOnPromote = function(t) { | |
var e, s, n, r, i, a, l, u; | |
for (u = o.getUser(), e = u.get("counters"), l = [], r = 0, i = t.length; r < i; r++) n = t[r], | |
e.increment("HPRMT"), e.increment("H#P:" + n), s = this.get(n), s && (a = s.getPromotion(), | |
l.push(s.set({ | |
promotion: a.plus(1) | |
}))); | |
return l; | |
}, e.isHeroStarUped = function(t) { | |
var e, s; | |
return s = l.getStars(t, 0, -1), e = l.getStars(t), s !== e; | |
}, e.showStarUpPopup = function(t) { | |
if (e.isHeroStarUped(t)) return o.show({ | |
popup: { | |
type: "heroNewStar", | |
data: { | |
heroId: t | |
}, | |
queued: !0 | |
} | |
}); | |
}, e.prototype.onBuyError = function(t) { | |
return o.showError(), a.log(t); | |
}, e; | |
}(i); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b, _, k, w, C, E = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, S = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) T.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, T = {}.hasOwnProperty; | |
f = s(12), p = s(25), y = s(22), i = s(23), u = s(79), d = s(74), r = s(8), n = s(68), | |
o = s(14), h = s(26)._tr, a = s(24), k = s(81), w = s(75), g = w.getHeroCost, v = w.getHeroDPS, | |
b = w.getHeroPromotionCost, _ = w.getHeroStar, m = w.bigRound, c = 5, x = function() { | |
C = []; | |
for (var t = 1; 1 <= c ? t <= c : t >= c; 1 <= c ? t++ : t--) C.push(t); | |
return C; | |
}.apply(this), t.exports = l = function(t) { | |
function e(t, s) { | |
this.onBuyError = E(this.onBuyError, this), this.updatePromotionProgress = E(this.updatePromotionProgress, this), | |
this.onPromotion = E(this.onPromotion, this), this.getPromotion = E(this.getPromotion, this), | |
this.upgrade = E(this.upgrade, this), this.onBought = E(this.onBought, this), this.promote = E(this.promote, this), | |
this.buy = E(this.buy, this), this.canBuy = E(this.canBuy, this), this.getRawPromotionCost = E(this.getRawPromotionCost, this), | |
this.getPromotionCost = E(this.getPromotionCost, this), this.abilityIsLocked = E(this.abilityIsLocked, this), | |
this.getPromotionMult = E(this.getPromotionMult, this), this.getDPSMult = E(this.getDPSMult, this), | |
this.getDPS = E(this.getDPS, this), this.getAffordableUpLevelAndCost = E(this.getAffordableUpLevelAndCost, this), | |
this.getCost = E(this.getCost, this), this.getPosition = E(this.getPosition, this), | |
this._getImgWithRatio = E(this._getImgWithRatio, this), this._getImg = E(this._getImg, this), | |
this.getStars = E(this.getStars, this), this.getImageForm = E(this.getImageForm, this), | |
this.getForm = E(this.getForm, this), this.getNextIcon = E(this.getNextIcon, this), | |
this.getIcon = E(this.getIcon, this), this.getAscendImage = E(this.getAscendImage, this), | |
this.getNextImage = E(this.getNextImage, this), this.getImage = E(this.getImage, this), | |
this.haveHero = E(this.haveHero, this), this.isPromoted = E(this.isPromoted, this); | |
var n, o; | |
t instanceof e ? n = t : (o = f.find(k, function(e) { | |
return e.id === t.id; | |
}), n = f.extend({}, o, t), n.abilities = u.create(this, o.abilities, t.abilities)), | |
e.__super__.constructor.call(this, n, s), this.get("multipliers") || this.set("multipliers", new d(), { | |
silent: !0 | |
}), this._costCaches = {}, this.get("multipliers").on("add change", function(t) { | |
return function() { | |
return t.trigger("change", t); | |
}; | |
}(this)), this.get("abilities").on("add change", function(t) { | |
return function() { | |
return t.trigger("change", t); | |
}; | |
}(this)); | |
} | |
var s; | |
return S(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
name: String, | |
description: String, | |
image: String, | |
image1: String, | |
icon: String, | |
icon1: String, | |
level: Number, | |
promotion: Number, | |
position: Number, | |
multipliers: d, | |
abilities: u | |
} | |
}), e.getDescriptor = function(t) { | |
return f.find(k, function(e) { | |
return e.id === t; | |
}); | |
}, e.prototype.isPromoted = function() { | |
return o.getUser().get("counters").get("H#P:" + this.get("id")) > 0; | |
}, e.prototype.haveHero = function() { | |
var t, e, s; | |
return e = this.get("id"), s = o.getUser().get("heroes"), t = s.findWhere({ | |
id: e | |
}); | |
}, e.prototype.getImage = function() { | |
return this._getImg("images"); | |
}, e.prototype.getNextImage = function() { | |
return this._getImg("images", 1); | |
}, e.prototype.getAscendImage = function() { | |
return this._getImg("images", 1); | |
}, e.prototype.getIcon = function() { | |
return this._getImg("icons"); | |
}, e.prototype.getNextIcon = function() { | |
return this._getImg("icons", 1); | |
}, e.prototype.getForm = function() { | |
var t, e; | |
return t = o.getUser(), e = t.get("vars"), e.get("H_ST_FM_" + this.get("id")) || this.getStars(); | |
}, e.prototype.getImageForm = function(t) { | |
var e, s; | |
return s = t - 1, e = this._getImgWithRatio("images"), t >= e.length ? e[e.length - 1] : e[s]; | |
}, e.getStars = function(t, s, n) { | |
var o, r, i; | |
return null == s && (s = 0), null == n && (n = 0), r = parseInt(e.getPromotion(t)), | |
o = r + n, i = _(o) + s, i < c ? i : c; | |
}, e.prototype.getStars = function(t, s) { | |
var n; | |
return null == t && (t = 0), null == s && (s = 0), n = this.get("id"), e.getStars(n, t, s); | |
}, e.prototype._getImg = function(t, e) { | |
var s, n; | |
return null == e && (e = 0), n = this.getStars() + e - 1, s = this._getImgWithRatio(t), | |
n >= s.length ? s[s.length - 1] : s[n]; | |
}, e.prototype._getImgWithRatio = function(t) { | |
var e; | |
return e = o.getDevicePixelRatio(), 2 === e && (t += "@2x"), this.get(t); | |
}, e.getPosition = function(t) { | |
var s; | |
return s = e.getDescriptor(t), s.position || t; | |
}, e.prototype.getPosition = function() { | |
return this.get("position") || this.get("id"); | |
}, e.getCost = function(t, s) { | |
var n; | |
if (null == s && (s = 1), !(s < 1)) return n = g(e.getPosition(t), s), { | |
gold: m(n, 1, 3) | |
}; | |
}, s = null, e.prototype.getCost = function(t) { | |
var e, s, n, o, i; | |
if (null == t && (t = 1), o = this.get("level") || 0, o || (t = 1), n = t, this._costCaches = this._costCaches || {}, | |
this._costCaches[o] = s = this._costCaches[o] || {}, e = s[n]) return e; | |
for (i = r(0); t > 0; ) i = i.plus(g(this.getPosition(), o + t)), t--; | |
return this._costCaches[o][n] = { | |
gold: m(i, 1, 3) | |
}; | |
}, e.prototype.getAffordableUpLevelAndCost = function() { | |
return { | |
level: 1, | |
cost: this.getCost().gold | |
}; | |
}, e.getDPS = function(t, s, n) { | |
return null == n && (n = 1), v(e.getPosition(t), s, n); | |
}, e.prototype.getDPS = function() { | |
return e.getDPS(this.id, this.get("level") || 1, this.getDPSMult()); | |
}, e.prototype.getDPSMult = function() { | |
var t; | |
return t = this.getPromotion(), this.getPromotionMult(t).times(this.get("multipliers").get("DPS").value); | |
}, e.prototype.getPromotionMult = function(t) { | |
return t.times(.5).plus(1); | |
}, e.prototype.abilityIsLocked = function(t) { | |
var e; | |
return !(null != (e = t.get("lock")) ? e.test(this, !1) : void 0); | |
}, e.prototype.getPromotionCost = function() { | |
var t, e; | |
return t = this.get("id"), e = b(this.getPosition()); | |
}, e.prototype.getRawPromotionCost = function() { | |
return b(this.getPosition()); | |
}, e.prototype.canBuy = function(t) { | |
var e, s, n, r, i; | |
return n = null != t ? t.promotion : void 0, r = (null != t ? t.upgradeLevel : void 0) ? null != t ? t.upgradeLevel : void 0 : 1, | |
e = this.get("level"), s = n ? this.getPromotionCost() : { | |
gold: this.getCost(r).gold | |
}, i = o.getUser(), i.get("resources").have(s); | |
}, e.prototype.buy = function(t, e) { | |
var s, r, i, a; | |
return null == t && (t = 1), null == e && (e = null), s = this.get("level"), r = { | |
gold: this.getCost(t).gold | |
}, a = o.getUser(), a.get("resources").have(r) ? (i = n.callMethod("heroes.buy", { | |
_id: this.get("id"), | |
level: t, | |
source: e | |
}), i.then(function(t) { | |
return function(e) { | |
return t.onBought(e, r); | |
}; | |
}(this)).catch(this.onBuyError)) : p.reject(new Error(h("Don't have enough: {resource}", { | |
resource: h("Gold") | |
}))); | |
}, e.prototype.promote = function(t) { | |
var e, s, r; | |
return e = this.getPromotionCost(), r = o.getUser(), r.get("resources").have(e) ? (s = n.callMethod("heroes.promote", { | |
_id: this.get("id"), | |
source: t | |
}), s.then(function(s) { | |
return function(n) { | |
return s.onPromotion(n, e, t); | |
}; | |
}(this)).catch(this.onBuyError)) : p.reject(new Error(h("Don't have enough: {resource}", { | |
resource: h("Crowns") | |
}))); | |
}, e.prototype.onBought = function(t, e) { | |
return o.getUser().get("resources").spend(e), this.upgrade(t.upgradeLevel); | |
}, e.prototype.upgrade = function(t) { | |
var e, s, n, r; | |
return null == t && (t = 1), this._costCaches = null, r = o.getUser(), e = r.get("counters"), | |
s = this.get("level") || 0, this.get("level") || (n = o.getUser().get("counters").get("H#P:" + this.get("id")), | |
this.set("promotion", n)), this.set({ | |
level: s + t | |
}), e.increment("HLVL", t), e.increment("C::HLVL", t), e.increment("C::H#L:" + this.get("id"), t), | |
o.analytics.amp_event("HeroBuy", { | |
id: this.get("id"), | |
levels: t | |
}), o.analytics.dtd_custom_event("HeroBuy", { | |
id: this.get("id"), | |
levels: t | |
}), null; | |
}, e.prototype.getPromotion = function() { | |
var t; | |
return t = this.get("id"), e.getPromotion(t); | |
}, e.getPromotion = function(t) { | |
return r(o.getUser().get("counters").get("H#P:" + t)); | |
}, e.prototype.onPromotion = function(t, e, s) { | |
var n; | |
return n = this.get("id"), o.getUser().get("resources").spend(e), this.updatePromotionProgress(s), | |
o.analytics.amp_event("promote", { | |
buttonname: s | |
}), this; | |
}, e.prototype.updatePromotionProgress = function(t) { | |
var e, s, n, r, i, a; | |
if (s = this.get("id"), a = o.getUser(), e = a.get("counters"), i = this.getStars(), | |
n = this.getPromotion(), e.increment("HPRMT"), e.increment("H#P:" + s), this.set({ | |
promotion: n.plus(1) | |
}), r = this.getStars(), o.analytics.dtd_custom_event("promote", { | |
id: s, | |
promotion: this.get("promotion"), | |
src: t | |
}), i !== r) return o.show({ | |
popup: { | |
type: "heroNewStar", | |
data: { | |
heroId: this.get("id") | |
} | |
} | |
}); | |
}, e.prototype.fakePromote = function(t) { | |
var e, s, n, r, i, a; | |
if (s = this.get("id"), a = o.getUser(), e = a.get("counters"), i = this.getStars(), | |
n = this.getPromotion(), e.increment("HPRMT"), e.increment("H#P:" + s), this.set({ | |
promotion: n.plus(1) | |
}), r = this.getStars(), i !== r) return o.show({ | |
popup: { | |
type: "heroNewStar", | |
data: { | |
heroId: this.get("id") | |
} | |
} | |
}); | |
}, e.prototype.onBuyError = function(t) { | |
var e, s, n, r, i; | |
a.log(t); | |
try { | |
n = t.data, s = n[0], e = n[1], i = s, r = e[0]; | |
} catch (e) { | |
i = h("Error"), r = t.message; | |
} | |
return o.showError(), p.reject(t); | |
}, e; | |
}(y); | |
}, function(t, e, s) { | |
var n, o, r, i, a = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, l = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) u.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, u = {}.hasOwnProperty; | |
n = s(23), r = s(80), i = s(12), t.exports = o = function(t) { | |
function e() { | |
return this.set = a(this.set, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return l(e, t), e.prototype.model = r, e.create = function(t, s, n) { | |
var o, r; | |
return o = new e(s), r = i.reduce(n, function(t, e) { | |
var s, n; | |
return n = e[0], s = e[1], t[n] = s, t; | |
}, {}), o.map(function(e) { | |
return e.set({ | |
bought: r[e.id] | |
}), e.hero = t; | |
}), o; | |
}, e.prototype.set = function(t, s) { | |
return t = i.map(t, function(t) { | |
var e, s; | |
return i.isArray(t) ? (s = t[0], e = t[1], { | |
id: s, | |
bought: e | |
}) : t; | |
}), e.__super__.set.call(this, t, s); | |
}, e; | |
}(n); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, f = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) h.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, h = {}.hasOwnProperty; | |
u = s(22), i = s(21), r = s(8), o = s(14), d = s(63), c = s(73), y = s(25), n = s(68), | |
a = s(24), p = s(26)._tr, t.exports = l = function(t) { | |
function e() { | |
return this.onBuyError = x(this.onBuyError, this), this.onBought = x(this.onBought, this), | |
this.isLocked = x(this.isLocked, this), this.buy = x(this.buy, this), this.getInfo = x(this.getInfo, this), | |
e.__super__.constructor.apply(this, arguments); | |
} | |
return f(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
lock: i, | |
bought: Boolean, | |
icon: String, | |
name: String, | |
info: String, | |
price: c, | |
reward: Object, | |
heroReward: Object, | |
skillId: Number | |
} | |
}), e.prototype.getInfo = function() { | |
var t, e, s, n; | |
return e = [ this.get("info"), this.get("skillId") ], t = e[0], (n = e[1]) ? (s = o.getUser().get("skills").get(n), | |
s.getInfo()) : t; | |
}, e.prototype.buy = function(t) { | |
var e, s; | |
return this.get("bought") ? y.resolve(this) : (s = o.getUser(), s.get("resources").have(this.get("price")) ? (e = n.callMethod("heroes.abilities.buy", { | |
heroId: t, | |
_id: this.get("id") | |
}), e.then(function(e) { | |
return function(s) { | |
return e.onBought(s, t); | |
}; | |
}(this)).catch(this.onBuyError)) : y.reject(new Error(p("Don't have enough: {resource}", { | |
resource: p("Gold") | |
})))); | |
}, e.prototype.isLocked = function() { | |
var t; | |
return !(null != (t = this.get("lock")) ? t.test(this.hero, !1) : void 0); | |
}, e.prototype.onBought = function(t, e) { | |
var s, n, r; | |
return o.getUser().get("resources").spend(this.get("price")), this.set({ | |
bought: !0 | |
}), r = o.getUser(), s = r.get("counters"), s.increment("HSKL"), s.increment("C::HA:" + this.get("id")), | |
this.get("reward") && (n = new d(this.get("reward")), n.claim(r)), this.get("heroReward") && (n = new d(this.get("heroReward")), | |
n.claim(this.hero)), o.events.trigger("newAbilityLearned"), o.analytics.amp_event("HeroAbilBuy", { | |
id: this.get("id") | |
}), o.analytics.dtd_custom_event("HeroAbilBuy", { | |
heroId: e, | |
id: this.get("id") | |
}), this; | |
}, e.prototype.onBuyError = function(t) { | |
return a.log(t); | |
}, e; | |
}(u); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, h = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) m.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, m = {}.hasOwnProperty; | |
u = s(12), o = s(8), i = s(22), n = s(14), r = s(64), c = s(26)._tr, d = s(75), | |
p = d.roundDown, x = d.roundUp, y = [ "gold", "shards", "gems", "crowns", "essence", "keys", "chests", "strength_res", "charisma_res", "intelligence_res", "luck_res" ], | |
a = { | |
gold: c("Gold"), | |
shards: c("Shards"), | |
gems: c("Gems"), | |
dpc: c("DPC"), | |
strength_res: c("Gems of {statName}", { | |
statName: c("strength") | |
}), | |
charisma_res: c("Gems of {statName}", { | |
statName: c("charisma") | |
}), | |
intelligence_res: c("Gems of {statName}", { | |
statName: c("intelligence") | |
}), | |
luck_res: c("Gems of {statName}", { | |
statName: c("luck") | |
}) | |
}, t.exports = l = function(t) { | |
function e() { | |
return this.getCompleteness = f(this.getCompleteness, this), this.getLimit = f(this.getLimit, this), | |
this.setLimit = f(this.setLimit, this), this.dtdToJSON = f(this.dtdToJSON, this), | |
this.reborn = f(this.reborn, this), this.withdraw = f(this.withdraw, this), this.isEnough = f(this.isEnough, this), | |
this.spend = f(this.spend, this), this.have = f(this.have, this), this.add = f(this.add, this), | |
this.get = f(this.get, this), this.getMultipliedValues = f(this.getMultipliedValues, this), | |
this.getMultipliedValue = f(this.getMultipliedValue, this), this.getMult = f(this.getMult, this), | |
e.__super__.constructor.apply(this, arguments); | |
} | |
return h(e, t), e.schema({ | |
attributes: { | |
growing: i | |
} | |
}), e.getName = function(t) { | |
return a[t]; | |
}, e.prototype.getMult = function(t) { | |
return n.getUser().get("multipliers").get(t).value; | |
}, e.prototype.getMultipliedValue = function(t, e, s) { | |
var n, r, i, a, l; | |
if (!e) return o(0); | |
if (a = this.getMult(t), e = o(e), l = e.times(a), null != s ? s.length : void 0) for (n = 0, | |
r = s.length; n < r; n++) i = s[n], l = l.times(i); | |
return x(l); | |
}, e.prototype.getMultipliedValues = function(t, e) { | |
var s, n, o; | |
o = {}; | |
for (s in t) n = t[s], o[s] = this.getMultipliedValue(s, n, null != e ? e[s] : void 0); | |
return o; | |
}, e.prototype.get = function(t) { | |
return e.__super__.get.call(this, t) || 0; | |
}, e.prototype.add = function(t, e, s) { | |
var r, i; | |
if (null == s && (s = !1), r = this.get(t), e = o(e), !e.eq(0)) return e instanceof o && !(r instanceof o) && (r = new o(r)), | |
r instanceof o ? (e instanceof o || (e = new o(e)), e.gt(0) && (i = r.plus(e), i.gt(r) && (r = p(i), | |
this.set(t, r)))) : e > 0 && (i = r + e, i > r && (r = p(i), this.set(t, r))), n.events.trigger("addResource", { | |
value: e, | |
resourceAmount: r, | |
name: t | |
}), [ t, r ]; | |
}, e.prototype.have = function(t, e) { | |
var s, n; | |
null == e && (e = !0); | |
for (n in t) if (m.call(t, n) && (s = t[n], !u.isFunction(s) && "old" !== n && s && !this.isEnough(n, s, e))) return !1; | |
return !0; | |
}, e.prototype.spend = function(t) { | |
var e, s; | |
if (!this.have(t)) return !1; | |
for (s in t) m.call(t, s) && (e = t[s], u.isFunction(e) || "old" !== s && this.withdraw(s, e)); | |
return !0; | |
}, e.prototype.isEnough = function(t, e, s) { | |
var r; | |
if (r = this.get(t), e instanceof o && !r instanceof o && (r = new o(r)), r instanceof o) { | |
if (r.gte(e)) return e; | |
} else if (r >= e) return e; | |
return s && (n.analytics.event("Resources", "need", t, e), n.events.trigger("notEnough", t, e)), | |
0; | |
}, e.prototype.withdraw = function(t, e) { | |
var s, r; | |
if (s = this.get(t), e instanceof o && !s instanceof o && (s = new o(s)), e instanceof o) { | |
if (e.lt(0)) return !1; | |
} else if (e < 0) return !1; | |
if (s instanceof o) { | |
if (s.gte(e)) return r = p(s.minus(e)), this.set(t, r), n.events.trigger("spendResource", { | |
value: e, | |
name: t | |
}), !0; | |
} else if (s >= e) return r = p(s - e), this.set(t, r), n.events.trigger("spendResource", { | |
value: e, | |
name: t | |
}), !0; | |
return !1; | |
}, e.prototype.reborn = function() { | |
return this.set("gold", o(0)), this.set("shards", o(0)); | |
}, e.prototype.dtdToJSON = function() { | |
var t, e, s, n, r; | |
for (t = [], e = 0, s = y.length; e < s; e++) n = y[e], r = o(this.get(n)), r.gt(0) && t.push({ | |
currency: n, | |
amount: parseInt(r) | |
}); | |
return { | |
balance: t | |
}; | |
}, e.prototype.setLimit = function(t, e) { | |
var s, n; | |
return s = t + "_lim", n = this.get(s) || 0, this.set(s, e), this.trigger("changeLimit", t, e); | |
}, e.prototype.getLimit = function(t) { | |
return this.get(t + "_lim") || 0; | |
}, e.prototype.getCompleteness = function(t, e) { | |
var s, n; | |
return null == e && (e = this.get(t + "_lim") || 0), e ? (s = this.get("name"), | |
s instanceof o ? (n = s.div(e).times(100).round(0, 0), n.lte(100) ? parseInt(n.toString()) : 100) : Math.min(Math.floor(s / e * 100), 100)) : 100; | |
}, e; | |
}(i), [ c("Gold"), c("Gems"), c("Shards"), c("Crowns") ]; | |
}, function(t, e, s) { | |
var n, o, r, i, a = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, l = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) u.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, u = {}.hasOwnProperty; | |
r = s(22), n = s(8), i = s(75).roundDown, t.exports = o = function(t) { | |
function e() { | |
return this.reborn = a(this.reborn, this), this.increment = a(this.increment, this), | |
this.get = a(this.get, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return l(e, t), e.prototype.get = function(t) { | |
return e.__super__.get.call(this, t) || 0; | |
}, e.prototype.increment = function(t, e) { | |
var s; | |
return null == e && (e = 1), e <= 0 ? this : (s = this.get(t), e instanceof n && !(s instanceof n) && (s = new n(s)), | |
s instanceof n ? s = s.plus(e) : s += e, this.set(t, i(s)), this); | |
}, e.prototype.reborn = function() { | |
var t, e, s, o; | |
e = this.attributes, s = []; | |
for (t in e) o = e[t], 0 === t.indexOf("C::") ? o instanceof n ? s.push(this.set(t, n(0))) : s.push(this.set(t, 0)) : s.push(void 0); | |
return s; | |
}, e; | |
}(r); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, c = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) y.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, y = {}.hasOwnProperty; | |
o = s(22), n = s(68), r = s(25), a = s(12), l = s(30).lookup, t.exports = i = function(t) { | |
function e() { | |
return this.lookup = u(this.lookup, this), this.getVarName = u(this.getVarName, this), | |
this.doSetVar = u(this.doSetVar, this), this.setVar = u(this.setVar, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return c(e, t), e.prototype.queued = null, e.prototype.timeout = 0, e.prototype.setVar = function(t, e, s) { | |
var n; | |
return this.queued ? n = this.queued : (n = { | |
vars: {}, | |
options: s | |
}, n.promise = new r(function(t, e) { | |
return n.resolve = t, n.reject = e, null; | |
}), this.queued = n), a.isObject(t) ? a.extend(n.vars, t) : n.vars[t] = e, this.timeout && clearTimeout(this.timeout), | |
this.timeout = setTimeout(this.doSetVar, 10), n.promise; | |
}, e.prototype.doSetVar = function() { | |
var t, e, s, o, r, i; | |
if (clearTimeout(this.timeout), this.timeout = 0, this.queued) return s = this.queued, | |
i = s.vars, t = s.options, r = s.resolve, o = s.reject, this.queued = null, e = n.callMethod("user.setVar", { | |
name: i | |
}), e.then(function(e) { | |
return function(s) { | |
return e.set(i, t), r(s), null; | |
}; | |
}(this), function(t) { | |
return o(t), null; | |
}).catch(function(t) { | |
return o(t); | |
}); | |
}, e.prototype.getVarName = function(t) { | |
var e; | |
return e = t.indexOf("."), e === -1 ? t : t.slice(0, +(e - 1) + 1 || 9e9); | |
}, e.prototype.lookup = function(t, e) { | |
return null == e && (e = null), null == e && (e = this.attributes), l(t, e); | |
}, e; | |
}(o); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, y = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) d.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, d = {}.hasOwnProperty; | |
r = s(23), i = s(86), l = s(12), u = s(88), n = s(68), o = s(14), t.exports = a = function(t) { | |
function e(t, s) { | |
this.reborn = c(this.reborn, this), this.beforeSkillActivate = c(this.beforeSkillActivate, this), | |
this.isAllInactive = c(this.isAllInactive, this), this.onSkillDeactivated = c(this.onSkillDeactivated, this), | |
this.onBlessing = c(this.onBlessing, this), this.init = c(this.init, this); | |
var n, r, a, u, y, d, p; | |
for (p = i.getDescriptors(), a = t.improvements || {}, n = l.map(p, function(t) { | |
var e; | |
return t.improvements = { | |
skillId: t.id, | |
improvements: a[t.id] || [] | |
}, e = new i(t); | |
}), this.on("beforeActivate", this.beforeSkillActivate), r = 0, u = n.length; r < u; r++) y = n[r], | |
d = l.find(t.skills, function(t) { | |
return t[0] === y.id; | |
}), d && y.set("lastUsed", 1e3 * d[1] || 0, { | |
silent: !0 | |
}); | |
this.blessed = t.blessed, this.skillEffectMult = t.skillEffectMult, this.skillsAmount = t.skillsAmount, | |
o.events.on("Blessing", this.onBlessing), e.__super__.constructor.call(this, n, s); | |
} | |
var s; | |
return y(e, t), e.prototype.model = i, s = null, e.prototype.init = function() { | |
return this.each(function(t) { | |
return function(e) { | |
return e.init(), e.on("deactivated", t.onSkillDeactivated); | |
}; | |
}(this)); | |
}, e.prototype.onBlessing = function(t) { | |
this.skillEffectMult = t.skillEffectMult, this.skillsAmount = t.skillsAmount; | |
}, e.prototype.onSkillDeactivated = function() { | |
if (this.isAllInactive()) return n.callMethod("skills.deactivated"); | |
}, e.prototype.isAllInactive = function() { | |
var t; | |
return t = !0, this.each(function(e) { | |
return function(e) { | |
if (e.isActive()) return t = !1; | |
}; | |
}(this)), t; | |
}, e.prototype.beforeSkillActivate = function(t) { | |
if (this.skillsAmount && this.skillsAmount > 0 && (this.skillsAmount--, t.skillEffectMult = this.skillEffectMult, | |
!this.skillsAmount)) return this.skillEffectMult = 1; | |
}, e.prototype.reborn = function() { | |
var t; | |
return t = {}, this.each(function(e) { | |
return function(e) { | |
return e.off(), "function" == typeof e.deactivate && e.deactivate(), t[e.get("id")] = e.getImprovedImprovementsIds(); | |
}; | |
}(this)), this.reset(), this.constructor({ | |
blessed: !1, | |
skills: [], | |
improvements: t | |
}), this.init(); | |
}, e; | |
}(r); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, f = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) h.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, h = {}.hasOwnProperty, m = [].indexOf || function(t) { | |
for (var e = 0, s = this.length; e < s; e++) if (e in this && this[e] === t) return e; | |
return -1; | |
}; | |
u = s(12), r = s(22), l = s(20), d = s(87), o = s(14), i = s(25), n = s(68), y = s(26).format, | |
c = s(88), p = [ "cooldown", "actionTime" ], t.exports = a = function(t) { | |
function e(t, s) { | |
this.deactivate = x(this.deactivate, this), this.activate = x(this.activate, this), | |
this.onDeactivate = x(this.onDeactivate, this), this.onActivate = x(this.onActivate, this), | |
this.improveEffect = x(this.improveEffect, this), this.isLocked = x(this.isLocked, this), | |
this.isAvailable = x(this.isAvailable, this), this.cooldownTimeEnd = x(this.cooldownTimeEnd, this), | |
this.isInCooldown = x(this.isInCooldown, this), this.actionTimeEnd = x(this.actionTimeEnd, this), | |
this.isActive = x(this.isActive, this), this.timeSinceUsed = x(this.timeSinceUsed, this), | |
this.bindHotKey = x(this.bindHotKey, this), this.improve = x(this.improve, this), | |
this.getSkillPowerMult = x(this.getSkillPowerMult, this), this.updateTimeValues = x(this.updateTimeValues, this), | |
this.initImprovements = x(this.initImprovements, this), this.getImprovedImprovementsIds = x(this.getImprovedImprovementsIds, this), | |
this.tryAutoActivate = x(this.tryAutoActivate, this), this.init = x(this.init, this), | |
this.initialize = x(this.initialize, this), this.getInfo = x(this.getInfo, this), | |
this.getPropByPath = x(this.getPropByPath, this), this.getInfoParams = x(this.getInfoParams, this), | |
e.__super__.constructor.call(this, t, s), this.bindHotKey(); | |
} | |
return f(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
name: String, | |
info: String, | |
lock: l, | |
infoParams: Object, | |
effect: Object, | |
cooldown: Number, | |
actionTime: Number, | |
lastUsed: Number, | |
hotKeyCode: Number, | |
autoActivation: Boolean, | |
noBlessEffects: Array, | |
improvements: s(96) | |
} | |
}), e.prototype.getInfoParams = function() { | |
var t, e, s, n, o, r, i, a; | |
s = this.get("infoParams"), o = {}; | |
for (n in s) h.call(s, n) && (t = s[n], r = t.path, i = this.getPropByPath(r), t.mult && (i *= t.mult), | |
t.noSkillPower || (a = this.getSkillPowerMult(), a > 1 && (i *= a)), e = t.toFixed || 0, | |
o[n] = i.toFixed(e)); | |
return o; | |
}, e.prototype.getPropByPath = function(t) { | |
var e, s, n, o; | |
for (t = t.split("."), n = this.attributes, e = 0, s = t.length; e < s; e++) o = t[e], | |
n = n[o]; | |
return n; | |
}, e.prototype.getInfo = function() { | |
var t; | |
return t = this.getInfoParams(), y(this.get("info"), t); | |
}, e.prototype.initialize = function() { | |
return this.set({ | |
cooldown: 1e3 * this.get("cooldown"), | |
actionTime: 1e3 * this.get("actionTime") | |
}); | |
}, e.prototype.init = function() { | |
if (this.initImprovements(), this.on("available change:autoActivation", this.tryAutoActivate), | |
this.get("lock").on("complete", this.tryAutoActivate), this.get("improvements").forEach(function(t) { | |
return function(e) { | |
return e.skill = t; | |
}; | |
}(this)), this.isAvailable() && this.trigger("available", this), !this.isLocked()) { | |
if (this.isInCooldown()) return this.onDeactivate(); | |
if (this.isActive()) return this.onActivate(); | |
} | |
}, e.prototype.tryAutoActivate = function() { | |
var t; | |
if (t = this.get("autoActivation")) return this.activate(); | |
}, e.prototype.getImprovedImprovementsIds = function() { | |
var t; | |
return t = [], this.get("improvements").each(function(e) { | |
return function(e) { | |
if (e.get("improved")) return t.push(e.get("id")); | |
}; | |
}(this)), t; | |
}, e.prototype.initImprovements = function() { | |
var t; | |
return t = this.get("improvements").getChanges(), t && this.improve(t), this.get("improvements").on("skillImproved", this.improve); | |
}, e.prototype.updateTimeValues = function(t, e) { | |
return m.call(p, t) >= 0 && (e *= 1e3), [ t, e ]; | |
}, e.prototype.getSkillPowerMult = function() { | |
var t, e; | |
return t = o.getUser().get("counters"), e = parseFloat(t.get("SKILL_POWER")), e / 100 + 1; | |
}, e.prototype.improve = function(t) { | |
var e, s, n, o; | |
n = []; | |
for (e in t) h.call(t, e) && (o = t[e], s = this.updateTimeValues(e, o), e = s[0], | |
o = s[1], n.push(this.set(e, o))); | |
return n; | |
}, e.prototype.bindHotKey = function() { | |
var t; | |
if (t = this.get("hotKeyCode")) return o.events.on("keyPressed", function(e) { | |
return function(s) { | |
if (s.keyCode === t) return e.trigger("hotKeyActivate", e); | |
}; | |
}(this)); | |
}, e.getDescriptors = function() { | |
return d; | |
}, e.getDescriptor = function(t) { | |
return u.find(d, function(e) { | |
return e.id === t; | |
}); | |
}, e.prototype.timeSinceUsed = function() { | |
return this.get("lastUsed") ? o.getTime() - this.get("lastUsed") : -1; | |
}, e.prototype.isActive = function() { | |
var t; | |
return t = this.timeSinceUsed(), t >= 0 && t < this.get("actionTime"); | |
}, e.prototype.actionTimeEnd = function() { | |
return this.isActive() ? o.getTime() + this.get("actionTime") - this.timeSinceUsed() : 0; | |
}, e.prototype.isInCooldown = function() { | |
var t; | |
return t = this.timeSinceUsed(), !this.isActive() && t > 0 && t < this.get("actionTime") + this.get("cooldown"); | |
}, e.prototype.cooldownTimeEnd = function() { | |
return this.isInCooldown() ? o.getTime() + this.get("actionTime") + this.get("cooldown") - this.timeSinceUsed() : 0; | |
}, e.prototype.isAvailable = function() { | |
return !(this.isActive() || this.isInCooldown() || this.isLocked()); | |
}, e.prototype.isLocked = function() { | |
var t; | |
return !(null != (t = this.get("lock")) ? t.test(o.getUser(), !1) : void 0); | |
}, e.prototype.improveEffect = function(t, e, s) { | |
var n, o, r; | |
null == s && (s = []), n = {}; | |
for (o in t) h.call(t, o) && (r = t[o], m.call(s, o) >= 0 ? n[o] = r : n[o] = r * e); | |
return n; | |
}, e.prototype.onActivate = function(t) { | |
var e, s, n, r, i, a; | |
return s = this.get("effect"), r = s.simple, i = {}, this.get("noBless") || (this.trigger("beforeActivate", i), | |
n = i.skillEffectMult, n && (r = this.improveEffect(r, n, this.get("noBlessEffects")))), | |
this.get("noSkillPower") || (a = this.getSkillPowerMult(), a > 1 && (r = this.improveEffect(r, a))), | |
e = this.get("actionTime") - this.timeSinceUsed(), this.effectObj = new c[s.className](r, e), | |
this.effectObj.activate(), o.analytics.dtd_custom_event("skills:activate", { | |
id: this.get("id") | |
}), o.events.trigger("skillActivated", this, i.skillEffectMult), setTimeout(this.deactivate, e); | |
}, e.prototype.onDeactivate = function() { | |
return setTimeout(function(t) { | |
return function() { | |
return t.trigger("available", t); | |
}; | |
}(this), this.cooldownTimeEnd() - o.getTime()); | |
}, e.prototype.activate = function() { | |
var t; | |
return !!this.isAvailable() && (this.set("lastUsed", o.getTime()), t = n.addToBatch("skills.activate", { | |
_id: this.get("id"), | |
lastUsed: this.get("lastUsed") / 1e3 | |
}), t.then(this.onActivate)); | |
}, e.prototype.deactivate = function() { | |
var t; | |
return null != (t = this.effectObj) && "function" == typeof t.deactivate && t.deactivate(), | |
this.effectObj = null, this.trigger("deactivated", this), this.onDeactivate(); | |
}, e; | |
}(r); | |
}, , function(t, e, s) { | |
t.exports = { | |
SwiftHand: s(89), | |
AncestorsForce: s(90), | |
PhilosopherStone: s(91), | |
Goldminer: s(92), | |
GuildMasterPower: s(93), | |
MasterAttack: s(94), | |
Blessing: s(95) | |
}; | |
window.game = s(14); // Export symbol to global scope | |
window.numbers = s(8); // Export symbol to global scope | |
}, function(t, e, s) { | |
var n, o, r = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), t.exports = o = function() { | |
function t(t, e) { | |
this.effect = t, this.duration = e, this.deactivate = r(this.deactivate, this), | |
this.activate = r(this.activate, this), this._update = r(this._update, this); | |
} | |
return t.prototype._update = function() { | |
return n.events.trigger("battleClicked"); | |
}, t.prototype.activate = function() { | |
var t; | |
return t = n.timer, t.remove("SwiftHand"), t.add("SwiftHand", 1e3 / this.effect.clicksPerSec), | |
n.timer.on("SwiftHand", this._update); | |
}, t.prototype.deactivate = function() { | |
return n.timer.off("SwiftHand", this._update); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), r = s(8), t.exports = n = function() { | |
function t(t, e) { | |
this.effect = t, this.duration = e, this.activate = i(this.activate, this); | |
} | |
return t.prototype.activate = function() { | |
return o.getUser().get("multipliers").add("DPS", { | |
value: new r(this.effect.dpsMultiplier), | |
validTill: this.duration + o.getTime() | |
}); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), r = [ "gold", "shards" ], t.exports = o = function() { | |
function t(t, e) { | |
this.effect = t, this.duration = e, this.addMultiplier = i(this.addMultiplier, this), | |
this.activate = i(this.activate, this); | |
} | |
return t.prototype.activate = function() { | |
var t, e, s, n; | |
for (n = [], t = 0, e = r.length; t < e; t++) s = r[t], n.push(this.addMultiplier(s)); | |
return n; | |
}, t.prototype.addMultiplier = function(t) { | |
var e; | |
if (e = this.effect[t + "Multiplier"]) return n.getUser().get("multipliers").add(t, { | |
value: e, | |
validTill: this.duration + n.getTime() | |
}); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), t.exports = o = function() { | |
function t(t, e) { | |
this.effect = t, this.duration = e, this.getPercent = r(this.getPercent, this), | |
this.deactivate = r(this.deactivate, this), this.activate = r(this.activate, this); | |
} | |
return t.prototype.activate = function() { | |
return n.events.trigger("goldOnClick", { | |
goldPercentFromMob: this.getPercent("goldPercentFromMob"), | |
goldPercentFromBoss: this.getPercent("goldPercentFromBoss"), | |
shardPercentFromMob: this.getPercent("shardPercentFromMob"), | |
shardPercentFromBoss: this.getPercent("shardPercentFromBoss") | |
}); | |
}, t.prototype.deactivate = function() { | |
return n.events.trigger("goldOnClick", { | |
goldPercentFromMob: 0, | |
goldPercentFromBoss: 0, | |
shardPercentFromMob: 0, | |
shardPercentFromBoss: 0 | |
}); | |
}, t.prototype.getPercent = function(t) { | |
return this.effect[t] || 0; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), o = s(8), t.exports = r = function() { | |
function t(t, e) { | |
this.effect = t, this.duration = e, this.activate = i(this.activate, this); | |
} | |
return t.prototype.activate = function() { | |
return n.getUser().get("multipliers").add("DPC", { | |
value: new o(this.effect.dpcMultiplier), | |
validTill: this.duration + n.getTime() | |
}); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), o = s(8), t.exports = r = function() { | |
function t(t, e) { | |
this.effect = t, this.duration = e, this.getEffectMult = i(this.getEffectMult, this), | |
this.activate = i(this.activate, this); | |
} | |
return t.prototype.activate = function() { | |
var t, e, s, o; | |
return o = n.getUser(), s = o.get("heroes").getDPS(), e = o.get("battle").getDPC(), | |
t = s.plus(e).times(this.getEffectMult()), n.events.trigger("plusDamage", { | |
damage: t | |
}); | |
}, t.prototype.getEffectMult = function() { | |
var t, e; | |
return t = n.getUser().get("battle"), e = t.isBossLocation(), e && this.effect.bossDpsMasterAttack ? this.effect.bossDpsMasterAttack : this.effect.dpsMasterAttack; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), t.exports = o = function() { | |
function t(t, e) { | |
this.effect = t, this.duration = e, this.activate = r(this.activate, this); | |
} | |
return t.prototype.activate = function() { | |
var t, e, s; | |
return t = [ this.effect.skillEffectMult, this.effect.skillsAmount ], e = t[0], | |
s = t[1], n.events.trigger("Blessing", { | |
skillEffectMult: e, | |
skillsAmount: s | |
}); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, u = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) c.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, c = {}.hasOwnProperty, y = [].indexOf || function(t) { | |
for (var e = 0, s = this.length; e < s; e++) if (e in this && this[e] === t) return e; | |
return -1; | |
}; | |
o = s(23), r = s(97), a = s(12), n = s(14), t.exports = i = function(t) { | |
function e(t, s) { | |
var n, o, i, u, c, d, p, x; | |
for (x = t.skillId, u = t.improvements, this.getChanges = l(this.getChanges, this), | |
o = r.getDescriptor(x), n = a.map(o.improvements, function(t) { | |
return new r(t); | |
}), i = 0, c = n.length; i < c; i++) d = n[i], d.set("improved", (p = d.id, y.call(u, p) >= 0)); | |
e.__super__.constructor.call(this, n, s); | |
} | |
return u(e, t), e.prototype.model = r, e.prototype.getChanges = function() { | |
var t; | |
return t = null, this.each(function(e) { | |
return function(e) { | |
if (e.get("improved")) return null == t && (t = {}), t = Object.assign({}, t, e.get("changes")); | |
}; | |
}(this)), t; | |
}, e; | |
}(o); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, f = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) h.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, h = {}.hasOwnProperty; | |
y = s(12), i = s(22), c = s(20), p = s(98).improvements, o = s(14), a = s(25), n = s(68), | |
r = s(24), d = s(26)._tr, l = s(63), t.exports = u = function(t) { | |
function e() { | |
return this.onBuyError = x(this.onBuyError, this), this.onBought = x(this.onBought, this), | |
this.buy = x(this.buy, this), this.isLocked = x(this.isLocked, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return f(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
improved: Boolean, | |
lock: c, | |
reward: Object, | |
price: Object, | |
changes: Object | |
} | |
}), e.getDescriptors = function() { | |
return p; | |
}, e.getDescriptor = function(t) { | |
return y.find(p, function(e) { | |
return e.id === t; | |
}); | |
}, e.prototype.isLocked = function() { | |
var t; | |
return !(null != (t = this.get("lock")) ? t.test(o.getUser(), !1) : void 0); | |
}, e.prototype.buy = function() { | |
var t, e, s, r, i, l; | |
return r = [ this.get("price"), this.get("id") ], e = r[0], t = r[1], i = this.skill.get("id"), | |
l = o.getUser(), l.get("resources").have(e) ? (s = n.callMethod("skills.improvement.buy", { | |
skillId: i, | |
improvementId: t | |
}), s.then(function(t) { | |
return function(e) { | |
return t.onBought(e); | |
}; | |
}(this)).catch(this.onBuyError)) : a.reject(new Error(d("Don't have enough: {resource}", { | |
resource: "gems" | |
}))); | |
}, e.prototype.onBought = function(t) { | |
var e, s, n, r, i; | |
if (t.result) return i = o.getUser(), n = [ this.get("reward"), this.get("price"), this.get("changes") ], | |
r = n[0], s = n[1], e = n[2], i.get("resources").spend(s), this.set("improved", !0), | |
new l(r).claim(i), o.analytics.dtd_custom_event("buy:stat", { | |
improvementId: this.get("id"), | |
skillId: this.skill.get("id") | |
}), this.collection.trigger("skillImproved", e); | |
}, e.prototype.onBuyError = function(t) { | |
var e, s, n, i, l; | |
r.log(t); | |
try { | |
n = t.data, s = n[0], e = n[1], l = s, i = e[0]; | |
} catch (e) { | |
l = d("Error"), i = t.message; | |
} | |
return o.showError(), a.reject(t); | |
}, e; | |
}(i); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, x = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) f.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, f = {}.hasOwnProperty; | |
a = s(22), r = s(8), n = s(14), i = s(100), c = s(75), u = c.getMobHP, y = c.roundDown, | |
d = c.roundUp, l = s(25), t.exports = o = function(t) { | |
function e() { | |
return this.onReborn = p(this.onReborn, this), this.getTimeskipReward = p(this.getTimeskipReward, this), | |
this.isBossLocationReached = p(this.isBossLocationReached, this), this.isBossLocation = p(this.isBossLocation, this), | |
this.isLastLocation = p(this.isLastLocation, this), this.locationIsFinished = p(this.locationIsFinished, this), | |
this.getMaxUnit = p(this.getMaxUnit, this), this.getUnit = p(this.getUnit, this), | |
this.getRawDpc = p(this.getRawDpc, this), this.getDPC = p(this.getDPC, this), this.getDPS = p(this.getDPS, this), | |
this.getMultiplier = p(this.getMultiplier, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return x(e, t), e.schema({ | |
attributes: { | |
locationId: Number, | |
monsterHP: r, | |
timeLeft: Number, | |
lastLocationId: Number, | |
lastLocationMonstersKilled: Number, | |
changed: Number | |
} | |
}), e.prototype.init = function() { | |
if (this.get("monsterHP").eq(0)) return this.set("monsterHP", this.getUnit().health); | |
}, e.prototype.getMultiplier = function(t) { | |
return r(n.getUser().get("multipliers").get(t).value); | |
}, e.prototype.getDPS = function() { | |
return d(n.getUser().get("heroes").getDPS().times(this.getMultiplier("DPS"))); | |
}, e.prototype.getDPC = function() { | |
var t, e, s, o, i; | |
return i = parseInt(this.get("lastLocationId")), t = i > 100 ? 100 : i, e = r(t).plus(n.getUser().get("counters").get("ADD_DPC")), | |
s = this.getMultiplier("DPC_DPS"), s.gt(1) && (o = d(this.getDPS().times(s.minus(1))), | |
e = e.plus(o)), d(e.times(this.getMultiplier("DPC"))); | |
}, e.prototype.getRawDpc = function() { | |
return y(r(this.get("lastLocationId")).plus(n.getUser().get("counters").get("ADD_DPC"))); | |
}, e.prototype.unitCache = null, e.prototype.getUnit = function(t) { | |
return null == t && (t = -1), t === -1 && (t = this.get("locationId")), this.unitCache ? this.unitCache : this.unitCache = i.getMonster(t); | |
}, e.prototype.getMaxUnit = function(t) { | |
return null == t && (t = this.get("locationId")), i.getMaxMonster(t); | |
}, e.prototype.locationIsFinished = function(t) { | |
var e; | |
return e = this.get("lastLocationId"), null == t && (t = e), t !== e || this.getMaxUnit(t) <= this.get("lastLocationMonstersKilled"); | |
}, e.prototype.isLastLocation = function() { | |
return this.get("locationId") === this.get("lastLocationId"); | |
}, e.prototype.isBossLocation = function(t) { | |
return null == t && (t = this.get("locationId")), t % 5 === 0; | |
}, e.prototype.isBossLocationReached = function() { | |
return this.isBossLocation(this.get("lastLocationId")); | |
}, e.prototype.getTimeskipReward = function(t, e) { | |
var s, o, r, i, a, l, u, c, d, p; | |
for (d = this.getUnit(), p = n.getUser(), l = p.get("multipliers"), s = this.getDPS().times(e), | |
o = d.health, i = y(s.div(o)), c = { | |
res: {} | |
}, r = 0, a = t.length; r < a; r++) u = t[r], c.res[u] = y(d.reward.res[u].times(i)); | |
return c.res = l.getMultipliersValue(c.res), c; | |
}, e.prototype.onReborn = function() { | |
return this.set("locationId", 1), this.set("lastLocationMonstersKilled", 0), this.set("lastLocationId", 1); | |
}, e; | |
}(a); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(8), n = s(14), i = s(12), p = s(75), y = p.getMobHP, d = p.getMobReward, c = p.getLocationById, | |
l = s(101), u = s(102), a = s(9).cdnURL, r = function() { | |
function t() { | |
this.getLocations = x(this.getLocations, this), this.getMaxMonster = x(this.getMaxMonster, this), | |
this.getLocationInfo = x(this.getLocationInfo, this), this.isBoss = x(this.isBoss, this), | |
this.getMonster = x(this.getMonster, this), this.gotResFromBoss = x(this.gotResFromBoss, this); | |
} | |
var e; | |
return e = null, t.prototype.gotResFromBoss = function(t) { | |
var e, s, r, i, a, l; | |
return l = n.getUser(), e = l.get("counters"), s = o(e.get("C::LST_CHM_LOC")), r = o(e.get("C::LST_INTL_LOC")), | |
i = s.gte(t), a = r.gte(t), [ i, a ]; | |
}, t.prototype.getMonster = function(t) { | |
var e, s, o, r, a, l, c, p, x, f, h, m, g; | |
if (p = this.getMonsterId(t), l = y(t), g = n.getUser(), r = g.get("counters"), | |
a = { | |
id: t, | |
health: l, | |
timeLimit: t % 5 ? 0 : 30, | |
isBoss: this.isBoss(t) | |
}, o = parseInt(r.get("MBGMS")), h = parseInt(r.get("REBORN")), s = parseInt(r.get("charisma_res")), | |
m = this.gotResFromBoss(t), x = m[0], f = m[1], a.reward = d(t, l, h, o, x, f, s), | |
e = this.getAvailableMobs(t), p > -1) c = this.lastMob = e[(t % 5 + p) % e.length]; else for (;;) if (c = e[Math.round(Math.random() * (e.length - 1))], | |
c !== this.lastMob) { | |
this.lastMob = c; | |
break; | |
} | |
return i.extend(a, i.find(u.mobs, function(t) { | |
return function(t) { | |
return t.id === c; | |
}; | |
}(this))), a.name = p > -1 ? u.prefix[(t % 5 + p) % u.prefix.length] + " " + a.name : u.prefix[Math.round(Math.random() * (u.prefix.length - 1))] + " " + a.name, | |
a; | |
}, t.prototype.isBoss = function(t) { | |
return !(t % 5); | |
}, t.prototype.getMonsterId = function(t) { | |
var e; | |
return e = n.getUser().get("battle"), t % 5 ? e.locationIsFinished(t) ? -1 : e.get("lastLocationMonstersKilled") : t / 5; | |
}, t.prototype.getAvailableMobs = function(t) { | |
var e, s; | |
return s = c(t, l.locations), e = s.mobs; | |
}, t.prototype.getMobsInfo = function(t) { | |
return i.filter(u.mobs, function(e) { | |
return -1 !== i.indexOf(t, e.id); | |
}); | |
}, t.prototype.getLocationInfo = function(t) { | |
var e, s, n, o, r, i; | |
return i = l.locations, r = c(t, i), e = r.platforms, s = r.mobs, o = l.floors, | |
n = e[t % e.length], { | |
id: t, | |
bg: r.image, | |
allFloors: e, | |
allMobs: s, | |
floor: { | |
id: n, | |
image: o[n - 1].image | |
} | |
}; | |
}, t.prototype.getMaxMonster = function(t) { | |
return this.isBoss(t) ? 1 : 10; | |
}, t.prototype.getLocations = function() { | |
var t, e, s, o; | |
return t = n.getUser().get("battle"), s = t.get("lastLocationId"), e = s - 5 > 1 ? s - 5 : 1, | |
i.map(function() { | |
o = []; | |
for (var t = e; e <= s ? t <= s : t >= s; e <= s ? t++ : t--) o.push(t); | |
return o; | |
}.apply(this), function(t) { | |
return function(t) { | |
return { | |
icon: a("rc/ico-loc.png"), | |
number: t | |
}; | |
}; | |
}(this)); | |
}, t; | |
}(), t.exports = new r(); | |
}, , , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b, _ = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, k = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) w.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, w = {}.hasOwnProperty; | |
c = s(22), l = s(23), h = s(104), a = s(14), d = s(25), b = s(75).getPicPrice, v = s(106), | |
m = s(12), n = s(68), u = s(24), g = s(26)._tr, i = s(107), p = s(82), o = 1, f = 2, | |
x = 3, y = 4, t.exports = r = function(t) { | |
function e() { | |
return this.onBuyError = _(this.onBuyError, this), this.onBought = _(this.onBought, this), | |
this.setFav = _(this.setFav, this), this.buyPicture = _(this.buyPicture, this), | |
this.tryBuyPicture = _(this.tryBuyPicture, this), this.canBuyPicture = _(this.canBuyPicture, this), | |
this.getFilteredPictures = _(this.getFilteredPictures, this), this.isLand = _(this.isLand, this), | |
this.onSetFavoriteTag = _(this.onSetFavoriteTag, this), this.getTags = _(this.getTags, this), | |
this.getSelectedTags = _(this.getSelectedTags, this), this.getFavoriteTags = _(this.getFavoriteTags, this), | |
this.getTagsByFilter = _(this.getTagsByFilter, this), this.getTagsByType = _(this.getTagsByType, this), | |
this.getTagsByFlag = _(this.getTagsByFlag, this), this.getPicPrice = _(this.getPicPrice, this), | |
this.init = _(this.init, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return k(e, t), e.schema({ | |
attributes: { | |
pics: { | |
cls: l, | |
options: { | |
model: i | |
} | |
} | |
} | |
}), e.prototype.init = function() { | |
var t, e, s, n, o; | |
for (this.set("tags", new h(v)), s = this.get("favTags"), t = 0, e = s.length; t < e; t++) n = s[t], | |
o = this.get("tags").get(n), o.set("fav", !0); | |
return this.set("favTagsAmount", this.get("favTags").length), this.get("pics") || this.set("pics", []), | |
a.events.on("setFavoriteTag", this.onSetFavoriteTag), this.onSetFavoriteTag(); | |
}, e.prototype.getPicPrice = function(t) { | |
var e; | |
return null == t && (t = 0), e = this.get("pics").size(), b(e + 1, t); | |
}, e.prototype.getTagsByFlag = function(t) { | |
return m.filter(this.get("tags").models, function(e) { | |
return function(e) { | |
return e.get(t); | |
}; | |
}(this)); | |
}, e.prototype.getTagsByType = function(t) { | |
return m.filter(this.get("tags").models, function(e) { | |
return function(e) { | |
return e.get("kind") === t; | |
}; | |
}(this)); | |
}, e.prototype.getTagsByFilter = function(t) { | |
return 0 === t.length ? [] : m.filter(this.get("tags").models, function(e) { | |
return function(e) { | |
return e.get("tag").toUpperCase().indexOf(t.toUpperCase()) > -1; | |
}; | |
}(this)); | |
}, e.prototype.getFavoriteTags = function() { | |
return this.getTagsByFlag("fav"); | |
}, e.prototype.getSelectedTags = function() { | |
return this.getTagsByFlag("selected"); | |
}, e.prototype.getTags = function(t, e) { | |
var s; | |
switch (t) { | |
case "theme": | |
s = this.getTagsByType(f); | |
break; | |
case "anime": | |
s = this.getTagsByType(x); | |
break; | |
case "artist": | |
s = this.getTagsByType(o); | |
break; | |
case "pers": | |
s = this.getTagsByType(y); | |
} | |
return e ? s.filter(function(t) { | |
return function(t) { | |
return t.get("tag").toLocaleLowerCase().indexOf(e.toLocaleLowerCase()) >= 0; | |
}; | |
}(this)) : s; | |
}, e.prototype.onSetFavoriteTag = function() { | |
var t; | |
return t = m.map(this.getFavoriteTags(), function(t) { | |
return function(t, e) { | |
return t.get("id"); | |
}; | |
}(this)), m.each(this.get("pics").models, function(e) { | |
return function(e, s) { | |
var n; | |
return n = m.find(e.get("tags"), function(e) { | |
return t.indexOf(e) >= 0; | |
}), e.set("fav", n); | |
}; | |
}(this)); | |
}, e.prototype.isLand = function(t) { | |
return t.get("width") > t.get("height"); | |
}, e.prototype.sort1 = function(t) { | |
var e, s, n, o; | |
return o = [], s = [], n = "any", e = 0, t.forEach(function(t) { | |
return function(r) { | |
if ("any" === n && s.length && (o.push(s.shift()), e += 2, n = "short"), "any" === n) o.push(r), | |
t.isLand(r) ? (n = "short", e += 2) : (e += 1, e > 1 && (n = "short")); else if ("short" === n) { | |
if (t.isLand(r)) return void s.push(r); | |
o.push(r), e += 1, 1 === e && (n = "any"); | |
} | |
if (3 === e) return e = 0, n = "any"; | |
}; | |
}(this)), s.length && 2 === e && o.push(new i({ | |
dummy: !0 | |
})), s.forEach(function(t) { | |
return o.push(t), o.push(new i({ | |
dummy: !0 | |
})); | |
}), o.length && o[o.length - 1].get("dummy") || o.push(new i({ | |
dummy: !0 | |
})), o; | |
}, e.prototype.getFilteredPictures = function(t) { | |
var e, s; | |
return s = m.uniq(m.union(m.map(this.getSelectedTags(), function(t) { | |
return function(t, e) { | |
return t.get("id"); | |
}; | |
}(this)), m.map(this.getTagsByFilter(t), function(t) { | |
return function(t, e) { | |
return t.get("id"); | |
}; | |
}(this)))), e = m.filter(this.get("pics").models, function(e) { | |
return function(e, n) { | |
return !s.length > 0 && 0 === t.length || m.find(e.get("tags"), function(t) { | |
return s.indexOf(t) >= 0; | |
}); | |
}; | |
}(this)), m.find(e, function(t) { | |
return function(t) { | |
return !t.get("loaded"); | |
}; | |
}(this)) || (e = this.sort1(e)), e; | |
}, e.prototype.canBuyPicture = function(t, e) { | |
var s, n, o, r, i, l, u, c; | |
return null == t && (t = 0), c = a.getUser(), i = this.getPicPrice(t), l = i[0], | |
r = l.shards, u = i[1], o = u.crowns, "crowns" === e ? (s = c.get("resources").get("crowns"), | |
s.gte(o)) : (n = c.get("resources").get("shards"), n.gte(r)); | |
}, e.prototype.tryBuyPicture = function(t, e, s) { | |
var n, o; | |
return n = "crowns" === e ? this.getPicPrice(t)[1] : this.getPicPrice(t)[0], o = a.getUser(), | |
o.get("resources").have(n) ? new d(function(n) { | |
return function(o, r) { | |
return t > 0 && !n.getFavoriteTags().length ? a.events.trigger("showDialog", { | |
type: "confirm", | |
data: { | |
title: g("Are you sure?"), | |
text: g("You haven't any favorite tags. Set up?"), | |
yesLabel: g("Yes"), | |
noLabel: g("No, Later"), | |
onOk: function() { | |
return "function" == typeof s && s(), window.location.assign("#/galery"), o(); | |
}, | |
onCancel: function() { | |
return r(new Error(g("on exit"))); | |
}, | |
onExit: function() { | |
return r(new Error(g("on exit"))); | |
} | |
} | |
}) : n.buyPicture(t, e).then(o); | |
}; | |
}(this)) : d.reject(new Error(g("Don't have enough: {resource}", { | |
resource: p.getName(e) | |
}))); | |
}, e.prototype.buyPicture = function(t, e) { | |
var s, o, r; | |
return s = "crowns" === e ? this.getPicPrice(t)[1] : this.getPicPrice(t)[0], r = a.getUser(), | |
o = n.callMethod("album.picture.buy", { | |
userTags: t, | |
resource: e | |
}), o.then(function(e) { | |
return function(n) { | |
return e.onBought(n, s, t); | |
}; | |
}(this)).catch(this.onBuyError); | |
}, e.prototype.setFav = function(t) { | |
var e, s; | |
return s = m.map(this.getFavoriteTags(), function(t) { | |
return function(t, e) { | |
return t.get("id"); | |
}; | |
}(this)), e = m.find(t.get("tags"), function(t) { | |
return function(t) { | |
return s.indexOf(t) >= 0; | |
}; | |
}(this)), t.set("fav", e); | |
}, e.prototype.onBought = function(t, e, s) { | |
var n, o; | |
return t.pic ? (a.getUser().get("resources").spend(e), n = t, o = new i(t.pic), | |
this.setFav(o), this.get("pics").add(o), this.onSetFavoriteTag(), a.show({ | |
popup: { | |
type: "newPicture", | |
data: o | |
} | |
}), a.events.trigger("newPicAdded", { | |
stars: o.get("stars"), | |
isFavorite: t.isFavorite | |
}), a.analytics.amp_event("PicBuy", { | |
id: t.pic.id, | |
grade: s | |
}), a.analytics.dtd_custom_event("PicBuy", { | |
id: t.pic.id, | |
grade: s | |
}), a.analytics.amp_set("Pictures", this.get("pics").size()), null) : new d(function(t) { | |
return function(t, e) { | |
return a.events.trigger("showDialog", { | |
type: "humble", | |
data: { | |
title: g("Oops!"), | |
text: g("You got all pictures with your favorite tags. Edit tags or open pictures with random tags."), | |
yesLabel: g("Ok"), | |
onOk: function() { | |
return t(); | |
}, | |
onExit: function() { | |
return e(new Error(g("on exit"))); | |
} | |
} | |
}); | |
}; | |
}(this)); | |
}, e.prototype.onBuyError = function(t) { | |
return a.showError(), u.log(t); | |
}, e; | |
}(c); | |
}, function(t, e, s) { | |
var n, o, r, i, a = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, l = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) u.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, u = {}.hasOwnProperty; | |
o = s(23), r = s(105), n = s(14), t.exports = i = function(t) { | |
function e() { | |
return this.getFavTagsCount = a(this.getFavTagsCount, this), this.unfavoriteAll = a(this.unfavoriteAll, this), | |
this.comparator = a(this.comparator, this), e.__super__.constructor.apply(this, arguments); | |
} | |
var s; | |
return l(e, t), e.prototype.model = r, s = 2, e.prototype.comparator = function(t, e) { | |
return t.get("tag").toLowerCase() > e.get("tag").toLowerCase() ? 1 : -1; | |
}, e.prototype.unfavoriteAll = function() { | |
return this.each(function(t) { | |
return function(t) { | |
return t.unfavorite(); | |
}; | |
}(this)); | |
}, e.prototype.getFavTagsCount = function() { | |
var t; | |
return t = n.getUser().get("counters"), s + parseInt(t.get("MFAVTG").toFixed()); | |
}, e; | |
}(o); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, d = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) p.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, p = {}.hasOwnProperty; | |
a = s(22), r = s(8), n = s(68), l = s(25), o = s(14), i = s(24), c = s(26)._tr, | |
t.exports = u = function(t) { | |
function e() { | |
return this.onBuyError = y(this.onBuyError, this), this.onFavorite = y(this.onFavorite, this), | |
this.onBoughtUnfavorite = y(this.onBoughtUnfavorite, this), this.buyUnfavorite = y(this.buyUnfavorite, this), | |
this.getUnfavoritePrice = y(this.getUnfavoritePrice, this), this.unfavoriteAll = y(this.unfavoriteAll, this), | |
this.unfavorite = y(this.unfavorite, this), this.favorite = y(this.favorite, this), | |
e.__super__.constructor.apply(this, arguments); | |
} | |
return d(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
name: String, | |
fav: Boolean | |
} | |
}), e.prototype.favorite = function() { | |
var t; | |
return t = n.callMethod("album.favoriteTag.add", { | |
_id: this.get("id") | |
}), t.then(this.onFavorite).catch(this.onBuyError); | |
}, e.prototype.unfavorite = function() { | |
var t, e; | |
if (e = o.getUser(), t = e.get("counters"), this.get("fav")) return this.set("fav", !1), | |
e.get("album").set("favTagsAmount", e.get("album").get("favTagsAmount") - 1), o.events.trigger("setFavoriteTag"); | |
}, e.prototype.unfavoriteAll = function() { | |
return this.collection.unfavoriteAll(); | |
}, e.prototype.getUnfavoritePrice = function(t) { | |
switch (t) { | |
case "current": | |
return r(50); | |
case "all": | |
return r(99); | |
} | |
}, e.prototype.buyUnfavorite = function(t) { | |
var e, s, r; | |
return e = { | |
crowns: this.getUnfavoritePrice(t) | |
}, r = o.getUser(), r.get("resources").have(e) ? (s = n.callMethod("album.favoriteTag.remove", { | |
_type: t, | |
_id: this.get("id") | |
}), s.then(function(s) { | |
return function(n) { | |
return s.onBoughtUnfavorite(n, e, t); | |
}; | |
}(this)).catch(this.onBuyError)) : l.reject(new Error(c("Don't have enough: {resource}", { | |
resource: c("Crowns") | |
}))); | |
}, e.prototype.onBoughtUnfavorite = function(t, e, s) { | |
var n; | |
switch (n = o.getUser(), n.get("resources").spend(e), s) { | |
case "current": | |
this.unfavorite(); | |
break; | |
case "all": | |
this.unfavoriteAll(); | |
} | |
return o.analytics.amp_event("TagUnFav", { | |
name: "current" === s ? this.get("name") : "__all__" | |
}), o.analytics.dtd_custom_event("TagUnFav", { | |
tag: "current" === s ? this.get("tag") : "__all__" | |
}), o.analytics.amp_set("TagsCount", n.get("album").get("favTagsAmount")), null; | |
}, e.prototype.onFavorite = function() { | |
var t, e, s; | |
return s = o.getUser(), t = o.getUser().get("counters"), this.get("fav") || (this.set("fav", !0), | |
e = s.get("album").get("favTagsAmount") + 1, s.get("album").set("favTagsAmount", e), | |
o.events.trigger("setFavoriteTag"), o.analytics.amp_event("TagFav", { | |
name: name | |
}), o.analytics.dtd_custom_event("TagFav", { | |
tag: this.get("tag") | |
}), o.analytics.amp_set("TagsCount", e)), null; | |
}, e.prototype.onBuyError = function(t) { | |
return o.showError(), i.log(t); | |
}, e; | |
}(a); | |
}, , function(t, e, s) { | |
var n, o, r, i, a = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) l.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, l = {}.hasOwnProperty; | |
o = s(22), r = s(12), i = s(106), t.exports = n = function(t) { | |
function e(t, s) { | |
var n; | |
e.__super__.constructor.call(this, t, s), n = this.get("rating"), n < 56 ? this.set("stars", 1) : n < 132 ? this.set("stars", 2) : this.set("stars", 3), | |
this.set("url", "http://cdn1.faptitans.com/img/" + this.get("name")), this.set("thb", "http://cdn1.faptitans.com/thb/" + this.get("name")), | |
this.set("ths", "http://cdn1.faptitans.com/ths/" + this.get("name")); | |
} | |
return a(e, t), e.schema({ | |
attributes: { | |
id: String, | |
url: String, | |
thb: String, | |
ths: String, | |
tags: Array, | |
rating: Number | |
} | |
}), e.prototype.getDescriptor = function(t) { | |
return r.find(i, function(e) { | |
return e.id === t; | |
}); | |
}, e.prototype.getLabel = function() { | |
var t, e, s, n, o, r; | |
for (e = "", n = this.get("tags"), t = 0, s = n.length; t < s; t++) o = n[t], r = this.getDescriptor(o), | |
r && (e += " " + r.tag); | |
return e; | |
}, e.prototype.getAuthor = function() { | |
var t, e, s, n, o, r; | |
for (e = "", n = this.get("tags"), t = 0, s = n.length; t < s; t++) o = n[t], r = this.getDescriptor(o), | |
r && 1 === r.kind && (e += " " + r.tag); | |
return e; | |
}, e; | |
}(o); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, g = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) v.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, v = {}.hasOwnProperty; | |
i = s(23), d = s(109), r = s(8), a = s(24), n = s(68), y = s(63), x = s(12), o = s(14), | |
l = s(25), h = s(75).roundDown, f = s(26)._tr, c = s(82), u = [ "GOLD", "GEMS", "SHARDS", "DPC" ], | |
t.exports = p = function(t) { | |
function e(t, s) { | |
this.reborn = m(this.reborn, this), this.claimSumAdditionalReward = m(this.claimSumAdditionalReward, this), | |
this.onBuyError = m(this.onBuyError, this), this.canBuy = m(this.canBuy, this), | |
this.getRoomsPrice = m(this.getRoomsPrice, this); | |
var n, o, r, i, a, l; | |
for (a = d.getDescriptors(), n = x.map(a, function(t) { | |
var e; | |
return e = new d(t); | |
}), o = 0, r = t.length; o < r; o++) i = t[o], l = x.find(n, function(t) { | |
return t.id === i[0]; | |
}), l.set("lvl", i[1], { | |
silent: !0 | |
}); | |
e.__super__.constructor.call(this, n, s); | |
} | |
return g(e, t), e.prototype.model = d, e.prototype.buyAll = function(t, e, s) { | |
var r, i, a; | |
return null == t && (t = 1), null == e && (e = "gems"), null == s && (s = !1), a = o.getUser(), | |
this.canBuy(t, e, s) || this.canBuy(t, e, s) ? (r = "all_rooms_by_" + t + "_lvl_" + e, | |
i = n.callMethod("rooms.buyAll", { | |
level: t, | |
resource: e, | |
wholesale: s | |
}), i.then(function(n) { | |
return function(i) { | |
return o.analytics.amp_event("guildbase", { | |
buttonname: r | |
}), o.analytics.dtd_custom_event("room:buyAll", { | |
level: t, | |
resource: e | |
}), x.each(n.models, function(n) { | |
return n.onBought(i, t, null, e, s); | |
}), n.trigger("change"); | |
}; | |
}(this)).catch(this.onBuyError)) : l.reject(new Error(f("Don't have enough: {resource}", { | |
resource: c.getName(e) | |
}))); | |
}, e.prototype.getRoomsPrice = function(t, e, s) { | |
var n; | |
return null == t && (t = 1), null == e && (e = "gems"), null == s && (s = !1), n = r(0), | |
x.each(this.models, function(o) { | |
return function(o) { | |
return n = n.plus(o.getRoomPrice(null, t, e, s)); | |
}; | |
}(this)), h(n); | |
}, e.prototype.canBuy = function(t, e, s) { | |
var n, r, i; | |
return null == t && (t = 1), null == s && (s = !1), n = {}, n["" + e] = this.getRoomsPrice(t, e, s), | |
r = n, i = o.getUser(), i.get("resources").have(r); | |
}, e.prototype.onBuyError = function(t) { | |
return o.showError(), a.log(t); | |
}, e.prototype.claimSumAdditionalReward = function() { | |
var t, e, s, n, i, a, l, c, p, x, f, h; | |
for (h = o.getUser(), e = h.get("counters"), s = r(1), x = new d(), n = 0, i = u.length; n < i; n++) if (f = u[n], | |
l = f + "MINRMTYPE", c = r(e.get(l)), c.gt(0)) { | |
switch (t = x.getRoomSameTypeBonus(0, c), f) { | |
case "DPC": | |
p = new y({ | |
mults: [ [ "DPC", { | |
value: t, | |
isAdditive: !0 | |
} ] ] | |
}); | |
break; | |
case "GOLD": | |
case "GEMS": | |
case "SHARDS": | |
p = new y({ | |
mults: [ [ f.toLocaleLowerCase(), { | |
value: t, | |
isAdditive: !0 | |
} ] ] | |
}); | |
} | |
p.claim(h); | |
} | |
if (a = e.get("MINRMSET"), a > 0) return t = x.getRoomFullSetBonus(0, a), new y({ | |
mults: [ [ "DPS", { | |
value: t, | |
isAdditive: !0 | |
} ] ] | |
}).claim(o.getUser()); | |
}, e.prototype.reborn = function() { | |
return this.each(function(t) { | |
return function(t) { | |
return t.claimSumReward(); | |
}; | |
}(this)), this.claimSumAdditionalReward(); | |
}, e; | |
}(i); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, _ = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) k.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, k = {}.hasOwnProperty; | |
p = s(12), a = s(22), c = s(63), d = s(20), g = s(110), r = s(8), o = s(14), n = s(68), | |
m = s(75), f = m.getRoomBonus, h = m.getRoomPrice, v = m.roundDown, i = s(24), x = s(26)._tr, | |
u = s(82), l = [ "GOLD", "GEMS", "SHARDS", "DPC" ], t.exports = y = function(t) { | |
function e() { | |
return this.onBuyError = b(this.onBuyError, this), this.claimSumReward = b(this.claimSumReward, this), | |
this.getSumBonus = b(this.getSumBonus, this), this.checkFullSetBonus = b(this.checkFullSetBonus, this), | |
this.checkSameTypeBonus = b(this.checkSameTypeBonus, this), this.onBought = b(this.onBought, this), | |
this.setRoomCounter = b(this.setRoomCounter, this), this.getRoomRow = b(this.getRoomRow, this), | |
this.buy = b(this.buy, this), this.canBuy = b(this.canBuy, this), this.getRoomSameTypeBonus = b(this.getRoomSameTypeBonus, this), | |
this.getRoomFullSetBonus = b(this.getRoomFullSetBonus, this), this.getRoomPrice = b(this.getRoomPrice, this), | |
this.getRoomBonus = b(this.getRoomBonus, this), this.getNextRoomLvl = b(this.getNextRoomLvl, this), | |
this.isLocked = b(this.isLocked, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return _(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
type: String, | |
lvl: Number, | |
title: String, | |
description: String, | |
lock: d | |
} | |
}), e.getDescriptors = function() { | |
return g; | |
}, e.getDescriptor = function(t) { | |
return p.find(g, function(e) { | |
return e.id === t; | |
}); | |
}, e.prototype.isLocked = function() { | |
var t; | |
return !(null != (t = this.get("lock")) ? t.test(o.getUser(), !1) : void 0); | |
}, e.prototype.getNextRoomLvl = function(t, e) { | |
return null == e && (e = 1), null == t && (t = this.get("lvl")), t ? t + e : e; | |
}, e.prototype.getRoomBonus = function(t) { | |
var e; | |
return e = r(t ? t : 1), e.div(100); | |
}, e.prototype.getRoomPrice = function(t, e, s, n) { | |
var o, i, a, l; | |
return null == s && (s = "gems"), null == n && (n = !1), null == t && (t = this.getNextRoomLvl()), | |
e ? (i = r(0), l = this.get("lvl") ? this.get("lvl") : 0, o = l + e - 1, p.each(function() { | |
a = []; | |
for (var t = l; l <= o ? t <= o : t >= o; l <= o ? t++ : t--) a.push(t); | |
return a; | |
}.apply(this), function(t) { | |
return function(e) { | |
return i = i.plus(h(t.getNextRoomLvl(e), s, n)); | |
}; | |
}(this))) : i = h(t, s, n), v(i); | |
}, e.prototype.getRoomFullSetBonus = function(t, e) { | |
return this.getRoomSameTypeBonus(t, e).times(3); | |
}, e.prototype.getRoomSameTypeBonus = function(t, e) { | |
var s; | |
return s = r(e).minus(t), s.div(100); | |
}, e.prototype.canBuy = function(t, e, s) { | |
var n, r, i; | |
return null == s && (s = "gems"), n = {}, n["" + s] = this.getRoomPrice(t, e, s), | |
r = n, i = o.getUser(), i.get("resources").have(r, !1); | |
}, e.prototype.buy = function(t, e) { | |
var s, r, i, a, l; | |
return null == t && (t = 1), null == e && (e = "gems"), r = {}, r["" + e] = this.getRoomPrice(null, t, e), | |
i = r, l = o.getUser(), l.get("resources").have(i) ? (s = "room_by_" + t + "_lvl_" + e, | |
a = n.callMethod("rooms.buy", { | |
_id: this.get("id"), | |
level: t | |
}), a.then(function(e) { | |
return function(n) { | |
return o.analytics.amp_event("guildbase", { | |
buttonname: s | |
}), o.analytics.dtd_custom_event("room:buy", { | |
id: e.get("id"), | |
level: t | |
}), e.onBought(n, t, i); | |
}; | |
}(this)).catch(this.onBuyError)) : Promise.reject(new Error(x("Don't have enough: {resource}", { | |
resource: u.getName(e) | |
}))); | |
}, e.prototype.getRoomRow = function() { | |
return this.get("lock").get("counters") ? +this.get("lock").get("counters").RMS + 1 : 1; | |
}, e.prototype.setRoomCounter = function(t) { | |
return null == t && (t = 1), o.getUser().get("counters").increment(this.get("type").toUpperCase() + "RM_" + this.getRoomRow(), t); | |
}, e.prototype.onBought = function(t, e, s, n, r) { | |
var i, a, l, u, y; | |
switch (null == n && (n = "gems"), null == r && (r = !1), null == s && (l = {}, | |
l["" + n] = this.getRoomPrice(null, e, n, r), s = l), o.getUser().get("resources").spend(s), | |
i = this.getRoomBonus(e), y = this.get("type")) { | |
case "dpc": | |
u = new c({ | |
mults: [ [ "DPC", { | |
value: i, | |
isAdditive: !0 | |
} ] ] | |
}); | |
break; | |
case "gold": | |
case "gems": | |
case "shards": | |
u = new c({ | |
mults: [ [ y, { | |
value: i, | |
isAdditive: !0 | |
} ] ] | |
}); | |
} | |
return u.claim(o.getUser()), this.set({ | |
lvl: this.getNextRoomLvl(this.get("lvl"), e) | |
}), this.setRoomCounter(e), a = this.checkSameTypeBonus(), this.checkFullSetBonus(), | |
o.events.trigger("roomBuy", a); | |
}, e.prototype.checkSameTypeBonus = function(t) { | |
var e, s, n, i, a, l, u; | |
if (null == t && (t = !1), s = o.getUser().get("counters"), u = this.get("type").toUpperCase(), | |
i = u + "MINRMTYPE", a = r(t ? 0 : s.get(i)), n = r(p.min(p.map([ 1, 2, 3, 4 ], function(t) { | |
return function(t) { | |
var e, n; | |
return e = u + "RM_" + t, n = s.get(e); | |
}; | |
}(this)))), n.gt(a)) { | |
if (e = this.getRoomSameTypeBonus(a, n), !t) { | |
switch (s.increment(i, n.minus(a)), this.get("type")) { | |
case "dpc": | |
l = new c({ | |
mults: [ [ "DPC", { | |
value: e, | |
isAdditive: !0 | |
} ] ] | |
}); | |
break; | |
case "gold": | |
case "gems": | |
case "shards": | |
l = new c({ | |
mults: [ [ this.get("type"), { | |
value: e, | |
isAdditive: !0 | |
} ] ] | |
}); | |
} | |
l.claim(o.getUser()); | |
} | |
return e; | |
} | |
return r(0); | |
}, e.prototype.checkFullSetBonus = function() { | |
var t, e, s, n; | |
if (e = o.getUser().get("counters"), n = r(e.get("MINRMSET")), s = r(p.min(p.flatten(p.map(l, function(t) { | |
return function(t) { | |
return p.map([ 1, 2, 3, 4 ], function(s) { | |
var n, o; | |
return n = t + "RM_" + s, o = e.get(n); | |
}); | |
}; | |
}(this))))), s.gt(n)) return e.increment("MINRMSET", s.minus(n)), t = this.getRoomFullSetBonus(n, s), | |
new c({ | |
mults: [ [ "DPS", { | |
value: t, | |
isAdditive: !0 | |
} ] ] | |
}).claim(o.getUser()); | |
}, e.prototype.getSumBonus = function(t) { | |
var e, s, n, i; | |
return s = o.getUser().get("counters"), e = r(0), p.each([ 1, 2, 3, 4 ], function(n) { | |
return function(o) { | |
var i, a; | |
if (i = t.toUpperCase() + "RM_" + o, a = r(s.get(i)), a.gte(1)) return e = e.plus(n.getRoomBonus(a)); | |
}; | |
}(this)), n = t.toUpperCase() + "MINRMTYPE", i = s.get(n), e = e.plus(this.getRoomSameTypeBonus(0, i)), | |
e.round(2); | |
}, e.prototype.claimSumReward = function(t) { | |
var e, s; | |
if (this.get("lvl")) { | |
switch (e = this.getRoomBonus(this.get("lvl")), this.get("type")) { | |
case "dpc": | |
s = new c({ | |
mults: [ [ "DPC", { | |
value: e, | |
isAdditive: !0 | |
} ] ] | |
}); | |
break; | |
case "gold": | |
s = new c({ | |
mults: [ [ "gold", { | |
value: e, | |
isAdditive: !0 | |
} ] ] | |
}); | |
break; | |
case "gems": | |
s = new c({ | |
mults: [ [ "gems", { | |
value: e, | |
isAdditive: !0 | |
} ] ] | |
}); | |
break; | |
case "shards": | |
s = new c({ | |
mults: [ [ "shards", { | |
value: e, | |
isAdditive: !0 | |
} ] ] | |
}); | |
} | |
return s.claim(o.getUser()); | |
} | |
}, e.prototype.onBuyError = function(t) { | |
return o.showError(), i.log(t); | |
}, e; | |
}(a); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, y = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) d.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, d = {}.hasOwnProperty; | |
o = s(23), i = s(112), r = s(25), n = s(14), u = s(98).stats, l = s(26)._tr, t.exports = a = function(t) { | |
function e() { | |
return this.addStat = c(this.addStat, this), this.reborn = c(this.reborn, this), | |
e.__super__.constructor.apply(this, arguments); | |
} | |
return y(e, t), e.prototype.model = i, e.prototype.reborn = function() { | |
return this.each(function(t) { | |
return function(t) { | |
return t.onReborn(); | |
}; | |
}(this)); | |
}, e.prototype.getDescriptors = function() { | |
return u; | |
}, e.prototype.addStat = function(t) { | |
var e; | |
return e = this.get(t), e ? e.addStat() : r.reject(l("No such stat")); | |
}, e; | |
}(o); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b, _, k = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, w = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) C.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, C = {}.hasOwnProperty; | |
y = s(12), l = s(25), a = s(22), r = s(8), u = s(63), n = s(68), p = s(7).formatBig, | |
o = s(14), d = s(26)._tr, i = s(24), _ = s(98).stats, p = s(7).formatBig, b = s(75), | |
h = b.getStatPrice, f = b.getStatMaxAttempts, x = b.getResByStatName, m = b.getStatReward, | |
v = b.getStatSumReward, g = b.getStatRewardValue, t.exports = c = function(t) { | |
function e(t, s) { | |
this.onBuyError = k(this.onBuyError, this), this.onBought = k(this.onBought, this), | |
this.getStatSumReward = k(this.getStatSumReward, this), this.showVip = k(this.showVip, this), | |
this.buy = k(this.buy, this), this.onReborn = k(this.onReborn, this), this.getStonesRelation = k(this.getStonesRelation, this), | |
this.getStatUIData = k(this.getStatUIData, this); | |
var n, o; | |
t instanceof e ? n = t : (o = e.getDescriptor(t.id), n = y.extend({}, o, t)), n.resName = n.name + "_res", | |
e.__super__.constructor.call(this, n, s); | |
} | |
return w(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
value: Number, | |
attemps: Number, | |
name: String, | |
resName: String, | |
icon: String, | |
bonusText: String | |
} | |
}), e.getDescriptor = function(t) { | |
return y.find(_, function(e) { | |
return e.id === t; | |
}); | |
}, e.prototype.getStatUIData = function() { | |
var t, e, s, n, o, r, i, a; | |
return r = [ this.get("name"), this.get("resName"), this.get("value") ], s = r[0], | |
i = r[1], a = r[2], e = f(a + 1, s), o = parseInt(100 / e), n = this.get("attemps") / e * 100, | |
n = n > 100 || n < 0 ? 0 : n, t = g(s, a), { | |
progress: n, | |
bonusValue: t, | |
progressPerTry: o | |
}; | |
}, e.prototype.getStonesRelation = function() { | |
var t, e, s, n, r, i; | |
return n = [ this.get("resName"), this.get("value") ], r = n[0], i = n[1], t = p(o.getUser().get("resources").get(r)), | |
e = h(r, i + 1), s = e[r], t + "/" + s; | |
}, e.prototype.onReborn = function() { | |
var t, e; | |
return e = o.getUser(), t = this.getStatSumReward(), new u(t).claimMultipliers(e); | |
}, e.prototype.buy = function() { | |
var t, e, s, r, i, a, u; | |
return r = [ this.get("name"), this.get("resName"), this.get("value") ], t = r[0], | |
i = r[1], u = r[2], a = o.getUser(), e = h(i, u + 1), a.get("resources").have(e) ? (s = n.callMethod("user.stats.buy", { | |
name: t | |
}), s.then(function(s) { | |
return function(n) { | |
return s.onBought(n, t, e); | |
}; | |
}(this)).catch(this.onBuyError)) : l.reject(new Error(d("Don't have enough: {resource}", { | |
resource: i | |
}))); | |
}, e.prototype.showVip = function() { | |
var t, e; | |
return e = o.vipModel, t = e.getVipLvl(), parseInt(t) > 4; | |
}, e.prototype.getStatSumReward = function() { | |
var t, e, s; | |
return e = [ this.get("name"), this.get("value") ], t = e[0], s = e[1], v(t, s); | |
}, e.prototype.onBought = function(t, e, s) { | |
var n, r, i, a, l, c; | |
if (l = t.statValue, a = t.statAttemp, c = o.getUser(), r = c.get("counters"), c.get("resources").spend(s), | |
this.set("value", l), this.set("attemps", a), r.increment("stat_up_try_" + e), r.set("" + e, l), | |
n = this.showVip() ? "vip" : "common", o.analytics.dtd_custom_event("buy:stat", { | |
statValue: l, | |
statAttemp: a, | |
buttonName: n | |
}), !a) return o.events.trigger("stat_lvlup", this.get("id")), i = m(e, l), new u(i).claim(c); | |
}, e.prototype.onBuyError = function(t) { | |
var e, s, n, r, a; | |
i.log(t); | |
try { | |
n = t.data, s = n[0], e = n[1], a = s, r = e[0]; | |
} catch (e) { | |
a = d("Error"), r = t.message; | |
} | |
return o.showError(), l.reject(t); | |
}, e; | |
}(a); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), n = s(68), c = s(12), l = s(20), y = s(114), i = 11e4, r = 110023, u = 18e6, | |
t.exports = a = function() { | |
function t() { | |
this.timeLeft = d(this.timeLeft, this), this.onUnlocked = d(this.onUnlocked, this), | |
this.conditionsAreMet = d(this.conditionsAreMet, this), this.cooldownPassed = d(this.cooldownPassed, this), | |
this.canStart = d(this.canStart, this), this.finish = d(this.finish, this), this.getRealItemsOnSale = d(this.getRealItemsOnSale, this), | |
this.getRealItemsList = d(this.getRealItemsList, this), this.getItemsListOnSale = d(this.getItemsListOnSale, this), | |
this.getItemsList = d(this.getItemsList, this), this.showItemDialog = d(this.showItemDialog, this), | |
this.showRealItemDialog = d(this.showRealItemDialog, this), this.tryShowRealItemDialog = d(this.tryShowRealItemDialog, this), | |
this.tryShowItemDialog = d(this.tryShowItemDialog, this), this.showDialog = d(this.showDialog, this), | |
this.shouldRefreshSale = d(this.shouldRefreshSale, this), this.onTabFocus = d(this.onTabFocus, this), | |
this.tryShowDialog = d(this.tryShowDialog, this), this.onStarted = d(this.onStarted, this), | |
this.tryStart = d(this.tryStart, this), this.initStarted = d(this.initStarted, this), | |
this.getSaleConf = d(this.getSaleConf, this), this.getConfig = d(this.getConfig, this), | |
this.isRealItemStarted = d(this.isRealItemStarted, this), this.isItemStarted = d(this.isItemStarted, this), | |
this.isStarted = d(this.isStarted, this), this.start = d(this.start, this); | |
} | |
return t.prototype.id = null, t.prototype.varName = "", t.prototype.type = null, | |
t.prototype.started = 0, t.prototype.endTimeout = 0, t.prototype.cooldownTimeout = 0, | |
t.prototype.varName = "__AITM_S", t.prototype.start = function() { | |
var t, e, s, n, r; | |
if (!this.isStarted()) return r = o.getUser(), t = r.get("vars").get(this.varName), | |
t ? (e = t[0], s = t[1], this.id = e, this.started = 1e3 * s, n = this.timeLeft(), | |
n > 0 ? (this.type = this.getSaleConf(this.id).type, this.endTimeout = setTimeout(this.finish, n), | |
this.initStarted(t)) : this.tryStart()) : this.tryStart(); | |
}, t.prototype.isStarted = function() { | |
return this.started; | |
}, t.prototype.isItemStarted = function() { | |
return this.isStarted && "item" === this.type; | |
}, t.prototype.isRealItemStarted = function() { | |
return this.isStarted && "real" === this.type; | |
}, t.prototype.getConfig = function() { | |
return y; | |
}, t.prototype.getSaleConf = function(t) { | |
return null == t && (t = null), t || this.started ? (null == t && (t = this.id), | |
c.findWhere(y.sales, { | |
id: t | |
})) : null; | |
}, t.prototype.initStarted = function() { | |
return o.events.trigger("itemSaleStarted", this), o.events.on("tabActiveChanged", this.onTabFocus), | |
c.defer(this.tryShowDialog); | |
}, t.prototype.tryStart = function() { | |
return !!this.canStart(!0) && n.callMethod("misc.item.sale").then(this.onStarted); | |
}, t.prototype.onStarted = function(t) { | |
return t.started && (this.id = t.id, this.started = 1e3 * t.started, this.type = this.getSaleConf(this.id).type, | |
this.endTimeout = setTimeout(this.finish, this.timeLeft()), o.events.trigger("itemSaleStarted", this), | |
o.analytics.dtd_custom_event("itemSaleStarted", { | |
id: this.id | |
}), c.defer(this.showDialog), o.events.on("tabActiveChanged", this.onTabFocus)), | |
this; | |
}, t.prototype.tryShowDialog = function() { | |
return "item" === this.type ? this.tryShowItemDialog() : "real" === this.type ? this.tryShowRealItemDialog() : void 0; | |
}, t.prototype.onTabFocus = function(t) { | |
if (t) return this.tryShowDialog(); | |
}, t.prototype.shouldRefreshSale = function() { | |
if (!this.finishTime || this.finishTime <= o.getTime()) return !0; | |
}, t.prototype.showDialog = function() { | |
return "item" === this.type ? this.showItemDialog() : "real" === this.type ? this.showRealItemDialog() : void 0; | |
}, t.prototype.tryShowItemDialog = function() { | |
var t, e, s; | |
if (s = o.getUser().get("vars"), e = s.get("item_sale_time") || 0, t = o.getUser().get("battle").getDPS().gt(0), | |
(!e || o.getTime() - e > u) && t) return this.showItemDialog(); | |
}, t.prototype.tryShowRealItemDialog = function() { | |
var t, e; | |
if (e = o.getUser().get("vars"), t = e.get("real_item_sale_time") || 0, !t || o.getTime() - t > u) return this.showRealItemDialog(); | |
}, t.prototype.showRealItemDialog = function() { | |
var t, e; | |
if (e = o.getUser().get("vars"), t = this.getRealItemsOnSale(), t && t.length) return e.setVar("real_item_sale_time", o.getTime()), | |
o.show({ | |
popup: { | |
type: "crownSale", | |
queued: !0, | |
data: { | |
pack: t[t.length - 1] | |
} | |
} | |
}); | |
}, t.prototype.showItemDialog = function() { | |
var t; | |
return t = o.getUser().get("vars"), t.setVar("item_sale_time", o.getTime()), o.show({ | |
popup: { | |
type: "sale", | |
queued: !0 | |
} | |
}); | |
}, t.prototype.getItemsList = function() { | |
return this.isStarted() && "item" === this.type ? this.getSaleConf().items : this.getConfig().default_items; | |
}, t.prototype.getItemsListOnSale = function() { | |
var t; | |
return t = this.getItemsList(), c.filter(t, function(t) { | |
return t >= i && t <= r; | |
}); | |
}, t.prototype.getRealItemsList = function() { | |
return this.isStarted() && "real" === this.type ? this.getSaleConf().items : this.getConfig().default_real_items; | |
}, t.prototype.getRealItemsOnSale = function() { | |
var t, e, s, n, r, i, a; | |
if (!this.isStarted()) return []; | |
for (e = this.getRealItemsList(), r = [], s = o.getUser().get("items"), t = 0, n = e.length; t < n; t++) a = e[t], | |
i = s.getDescriptor(parseInt(a)), (i.discount || i.saleLabel) && r.push(i); | |
return r; | |
}, t.prototype.finish = function() { | |
return clearTimeout(this.endTimeout), o.events.trigger("itemSaleFinished", this), | |
o.events.off("tabActiveChanged", this.onTabFocus), this.tryStart(); | |
}, t.prototype.canStart = function(t) { | |
return !(!this.cooldownPassed(t) || !this.conditionsAreMet(t)); | |
}, t.prototype.cooldownPassed = function(t) { | |
var e, s; | |
return !(e = this.getSaleConf()) || (s = o.getTime() - (this.started + 1e3 * e.term + (1e3 * e.cooldown || 0)), | |
s > 0 ? (clearTimeout(this.cooldownTimeout), !0) : (t && (this.cooldownTimeout = setTimeout(this.tryStart, -s)), | |
!1)); | |
}, t.prototype.conditionsAreMet = function(t) { | |
var e, s, n; | |
return s = this.getConfig(), n = o.getUser(), !(s.lock && (e = new l(s.lock), !e.test(n, this.onUnlocked))) || (t && (e.watch(n), | |
e.on("complete", function(t) { | |
return function() { | |
return t.onUnlocked(); | |
}; | |
}(this))), !1); | |
}, t.prototype.onUnlocked = function() { | |
return this.tryStart(); | |
}, t.prototype.timeLeft = function(t) { | |
var e, s; | |
return null == t && (t = 0), e = this.getSaleConf(), (t = t || this.started) ? (s = t + 1e3 * e.term - o.getTime(), | |
s > 0 ? s : 0) : 0; | |
}, t; | |
}(); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), n = s(68), d = s(12), u = s(70), l = s(25), a = s(24), c = s(63), y = s(20), | |
r = s(8), x = s(7).formatBig, p = s(116), t.exports = i = function() { | |
function t() { | |
this.onClaimError = f(this.onClaimError, this), this.timeLeft = f(this.timeLeft, this), | |
this.onUnlocked = f(this.onUnlocked, this), this.conditionsAreMet = f(this.conditionsAreMet, this), | |
this.showDialog = f(this.showDialog, this), this.onStarted = f(this.onStarted, this), | |
this.tryStart = f(this.tryStart, this), this.initStarted = f(this.initStarted, this), | |
this.onComplete = f(this.onComplete, this), this.isComplete = f(this.isComplete, this), | |
this.onClaimReward = f(this.onClaimReward, this), this.claimReward = f(this.claimReward, this), | |
this.getObjective = f(this.getObjective, this), this.getProgressData = f(this.getProgressData, this), | |
this.getProgressValue = f(this.getProgressValue, this), this.reborn = f(this.reborn, this), | |
this.beforeReborn = f(this.beforeReborn, this), this.getDescById = f(this.getDescById, this), | |
this.start = f(this.start, this), this.currentId = null, this.finished = null, this.objective = null, | |
this.finishedQuests = null; | |
} | |
return t.prototype.varName = "__DAILY_QUEST", t.prototype.start = function() { | |
var t, e; | |
return e = o.getUser(), t = e.get("vars").get(this.varName), t ? this.initStarted(t) : this.tryStart(); | |
}, t.prototype.getDescById = function(t) { | |
var e; | |
return e = t || this.currentId, e ? d.findWhere(p.quests, { | |
id: e | |
}) : null; | |
}, t.prototype.beforeReborn = function() { | |
return this.currentProgressValue = this.getProgressValue(); | |
}, t.prototype.reborn = function() { | |
var t, e, s, n, r, i, a; | |
if (!this.objective) return null; | |
this.objective.updateConditionOnReborn(this.currentProgressValue), r = this.finishedQuests, | |
i = []; | |
for (n in r) e = r[n], t = this.getDescById(parseInt(n)), a = new c(t.reward), i.push(function() { | |
var t, n, r; | |
for (r = [], s = t = 1, n = e; 1 <= n ? t <= n : t >= n; s = 1 <= n ? ++t : --t) r.push(a.claimMultipliers(o.getUser())); | |
return r; | |
}()); | |
return i; | |
}, t.prototype.getProgressValue = function() { | |
var t, e, s, n, i, a, l, u, c; | |
return this.objective ? (l = this.objective.attributes, i = l.initialValue, c = l.value, | |
e = l.counter, (t = l.condition) ? (n = t.get("counters")[e], n || (n = this.objective.getGoalValue()), | |
u = n.minus(c), a = r(o.getUser().get("counters").get(e)), s = a.minus(u), s = s.gt(c) ? c : s) : c) : null; | |
}, t.prototype.getProgressData = function() { | |
var t, e, s, n, o, i; | |
return this.objective ? (o = this.objective.attributes, i = o.value, t = o.counter, | |
e = this.getProgressValue(), n = x(e) + "/" + x(i), s = r(e).div(i).times(100).toString() + "%", | |
{ | |
progress: n, | |
percentProgress: s | |
}) : null; | |
}, t.prototype.getObjective = function(t, e) { | |
var s, n, o; | |
return n = t, s = this.getDescById(n), o = new u(s.objective), o.setState(e), o; | |
}, t.prototype.claimReward = function() { | |
var t; | |
return t = n.callMethod("misc.dailyquest.claim"), t.then(this.onClaimReward).catch(this.onClaimError); | |
}, t.prototype.onClaimReward = function(t) { | |
var e, s, n, r, i; | |
if (n = t.reward, e = t.finished, s = t.finishedQuests, n && (i = o.getUser(), n = new c(t.reward), | |
n.claim(i), this.finished = 1e3 * e, this.finishedQuests = s, o.analytics.amp_event("dailyQuestRewardClaimed", { | |
questId: this.currentId | |
}), o.analytics.dtd_custom_event("dailyQuestRewardClaimed", { | |
questId: this.currentId | |
}), this.currentId = null, r = this.timeLeft(this.finished) - o.getTime(), o.events.trigger("dailyQuestFinished"), | |
r > 0)) return clearTimeout(this.endTimeout), this.endTimeout = setTimeout(this.tryStart, r); | |
}, t.prototype.isComplete = function() { | |
return !!this.objective && this.objective.isFinished(); | |
}, t.prototype.onComplete = function() { | |
return o.events.trigger("dailyQuestCompleted"), this.showDialog(), this.objective.off("complete", this.onComplete); | |
}, t.prototype.initStarted = function(t) { | |
var e, s, n, r, i, a, l; | |
return e = t[0], r = t[1], a = t[2], s = t[3], i = t[4], n = t[5], this.finishedQuests = n, | |
s ? (this.finished = 1e3 * s, l = this.timeLeft(this.finished) - o.getTime(), l > 0 ? (clearTimeout(this.endTimeout), | |
this.endTimeout = setTimeout(this.tryStart, l)) : this.tryStart()) : (this.currentId = e, | |
this.started = 1e3 * a, this.objective = this.getObjective(e, i), this.isComplete() ? this.onComplete() : this.objective.on("complete", this.onComplete)), | |
o.events.trigger("dailyQuestStarted", this); | |
}, t.prototype.tryStart = function() { | |
return !!this.conditionsAreMet() && (n.callMethod("misc.dailyquest.start").then(this.onStarted), | |
!0); | |
}, t.prototype.onStarted = function(t) { | |
var e, s, n, r; | |
if (t) return e = t.currentId, r = t.started, n = t.objective, s = t.finishedQuests, | |
this.currentId = e, this.finishedQuests = s, this.started = 1e3 * r, this.finished = null, | |
this.objective = this.getObjective(e, n), this.objective.on("complete", this.onComplete), | |
this.showDialog(), o.events.trigger("dailyQuestStarted", this), o.analytics.amp_event("dailyQuestStarted", { | |
questId: e | |
}), o.analytics.dtd_custom_event("dailyQuestStarted", { | |
questId: e | |
}), this; | |
}, t.prototype.showDialog = function() { | |
return o.show({ | |
popup: { | |
type: "questoffer", | |
queued: !0 | |
} | |
}); | |
}, t.prototype.conditionsAreMet = function() { | |
var t, e; | |
return e = o.getUser(), t = new y(p.lock), !!t.test(e, this.onUnlocked) || (t.watch(e), | |
t.on("complete", function(t) { | |
return function() { | |
return t.onUnlocked(); | |
}; | |
}(this)), !1); | |
}, t.prototype.onUnlocked = function() { | |
return this.tryStart(); | |
}, t.prototype.timeLeft = function(t) { | |
var e; | |
return null == t && (t = 0), (t = t || this.finished) ? (e = t + 1e3 * p.term, e > 0 ? e : 0) : 0; | |
}, t.prototype.onClaimError = function(t) { | |
return a.log(t); | |
}, t; | |
}(); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), n = s(68), a = s(12), i = s(20), l = s(118), t.exports = r = function() { | |
function t() { | |
this.timeLeft = u(this.timeLeft, this), this.onUnlocked = u(this.onUnlocked, this), | |
this.conditionsAreMet = u(this.conditionsAreMet, this), this.canStart = u(this.canStart, this), | |
this.finish = u(this.finish, this), this.getNoobPack = u(this.getNoobPack, this), | |
this.getKingPack = u(this.getKingPack, this), this.showDialog = u(this.showDialog, this), | |
this.tryShowDialog = u(this.tryShowDialog, this), this.onStarted = u(this.onStarted, this), | |
this.isStarted = u(this.isStarted, this), this.onTabFocus = u(this.onTabFocus, this), | |
this.getConfig = u(this.getConfig, this), this.initStarted = u(this.initStarted, this), | |
this.tryStart = u(this.tryStart, this), this.start = u(this.start, this); | |
} | |
return t.prototype.started = 0, t.prototype.endTimeout = 0, t.prototype.varName = "__STARTER_PACK", | |
t.prototype.start = function() { | |
var t, e, s, n, r; | |
if (!this.isStarted() && (t = o.getUser().get("counters").get("ST_PK"), !t)) return r = o.getUser(), | |
e = r.get("vars").get(this.varName), e ? (s = e[0], s *= 1e3, n = this.timeLeft(s), | |
n > 0 ? (this.started = s, this.endTimeout = setTimeout(this.finish, n), this.initStarted(e)) : void 0) : this.tryStart(); | |
}, t.prototype.tryStart = function() { | |
return !!this.canStart(!0) && n.callMethod("misc.starter.pack").then(this.onStarted); | |
}, t.prototype.initStarted = function() { | |
return o.events.trigger("StarterPackStarted", this), o.events.on("tabActiveChanged", this.onTabFocus), | |
a.defer(this.tryShowDialog); | |
}, t.prototype.getConfig = function() { | |
return l; | |
}, t.prototype.onTabFocus = function(t) { | |
if (t) return this.tryShowDialog(); | |
}, t.prototype.isStarted = function() { | |
return this.started; | |
}, t.prototype.onStarted = function(t) { | |
return t.started && (this.started = 1e3 * t.started, this.endTimeout = setTimeout(this.finish, this.timeLeft()), | |
o.events.trigger("StarterPackStarted", this), a.defer(this.showDialog), o.events.on("tabActiveChanged", this.onTabFocus)), | |
this; | |
}, t.prototype.tryShowDialog = function() { | |
var t, e; | |
if (e = o.getUser().get("vars"), t = e.get("starter_pack_time") || 0, !t || o.getTime() - t > 1e3 * l.wait_before_show_again) return this.showDialog(); | |
}, t.prototype.showDialog = function() { | |
var t; | |
return t = o.getUser().get("vars"), t.setVar("starter_pack_time", o.getTime()), | |
o.show({ | |
popup: { | |
type: "starterPack", | |
data: this, | |
queued: !0 | |
} | |
}); | |
}, t.prototype.getKingPack = function() { | |
return o.getUser().get("items").get(110025); | |
}, t.prototype.getNoobPack = function() { | |
return o.getUser().get("items").get(110024); | |
}, t.prototype.finish = function() { | |
return clearTimeout(this.endTimeout), o.events.trigger("StarterPackFinished", this), | |
o.events.off("tabActiveChanged", this.onTabFocus), this.tryStart(); | |
}, t.prototype.canStart = function(t) { | |
return !!this.conditionsAreMet(t); | |
}, t.prototype.conditionsAreMet = function(t) { | |
var e, s; | |
return s = o.getUser(), e = new i(l.lock), !!e.test(s, this.onUnlocked) || (t && (e.watch(s), | |
e.on("complete", function(t) { | |
return function() { | |
return t.onUnlocked(); | |
}; | |
}(this))), !1); | |
}, t.prototype.onUnlocked = function() { | |
return this.tryStart(); | |
}, t.prototype.timeLeft = function(t) { | |
var e; | |
return null == t && (t = 0), (t = t || this.started) ? (e = t + 1e3 * l.term - o.getTime(), | |
e > 0 ? e : 0) : 0; | |
}, t; | |
}(); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), n = s(68), u = s(12), l = s(20), i = s(63), c = s(120), r = s(8), t.exports = a = function() { | |
function t() { | |
this.timeLeft = y(this.timeLeft, this), this.onUnlocked = y(this.onUnlocked, this), | |
this.conditionsAreMet = y(this.conditionsAreMet, this), this.canStart = y(this.canStart, this), | |
this.finish = y(this.finish, this), this.showDialog = y(this.showDialog, this), | |
this.tryShowDialog = y(this.tryShowDialog, this), this.onStarted = y(this.onStarted, this), | |
this.onBought = y(this.onBought, this), this.buy = y(this.buy, this), this.isStarted = y(this.isStarted, this), | |
this.onTabFocus = y(this.onTabFocus, this), this.getChest = y(this.getChest, this), | |
this.canShow = y(this.canShow, this), this.getConfig = y(this.getConfig, this), | |
this.initStarted = y(this.initStarted, this), this.isChestAvaliable = y(this.isChestAvaliable, this), | |
this.getKeysData = y(this.getKeysData, this), this.getCurrentChestId = y(this.getCurrentChestId, this), | |
this.tryStart = y(this.tryStart, this), this.start = y(this.start, this); | |
} | |
return t.prototype.started = 0, t.prototype.endTimeout = 0, t.prototype.varName = "__S_CT_QT", | |
t.prototype.varCompleteName = "S_CH_QT_COMPLETE", t.prototype.counterName = "__S_CH_QT_KEYS", | |
t.prototype.timeVarName = "super_chest_quest_time", t.prototype.start = function() { | |
var t, e, s, n; | |
if (!this.isStarted()) return n = o.getUser(), t = n.get("vars").get(this.varName), | |
t ? (e = t[0], e *= 1e3, s = this.timeLeft(e), s > 0 ? (this.started = e, this.endTimeout = setTimeout(this.finish, s), | |
this.initStarted(t)) : void 0) : this.tryStart(); | |
}, t.prototype.tryStart = function() { | |
return !!this.canStart(!0) && n.callMethod("super.chest.quest").then(this.onStarted); | |
}, t.prototype.getCurrentChestId = function() { | |
return parseInt(r(o.getUser().get("counters").get(this.counterName)).plus(1)); | |
}, t.prototype.getKeysData = function() { | |
var t, e, s, n, r, i; | |
return e = this.getCurrentChestId(), (t = this.getChest(e)) ? (i = t.price.keys, | |
s = o.getUser().get("resources").get("keys"), s = s > i ? i : s, r = s + "/" + i, | |
n = s / i * 100, { | |
keysRelation: r, | |
keysPc: n | |
}) : { | |
keysRelation: "0/0", | |
keysPc: 0 | |
}; | |
}, t.prototype.isChestAvaliable = function() { | |
var t; | |
return t = this.getKeysData().keysPc, 100 === t; | |
}, t.prototype.initStarted = function() { | |
return o.events.trigger("SuperChestQuestStarted", this), o.events.on("tabActiveChanged", this.onTabFocus), | |
u.defer(this.tryShowDialog); | |
}, t.prototype.getConfig = function() { | |
return c; | |
}, t.prototype.canShow = function() { | |
var t; | |
return t = o.getUser().get("vars").get(this.varCompleteName), this.isStarted() && !t; | |
}, t.prototype.getChest = function(t) { | |
return u.find(c.chests, function(e) { | |
return function(e) { | |
return e.id === t; | |
}; | |
}(this)); | |
}, t.prototype.onTabFocus = function(t) { | |
if (t) return this.tryShowDialog(); | |
}, t.prototype.isStarted = function() { | |
return this.started; | |
}, t.prototype.buy = function(t) { | |
var e, s; | |
if (s = o.getUser(), this.isStarted()) return s.get("resources").have(t.price) ? (e = n.callMethod("super.chest.quest.buy", { | |
_id: t.id | |
}), e.then(function(e) { | |
return function(s) { | |
return e.onBought(s, t); | |
}; | |
}(this))) : Promise.reject(new Error(_tr("Don't have enough: {resource}", { | |
resource: _tr("Keys") | |
}))); | |
}, t.prototype.onBought = function(t, e) { | |
var s; | |
return s = o.getUser(), s.get("resources").spend(e.price), o.analytics.dtd_custom_event("super:chest:quest:id", { | |
id: e.id | |
}), new i(e.reward).claim(s); | |
}, t.prototype.onStarted = function(t) { | |
return t.started && (this.started = 1e3 * t.started, this.endTimeout = setTimeout(this.finish, this.timeLeft()), | |
o.events.trigger("SuperChestQuestStarted", this), o.analytics.dtd_custom_event("super:chest:quest:start", { | |
id: 1 | |
}), u.defer(this.showDialog), o.events.on("tabActiveChanged", this.onTabFocus)), | |
this; | |
}, t.prototype.tryShowDialog = function() { | |
var t, e; | |
if (this.canShow()) return e = o.getUser().get("vars"), t = e.get(this.timeVarName) || 0, | |
!t || o.getTime() - t > 1e3 * c.wait_before_show_again ? this.showDialog() : void 0; | |
}, t.prototype.showDialog = function() { | |
var t; | |
return t = o.getUser().get("vars"), t.setVar(this.timeVarName, o.getTime()), o.show({ | |
popup: { | |
type: "chestQuest" | |
} | |
}); | |
}, t.prototype.finish = function() { | |
return clearTimeout(this.endTimeout), o.events.trigger("SuperChestQuestFinished", this), | |
o.events.off("tabActiveChanged", this.onTabFocus); | |
}, t.prototype.canStart = function(t) { | |
return !!this.conditionsAreMet(t); | |
}, t.prototype.conditionsAreMet = function(t) { | |
var e, s; | |
return s = o.getUser(), e = new l(c.lock), !!e.test(s, this.onUnlocked) || (t && (e.watch(s), | |
e.on("complete", function(t) { | |
return function() { | |
return t.onUnlocked(); | |
}; | |
}(this))), !1); | |
}, t.prototype.onUnlocked = function() { | |
return this.tryStart(); | |
}, t.prototype.timeLeft = function(t) { | |
var e; | |
return null == t && (t = 0), (t = t || this.started) ? (e = t + 1e3 * c.term - o.getTime(), | |
e > 0 ? e : 0) : 0; | |
}, t; | |
}(); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), r = 3600, a = s(12), l = s(81), o = s(78), t.exports = i = function() { | |
function t(t) { | |
this.offlineReward = t, this.getNewHeroData = u(this.getNewHeroData, this), this.shouldShowPopup = u(this.shouldShowPopup, this), | |
this.getPopupData = u(this.getPopupData, this), this.init = u(this.init, this); | |
} | |
return t.prototype.init = function() { | |
if (window.serverTime - window.last_access > r && this.shouldShowPopup()) return a.defer(function(t) { | |
return function() { | |
return n.show({ | |
popup: { | |
type: "welcomeBack", | |
data: t.getPopupData() | |
} | |
}); | |
}; | |
}(this)); | |
}, t.prototype.getPopupData = function() { | |
var t, e, s, n; | |
return a.extend({}, this.getNewHeroData(), { | |
rewardGold: null != (t = this.offlineReward) && null != (e = t.res) ? e.gold : void 0, | |
rewardShards: null != (s = this.offlineReward) && null != (n = s.res) ? n.shards : void 0 | |
}); | |
}, t.prototype.shouldShowPopup = function() { | |
var t, e, s, n; | |
return (null != (t = this.offlineReward) && null != (e = t.res) ? e.gold : void 0) && (null != (s = this.offlineReward) && null != (n = s.res) ? n.shards : void 0); | |
}, t.prototype.getNewHeroData = function() { | |
var t, e, s, r, i, u, c, y, d; | |
return e = !1, d = n.getUser(), i = d.get("heroes"), u = a.object(i.map(function(t) { | |
return function(t) { | |
return [ t.get("id"), !0 ]; | |
}; | |
}(this))), c = a.filter(l, function(t) { | |
return function(t) { | |
return !u[t.id] && !t.special; | |
}; | |
}(this)), (s = c.length ? new o(c.shift()) : null) ? (y = s.getAffordableUpLevelAndCost(), | |
r = y.level, t = y.cost, e = n.getUser().get("resources").have({ | |
gold: t | |
}, !1), { | |
hero: s, | |
haveEnoughMoney: e | |
}) : { | |
hero: s, | |
haveEnoughMoney: e | |
}; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, f = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) h.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, h = {}.hasOwnProperty; | |
r = s(23), l = s(123), i = s(24), a = s(25), n = s(68), o = s(14), y = s(26)._tr, | |
c = s(12), p = s(124), d = s(76).randomInteger, t.exports = u = function(t) { | |
function e(t, s) { | |
this.onBuyError = x(this.onBuyError, this), this.onActivate = x(this.onActivate, this), | |
this.activate = x(this.activate, this), this.addStars = x(this.addStars, this), | |
this.reborn = x(this.reborn, this), this.activatedHeroId = x(this.activatedHeroId, this), | |
null == s && (s = {}), null == s.comparator && (s.comparator = function(t, e) { | |
return t.get("id") - e.get("id"); | |
}), t = c.map(p, function(e) { | |
var s; | |
return s = c.find(t, function(t) { | |
return t.id === e.id; | |
}), s || { | |
id: e.id | |
}; | |
}), e.__super__.constructor.call(this, t, s); | |
} | |
return f(e, t), e.prototype.model = l, e.prototype.activatedHeroId = function() { | |
var t, e, s, n; | |
for (s = this.models, t = 0, e = s.length; t < e; t++) if (n = s[t], n.get("activated")) return n.get("id"); | |
}, e.prototype.reborn = function() { | |
return this.each(function(t) { | |
return function(t) { | |
return t.reborn(); | |
}; | |
}(this)); | |
}, e.prototype.getDescriptors = function() { | |
return p; | |
}, e.prototype.getRandomHero = function() { | |
return this.models[d(0, this.length - 1)]; | |
}, e.prototype.addStars = function(t, e) { | |
var s; | |
return s = this.get(t), s ? s.addStars(e) : a.reject(y("No such hero")); | |
}, e.prototype.activate = function(t) { | |
var e, s; | |
return (s = this.get(t)) ? s.get("activated") ? a.resolve() : s.get("stars") ? (e = n.callMethod("super.heroes.activate", { | |
_id: s.get("id") | |
}), e.then(function(t) { | |
return function(e) { | |
return t.onActivate(e); | |
}; | |
}(this)).catch(this.onBuyError)) : (s.openChestPopup("hero"), a.resolve()) : a.reject(y("No such hero")); | |
}, e.prototype.onActivate = function(t) { | |
var e, s, n, r, i; | |
if (s = t.lastHeroId, r = t.newHeroId, i = o.getUser().get("vars"), s) { | |
if (e = this.get(s), !e) return a.reject(y("Deactivate fail. No such hero with id {lastHeroId}", { | |
lastHeroId: s | |
})); | |
e.deactivate(); | |
} | |
return (n = this.get(r)) ? (o.events.trigger("heroActivated"), i.set("__SH_AC", r), | |
o.analytics.dtd_custom_event("s:h:activate", { | |
id: r | |
}), n.activate()) : a.reject(y("Activate fail. No such hero with id {newHeroId}", { | |
newHeroId: r | |
})); | |
}, e.prototype.onBuyError = function(t) { | |
return o.showError(), i.log(t); | |
}, e; | |
}(r); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b, _, k = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, w = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) C.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, C = {}.hasOwnProperty; | |
p = s(12), c = s(25), u = s(22), r = s(8), n = s(68), f = s(7).formatBig, o = s(14), | |
x = s(26)._tr, i = s(24), _ = s(124), v = s(75), g = v.getSuperHeroCost, m = v.getSuperHeroBonus, | |
h = v.getStarsMultiplicator, b = s(125), a = b.ImageManager, d = b.UPGRADES_FOR_STARS, | |
l = 10, t.exports = y = function(t) { | |
function e(t, s) { | |
this.onBuyError = k(this.onBuyError, this), this.upgrade = k(this.upgrade, this), | |
this.onBought = k(this.onBought, this), this.lvlup = k(this.lvlup, this), this.updateMultiplier = k(this.updateMultiplier, this), | |
this.getBonus = k(this.getBonus, this), this.getMultiplier = k(this.getMultiplier, this), | |
this.getStarsMult = k(this.getStarsMult, this), this.addStars = k(this.addStars, this), | |
this.deactivate = k(this.deactivate, this), this.activate = k(this.activate, this), | |
this.reborn = k(this.reborn, this), this.getNextVisualStar = k(this.getNextVisualStar, this), | |
this.showChangesPreview = k(this.showChangesPreview, this), this.showPreviewFull = k(this.showPreviewFull, this), | |
this.isMaxUpgradeStarLvl = k(this.isMaxUpgradeStarLvl, this), this.openChestPopup = k(this.openChestPopup, this); | |
var n, r, i; | |
t instanceof e ? r = t : (i = p.find(_, function(e) { | |
return e.id === t.id; | |
}), r = p.extend({}, i, t)), n = o.getUser().get("vars").get("__SH_AC"), null == r.level && (r.level = 1), | |
r.activated = r.id === n, null == r.stars && (r.stars = 0), e.__super__.constructor.call(this, r, s), | |
this.get("imageManager").superHero = this; | |
} | |
return w(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
name: String, | |
description: String, | |
type: String, | |
rare: String, | |
level: Number, | |
stars: Number, | |
activated: Boolean, | |
mult: Object, | |
imageManager: a | |
} | |
}), e.prototype.openChestPopup = function(t) { | |
return null == t && (t = "details"), o.show({ | |
popup: { | |
type: "superChest", | |
data: { | |
chestId: this.get("type"), | |
source: t | |
} | |
} | |
}); | |
}, e.getDescriptor = function(t) { | |
return p.find(_, function(e) { | |
return e.id === t; | |
}); | |
}, e.prototype.getUpgradeLvl = function(t) { | |
var e; | |
return e = this.get("stars") + t, p.reduce(d, function(t, s) { | |
return s <= e ? ++t : t; | |
}, 0); | |
}, e.prototype.isMaxUpgradeStarLvl = function() { | |
return this.get("stars") >= d[d.length - 1]; | |
}, e.prototype.showPreviewFull = function() { | |
if (this.get("stars")) return o.show({ | |
popup: { | |
type: "superPreview", | |
data: { | |
name: this.get("name"), | |
image: this.get("imageManager").getFullImage() | |
} | |
} | |
}); | |
}, e.prototype.showChangesPreview = function() { | |
var t, e; | |
if (this.get("stars")) return e = o.getUser().get("vars"), t = r(e.get("PREVIEW") || 0), | |
e.setVar("PREVIEW", t.plus(1)), o.show({ | |
popup: { | |
type: "superPreviewChanges", | |
data: { | |
name: this.get("name"), | |
image: this.get("imageManager").getFullImage(), | |
imageNext: this.get("imageManager").getNextFullImage() | |
} | |
} | |
}); | |
}, e.prototype.getNextVisualStar = function() { | |
var t, e, s, n, o; | |
for (t = this.get("stars"), o = 0, e = 0, s = d.length; e < s && (n = d[e], o = n, | |
!(t < n)); e++) ; | |
return o; | |
}, e.prototype.reborn = function() { | |
return this.updateMultiplier({}, !1); | |
}, e.prototype.activate = function() { | |
return this.updateMultiplier({ | |
activated: !0 | |
}), this.set("activated", !0); | |
}, e.prototype.deactivate = function() { | |
return this.updateMultiplier({ | |
activated: !1 | |
}), this.set("activated", !1); | |
}, e.prototype.addStars = function(t) { | |
var e, s; | |
return null == t && (t = 1), e = o.getUser().get("counters"), s = this.get("stars") || 0, | |
t + s > l && (t = l - s), this.updateMultiplier({ | |
stars: s + t | |
}), this.set({ | |
stars: s + t | |
}), e.increment("SHST", t), e.increment("SH#S:" + this.get("id"), t); | |
}, e.prototype.getStarsMult = function(t) { | |
return null == t && (t = 0), h(this.get("stars") + t); | |
}, e.prototype.getMultiplier = function(t, s, n) { | |
var o, r, i, a, l; | |
if (null == t && (t = 0), null == s && (s = 0), null == n && (n = !1), i = e.getDescriptor(this.get("id")), | |
a = i.mult, o = m(a, t, s)) return r = n ? 1 : 10, l = o.div(r).div(100), { | |
value: l, | |
validTill: 0, | |
isMult: !1 | |
}; | |
}, e.prototype.getBonus = function(t, e) { | |
var s, n, o, r, i, a; | |
return o = e.level, i = e.stars, s = this.get("level") || 1, n = this.get("stars") || 1, | |
null == o && (o = 0), null == i && (i = 0), (r = this.getMultiplier(s + o, n + i, t)) ? (a = r.value.times(100), | |
a.gt(1) ? f(a) : a.toString()) : ""; | |
}, e.prototype.updateMultiplier = function(t, e) { | |
var s, n, r, i, a, l, u, c; | |
if (r = t.level, u = t.stars, s = t.activated, null == e && (e = !0), c = null != (l = this.get("mult")) ? l.type : void 0) return i = o.getUser().get("multipliers"), | |
null == r && (r = this.get("level")), null == u && (u = this.get("stars")), s = void 0 === s ? this.get("activated") : s, | |
n = this.getMultiplier(this.get("level"), this.get("stars"), this.get("activated")), | |
n && e && i.drop(c, n), a = this.getMultiplier(r, u, s), a ? i.add(c, a) : void 0; | |
}, e.prototype.getPrice = function(t) { | |
if (null == t && (t = 1), !(t < 1)) return { | |
essence: g(this.get("level") + t) | |
}; | |
}, e.prototype.lvlup = function(t, e) { | |
var s, r, i, a; | |
return null == t && (t = 1), null == e && (e = null), this.get("stars") ? (s = this.get("level"), | |
r = this.getPrice(t), a = o.getUser(), a.get("resources").have(r) ? (i = n.callMethod("super.heroes.lvlup", { | |
_id: this.get("id"), | |
source: e | |
}), i.then(function(t) { | |
return function(s) { | |
return t.onBought(s, r, e); | |
}; | |
}(this)).catch(this.onBuyError)) : c.reject(new Error(x("Don't have enough: {resource}", { | |
resource: x("Essence") | |
})))) : c.resolve(); | |
}, e.prototype.onBought = function(t, e, s) { | |
return o.getUser().get("resources").spend(e), this.upgrade(t.upgradeLevel, s); | |
}, e.prototype.upgrade = function(t, e) { | |
var s, n; | |
return null == t && (t = 1), s = this.get("level") || 0, n = s + t, this.updateMultiplier({ | |
level: n | |
}), this.set({ | |
level: n | |
}), o.analytics.dtd_custom_event("sh:lvl:buy", { | |
heroId: this.get("id"), | |
herolvl: n | |
}), o.getUser().get("counters").increment("SHLVL", t), o.getUser().get("counters").increment("SH#L:" + this.get("id"), t), | |
null; | |
}, e.prototype.onBuyError = function(t) { | |
var e, s, n, r, a; | |
i.log(t); | |
try { | |
n = t.data, s = n[0], e = n[1], a = s, r = e[0]; | |
} catch (e) { | |
a = x("Error"), r = t.message; | |
} | |
return o.showError(), c.reject(t); | |
}, e; | |
}(u); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, c = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) y.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, y = {}.hasOwnProperty; | |
l = s(12), r = s(22), n = s(14), a = [ 2, 3, 4, 5, 6, 7, 8, 9, 10 ], o = 10, i = function(t) { | |
function e() { | |
return this._getImgWithRatio = u(this._getImgWithRatio, this), this._getImg = u(this._getImg, this), | |
this.showChangesPreview = u(this.showChangesPreview, this), this.getNextFullImage = u(this.getNextFullImage, this), | |
this.getFullImage = u(this.getFullImage, this), this.getNextThumbnail = u(this.getNextThumbnail, this), | |
this.getThumbnail = u(this.getThumbnail, this), this.getNextIcon = u(this.getNextIcon, this), | |
this.getIcon = u(this.getIcon, this), this.getNextImage = u(this.getNextImage, this), | |
this.getImage = u(this.getImage, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return c(e, t), e.schema({ | |
attributes: { | |
images: Array, | |
icons: Array, | |
thumbnails: Array | |
} | |
}), e.prototype.getUpgradeLvl = function(t) { | |
var e; | |
return e = this.superHero.get("stars") + t, l.reduce(a, function(t, s) { | |
return s <= e ? ++t : t; | |
}, 0); | |
}, e.prototype.getImage = function() { | |
return this._getImg("images"); | |
}, e.prototype.getNextImage = function() { | |
return this._getImg("images", 1); | |
}, e.prototype.getIcon = function() { | |
return this._getImg("icons"); | |
}, e.prototype.getNextIcon = function() { | |
return this._getImg("icons", 1); | |
}, e.prototype.getThumbnail = function() { | |
return this._getImg("thumbnails"); | |
}, e.prototype.getNextThumbnail = function() { | |
return this._getImg("thumbnails", 1); | |
}, e.prototype.getFullImage = function() { | |
return this._getImg("fullimages"); | |
}, e.prototype.getNextFullImage = function() { | |
return this._getImg("fullimages", 1); | |
}, e.prototype.showChangesPreview = function() { | |
if (this.superHero.get("stars")) return n.show({ | |
popup: { | |
type: "superPreviewChanges", | |
data: { | |
name: this.get("name"), | |
image: this.getFullImage(), | |
imageNext: this.getNextFullImage() | |
} | |
} | |
}); | |
}, e.prototype._getImg = function(t, e) { | |
var s, n; | |
return null == e && (e = 0), n = this.getUpgradeLvl(e), s = this._getImgWithRatio(t), | |
"thumbnails" === t && 0 === n ? s[1] : n >= s.length ? s[s.length - 1] : s[n]; | |
}, e.prototype._getImgWithRatio = function(t) { | |
var e; | |
return e = n.getDevicePixelRatio(), 2 === e && (t += "@2x"), this.get(t); | |
}, e; | |
}(r), t.exports = { | |
ImageManager: i, | |
UPGRADES_FOR_STARS: a | |
}; | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), n = s(68), y = s(12), r = s(8), d = s(26)._tr, x = s(127), i = s(24), | |
a = s(25), c = s(20), l = s(63), p = "LT_SH_AC", t.exports = u = function() { | |
function t() { | |
this.onBuyError = f(this.onBuyError, this), this.isAvailable = f(this.isAvailable, this), | |
this.getAvailableHeroes = f(this.getAvailableHeroes, this), this.getHeroesList = f(this.getHeroesList, this), | |
this.addSuperHero = f(this.addSuperHero, this), this.onAnimationEnd = f(this.onAnimationEnd, this), | |
this.showActionStart = f(this.showActionStart, this), this.init = f(this.init, this), | |
this.onBought = f(this.onBought, this), this.getPrice = f(this.getPrice, this), | |
this.getDesc = f(this.getDesc, this), this.buy = f(this.buy, this); | |
} | |
return t.prototype.buy = function(t, e, s) { | |
var r, i, l; | |
return null == t && (t = 1), null == e && (e = "crowns"), null == s && (s = null), | |
r = this.getPrice(t, e), l = o.getUser(), l.get("resources").have(r) ? (i = n.callMethod("super.chest.buy", { | |
chestId: t, | |
resource: e, | |
source: s | |
}), i.then(function(e) { | |
return function(n) { | |
return e.onBought(n, r, s, t); | |
}; | |
}(this)).catch(this.onBuyError)) : a.reject(new Error(d("Don't have enough: {resource}", { | |
resource: d("Crowns") | |
}))); | |
}, t.prototype.getDesc = function(t) { | |
return y.findWhere(x, function(e) { | |
return function(e) { | |
return e.id === t; | |
}; | |
}(this)); | |
}, t.prototype.getPrice = function(t, e) { | |
var s, n; | |
return null == e && (e = "crowns"), s = this.getDesc(t), n = {}, n["" + e] = s.price[e], | |
n; | |
}, t.prototype.onBought = function(t, e, s, n) { | |
return t.heroId ? (o.events.trigger("chestBuyed"), o.analytics.dtd_custom_event("sh:chest:buy", { | |
chestId: n, | |
heroId: t.heroId, | |
stars: t.stars, | |
src: s | |
}), o.getUser().get("resources").spend(e), t) : a.reject(new Error("SuperChest on bought problem. No heroId")); | |
}, t.prototype.init = function() { | |
var t, e, s, n, r, i, a, l, u; | |
for (l = o.getUser(), u = l.get("vars"), a = [], s = 0, r = x.length; s < r && (t = x[s], | |
e = t.id, n = u.get(p) || 0, !(n >= e)); s++) i = new c(t.lock), i.test(l) ? a.push(this.showActionStart(e)) : (i.watch(l), | |
a.push(i.on("complete", function(t) { | |
return function() { | |
return t.showActionStart(e); | |
}; | |
}(this)))); | |
return a; | |
}, t.prototype.showActionStart = function(t) { | |
return o.getUser().get("vars").setVar(p, t), y.defer(function(e) { | |
return function() { | |
return o.show({ | |
popup: { | |
type: "superActionStart", | |
data: { | |
chestId: t | |
} | |
} | |
}); | |
}; | |
}(this)); | |
}, t.prototype.onAnimationEnd = function(t) { | |
return this.addSuperHero(t); | |
}, t.prototype.addSuperHero = function(t) { | |
var e, s; | |
return e = t.heroId, s = t.stars, o.getUser().get("superHeroes").addStars(e, s); | |
}, t.prototype.getHeroesList = function(t) { | |
var e; | |
return e = o.getUser().get("superHeroes"), y.filter(e.models, function(e) { | |
return function(e) { | |
return e.get("type") === t; | |
}; | |
}(this)); | |
}, t.prototype.getAvailableHeroes = function(t) { | |
var e; | |
return e = this.getHeroesList(t), y.filter(e, function(t) { | |
return function(t) { | |
return t.get("stars") < 10; | |
}; | |
}(this)); | |
}, t.prototype.isAvailable = function(t) { | |
return this.getAvailableHeroes(t).length > 0; | |
}, t.prototype.onBuyError = function(t) { | |
var e, s, n, r, l; | |
i.log(t); | |
try { | |
n = t.data, s = n[0], e = n[1], l = s, r = e[0]; | |
} catch (e) { | |
l = d("Error"), r = t.message; | |
} | |
return o.showError(), a.reject(t); | |
}, t; | |
}(); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), n = s(68), u = s(12), r = s(8), c = s(129), a = s(24), l = s(63), t.exports = i = function() { | |
function t() { | |
this.finish = y(this.finish, this), this.timeLeft = y(this.timeLeft, this), this.isTimeLeft = y(this.isTimeLeft, this), | |
this.onSpend = y(this.onSpend, this), this.onFail = y(this.onFail, this), this.spend = y(this.spend, this), | |
this.onAsk = y(this.onAsk, this), this.askNewChests = y(this.askNewChests, this), | |
this.getChestsAmount = y(this.getChestsAmount, this), this.getMaxChest = y(this.getMaxChest, this), | |
this.init = y(this.init, this), this.data = y(this.data, this), this.started = null, | |
this.lastTimeAsked = null, this.spendedChests = r(0); | |
} | |
return t.prototype.data = function() { | |
return o.getUser().get("vars").get("__CHESTS"); | |
}, t.prototype.init = function() { | |
var t, e, s, n, i, a; | |
if (i = o.getUser(), t = i.get("counters"), a = r(t.get("VIPLVL")), !a.eq(0)) return e = this.data(), | |
e && !this.isTimeLeft() ? (n = e[0], s = e[1], this.started = n, this.spendedChests = s, | |
this.endTimeout = setTimeout(this.finish, this.timeLeft(n) - o.getTime())) : this.askNewChests(); | |
}, t.prototype.getMaxChest = function() { | |
return r(o.getUser().get("counters").get("FCHEST")); | |
}, t.prototype.getChestsAmount = function() { | |
return this.getMaxChest().minus(this.spendedChests); | |
}, t.prototype.askNewChests = function() { | |
if (this.isTimeLeft()) return n.callMethod("misc.chest.ask").then(this.onAsk); | |
}, t.prototype.onAsk = function(t) { | |
var e, s, n, r, i, a; | |
return n = t.started, s = t.spendedChests, i = o.getTime(), a = 0, this.lastTimeAsked && (e = i - this.lastTimeAsked, | |
e < 36e5 && (a = e < 1e3 ? 2e3 : 2 * e)), this.lastTimeAsked = i, this.started = 1e3 * n, | |
this.spendedChests = s, clearTimeout(this.endTimeout), r = this.timeLeft(this.started) - o.getTime(), | |
r = r > 0 ? r : 0, this.endTimeout = setTimeout(this.finish, r + a), o.getUser().get("vars").set("__CHESTS", [ n, s ]), | |
o.events.trigger("chestsChanged", this); | |
}, t.prototype.spend = function() { | |
var t; | |
if (t = this.getMaxChest(), t.gt(this.spendedChests)) return n.callMethod("misc.chest.spend").then(this.onSpend).catch(this.onFail); | |
}, t.prototype.onFail = function(t) { | |
return a.log(t), o.showError(); | |
}, t.prototype.onSpend = function(t) { | |
return new l(c.reward).claim(o.getUser()), o.show({ | |
popup: { | |
type: "chest" | |
} | |
}), o.analytics.dtd_custom_event("chest:spend", { | |
params: "none" | |
}), this.onAsk(t); | |
}, t.prototype.isTimeLeft = function() { | |
var t, e, s, n; | |
return !(e = this.data()) || (s = e[0], t = e[1], n = this.timeLeft(s) - o.getTime(), | |
n <= 0); | |
}, t.prototype.timeLeft = function(t) { | |
var e; | |
return null == t && (t = 0), (t = t || this.started) ? (e = t + 1e3 * c.term, e > 0 ? e : 0) : 0; | |
}, t.prototype.finish = function() { | |
return this.started = 0, clearTimeout(this.endTimeout), this.init(); | |
}, t; | |
}(); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) u.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, u = {}.hasOwnProperty; | |
n = s(23), o = s(131), a = s(132), i = s(12), t.exports = r = function(t) { | |
function e(t, s) { | |
var n; | |
n = i.map(a, function(t) { | |
var e; | |
return e = new o(t); | |
}), e.__super__.constructor.call(this, n, s); | |
} | |
return l(e, t), e.prototype.model = o, e.prototype.getTab = function(t) { | |
return this.findWhere({ | |
tabName: t | |
}); | |
}, e; | |
}(n); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, c = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) y.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, y = {}.hasOwnProperty; | |
r = s(22), o = s(8), a = s(12), i = s(20), n = s(14), t.exports = l = function(t) { | |
function e() { | |
return this.isLocked = u(this.isLocked, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return c(e, t), e.schema({ | |
attributes: { | |
tabName: String, | |
tooltipText: String, | |
to: String, | |
path: Object, | |
lock: i | |
} | |
}), e.prototype.isLocked = function() { | |
var t; | |
return !!this.get("lock") && !(null != (t = this.get("lock")) ? t.test(n.getUser(), !1) : void 0); | |
}, e; | |
}(r); | |
}, , function(t, e, s) { | |
var n, o, r, i, a, l = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, u = {}.hasOwnProperty; | |
o = s(14), r = s(25), i = s(12), a = s(24).log, t.exports = n = function() { | |
function t() { | |
this.dtd_custom_event = l(this.dtd_custom_event, this), this.dtd_event = l(this.dtd_event, this), | |
this.amp_set = l(this.amp_set, this), this.amp_event = l(this.amp_event, this), | |
this.pageView = l(this.pageView, this), this.error = l(this.error, this), this.event = l(this.event, this), | |
this.set = l(this.set, this), this.send = l(this.send, this); | |
} | |
return t.prototype.send = function(t, e) { | |
var s, n, o, r; | |
if (null == e && (e = {}), r = e.hitCallback || function() {}, n = function() { | |
return clearTimeout(o), "function" == typeof r && r(), r = null; | |
}, o = setTimeout(n, 1e3), e.hitCallback = n, s = [ "send", t, e ], "undefined" != typeof ga && i.isFunction(ga)) return ga.apply(window, s); | |
}, t.prototype.set = function(t, e) { | |
return "undefined" != typeof ga && i.isFunction(ga) ? ga("set", t, e) : a("Analytics", "set", t, e); | |
}, t.prototype.event = function() { | |
var t, e, s, n, o; | |
for (s = [], n = 0, o = arguments.length; n < o; n++) t = arguments[n], s.push(t); | |
return e = [ "send", "event" ].concat(s), "undefined" != typeof ga && i.isFunction(ga) ? ga.apply(window, e) : a("Analytics", e), | |
null; | |
}, t.prototype.error = function(t, e) { | |
return this.send("exception", { | |
exDescription: t, | |
exFatal: e ? 1 : 0 | |
}); | |
}, t.prototype.pageView = function(t, e) { | |
var s, n; | |
return s = [ "send", "pageview" ], n = {}, t && (n.page = t), e && (n.title = e), | |
s.push(n), "undefined" != typeof ga && i.isFunction(ga) ? ga.apply(window, s) : a("Analytics", s); | |
}, t.prototype.amp_event = function(t, e) { | |
var s; | |
if (s = o.getUser().get("vars").get("test_user"), "undefined" != typeof window.amplitude && !s) return window.amplitude.getInstance().logEvent(t, e); | |
}, t.prototype.amp_set = function(t, e) { | |
var s, n; | |
if (n = o.getUser().get("vars").get("test_user"), "undefined" != typeof window.amplitude && !n) return s = new window.amplitude.Identify(), | |
s.set(t, e), window.amplitude.getInstance().identify(s); | |
}, t.prototype.dtd_event = function(t, e) { | |
var s, n; | |
if (s = window.devtodev, "undefined" != typeof s && (n = s[t], "function" == typeof n)) return n.apply(s, e); | |
}, t.prototype.dtd_custom_event = function(t, e) { | |
var s, n, o, r, a, l; | |
if (s = window.devtodev, "undefined" != typeof s) { | |
r = []; | |
for (o in e) u.call(e, o) && (l = e[o], n = parseInt(l), a = i.isString(l) ? "string" : "double", | |
r.push({ | |
name: o, | |
value: l, | |
type: a | |
})); | |
return s.customEvent(t, r); | |
} | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a, l, u, c, y, d, p, x, f, h, m, g, v, b, _, k, w = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
i = s(15), h = s(12), o = s(14), m = s(26)._tr, l = s(8), n = s(68), p = s(25), | |
x = s(63), y = s(24), _ = s(75), g = _.getMobRewardGold, v = _.getMobRewardShards, | |
k = _.roundDown, d = 5, r = "BattleQuantum", u = "Changing location", f = [ "charisma_res", "intelligence_res" ], | |
c = { | |
charisma_res: "CHM", | |
intelligence_res: "INTL" | |
}, b = function(t) { | |
return function(t) { | |
var e; | |
return e = c[t] || t, "C::LST_" + e + "_LOC"; | |
}; | |
}(this), t.exports = a = function() { | |
function t() { | |
this.changeLocation = w(this.changeLocation, this), this.onReborn = w(this.onReborn, this), | |
this.onNeedChangeLocation = w(this.onNeedChangeLocation, this), this.damageMonster = w(this.damageMonster, this), | |
this.updateMonsterHP = w(this.updateMonsterHP, this), this.killMonster = w(this.killMonster, this), | |
this.addKeyReward = w(this.addKeyReward, this), this.spawnMonster = w(this.spawnMonster, this), | |
this.logger = w(this.logger, this), this.startFight = w(this.startFight, this), | |
this.stopFight = w(this.stopFight, this), this.getBattle = w(this.getBattle, this), | |
this._updateProgress = w(this._updateProgress, this), this.onOneTimeDamage = w(this.onOneTimeDamage, this), | |
this.onGoldOnClick = w(this.onGoldOnClick, this), this.click = w(this.click, this), | |
this.getRewardOnClick = w(this.getRewardOnClick, this), this.getGoldRewardOnClick = w(this.getGoldRewardOnClick, this), | |
this.getResRewardOnClick = w(this.getResRewardOnClick, this), this.getFraction = w(this.getFraction, this), | |
this.sendClicks = w(this.sendClicks, this), this.beforeSendBatch = w(this.beforeSendBatch, this), | |
this.start = w(this.start, this); | |
window.killMonster = this.killMonster; // Export the symbol to global scope | |
} | |
var e, s, a, c, m, v, _, C, E, S, T, N; | |
return h.extend(t.prototype, i.Events), e = new l(0), S = new l(0), T = new l(0), | |
c = new l(0), a = 0, s = 0, m = 0, N = null, _ = !1, C = 0, E = !1, t.prototype.start = function() { | |
var t, e, s, n, i; | |
return i = o.getUser(), n = o.timer, n.remove(r), n.add(r, 1e3 / d), e = o.events, | |
e.on("battleStageClicked", this.click), e.on("needChangeLocation", this.onNeedChangeLocation), | |
e.on("plusDamage", this.onOneTimeDamage), e.on("goldOnClick", this.onGoldOnClick), | |
e.on("reborn", this.onReborn), e.on("stopFight", this.stopFight), e.on("startFight", this.startFight), | |
e.on("beforeSendBatch", this.beforeSendBatch), s = p.resolve(!0), t = { | |
promise: s | |
}, o.events.trigger("battleStarted", t), t.promise.then(this.startFight).then(function() { | |
return e.trigger("stageInitialized"); | |
}); | |
}, t.prototype.beforeSendBatch = function() { | |
return this.sendClicks(); | |
}, t.prototype.sendClicks = function() { | |
var t, e; | |
if (m && N) return t = this.getBattle(), e = t.get("locationId"), n.addToBatch("battle.clicks", { | |
clicks: m, | |
locationId: e, | |
reward: N | |
}).catch(function(t) { | |
return function(t) { | |
return y.log("Network error", t), o.showError(); | |
}; | |
}(this)), N = null, m = 0; | |
}, t.prototype.getFraction = function(t) { | |
if (c = c.plus(new l(new Number(t.toFixed(2)) - new Number(t.toFixed(0)))), c.gte(1)) return c = c.minus(1), | |
!0; | |
}, t.prototype.getResRewardOnClick = function(t, e, s, n) { | |
var r, i, a; | |
return r = this.getBattle(), a = r.getUnit(), i = r.get("locationId"), k(e(i, a.health).times(o.getUser().get("multipliers").get(t).value).times(a.isBoss ? n : s).round(0, 3), 3); | |
}, t.prototype.getGoldRewardOnClick = function() { | |
return this.getResRewardOnClick("gold", g, this.goldPercentFromMob, this.goldPercentFromBoss); | |
}, t.prototype.getRewardOnClick = function() { | |
var t, e, s, n; | |
if (this.goldPercentFromMob || this.goldPercentFromBoss) return n = this.getBattle().getUnit(), | |
t = this.getGoldRewardOnClick(), s = { | |
res: { | |
gold: t | |
} | |
}, e = new x(s); | |
}, t.prototype.click = function(t) { | |
var n, r, i, a; | |
return i = null, _ ? (s++, r = this.getBattle().getDPC(), t.dpc = r, a = this.getBattle().getUnit(), | |
e = e.plus(r), i = this.getRewardOnClick(), i && (n = function() { | |
return i.claim(o.getUser()), N || (N = new x()), N.add(i); | |
}, t.reward = i, o.events.trigger("goldenClick", t), m++, n()), this.trigger("click")) : t.dpc = 0; | |
}, t.prototype.onGoldOnClick = function(t) { | |
return this.goldPercentFromMob = t.goldPercentFromMob, this.goldPercentFromBoss = t.goldPercentFromBoss, | |
this.shardPercentFromMob = t.shardPercentFromMob, this.shardPercentFromBoss = t.shardPercentFromBoss; | |
}, t.prototype.onOneTimeDamage = function(t) { | |
return S = t.damage; | |
}, t.prototype._updateProgress = function() { | |
var t, n, r, i, u, c, y, d; | |
if (_ && (t = this.getBattle(), d = t.getUnit(), u = t.attributes.monsterHP, c = o.getTime(), | |
y = c - C, C = c, r = t.getDPS(), n = r.times(y / 1e3).plus(e), o.events.trigger("clickDamage", e), | |
S.gt(0) && (o.events.trigger("skillDamage", S), n = n.plus(S), T = n, S = new l(0)), | |
this.getFraction(n) && (n = n.plus(1)), n = k(new l(n.toFixed(0))), !n.lt(1) || d.timeLimit)) return e = new l(0), | |
a += s, s = 0, i = n.gte(u), i ? this.killMonster() : this.damageMonster(n, u, y), | |
t.set("changed", c); | |
}, t.prototype.getBattle = function() { | |
return o.getUser().get("battle"); | |
}, t.prototype.stopFight = function() { | |
return _ = !1, o.timer.off(r, this._updateProgress); | |
}, t.prototype.startFight = function() { | |
return _ = !0, C = o.getTime(), o.timer.on(r, this._updateProgress); | |
}, t.prototype.logger = function(t) {}, t.prototype.spawnMonsterPromise = null, | |
t.prototype.killMonsterPromise = null, t.prototype.spawnMonster = function() { | |
var t, e, s, n, r, i; | |
return this.changingLocation && this.spawnMonsterPromise ? p.reject(new Error(u)) : (n = p.resolve(!0), | |
e = { | |
promise: n | |
}, t = this.getBattle(), i = t.getUnit(), s = i.health, r = 1e3 * i.timeLimit, t.set({ | |
monsterHP: s, | |
timeLeft: r | |
}), o.events.trigger("spawnMonster", e), this.spawnMonsterPromise = e.promise.then(function(t) { | |
return function() { | |
return t.spawnMonsterPromise = null; | |
}; | |
}(this)).then(this.startFight)); | |
}, t.prototype.addKeyReward = function(t) { | |
var e, s, n, r, i, a; | |
if (a = o.getUser(), e = this.getBattle(), r = a.get("counters").get("C::MAXLOCK"), | |
s = a.get("superChestQuest"), n = e.get("locationId"), !(n % 10) && r.eq(n) && s.canShow()) return null != (i = t.res) ? i.keys = l(1) : void 0; | |
}, t.prototype.killMonster = function() { | |
var t, e, s, r, i, l, u, c, d, h, g, _, k, w, C, E; | |
for (E = o.getUser(), r = E.get("counters"), k = E.get("resources"), this.stopFight(), | |
t = this.getBattle(), d = t.get("locationId"), w = t.getUnit(), t.isLastLocation() && t.set("lastLocationMonstersKilled", t.get("lastLocationMonstersKilled") + 1), | |
t.set("monsterHP", 0), C = w.reward, C.res && (C.res = k.getMultipliedValues(C.res)), | |
N ? (i = N.add(C), N = null, m = 0) : i = C, this.addKeyReward(i), n.addToBatch("battle.monsterKilled", { | |
gameTime: o.getTime(), | |
reward: i, | |
clicks: a, | |
clicsInSec: r.get("CLKSEC"), | |
critClicks: r.get("CLKCRT"), | |
skillDamage: T | |
}).catch(function(t) { | |
return function(t) { | |
return y.log("Network error", t), o.showError(); | |
}; | |
}(this)), u = 0, c = f.length; u < c; u++) _ = f[u], i.res[_].gt(0) && (s = b(_), | |
r.set(s, d), t.unitCache = null); | |
return T = 0, this.logger(a), a = 0, g = new p(function(t) { | |
return function(t) { | |
return setTimeout(function() { | |
return t(); | |
}, 500); | |
}; | |
}(this)), l = { | |
promise: g | |
}, l.unit = w, t.unitCache = null, o.events.trigger("monsterKilled", l), e = function() { | |
return new x(w.reward).claim(E); | |
}, l.rewardPromise ? l.rewardPromise.then(e, e) : e(), t.locationIsFinished() ? (h = t.get("locationId") + 1, | |
t.set("lastLocationId", h), t.set("lastLocationMonstersKilled", 0), this.killMonsterPromise = l.promise, | |
l.promise.then(function(t) { | |
return function() { | |
return t.killMonsterPromise = null, t.changeLocation(h).then(function(t) { | |
return o.analytics.amp_event("LocChange", { | |
id: h | |
}), o.analytics.amp_set("LastLocation", h), o.analytics.dtd_event("levelUp", [ h ]), | |
t; | |
}); | |
}; | |
}(this)).catch(v)) : this.killMonsterPromise = l.promise.then(this.spawnMonster).then(function(t) { | |
return function() { | |
return t.killMonsterPromise = null; | |
}; | |
}(this)).catch(v); | |
}, t.prototype.updateMonsterHP = function(t, e) { | |
var s, n; | |
return s = this.getBattle(), n = s.getUnit(s.get("locationId")), null == t && (t = n.health), | |
null == e && (e = 1e3 * n.timeLimit), s.set({ | |
monsterHP: t, | |
timeLeft: e | |
}); | |
}, t.prototype.damageMonster = function(t, e, s) { | |
var n, r, i, a; | |
return n = this.getBattle(), a = n.getUnit(), r = k(e.minus(t)), i = n.get("timeLeft"), | |
a.isBoss && i ? i > s ? (n.set("timeLeft", n.get("timeLeft") - s), this.updateMonsterHP(r, n.get("timeLeft"))) : (this.changeLocation(n.get("locationId") - 1), | |
o.events.trigger("timeExpired")) : this.updateMonsterHP(r); | |
}, t.prototype.onNeedChangeLocation = function(t) { | |
return t.promise = this.changeLocation(t.locationId); | |
}, t.prototype.onReborn = function() { | |
return this.changeLocation(1, !0).catch(function(t) { | |
return function(e) { | |
if (e.message === u) return e.data.then(t.onReborn); | |
throw e; | |
}; | |
}(this)); | |
}, t.prototype.changingLocation = null, v = function(t) { | |
if (!t.message === u) throw t; | |
}, t.prototype.changeLocation = function(t, e) { | |
var s, r, i, l, c; | |
return this.changingLocation ? (i = new Error(u), i.data = this.changingLocation, | |
p.reject(i)) : (s = this.getBattle(), c = s.get("locationId"), l = s.get("lastLocationId"), | |
t !== c || e ? (r = function(e) { | |
return function() { | |
return e.stopFight(), s.unitCache = null, e.logger(a), a = 0, n.callMethod("battle.changeLocation", { | |
locationId: t | |
}).then(function(t) { | |
var n, r; | |
return r = t.locationId, s.set("locationId", r), n = { | |
locationId: r | |
}, n.promise = p.resolve(!0), o.events.trigger("locationChanged", n), n.promise.then(function(t) { | |
return e.changingLocation = null, t; | |
}).then(e.spawnMonster); | |
}).catch(function(t) { | |
return y.log("Network error", t), o.showError(), e.changingLocation = null; | |
}); | |
}; | |
}(this), this.changingLocation = this.killMonsterPromise ? this.killMonsterPromise.then(r) : this.spawnMonsterPromise ? this.spawnMonsterPromise.then(r) : r()) : p.resolve()); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), o = s(8), t.exports = r = function() { | |
function t() { | |
this.onCritClick = i(this.onCritClick, this), this.onClick = i(this.onClick, this), | |
this.updateClicks = i(this.updateClicks, this), this.onRoomBuy = i(this.onRoomBuy, this), | |
this.onClickDamage = i(this.onClickDamage, this), this.onSkillDamage = i(this.onSkillDamage, this), | |
this.onNewPicAdded = i(this.onNewPicAdded, this), this.onLocationChange = i(this.onLocationChange, this), | |
this.onMonsterKilled = i(this.onMonsterKilled, this), this.checkDps = i(this.checkDps, this), | |
this.checkMultiplier = i(this.checkMultiplier, this), this.onAddResource = i(this.onAddResource, this), | |
this.init = i(this.init, this); | |
} | |
var e, s; | |
return e = 0, s = 0, t.prototype.init = function() { | |
var t, e, s; | |
return e = n.timer, s = n.getUser(), e.on("second", this.updateClicks), t = n.events, | |
t.on("addResource", this.onAddResource), t.on("clickDamage", this.onClickDamage), | |
t.on("skillDamage", this.onSkillDamage), t.on("monsterKilled", this.onMonsterKilled), | |
t.on("locationChanged", this.onLocationChange), t.on("newPicAdded", this.onNewPicAdded), | |
t.on("roomBuy", this.onRoomBuy), s.get("multipliers").on("add change", this.checkMultiplier), | |
s.get("heroes").on("add change", this.checkDps), t.on("battleStageClicked", this.onClick), | |
t.on("critClick", this.onCritClick); | |
}, t.prototype.onAddResource = function(t) { | |
var e, s, r, i, a; | |
if (i = t.resourceAmount, a = t.value, r = t.name, e = n.getUser().get("counters"), | |
s = o(e.get("C::H:" + r)), e.increment("" + r, a), e.increment("C::" + r, a), i instanceof o && s.lt(i)) return e.increment("H:" + r, i.minus(s)); | |
}, t.prototype.checkMultiplier = function(t) { | |
if ("DPS" === t) return this.checkDps(); | |
}, t.prototype.checkDps = function() { | |
var t, e, s, r; | |
if (r = n.getUser(), t = n.getUser().get("counters"), e = o(t.get("DPS")), s = r.get("heroes").getDPS().times(r.get("multipliers").get("DPS").value), | |
e.lt(s)) return t.increment("DPS", s.minus(e)); | |
}, t.prototype.onMonsterKilled = function(t) { | |
var e, s; | |
return e = t.unit, s = n.getUser(), s.get("counters").increment("MSTRKL", 1), s.get("counters").increment("C::MSTRKL", 1), | |
e.isBoss ? s.get("counters").increment("BOSSKL", 1) : s.get("counters").increment("MOBKL", 1); | |
}, t.prototype.onLocationChange = function(t) { | |
var e, s, r, i, a, l; | |
if (i = t.locationId, i = o(i), e = n.getUser().get("counters"), s = o(e.get("C::MAXLOCK")), | |
r = o(e.get("MAXLOCK")), a = o(e.get("C::WMAXLOCK")), l = o(e.get("WMAXLOCK")), | |
s.lt(i) && (e.increment("C::MAXLOCK", i.minus(s)), e.increment("PASSLOCK", 1)), | |
a.lt(i) && e.increment("C::WMAXLOCK", i.minus(a).minus(1)), r.lt(i) && e.increment("MAXLOCK", i.minus(r)), | |
l.lt(i)) return e.increment("WMAXLOCK", i.minus(l).minus(1)); | |
}, t.prototype.onNewPicAdded = function(t) { | |
var e, s, o, r, i; | |
switch (o = t.stars, s = t.isFavorite, r = n.getUser(), i = r.get("vars"), e = r.get("counters"), | |
s && e.increment("FPictures", 1), i.get("PICS") || i.setVar("PICS", 1), e.increment("Pictures"), | |
o) { | |
case 1: | |
return e.increment("OSRPR"); | |
case 2: | |
return e.increment("TSRPR"); | |
case 3: | |
return e.increment("THSRPR"); | |
} | |
}, t.prototype.onSkillDamage = function(t) { | |
var e; | |
return e = n.getUser().get("counters"), e.increment("SLDMG", t), e.increment("C::SLDMG", t); | |
}, t.prototype.onClickDamage = function(t) { | |
var e; | |
return e = n.getUser().get("counters"), e.increment("SCLKDMG", t), e.increment("C::SCLKDMG", t); | |
}, t.prototype.onRoomBuy = function(t) { | |
var e; | |
if (e = n.getUser().get("counters"), e.increment("RM"), t.gt(0)) return e.increment("CBRM"); | |
}, t.prototype.updateClicks = function() { | |
var t, r, i, a, l; | |
if (i = n.getUser().get("counters"), t = o(i.get("CLKSEC")), r = o(i.get("CLKCRT")), | |
a = o(e), l = o(s), e = 0, s = 0, i.increment("CLK", a), t.lt(a) && i.increment("CLKSEC", a.minus(t)), | |
r.lt(l)) return i.increment("CLKCRT", a.minus(t)); | |
}, t.prototype.onClick = function() { | |
return e++; | |
}, t.prototype.onCritClick = function() { | |
return s++; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), o = s(8), t.exports = r = function() { | |
function t() { | |
this.onNotEnough = i(this.onNotEnough, this), this.init = i(this.init, this); | |
} | |
return t.prototype.init = function() { | |
var t; | |
return t = n.events, t.on("notEnough", this.onNotEnough); | |
}, t.prototype.onNotEnough = function(t) { | |
return "crowns" === t ? n.show({ | |
popup: { | |
type: "addcrowns" | |
} | |
}) : "essence" === t ? n.show({ | |
popup: { | |
type: "addessence" | |
} | |
}) : "strength_res" === t || "charisma_res" === t || "intelligence_res" === t || "luck_res" === t ? n.show({ | |
popup: { | |
type: "addstatgems", | |
data: { | |
type: t, | |
forced: !0 | |
} | |
} | |
}) : "gems" !== t ? n.show({ | |
popup: { | |
type: "addresource", | |
data: { | |
type: t, | |
forced: !0 | |
} | |
} | |
}) : void 0; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(14), r = s(8), t.exports = n = function() { | |
function t() { | |
this.onGotAchievment = i(this.onGotAchievment, this), this.init = i(this.init, this); | |
} | |
return t.prototype.init = function() { | |
var t, e, s; | |
return s = o.getUser(), e = s.get("quests"), t = e.where({ | |
type: "ach" | |
}), t.forEach(function(t) { | |
return function(e) { | |
var n; | |
return n = e.get("lock"), n.watch(s), n.on("complete", function() { | |
return t.onGotAchievment(e); | |
}); | |
}; | |
}(this)); | |
}, t.prototype.onGotAchievment = function(t) { | |
return o.events.trigger("showSlider", { | |
type: "achievment", | |
data: { | |
achievment: t | |
} | |
}); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
n = s(14), r = s(12), t.exports = o = function() { | |
function t() { | |
this.keyUp = i(this.keyUp, this), this.isAllKeysUp = i(this.isAllKeysUp, this), | |
this.isSomeKeysPressed = i(this.isSomeKeysPressed, this), this.isKeyPressed = i(this.isKeyPressed, this), | |
this.keyDown = i(this.keyDown, this), this.init = i(this.init, this); | |
} | |
var e; | |
return e = null, t.prototype.init = function() { | |
return this.state = {}, document.addEventListener("keydown", this.keyDown), document.addEventListener("keyup", this.keyUp); | |
}, t.prototype.keyDown = function(t) { | |
if (!this.state[t.keyCode]) return this.state[t.keyCode] = !0, n.events.trigger("keyPressed", t); | |
}, t.prototype.isKeyPressed = function(t) { | |
return this.state[parseInt(t)]; | |
}, t.prototype.isSomeKeysPressed = function(t) { | |
return r.some(r.map(t, this.isKeyPressed)); | |
}, t.prototype.isAllKeysUp = function(t) { | |
return !this.isSomeKeysPressed(t); | |
}, t.prototype.keyUp = function(t) { | |
return delete this.state[t.keyCode], n.events.trigger("keyUp", t); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
var n, o, r, i, a = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}; | |
o = s(8), n = s(14), i = s(12), t.exports = r = function() { | |
function t() { | |
this.getVipData = a(this.getVipData, this), this.getVipLvl = a(this.getVipLvl, this); | |
} | |
return t.prototype.getVipLvl = function() { | |
var t, e, s; | |
return e = n.getUser(), t = e.get("counters"), s = t.get("VIPLVL"), s instanceof o && (s = parseInt(s.toFixed())), | |
s; | |
}, t.prototype.getVipData = function() { | |
var t, e, s, r, a, l, u, c, y, d; | |
return c = n.getUser(), u = c.get("quests"), t = c.get("counters"), y = o(t.get("vip")), | |
d = u.where({ | |
type: "vip" | |
}), e = i.findWhere(d, { | |
id: 2e3 + this.getVipLvl() | |
}), r = i.findWhere(d, { | |
id: 2e3 + this.getVipLvl() + 1 | |
}), l = e ? e.get("objectives").models[0].get("value") : o(0), r ? (s = r.get("objectives").models[0].get("value"), | |
y = y.minus(l), s = s.minus(l)) : (s = o(l), y = s, y = s, s = s), a = y.div(s).times(100).round(0, 0).toString(), | |
{ | |
vipPoints: y, | |
nextValue: s, | |
pc: a | |
}; | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
function a(t, e, s, n) { | |
if (e[s]) { | |
var o = e[s]; | |
t[s] = function(t) { | |
o(t), t.isDefaultPrevented() || n(t); | |
}; | |
} else t[s] = n; | |
} | |
function l(t, e, s) { | |
if (e.setRef) { | |
var n = e.setRef; | |
t.setRef = function(t) { | |
n(t), s(t); | |
}; | |
} else t.setRef = s; | |
} | |
function u(t) { | |
var e = function(e) { | |
function s() { | |
o(this, s); | |
var t = r(this, e.apply(this, arguments)); | |
return t.setRef = t.setRef.bind(t), t.onLeave = t.onLeave.bind(t), t.onEnter = t.onEnter.bind(t), | |
t.handleProps = t.handleProps.bind(t), t.handleProps(t.props), t; | |
} | |
return i(s, e), s.prototype.handleProps = function(t) { | |
var e = c({}, t); | |
a(e, t, "onMouseEnter", this.onEnter), a(e, t, "onMouseLeave", this.onLeave), l(e, t, this.setRef), | |
this.myProps = e; | |
}, s.prototype.componentWillReceiveProps = function(t) { | |
this.handleProps(t); | |
}, s.prototype.onEnter = function(t) { | |
var e = t.position || "bottom", s = d.default.createElement("div", { | |
className: "tooltip" | |
}, d.default.createElement("div", { | |
className: "descr" | |
}, t.tooltipText)), n = (0, x.default)(this.el).offset(), o = void 0 == t.topDistance ? 65 : t.topDistance, r = { | |
top: n.top + o, | |
left: n.left - 112 + (0, x.default)(this.el).width() / 2, | |
width: 224 | |
}; | |
if ("right" == e) { | |
var i = t.leftDistance || 0; | |
r.left = n.left + (0, x.default)(this.el).width() + i; | |
} | |
if ("left" == e) { | |
var a = t.rightDistance || 0; | |
r.left = n.left - r.width - a; | |
} | |
h.default.events.trigger("showTooltip", { | |
children: s, | |
style: r, | |
parent: this | |
}); | |
}, s.prototype.onLeave = function() { | |
h.default.events.trigger("hideTooltip", { | |
parent: this | |
}); | |
}, s.prototype.setRef = function(t) { | |
t && (this.el = t); | |
}, s.prototype.render = function() { | |
return d.default.createElement(t, this.myProps); | |
}, s; | |
}(y.Component); | |
return e.displayName = t.displayName, e; | |
} | |
e.__esModule = !0; | |
var c = Object.assign || function(t) { | |
for (var e = 1; e < arguments.length; e++) { | |
var s = arguments[e]; | |
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]); | |
} | |
return t; | |
}, y = s(1), d = n(y), p = s(19), x = n(p), f = s(14), h = n(f); | |
e.default = u; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(7), d = (s(9), function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = c.default.getUser(); | |
t.get("counters").on("change:vip", this.__update), this.props.resources.on("change:crowns", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
user.get("counters").off("change:vip", this.__update), this.props.resources.off("change:crowns", this.__update); | |
}, e.prototype.buyCrowns = function(t) { | |
t.stopPropagation(), c.default.events.trigger("notEnough", "crowns"); | |
}, e.prototype.onVip = function(t) { | |
t.stopPropagation(), window.location.assign("#/bank/vip"); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.render = function() { | |
var t = this.props.resources.get("crowns"), e = c.default.vipModel.getVipLvl(); | |
return l.default.createElement("div", { | |
className: "vip-box" | |
}, l.default.createElement("div", { | |
className: "n-vip-btn lvl" + (e + "-1"), | |
onClick: this.onVip | |
}, l.default.createElement("div", { | |
className: "n-num" | |
}, (0, y.formatBig)(t)), l.default.createElement("div", { | |
className: "n-vip-plus", | |
onClick: this.buyCrowns | |
}))); | |
}, e; | |
}(a.Component)); | |
e.default = d; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(140), c = n(u), y = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this, e = this.props, s = e.className, n = e.onClick, o = e.children, r = e.onMouseLeave, i = e.setRef, a = e.onMouseEnter, u = e.tagName, c = u ? u : "div"; | |
return l.default.createElement(c, { | |
onMouseEnter: function() { | |
return a(t.props); | |
}, | |
onMouseLeave: r, | |
ref: i, | |
className: s, | |
onClick: n | |
}, o); | |
}, e; | |
}(a.Component); | |
y = (0, c.default)(y), e.default = y; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
e.__esModule = !0; | |
var o = s(68), r = n(o), i = s(9), a = s(26), l = s(14), u = n(l), c = s(19), y = n(c), d = s(1), p = n(d); | |
e.default = function(t) { | |
t.preventDefault(); | |
var e = u.default.getUser().get("registered"), s = p.default.createElement("div", { | |
className: "content" | |
}, p.default.createElement("div", { | |
className: "text-top" | |
}, (0, a._tr)("Welcome to FapTitans.com! Found an error? Have a question? Send a message and wait for answer.")), p.default.createElement("form", { | |
className: "feed-form" | |
}, p.default.createElement("div", { | |
className: "subject" | |
}, p.default.createElement("label", { | |
className: "tfield name" | |
}, (0, a._tr)("Subject"), p.default.createElement("input", { | |
id: "messageSubject", | |
type: "text", | |
className: "itext" | |
}))), (0, i.IF)(!e)(function() { | |
return p.default.createElement("div", { | |
className: "subject" | |
}, p.default.createElement("label", { | |
className: "tfield name" | |
}, (0, a._tr)("Your email"), p.default.createElement("input", { | |
id: "messageEmail", | |
type: "text", | |
className: "itext" | |
}))); | |
}), p.default.createElement("div", { | |
className: "subject message" | |
}, p.default.createElement("label", { | |
className: "tfield message" | |
}, (0, a._tr)("Message"), p.default.createElement("textarea", { | |
id: "messageText", | |
className: "itext" | |
}))))); | |
u.default.events.trigger("showDialog", { | |
type: "feedback", | |
data: { | |
title: (0, a._tr)("Customer service"), | |
content: s, | |
yesLabel: (0, a._tr)("Send Message"), | |
onOk: function() { | |
var t = (0, y.default)("#messageSubject").val(), s = (0, y.default)("#messageText").val(), n = (0, | |
y.default)("#messageEmail").val(), o = { | |
subject: t, | |
text: s | |
}; | |
e || (o.email = n), r.default.callMethod("misc.feedback.post", o); | |
}, | |
onExit: function() {} | |
} | |
}); | |
}; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = Object.assign || function(t) { | |
for (var e = 1; e < arguments.length; e++) { | |
var s = arguments[e]; | |
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]); | |
} | |
return t; | |
}, l = function() { | |
function t(t, e) { | |
for (var s = 0; s < e.length; s++) { | |
var n = e[s]; | |
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), | |
Object.defineProperty(t, n.key, n); | |
} | |
} | |
return function(e, s, n) { | |
return s && t(e.prototype, s), n && t(e, n), e; | |
}; | |
}(), u = s(1), c = n(u), y = s(19), d = n(y), p = s(14), x = n(p), f = (s(9), s(13)), h = (n(f), | |
s(12)), m = n(h), g = s(142), v = (n(g), s(145)), b = n(v), _ = (s(26), s(146)), k = n(_), w = s(147), C = n(w), E = s(148), S = n(E), T = s(149), N = n(T), P = s(150), O = n(P), M = s(151), B = n(M), R = s(152), j = n(R), I = s(153), U = n(I), A = 5, L = 30, D = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = 0; | |
(0, d.default)(".quests .quest").each(function() { | |
(0, d.default)(this).removeClass("open").css({ | |
animationDelay: 150 * t++ + "ms" | |
}).addClass("open"); | |
}); | |
}, e.prototype.render = function() { | |
var t = (x.default.getUser(), this.popupQuests), e = { | |
rightDistance: L, | |
topDistance: A | |
}, s = m.default.map(t, function(t) { | |
return c.default.createElement(B.default, a({ | |
quest: t, | |
key: t.get("id") | |
}, e)); | |
}); | |
return c.default.createElement("ul", { | |
className: "quests" | |
}, c.default.createElement(j.default, e), c.default.createElement(k.default, e), c.default.createElement(b.default, e), c.default.createElement(C.default, e), c.default.createElement(S.default, e), c.default.createElement(N.default, e), c.default.createElement(U.default, e), c.default.createElement(O.default, e), s); | |
}, l(e, [ { | |
key: "popupQuests", | |
get: function() { | |
var t = x.default.getUser().get("quests").models; | |
return m.default.filter(t, function(t) { | |
return t.get("popup"); | |
}); | |
} | |
} ]), e; | |
}(u.Component); | |
e.default = D; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(142), c = n(u), y = s(14), d = n(y), p = s(26), x = s(8), f = n(x), h = s(9), m = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.queueShining = function() { | |
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 5; | |
clearTimeout(s.shineTimeout), s.shineTimeout = setTimeout(s.shine, Math.random() * t * 1e3); | |
}, s.shine = function() { | |
s.setState({ | |
shiny: !0 | |
}), s.el && s.el.addEventListener(h.transitionEndName, s.fade); | |
}, s.fade = function() { | |
s.setState({ | |
shiny: !1 | |
}), s.el && s.el.removeEventListener(h.transitionEndName, s.fade), s.queueShining(); | |
}, s.el = null, s.regEl = function(t) { | |
s.el = t; | |
}, s.canShowButton = s.canShowButton.bind(s), s.updateState = s.updateState.bind(s), | |
s.shineTimeout = 0, s.state = { | |
showButton: s.canShowButton() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
this.queueShining(10), d.default.getUser().get("counters").on("change:C::HLVL", this.updateState), | |
d.default.events.on("SignUp", this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
clearTimeout(this.shineTimeout), d.default.getUser().get("counters").off("change:C::HLVL", this.updateState), | |
d.default.events.off("SignUp", this.updateState); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton; | |
}, e.prototype.updateState = function() { | |
this.setState({ | |
showButton: this.canShowButton() | |
}); | |
}, e.prototype.canShowButton = function() { | |
var t = d.default.getUser(), e = (0, f.default)(t.get("counters").get("C::HLVL")); | |
return !t.get("registered") && e.gt(3); | |
}, e.prototype.render = function() { | |
return this.state.showButton ? l.default.createElement(c.default, { | |
setRef: this.regEl, | |
className: "quest open reg-ic " + (this.state.shiny ? "shiny" : ""), | |
position: "left", | |
rightDistance: this.props.rightDistance, | |
topDistance: this.props.topDistance, | |
tagName: "li", | |
onClick: function(t) { | |
return d.default.show({ | |
popup: { | |
type: "signup" | |
} | |
}); | |
}, | |
tooltipText: (0, p._tr)("Get rewards!") | |
}, l.default.createElement("div", { | |
className: "icon-reg" | |
}), l.default.createElement("div", { | |
className: "icon-reg2" | |
})) : null; | |
}, e; | |
}(a.Component); | |
e.default = m; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(142), p = n(d), x = s(8), f = n(x), h = s(1), m = h.createElement, g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.canShowButton = s.canShowButton.bind(s), s.updateState = s.updateState.bind(s), | |
s.state = { | |
showButton: s.canShowButton() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
u.default.getUser().get("counters").on("change:C::HLVL", this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
u.default.getUser().get("counters").off("change:C::HLVL", this.updateState); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton; | |
}, e.prototype.updateState = function() { | |
this.setState({ | |
showButton: this.canShowButton() | |
}); | |
}, e.prototype.canShowButton = function() { | |
var t = u.default.getUser(), e = (0, f.default)(t.get("counters").get("C::HLVL")); | |
return e.gte(1e3); | |
}, e.prototype.render = function() { | |
if (!this.state.showButton) return null; | |
var t = this.props, e = t.rightDistance, s = t.topDistance; | |
return m(p.default, { | |
className: "quest open", | |
position: "left", | |
rightDistance: e, | |
topDistance: s, | |
onClick: function(t) { | |
return u.default.show({ | |
popup: { | |
type: "reborn" | |
} | |
}); | |
}, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Reborn") | |
}, m("img", { | |
className: "icon", | |
src: (0, c.cdnURL)("rc/ic-abil-reborn.png") | |
})); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(13), p = n(d), x = s(142), f = n(x), h = s(1), m = h.createElement, g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.canShowButton = s.canShowButton.bind(s), s.updateState = s.updateState.bind(s), | |
s.state = { | |
showButton: s.canShowButton() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
u.default.events.on("itemSaleStarted itemSaleFinished", this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
u.default.events.off("itemSaleStarted itemSaleFinished", this.updateState); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton; | |
}, e.prototype.updateState = function() { | |
this.setState({ | |
showButton: this.canShowButton() | |
}); | |
}, e.prototype.canShowButton = function() { | |
var t = u.default.getUser(), e = t.get("itemSale"); | |
return e.isRealItemStarted(); | |
}, e.prototype.render = function() { | |
if (!this.state.showButton) return null; | |
var t = u.default.getUser(), e = t.get("itemSale"), s = e.getRealItemsOnSale(); | |
if (s.length <= 0) return null; | |
var n = s[0], o = e.timeLeft() + u.default.getTime(), r = this.props, i = r.rightDistance, a = r.topDistance; | |
return m(f.default, { | |
className: "quest open", | |
position: "left", | |
rightDistance: i, | |
topDistance: a, | |
onClick: function(t) { | |
return e.showRealItemDialog(); | |
}, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Sale!") | |
}, m("img", { | |
className: "icon", | |
src: (0, c.cdnURL)("rc/ic-abil-corona.png") | |
}), m("div", { | |
className: "coronatext" | |
}, n.saleLabel || n.discount + "%"), m("div", { | |
className: "timerbox corona" | |
}, m(p.default, { | |
cls: "timer", | |
time: o | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(13), p = n(d), x = s(142), f = n(x), h = s(1), m = h.createElement, g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.canShowButton = s.canShowButton.bind(s), s.updateState = s.updateState.bind(s), | |
s.state = { | |
showButton: s.canShowButton() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
u.default.events.on("itemSaleStarted itemSaleFinished", this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
u.default.events.off("itemSaleStarted itemSaleFinished", this.updateState); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton; | |
}, e.prototype.updateState = function() { | |
this.setState({ | |
showButton: this.canShowButton() | |
}); | |
}, e.prototype.canShowButton = function() { | |
var t = u.default.getUser(), e = t.get("itemSale"); | |
return e.isItemStarted(); | |
}, e.prototype.render = function() { | |
if (!this.state.showButton) return null; | |
var t = u.default.getUser(), e = t.get("itemSale"), s = e.timeLeft() + u.default.getTime(), n = this.props, o = n.rightDistance, r = n.topDistance; | |
return m(f.default, { | |
className: "quest open", | |
position: "left", | |
rightDistance: o, | |
topDistance: r, | |
onClick: function(t) { | |
return window.location.assign("#/bank/sale"); | |
}, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Sale!") | |
}, m("img", { | |
className: "icon", | |
src: (0, c.cdnURL)("rc/m-ico-gold.png") | |
}), m("div", { | |
className: "timerbox" | |
}, m(p.default, { | |
cls: "timer", | |
time: s | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(13), p = n(d), x = s(142), f = n(x), h = s(1), m = h.createElement, g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.canShowButton = s.canShowButton.bind(s), s.updateState = s.updateState.bind(s), | |
s.state = { | |
showButton: s.canShowButton() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
u.default.events.on("StarterPackStarted StarterPackFinished", this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
u.default.events.off("StarterPackStarted StarterPackFinished", this.updateState); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton; | |
}, e.prototype.updateState = function() { | |
this.setState({ | |
showButton: this.canShowButton() | |
}); | |
}, e.prototype.canShowButton = function() { | |
var t = u.default.getUser(), e = t.get("starterPack"); | |
return e.isStarted(); | |
}, e.prototype.render = function() { | |
if (!this.state.showButton) return null; | |
var t = u.default.getUser(), e = t.get("starterPack"), s = e.timeLeft() + u.default.getTime(), n = this.props, o = n.rightDistance, r = n.topDistance; | |
return m(f.default, { | |
className: "quest open startpack", | |
position: "left", | |
rightDistance: o, | |
topDistance: r, | |
onClick: e.showDialog, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Starter Pack") | |
}, m("img", { | |
className: "icon", | |
src: (0, c.cdnURL)("rc/startpackicon.png") | |
}), m("div", { | |
className: "timerbox" | |
}, m(p.default, { | |
cls: "timer", | |
time: s | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(142), p = n(d), x = s(1), f = x.createElement, h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
u.default.events.on("dailyQuestCompleted dailyQuestStarted dailyQuestFinished", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
u.default.events.off("dailyQuestCompleted dailyQuestStarted dailyQuestFinished", this.__update); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.render = function() { | |
var t = u.default.getUser(), e = t.get("dailyQuest"), s = e.getDescById(); | |
if (!s) return null; | |
var n = (0, c.cdnURL)(e.isComplete() ? "rc/m-ico-quest-gift.png" : "rc/m-ico-quest.png"), o = this.props, r = o.rightDistance, i = o.topDistance; | |
return f(p.default, { | |
className: "quest open", | |
position: "left", | |
rightDistance: r, | |
topDistance: i, | |
onClick: function(t) { | |
return u.default.show({ | |
popup: { | |
type: "questoffer" | |
} | |
}); | |
}, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Daily Quest") | |
}, f("img", { | |
className: "icon", | |
src: n | |
})); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(142), p = n(d), x = s(1), f = x.createElement, h = "started finished claimed", m = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.isQuestFinished = function() { | |
var t = s.props.quest; | |
return !!t && t.isFinished(); | |
}, s.canShowButton = s.canShowButton.bind(s), s.updateState = s.updateState.bind(s), | |
s.state = { | |
showButton: s.canShowButton(), | |
finished: s.isQuestFinished() | |
}, s; | |
} | |
return i(e, t), e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton || this.state.finished != e.finished; | |
}, e.prototype.updateState = function() { | |
this.setState({ | |
showButton: this.canShowButton(), | |
finished: this.isQuestFinished() | |
}); | |
}, e.prototype.componentWillMount = function() { | |
this.props.quest.on(h, this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
this.props.quest.off(h, this.updateState); | |
}, e.prototype.canShowButton = function() { | |
var t = this.props.quest, e = u.default.getUser(), s = e.get("vars").get("__NON_CLAIMED_Q") || [], n = s.indexOf(t.get("id")) > -1, o = !t.get("finished") && !t.isLocked(); | |
return o || n; | |
}, e.prototype.render = function() { | |
if (!this.state.showButton) return null; | |
var t = this.props.quest, e = this.props, s = e.rightDistance, n = e.topDistance, o = (0, | |
c.cdnURL)(t.isFinished() ? "rc/m-ico-quest-gift.png" : "rc/m-ico-quest.png"); | |
return f(p.default, { | |
key: "" + t.get("id"), | |
className: "quest open", | |
position: "left", | |
rightDistance: s, | |
topDistance: n, | |
onClick: function(e) { | |
return t.showPopup(!1); | |
}, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Beginner Quest") | |
}, f("img", { | |
className: "icon", | |
src: o | |
})); | |
}, e; | |
}(a.Component); | |
e.default = m; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(142), p = n(d), x = s(8), f = n(x), h = s(1), m = h.createElement, g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.updateState = function() { | |
s.setState({ | |
showButton: s.canShowButton() | |
}); | |
}, s.canShowButton = function() { | |
return s.isChestQuestCompleted(); | |
}, s.isChestQuestCompleted = function() { | |
var t = u.default.getUser(), e = t.get("vars"), s = (0, f.default)(e.get("QT_SH") || 0); | |
return s.gte(1); | |
}, s.onClick = function() { | |
u.default.show({ | |
popup: { | |
type: "superChest", | |
data: { | |
chestId: 1, | |
source: "shortcut" | |
} | |
} | |
}); | |
}, s.state = { | |
showButton: s.canShowButton() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = u.default.getUser(), e = t.get("vars"); | |
e.on("change:QT_SH", this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = u.default.getUser(), e = t.get("vars"); | |
e.off("change:QT_SH", this.updateState); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton; | |
}, e.prototype.render = function() { | |
if (!this.state.showButton) return null; | |
var t = this.props, e = t.rightDistance, s = t.topDistance; | |
return m(p.default, { | |
className: "quest open", | |
position: "left", | |
rightDistance: e, | |
topDistance: s, | |
onClick: this.onClick, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Super Heroes") | |
}, m("img", { | |
className: "icon", | |
src: (0, c.cdnURL)("rc/ic-superhero-60.png") | |
})); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(9), y = s(26), d = s(142), p = n(d), x = s(8), f = (n(x), | |
s(13)), h = n(f), m = s(1), g = m.createElement, v = "SuperChestQuestStarted SuperChestQuestFinished", b = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.isQuestFinished = function() { | |
var t = s.getChestQuest(); | |
return !!t && t.isChestAvaliable(); | |
}, s.updateState = function() { | |
s.setState({ | |
showButton: s.canShowButton(), | |
finished: s.isQuestFinished() | |
}); | |
}, s.canShowButton = function() { | |
return s.isChestQuestCompleted(); | |
}, s.getChestQuest = function() { | |
var t = u.default.getUser(); | |
return t.get("superChestQuest"); | |
}, s.isChestQuestCompleted = function() { | |
var t = s.getChestQuest(); | |
return t.canShow(); | |
}, s.onClick = function() { | |
u.default.show({ | |
popup: { | |
type: "chestQuest" | |
} | |
}); | |
}, s.state = { | |
showButton: s.canShowButton(), | |
finished: s.isQuestFinished() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
u.default.events.on(v, this.updateState); | |
var t = u.default.getUser(), e = t.get("resources"), s = t.get("vars"); | |
e.on("change:keys", this.updateState), s.on("change:S_CH_QT_COMPLETE", this.updateState); | |
}, e.prototype.componentWillUnmount = function() { | |
u.default.events.off(v, this.updateState); | |
var t = u.default.getUser(), e = t.get("resources"), s = t.get("vars"); | |
e.off("change:keys", this.updateState), s.off("change:S_CH_QT_COMPLETE", this.updateState); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.showButton != e.showButton || this.state.finished != e.finished; | |
}, e.prototype.render = function() { | |
if (!this.state.showButton) return null; | |
var t = this.getChestQuest(), e = this.props, s = e.rightDistance, n = e.topDistance; | |
return g(p.default, { | |
className: "quest open startpack", | |
position: "left", | |
rightDistance: s, | |
topDistance: n, | |
onClick: this.onClick, | |
tagName: "li", | |
tooltipText: (0, y._tr)("Chest Quest") | |
}, (0, c.IF)(this.state.finished)(function() { | |
return g("img", { | |
className: "icon", | |
src: (0, c.cdnURL)("rc/sunduk-60-open.png") | |
}); | |
}, function() { | |
return g("img", { | |
className: "icon", | |
src: (0, c.cdnURL)("rc/sunduk-60.png") | |
}); | |
}), g("div", { | |
className: "timerbox" | |
}, g(h.default, { | |
cls: "timer", | |
time: t.timeLeft() + u.default.getTime() | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = b; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(12), l = n(a), u = s(1), c = n(u), y = s(155), d = n(y), p = s(157), x = n(p), f = s(163), h = n(f), m = s(168), g = n(m), v = s(169), b = n(v), _ = s(170), k = n(_), w = s(171), C = n(w), E = s(78), S = n(E), T = s(81), N = n(T), P = s(26), O = s(9), M = s(14), B = n(M), R = s(172), j = n(R), I = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s.onSelectUpgradeLevel = s.onSelectUpgradeLevel.bind(s), | |
s.state = { | |
upgradeLevel: 1 | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = B.default.getUser(); | |
t.get("heroes").on("add", this.__update), B.default.events.on("reborn StarterPackStarted StarterPackFinished", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = B.default.getUser(); | |
t.get("heroes").off("add", this.__update), B.default.events.off("reborn StarterPackStarted StarterPackFinished", this.__update); | |
}, e.prototype.onSelectUpgradeLevel = function(t) { | |
this.setState({ | |
upgradeLevel: t | |
}); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.render = function() { | |
var t = this, e = B.default.getUser(), s = e.get("heroes"), n = l.default.object(s.map(function(t) { | |
return [ t.get("id"), !0 ]; | |
})), o = s.map(function(e) { | |
return c.default.createElement(h.default, { | |
data: e, | |
upgradeLevel: t.state.upgradeLevel, | |
key: e.get("id") | |
}); | |
}), r = l.default.filter(N.default, function(t) { | |
return !n[t.id] && !t.special; | |
}); | |
if (r.length) { | |
var i = r.shift(); | |
if (o.unshift(c.default.createElement(k.default, { | |
data: new S.default(i), | |
key: i.id | |
})), r.length) var a = l.default.map(r, function(t) { | |
return c.default.createElement(b.default, { | |
data: new S.default(t), | |
key: t.id | |
}); | |
}); | |
} | |
o.unshift(c.default.createElement(C.default, { | |
key: "superHero" | |
})); | |
var u = e.get("starterPack"); | |
if (u.isStarted()) { | |
var y = u.getKingPack(), p = l.default.find(N.default, function(t) { | |
return t.id == y.get("reward").hero.id; | |
}); | |
o.unshift(c.default.createElement(g.default, { | |
starterPack: u, | |
data: new S.default(p), | |
key: p.id + "starter" | |
})); | |
} | |
var f = this.props, m = f.setRef, v = f.loading; | |
return c.default.createElement("div", { | |
className: "heroes-list", | |
ref: m, | |
style: { | |
visibility: v ? "hidden" : "visible" | |
} | |
}, c.default.createElement(d.default, null), c.default.createElement(x.default, { | |
onSelectUpgradeLevel: this.onSelectUpgradeLevel | |
}), c.default.createElement("ul", { | |
className: "all-heroes" | |
}, c.default.createElement("ul", { | |
className: "my-heroes" | |
}, o), (0, O.IF)(a)(function() { | |
return c.default.createElement("div", null, c.default.createElement("div", { | |
className: "new-heroes-title" | |
}, (0, P._tr)("Earn gold and unlock new heroes")), c.default.createElement("ul", { | |
className: "new-heroes" | |
}, a.slice(0, 2))); | |
}))); | |
}, e; | |
}(u.Component); | |
I = (0, j.default)(I), e.default = I; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(156), d = n(y), p = s(26), x = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s; | |
} | |
return i(e, t), e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.componentDidMount = function() { | |
var t = c.default.getUser(); | |
t.get("heroes").on("add change", this.__update), t.get("multipliers").on("add change", this.__update), | |
t.get("counters").on("change:ADD_DPC", this.__update), t.get("counters").on("change:DPC_DPS", this.__update), | |
t.get("battle").on("change:lastLocationId", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = c.default.getUser(); | |
t.get("heroes").off("add change", this.__update), t.get("multipliers").off("add change", this.__update), | |
t.get("counters").off("change:ADD_DPC", this.__update), t.get("counters").off("change:DPC_DPS", this.__update), | |
t.get("battle").off("change:lastLocationId", this.__update); | |
}, e.prototype.render = function() { | |
var t = c.default.getUser(), e = t.get("multipliers"), s = t.get("battle"), n = [ { | |
type: "dpc", | |
name: (0, p._tr)("DPC"), | |
tooltipText: (0, p._tr)("Damage Per Click"), | |
value: s.getDPC(), | |
mult: e.get("DPC").value.round(2, 3) | |
}, { | |
type: "dps", | |
name: (0, p._tr)("DPS"), | |
tooltipText: (0, p._tr)("Damage Per Second"), | |
value: s.getDPS(), | |
mult: e.get("DPS").value.round(2, 3) | |
} ]; | |
return l.default.createElement(d.default, { | |
data: n | |
}); | |
}, e; | |
}(a.Component); | |
e.default = x; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(7), c = s(12), y = n(c), d = s(9), p = s(19), x = n(p), f = s(142), h = n(f), m = s(14), g = n(m), v = "animationend animationEnd webkitAnimationEnd msAnimationEnd", b = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.setSubPanel = s.setSubPanel.bind(s), s.makeAnimation = s.makeAnimation.bind(s), | |
s.onAbilityLearned = s.onAbilityLearned.bind(s), s.state = { | |
dps: !1, | |
dpc: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
g.default.events.on("newAbilityLearned", this.onAbilityLearned); | |
}, e.prototype.componentWillUnmount = function() { | |
g.default.events.off("newAbilityLearned", this.onAbilityLearned); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
y.default.map(t.data, function(t, e) { | |
var s = t.type, n = y.default.findWhere(this.props.data, { | |
type: s | |
}).value; | |
t.value.gt(n) && !this.state[s] && this.makeAnimation(s); | |
}.bind(this)); | |
}, e.prototype.makeAnimation = function() { | |
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "dps", e = {}; | |
e[t] = !0, this.setState(e), (0, x.default)(this[t]).on(v, function() { | |
e[t] = !1, this.setState(e); | |
}.bind(this)); | |
}, e.prototype.onAbilityLearned = function() { | |
this.makeAnimation(); | |
}, e.prototype.setSubPanel = function(t, e) { | |
t && (this[e] = t); | |
}, e.prototype.render = function() { | |
var t = y.default.map(this.props.data, function(t, e) { | |
var s = this, n = t.mult.minus(1).times(100), o = t.type, r = this.state[o]; | |
return l.default.createElement("div", { | |
ref: function(t) { | |
return s.setSubPanel(t, o); | |
}, | |
className: o + " " + (r ? "play-in" : ""), | |
key: o | |
}, l.default.createElement("div", { | |
className: "value" | |
}, (0, u.formatBig)(t.value)), l.default.createElement("div", { | |
className: "mlt-prm" | |
}, (0, d.IF)(n && n > 0)(function() { | |
return l.default.createElement("span", null, "+" + (0, u.formatBig)(n) + "%"); | |
})), l.default.createElement(h.default, { | |
className: "title", | |
topDistance: 80, | |
tooltipText: t.tooltipText | |
}, t.name, l.default.createElement("div", { | |
className: "icon-" + o | |
}))); | |
}.bind(this)); | |
return l.default.createElement("div", { | |
className: "dps-dpc-panel " + (this.props.popup ? "hero" : "") | |
}, t, l.default.createElement("div", { | |
className: "dps-dpc-panel-d1" | |
}), l.default.createElement("div", { | |
className: "dps-dpc-panel-d2" | |
})); | |
}, e; | |
}(a.Component); | |
e.default = b; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(142), y = (n(c), s(158)), d = n(y), p = s(12); | |
n(p); | |
s(159); | |
var x = s(1), f = x.createElement, h = [ 1, 10, 25, 100 ], m = { | |
10: { | |
code: 90, | |
key: '"Z"' | |
}, | |
25: { | |
code: 88, | |
key: '"X"' | |
}, | |
100: { | |
code: 67, | |
key: '"C"' | |
} | |
}, g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.select = s.select.bind(s), s.getButtons = s.getButtons.bind(s), s.onKeyUp = s.onKeyUp.bind(s), | |
s.state = { | |
selectedAmount: h[0] | |
}, s; | |
} | |
return i(e, t), e.prototype.select = function(t) { | |
this.state.amount != t && (this.setState({ | |
selectedAmount: t | |
}), this.props.onSelectUpgradeLevel(t)); | |
}, e.prototype.onKeyUp = function(t) { | |
var e = Object.values(m).map(function(t) { | |
return parseInt(t.code); | |
}), s = u.default.inputController.isAllKeysUp, n = s(e); | |
e.indexOf(t.keyCode) > -1 && n && this.select(h[0]); | |
}, e.prototype.componentDidMount = function() { | |
u.default.events.on("keyUp", this.onKeyUp); | |
}, e.prototype.componentWillUnmount = function() { | |
u.default.events.off("keyUp", this.onKeyUp); | |
}, e.prototype.getButtons = function() { | |
var t = this; | |
return h.map(function(e) { | |
var s = t.state.selectedAmount == e, n = m[e]; | |
return f(d.default, { | |
onClick: t.select, | |
amount: e, | |
key: e, | |
selected: s, | |
hotkey: n | |
}); | |
}); | |
}, e.prototype.render = function() { | |
var t = this.getButtons(); | |
return f("div", { | |
className: "all-x2-panel-box" | |
}, t); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(12), u = n(l), c = s(142), y = n(c), d = s(14), p = n(d), x = s(1), f = x.createElement, h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.getCustomProps = s.getCustomProps.bind(s), s.onKeyPressed = s.onKeyPressed.bind(s), | |
s.select = s.select.bind(s), s; | |
} | |
return i(e, t), e.prototype.select = function() { | |
this.props.onClick(this.props.amount); | |
}, e.prototype.onKeyPressed = function(t) { | |
var e = this.props.hotkey; | |
e && t.keyCode == e.code && this.select(); | |
}, e.prototype.componentDidMount = function() { | |
p.default.events.on("keyPressed", this.onKeyPressed); | |
}, e.prototype.componentWillUnmount = function() { | |
p.default.events.off("keyPressed", this.onKeyPressed); | |
}, e.prototype.getCustomProps = function() { | |
var t = this.props, e = t.amount, s = t.selected, n = t.hotkey, o = s ? "selected" : "", r = n ? "HotKey: " + n.key : null, i = { | |
className: "x2-btn-all-box " + o, | |
onClick: this.select, | |
key: e | |
}; | |
return r && (i = u.default.extend(i, { | |
topDistance: 30, | |
tooltipText: r | |
})), i; | |
}, e.prototype.render = function() { | |
var t = this.props, e = t.amount, s = t.hotkey, n = s ? y.default : "div", o = this.getCustomProps(); | |
return f(n, o, f("div", { | |
className: "x2-btn-all-text" | |
}, "x" + e)); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e) {}, , , , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(164), c = n(u), y = s(9), d = s(14), p = n(d), x = s(165), f = n(x), h = s(7), m = s(26), g = s(142), v = n(g), b = s(167), _ = n(b), k = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onClick = s.onClick.bind(s), s; | |
} | |
return i(e, t), e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.props.upgradeLevel != t.upgradeLevel; | |
}, e.prototype.onClick = function() { | |
var t = this.props.data; | |
t.get("level") && p.default.show({ | |
popup: { | |
type: "hero", | |
heroId: t.get("id") | |
} | |
}); | |
}, e.prototype.render = function() { | |
var t = this.props.data, e = t.get("level"), s = (0, m._tr)("Click to open hero screen"); | |
return l.default.createElement("li", { | |
className: "hero-card", | |
onClick: this.onClick | |
}, l.default.createElement(v.default, { | |
className: "avatar", | |
topDistance: 120, | |
tooltipText: s | |
}, l.default.createElement("img", { | |
className: "ava", | |
src: (0, y.cdnURL)(t.getIcon()) | |
})), l.default.createElement(_.default, { | |
data: t | |
}), l.default.createElement("div", { | |
className: "dps" | |
}, (0, h.formatBig)(t.getDPS())), l.default.createElement("div", { | |
className: "name" | |
}, t.get("name")), l.default.createElement("div", { | |
className: "lvl" | |
}, l.default.createElement("div", { | |
className: "n" | |
}, e)), l.default.createElement(f.default, { | |
hero: this.props.data, | |
source: "list", | |
upgradeLevel: this.props.upgradeLevel | |
})); | |
}, e; | |
}(c.default); | |
e.default = k; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = (n(a), function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
this.props.data && this.props.data.on("change", this.__update); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
this.props.data && this.props.data.off("change", this.__update), t && t.data && t.data.on("change", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
this.props.data && this.props.data.off("change", this.__update); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e; | |
}(a.Component)); | |
e.default = l; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = (s(7), s(24)), d = n(y), p = s(26), x = s(166), f = n(x), h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.fired = !1, s.onClick = s.onClick.bind(s), s.onBuyFail = s.onBuyFail.bind(s), | |
s.getUpgradeLevel = s.getUpgradeLevel.bind(s), s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.getUpLevelAndCost = function() { | |
var t = this.props.hero, e = this.getUpgradeLevel(); | |
return { | |
level: e, | |
cost: t.getCost(e).gold | |
}; | |
}, e.prototype.getUpgradeLevel = function() { | |
return this.props.upgradeLevel || 1; | |
}, e.prototype.onClick = function(t) { | |
var e = this; | |
if (!this.state.locked) { | |
t.stopPropagation(); | |
var s = this.props, n = s.hero, o = s.source, r = c.default.getUser(), i = void 0; | |
if (this.setState({ | |
locked: !0 | |
}), n.get("level")) { | |
var a = this.getUpgradeLevel(); | |
i = n.buy(a, o).catch(this.onBuyFail).finally(function() { | |
return e.setState({ | |
locked: !1 | |
}); | |
}); | |
} else i = r.get("heroes").buy(n.get("id"), 1, o).catch(this.onBuyFail); | |
return this.props.onClick && i.then(this.props.onClick), !1; | |
} | |
}, e.prototype.onBuyFail = function(t) { | |
d.default.log(t); | |
}, e.prototype.render = function() { | |
var t = this.getUpLevelAndCost(), e = t.level, s = t.cost, n = this.props.hero.get("level") ? (0, | |
p._tr)("Lvl Up") + (e > 1 ? " x" + e : "") : (0, p._tr)("Hire"); | |
return l.default.createElement(f.default, { | |
className: "btn-buy btn-lvl", | |
resource: "gold", | |
value: s, | |
text: n, | |
resourceCouldBeDisabled: !0, | |
onClick: this.onClick, | |
locked: this.state.locked | |
}); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(7), d = s(9), p = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.setDisabled = s.setDisabled.bind(s), s.onResourceChanged = s.onResourceChanged.bind(s), | |
s.shouldDisable = s.shouldDisable.bind(s), s.shouldDisableFallback = s.shouldDisableFallback.bind(s), | |
s.onClick = s.onClick.bind(s), s.getResource = s.getResource.bind(s), s.getResourceDisabled = s.getResourceDisabled.bind(s), | |
s.props.fallbackResource ? s.state = { | |
resourceDisabled: s.shouldDisable(), | |
fallbackResourceDisabled: s.shouldDisableFallback() | |
} : s.state = { | |
resourceDisabled: s.shouldDisable() | |
}, s; | |
} | |
return i(e, t), e.prototype.setDisabled = function(t) { | |
var e = this.shouldDisable(t); | |
if (this.props.fallbackResource || e == this.state.resourceDisabled) { | |
var s = this.shouldDisableFallback(t); | |
e == this.state.resourceDisabled && s == this.state.fallbackResourceDisabled || this.setState({ | |
resourceDisabled: e, | |
fallbackResourceDisabled: s | |
}); | |
} else this.setState({ | |
resourceDisabled: e | |
}); | |
}, e.prototype.onClick = function(t) { | |
t.stopPropagation(); | |
var e = this.getResource(), s = this.getResourceDisabled(); | |
s || this.props.locked || this.props.onClick(t, e); | |
}, e.prototype.shouldDisable = function(t) { | |
var e; | |
if (!this.props.resourceCouldBeDisabled) return !1; | |
t = t || this.props; | |
var s = t, n = s.resource, o = s.value; | |
return !c.default.getUser().get("resources").have((e = {}, e[n] = o, e), !1); | |
}, e.prototype.shouldDisableFallback = function(t) { | |
var e; | |
if (this.props.resourceFallbackAlwaysEnabled) return !1; | |
t = t || this.props; | |
var s = t, n = s.fallbackResource, o = s.fallbackValue; | |
return !c.default.getUser().get("resources").have((e = {}, e[n] = o, e), !1); | |
}, e.prototype.onResourceChanged = function() { | |
this.setDisabled(); | |
}, e.prototype.componentDidMount = function() { | |
c.default.getUser().get("resources").on("change:" + this.props.resource, this.onResourceChanged), | |
this.props.fallbackResource && c.default.getUser().get("resources").on("change:" + this.props.fallbackResource, this.onResourceChanged); | |
}, e.prototype.componentWillUnmount = function() { | |
c.default.getUser().get("resources").off("change:" + this.props.resource, this.onResourceChanged), | |
this.props.fallbackResource && c.default.getUser().get("resources").off("change:" + this.props.fallbackResource, this.onResourceChanged); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
this.setDisabled(t); | |
}, e.prototype.getResource = function() { | |
return this.state.resourceDisabled && this.props.fallbackResource ? this.props.fallbackResource : this.props.resource; | |
}, e.prototype.getResourceDisabled = function() { | |
if (this.props.forceDisable) return !0; | |
var t = this.getResource(); | |
return t == this.props.resource ? this.state.resourceDisabled : this.state.fallbackResourceDisabled; | |
}, e.prototype.render = function() { | |
var t = this.state.resourceDisabled && this.props.fallbackValue ? this.props.fallbackValue : this.props.value, e = this.getResource(), s = this.getResourceDisabled() || this.props.locked, n = this.props.priceOld; | |
return l.default.createElement("div", { | |
className: this.props.className + " " + (s ? "disabled" : ""), | |
onMouseLeave: this.props.onMouseLeave, | |
onMouseEnter: this.props.onMouseEnter, | |
onClick: this.onClick | |
}, l.default.createElement("div", { | |
className: "price " + e | |
}, (0, y.formatBig)(t)), l.default.createElement("div", { | |
className: "txt" | |
}, this.props.text), (0, d.IF)(n)(function() { | |
return l.default.createElement("div", { | |
className: "price-old" | |
}, (0, y.formatBig)(n)); | |
})); | |
}, e; | |
}(a.Component); | |
e.default = p; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = function() { | |
function t(t, e) { | |
for (var s = 0; s < e.length; s++) { | |
var n = e[s]; | |
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), | |
Object.defineProperty(t, n.key, n); | |
} | |
} | |
return function(e, s, n) { | |
return s && t(e.prototype, s), n && t(e, n), e; | |
}; | |
}(), l = s(1), u = s(9), c = s(14), y = n(c), d = s(12), p = n(d), x = s(1), f = x.createElement, h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.setAbilityAvailable = s.setAbilityAvailable.bind(s), s.couldBuy = s.couldBuy.bind(s), | |
s.state = { | |
couldBuy: s.couldBuy(), | |
abilityId: s.abilityId | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
y.default.getUser().get("resources").on("change:gold", this.setAbilityAvailable); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
this.setAbilityAvailable(); | |
}, e.prototype.componentWillUnmount = function() { | |
y.default.getUser().get("resources").off("change:gold", this.setAbilityAvailable); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.couldBuy != e.couldBuy || this.state.abilityId != e.abilityId; | |
}, e.prototype.setAbilityAvailable = function() { | |
p.default.defer(function() { | |
this.setState({ | |
couldBuy: this.couldBuy(), | |
abilityId: this.abilityId | |
}); | |
}.bind(this)); | |
}, e.prototype.couldBuy = function() { | |
var t = this.ability; | |
if (t) return y.default.getUser().get("resources").have(t.get("price"), !1); | |
}, e.prototype.render = function() { | |
var t = (this.props.data, this.ability); | |
if (!t) return null; | |
var e = this.state.couldBuy ? "" : "disable"; | |
return f("div", { | |
className: "abil-ready " + e | |
}, f("img", { | |
className: "icon", | |
src: (0, u.cdnURL)(t.get("icon")) | |
})); | |
}, a(e, [ { | |
key: "ability", | |
get: function() { | |
var t = this.props.data; | |
return t.get("abilities").find(function(t) { | |
return !t.isLocked() && !t.get("bought"); | |
}); | |
} | |
}, { | |
key: "abilityId", | |
get: function() { | |
var t = this.ability; | |
return t ? t.get("id") : null; | |
} | |
} ]), e; | |
}(l.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(9), c = s(14), y = n(c), d = s(26), p = s(13), x = n(p), f = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props, e = t.data, s = t.starterPack; | |
return l.default.createElement("li", { | |
className: "hero-card starterpack" | |
}, l.default.createElement("div", { | |
className: "avatar" | |
}, l.default.createElement("img", { | |
className: "ava", | |
src: (0, u.cdnURL)(e.getIcon()) | |
})), l.default.createElement("div", { | |
className: "name" | |
}, (0, d._tr)("Starter Pack")), l.default.createElement("div", { | |
className: "btn-buy starterpack", | |
onClick: s.showDialog | |
}, l.default.createElement("div", { | |
className: "txt" | |
}, (0, d._tr)("Get"))), l.default.createElement("div", { | |
className: "st-timer" | |
}, l.default.createElement(x.default, { | |
cls: "st-time", | |
time: s.timeLeft() + y.default.getTime() | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = f; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function o(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function r(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var i = s(1), a = s(9), l = s(7), u = s(1), c = u.createElement, y = function(t) { | |
function e() { | |
return n(this, e), o(this, t.apply(this, arguments)); | |
} | |
return r(e, t), e.prototype.render = function() { | |
var t = this.props.data; | |
return c("li", { | |
className: "hero-card" | |
}, c("div", { | |
className: "avatar" | |
}, c("img", { | |
className: "ava", | |
src: (0, a.cdnURL)(t.getIcon()) | |
})), c("div", { | |
className: "dps" | |
}, (0, l.formatBig)(t.getDPS())), c("div", { | |
className: "name" | |
}, t.get("name")), c("div", { | |
className: "btn-buy btn-lvl" | |
}, c("div", { | |
className: "price gold" | |
}, (0, l.formatBig)(t.getCost().gold)))); | |
}, e; | |
}(i.Component); | |
e.default = y; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(164), c = n(u), y = s(9), d = s(14), p = n(d), x = s(165), f = n(x), h = s(7), m = s(26), g = s(142), v = n(g), b = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.blinkAnimation = s.blinkAnimation.bind(s), s.restartBlinkAnimation = s.restartBlinkAnimation.bind(s), | |
s.couldBuy = s.couldBuy.bind(s), s.state = { | |
blinking: !1, | |
couldBuy: s.couldBuy() | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
t.prototype.componentDidMount.call(this), p.default.getUser().get("resources").on("change:gold", this.blinkAnimation), | |
this.blinkAnimation(); | |
}, e.prototype.componentWillUnmount = function() { | |
t.prototype.componentWillUnmount.call(this), p.default.getUser().get("resources").off("change:gold", this.blinkAnimation), | |
window.clearTimeout(this.restartTimeout), window.clearTimeout(this.animationTimeout); | |
}, e.prototype.restartBlinkAnimation = function() { | |
this.animationTimeout = null, this.setState({ | |
blinking: !1 | |
}), window.clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(this.blinkAnimation, 10); | |
}, e.prototype.blinkAnimation = function() { | |
var t = this.couldBuy(); | |
this.state.couldBuy != t && this.setState({ | |
couldBuy: t | |
}), t && !this.animationTimeout && (this.setState({ | |
blinking: !0 | |
}), this.animationTimeout = setTimeout(this.restartBlinkAnimation, 4e3)); | |
}, e.prototype.couldBuy = function() { | |
var t = this.props.data, e = t.getCost(); | |
return p.default.getUser().get("resources").have(e, !1); | |
}, e.prototype.render = function() { | |
var t = this.props.data, e = this.couldBuy(), s = this.state.blinking && e ? "available" : "", n = e ? "highlight" : "", o = (0, | |
m._tr)("You can hire this hero"); | |
return l.default.createElement("li", { | |
className: "hero-card disabled " + n + " " + s | |
}, l.default.createElement(v.default, { | |
className: "avatar", | |
topDistance: 120, | |
tooltipText: o | |
}, l.default.createElement("img", { | |
className: "ava", | |
src: (0, y.cdnURL)(t.getIcon()) | |
})), l.default.createElement("div", { | |
className: "dps" | |
}, (0, h.formatBig)(t.getDPS())), l.default.createElement("div", { | |
className: "name" | |
}, t.get("name")), l.default.createElement("div", { | |
className: "lvl" | |
}, l.default.createElement("div", { | |
className: "n" | |
}, 1)), l.default.createElement(f.default, { | |
hero: this.props.data, | |
source: "list" | |
})); | |
}, e; | |
}(c.default); | |
e.default = b; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(9), c = s(14), y = n(c), d = s(26), p = s(13), x = (n(p), | |
s(142)), f = n(x), h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.Bonus = s.Bonus.bind(s), s.Button = s.Button.bind(s), s.getActivatedHero = s.getActivatedHero.bind(s), | |
s.setActivatedHero = s.setActivatedHero.bind(s), s.state = { | |
activatedHeroId: s.getActivatedHero() | |
}, s; | |
} | |
return i(e, t), e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.state.activatedHeroId !== e.activatedHeroId; | |
}, e.prototype.componentDidMount = function() { | |
y.default.events.on("heroActivated", this.setActivatedHero); | |
}, e.prototype.componentWillUnmount = function() { | |
y.default.events.off("heroActivated", this.setActivatedHero); | |
}, e.prototype.setActivatedHero = function() { | |
this.setState({ | |
activatedHeroId: this.getActivatedHero() | |
}); | |
}, e.prototype.getActivatedHero = function() { | |
return y.default.getUser().get("superHeroes").activatedHeroId(); | |
}, e.prototype.change = function() { | |
window.location.assign("#/super-heroes"); | |
}, e.prototype.buy = function() { | |
y.default.show({ | |
popup: { | |
type: "superChest", | |
data: { | |
chestId: 1, | |
source: "main hero list" | |
} | |
} | |
}); | |
}, e.prototype.Bonus = function() { | |
var t = this.getSuperHero(), e = t.get("mult").type, s = "shards" == e || "gold" == e, n = t.getBonus(!0, {}); | |
return s ? l.default.createElement("div", { | |
className: "bn-price" | |
}, (0, d._tr)("+{percent}%", { | |
percent: n | |
}), l.default.createElement("div", { | |
className: "bn-icon " + e | |
})) : l.default.createElement("div", { | |
className: "abonus" | |
}, (0, d._tr)("+{percent}% {bonusType}", { | |
percent: n, | |
bonusType: e | |
})); | |
}, e.prototype.Button = function() { | |
var t = this.getSuperHero(); | |
t.get("stars"); | |
return l.default.createElement("div", { | |
className: "activate-btn", | |
onClick: this.change | |
}, l.default.createElement("div", { | |
className: "btn-text" | |
}, (0, d._tr)("change"))); | |
}, e.prototype.getSuperHero = function() { | |
var t = y.default.getUser().get("superHeroes").get(this.state.activatedHeroId); | |
return t; | |
}, e.prototype.render = function() { | |
var t = this.getSuperHero(); | |
if (!t) return null; | |
var e = this.Bonus, s = this.Button, n = t.get("stars"), o = t.get("level"), r = t.get("rare"); | |
return l.default.createElement("li", { | |
className: "hero-card suphero" | |
}, l.default.createElement("div", { | |
className: "hero-pic-box" | |
}, l.default.createElement("div", { | |
className: "hero-pic" | |
}, l.default.createElement("img", { | |
src: (0, u.cdnURL)(t.get("imageManager").getIcon()) | |
})), l.default.createElement("div", { | |
className: "herostar-box" | |
}, l.default.createElement("div", { | |
className: "herostar lvl" + (n < 10 ? "0" + n : n) | |
}))), l.default.createElement("div", { | |
className: "suphero-lvl" | |
}, (0, d._tr)("{level} lvl", { | |
level: o | |
})), l.default.createElement("div", { | |
className: "bonus-box" | |
}, l.default.createElement("div", { | |
className: "bonus-text" | |
}, (0, d._tr)("active bonus")), l.default.createElement(e, null)), l.default.createElement(s, null), l.default.createElement(f.default, { | |
className: "rarn-zn " + r, | |
topDistance: 40, | |
tooltipText: r.toUpperCase() | |
})); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
function a(t, e, s, n) { | |
if (e[s]) { | |
var o = e[s]; | |
t[s] = function(t) { | |
o(t), t.isDefaultPrevented() || n(t); | |
}; | |
} else t[s] = n; | |
} | |
function l(t) { | |
var e = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], s = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], n = function(n) { | |
function l() { | |
o(this, l); | |
var t = r(this, n.apply(this, arguments)); | |
return t.setRef = t.setRef.bind(t), t.handleProps = t.handleProps.bind(t), t.handleProps(t.props), | |
t.state = { | |
loading: !0, | |
showLoader: !1 | |
}, t; | |
} | |
return i(l, n), l.prototype.handleProps = function(t) { | |
var e = u({}, t); | |
a(e, t, "setRef", this.setRef), this.myProps = e; | |
}, l.prototype.componentWillReceiveProps = function(t) { | |
this.handleProps(t); | |
}, l.prototype.componentDidMount = function() { | |
var t = this; | |
"function" == typeof n.prototype.componentDidMount && n.prototype.componentDidMount.call(this), | |
(0, p.default)(this.el).waitForImages(!0).done(function() { | |
t.setState({ | |
loading: !1 | |
}); | |
}); | |
}, l.prototype.setRef = function(t) { | |
t && (this.el = t); | |
}, l.prototype.render = function() { | |
var n = this.state.loading; | |
return s ? y.default.createElement("div", null, y.default.createElement(t, u({ | |
loading: n | |
}, this.myProps)), (0, f.IF)(n)(function() { | |
return y.default.createElement(m.default, null); | |
})) : y.default.createElement("div", { | |
className: "container" | |
}, y.default.createElement(t, u({ | |
loading: n | |
}, this.myProps)), y.default.createElement("div", { | |
className: "tab-loading-wrapper " + (e ? "border" : "") | |
}, (0, f.IF)(n)(function() { | |
return y.default.createElement(m.default, null); | |
}))); | |
}, l; | |
}(c.Component); | |
return n.displayName = t.displayName, n; | |
} | |
e.__esModule = !0; | |
var u = Object.assign || function(t) { | |
for (var e = 1; e < arguments.length; e++) { | |
var s = arguments[e]; | |
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]); | |
} | |
return t; | |
}, c = s(1), y = n(c), d = s(19), p = n(d), x = s(14), f = (n(x), s(9)), h = s(173), m = n(h); | |
e.default = l; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
return l.default.createElement("div", { | |
className: "loading-block" | |
}, l.default.createElement("div", { | |
className: "progress-loader" | |
}, l.default.createElement("div", { | |
className: "prg play" | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = u; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(19), c = n(u), y = s(14), d = n(y), p = s(175), x = n(p), f = (s(9), | |
s(25)), h = n(f), m = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.hiding = null, s.onShowPopupEvent = s.onShowPopupEvent.bind(s), s.onUpdatePopupEvent = s.onUpdatePopupEvent.bind(s), | |
s.close = s.close.bind(s), s.onClosed = s.onClosed.bind(s), s.onPopupOpened = s.onPopupOpened.bind(s), | |
s.getPopupClass = s.getPopupClass.bind(s), d.default.events.on("showPopup", s.onShowPopupEvent), | |
d.default.events.on("updatePopup", s.onUpdatePopupEvent), s.state = {}, s.queue = [], | |
s; | |
} | |
return i(e, t), e.prototype.getPopupClass = function(t) { | |
var e = t.type; | |
if ("function" == typeof e) var s = e; else s = x.default[e]; | |
return s; | |
}, e.prototype.getNewPopup = function(t) { | |
var e = this.getPopupClass(t); | |
if (e) { | |
if (e == this.state.PopupClass) return null; | |
var s = { | |
PopupClass: e, | |
data: t.data, | |
meta: t | |
}; | |
} | |
return s; | |
}, e.prototype.onUpdatePopupEvent = function(t) { | |
var e = this.getPopupClass(t); | |
e && e == this.state.PopupClass && (this.opened = { | |
PopupClass: e, | |
data: t.data, | |
meta: t | |
}); | |
}, e.prototype.onShowPopupEvent = function(t) { | |
if (!this.isIntercepted(t)) { | |
var e = this.getNewPopup(t); | |
e && ((this.opened || this.opening) && t.queued ? this.queuePopup(e) : this.showPopup(e)); | |
} | |
}, e.prototype.showPopup = function(t) { | |
var e = this; | |
this.opening = t, this.opened ? this.hiding ? this.hiding.then(function() { | |
return e.showPopup(t); | |
}) : (this.queuePopup(this.opened, "start"), this._hidePopup(function() { | |
e.openedPopup = e.opened = null, e.showPopup(t); | |
})) : this._doShowPopup(t); | |
}, e.prototype.queuePopup = function(t) { | |
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "end"; | |
"end" === e ? this.queue.push(t) : this.queue.unshift(t); | |
}, e.prototype._doShowPopup = function(t) { | |
this.setState(t); | |
}, e.prototype.close = function() { | |
return this._hidePopup(this.onClosed), null; | |
}, e.prototype.onClosed = function() { | |
this.openedPopup && d.default.events.trigger("popupClosed", this.openedPopup), this.openedPopup = this.opened = null, | |
this.opening || (this.queue.length ? this.showPopup(this.queue.shift()) : ((0, c.default)("#popupWrapper").fadeOut(50), | |
this.setState({ | |
PopupClass: null, | |
data: null, | |
meta: null | |
}))); | |
}, e.prototype._hidePopup = function(t) { | |
var e = this; | |
return this.hiding = new h.default(function(s, n) { | |
(0, c.default)("#popupContainer").fadeOut(150, function() { | |
t(), e.hiding = null, s(); | |
}); | |
}), null; | |
}, e.prototype.isIntercepted = function(t) { | |
var e = { | |
data: t, | |
intercepted: null | |
}; | |
return d.default.events.trigger("beforeShowDialog", e), e.intercepted; | |
}, e.prototype.onPopupOpened = function(t) { | |
t && (this.opened = this.opening, this.opening = null, this.openedPopup = t, (0, | |
c.default)("#popupContainer").show(), (0, c.default)("#popupWrapper").fadeIn(100), | |
d.default.events.trigger("popupOpened", t)); | |
}, e.prototype.getCurrentPopup = function() { | |
var t = this; | |
if (this.state.PopupClass) { | |
var e = this.state.PopupClass; | |
return l.default.createElement(e, { | |
data: this.state.data, | |
meta: this.state.meta, | |
ref: function(e) { | |
t.onPopupOpened(e); | |
}, | |
close: this.close | |
}); | |
} | |
}, e.prototype.render = function() { | |
return l.default.createElement("div", { | |
id: "popupWrapper", | |
className: "popup-layer" | |
}, l.default.createElement("div", { | |
className: "screen-blend-55" | |
}), l.default.createElement("div", { | |
id: "popupContainer" | |
}, this.getCurrentPopup())); | |
}, e; | |
}(a.Component); | |
e.default = m; | |
}, function(t, e, s) { | |
t.exports = { | |
hero: s(176).default, | |
heroNewStar: s(201).default, | |
heroNextForm: s(204).default, | |
heroesascendstate: s(205).default, | |
heroesascendrand: s(209).default, | |
picture: s(210).default, | |
buyPicture: s(217).default, | |
reborn: s(218).default, | |
favorite: s(219).default, | |
unfavorite: s(220).default, | |
newPicture: s(221).default, | |
limitfavorite: s(222).default, | |
signin: s(223).default, | |
signinrecover: s(224).default, | |
signup: s(225).default, | |
addresource: s(226).default, | |
addcrowns: s(229).default, | |
addessence: s(232).default, | |
addstatgems: s(234).default, | |
sale: s(236).default, | |
chest: s(239).default, | |
questoffer: s(240).default, | |
crownSale: s(243).default, | |
welcomeBack: s(244).default, | |
startQuest: s(247).default, | |
starterPack: s(248).default, | |
timeskipReward: s(251).default, | |
lang: s(253).default, | |
superChest: s(256).default, | |
chestQuest: s(262).default, | |
superActionStart: s(263).default, | |
superPreview: s(265).default, | |
superPreviewChanges: s(266).default, | |
upsell: s(267).default, | |
rebornReward: s(270).default | |
}, null === { | |
DEBUG: !1 | |
} && void 0 && (t.exports.admin = s(273).default); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(177), u = n(l), c = s(184), y = n(c), d = s(192), p = n(d), x = (s(9), | |
s(194)), f = n(x), h = s(14), m = n(h); | |
s(195), s(197), s(199); | |
var g = s(1), v = g.createElement, b = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
s.onUpdate = function(t) { | |
var e = t.type, n = t.heroId; | |
"hero" == e && s.setState({ | |
heroId: n | |
}); | |
}, s.changeTab = function(t) { | |
m.default.events.trigger("updatePopup", { | |
type: "hero", | |
heroId: s.getHero().get("id"), | |
tab: t | |
}), s.setState({ | |
tab: t | |
}); | |
}, s.getHero = function() { | |
var t = s.state.heroId || s.props.meta.heroId, e = m.default.getUser().get("heroes"); | |
return e.get(t); | |
}, s.getCurrentTab = function() { | |
var t = s.getHero(), e = { | |
hero: t, | |
changeTab: s.changeTab | |
}; | |
return "promotion" == s.state.tab ? v(u.default, e) : v(y.default, e); | |
}; | |
var n = s.props.meta.tab || "skills"; | |
return s.state = { | |
tab: n, | |
heroId: null | |
}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
m.default.events.on("updatePopup", this.onUpdate); | |
}, e.prototype.componentWillUnmount = function() { | |
m.default.events.off("updatePopup", this.onUpdate); | |
}, e.prototype.render = function() { | |
var t = this.getHero(); | |
return v("div", { | |
className: "hero-popup" | |
}, v("div", { | |
className: "left-side" | |
}, v(p.default, { | |
hero: t | |
}), v(f.default, { | |
name: t.get("name"), | |
description: t.get("info") | |
})), this.getCurrentTab(), v("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = b; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(178), l = n(a), u = s(179), c = n(u), y = s(181), d = n(y), p = s(183), x = n(p), f = s(1), h = s(7), m = s(24), g = n(m), v = s(26), b = s(1), _ = b.createElement, k = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.state = { | |
promouteLevel: parseInt(n.props.hero.get("promotion")), | |
locked: !1 | |
}, n.updatePromotion = function(t, e) { | |
n.setState({ | |
promouteLevel: parseInt(e) | |
}); | |
}, n.onPromoteClick = function() { | |
if (!n.state.locked) { | |
var t = n.props.hero; | |
(!window.realPromote || t.canBuy({ | |
promotion: !0 | |
})) && (n.setState({ | |
locked: !0 | |
}), ( window.realPromote && t.promote("heroscreen") || t.fakePromote("heroscreen") ), n.setState({ | |
locked: !1 | |
})); | |
} | |
}, n.onPromoteFail = function(t) { | |
g.default.log(t); | |
}, n.changeTab = function() { | |
n.props.changeTab("skills"); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = this.props.hero; | |
t.on("change:promotion", this.updatePromotion); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
var e = this.props.hero, s = t.hero; | |
e.off("change:promotion", this.updatePromotion), s.on("change:promotion", this.updatePromotion); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = this.props.hero; | |
t.off("change:promotion", this.updatePromotion); | |
}, e.prototype.shouldComponentUpdate = function(t, e) { | |
var s = this.props.hero, n = t.hero; | |
return s.get("id") != n.get("id") || this.state.promouteLevel != e.promouteLevel; | |
}, e.prototype.render = function() { | |
var t = this.props.hero, e = this.state.promouteLevel, s = t.getStars(), n = t.getStars(1); | |
return _("div", { | |
className: "right-side promotion" | |
}, _("div", { | |
className: "back-btn", | |
onClick: this.changeTab | |
}, _("div", { | |
className: "btn-text" | |
}, (0, v._tr)("back"))), _("div", { | |
className: "promote-text-box" | |
}, _("div", { | |
className: "promote-text" | |
}, (0, v._tr)("Promote to increase hero DPS"))), _("div", { | |
className: "prm-allbonus-box" | |
}, _(l.default, { | |
text: (0, v._tr)("promote bonus now"), | |
promouteLevel: e | |
}), _(l.default, { | |
next: !0, | |
text: (0, v._tr)("next promote bonus"), | |
promouteLevel: e + 1 | |
}), _(x.default, { | |
text: (0, v._tr)("promote"), | |
cost: (0, h.formatBig)(t.getPromotionCost().crowns), | |
onClick: this.onPromoteClick | |
})), _(c.default, { | |
promouteLevel: e, | |
currentStar: s, | |
nextStar: n | |
}), _(d.default, { | |
promouteLevel: e, | |
hero: t | |
})); | |
}, e; | |
}(f.Component); | |
e.default = k; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
var e = t.promouteLevel, s = t.next, n = t.text, r = 50 * e, a = (0, o._tr)("+{bonusDps}% DPS", { | |
bonusDps: r | |
}); | |
return i("div", { | |
className: "prm-bonus-box " + (s ? "next" : "") | |
}, i("div", { | |
className: "prm-text" | |
}, n), i("div", { | |
className: "prm-bonus" | |
}, i("div", { | |
className: "bn-price" | |
}, a))); | |
} | |
e.__esModule = !0, e.default = n; | |
var o = (s(1), s(26)), r = s(1), i = r.createElement; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(180), u = n(l), c = s(26), y = s(75), d = s(1), p = d.createElement, x = y.heroStars[5], f = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.getNextPromoteLevel = function(t) { | |
var e = (0, y.needPromotesForStar)(t); | |
return e > x ? x : e; | |
}, n.getPc = function(t, e) { | |
var s = t / e * 100; | |
return s > 100 ? 100 : s; | |
}, n.getProgressLabel = function(t, e) { | |
return t < x ? t + "/" + e : t; | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props, e = t.promouteLevel, s = t.currentStar, n = t.nextStar, o = this.getNextPromoteLevel(n), r = this.getPc(e, o), i = this.getProgressLabel(e, o); | |
return p("div", { | |
className: "prgbarall-box" | |
}, p("div", { | |
className: "prgball-box" | |
}, p("div", { | |
className: "prgall-prom" | |
}, p("div", { | |
className: "prg-all-bar", | |
style: { | |
width: r + "%" | |
} | |
})), p("div", { | |
className: "prg-all-text" | |
}, (0, c._tr)("promotes") + " " + i)), p(u.default, { | |
stars: s | |
}), p(u.default, { | |
next: !0, | |
stars: n | |
})); | |
}, e; | |
}(a.Component); | |
e.default = f; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
var e = t.stars, s = t.next; | |
return r("div", { | |
className: "herostar-box-promotion " + (s ? "next" : "") | |
}, r("div", { | |
className: "herostar lvl0" + e | |
})); | |
} | |
e.__esModule = !0, e.default = n; | |
var o = (s(1), s(1)), r = o.createElement; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(182), l = n(a), u = s(1), c = s(26), y = s(75), d = s(1), p = d.createElement, x = -230, f = 0, h = 115, m = 5, g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.updatePosition = function() { | |
s.setState({ | |
position: s.getStartPosition() | |
}); | |
}, s.getStartPosition = function() { | |
var t = s.props.hero, e = t.getStars(), n = m - e, o = x + n * h; | |
return s.validatePosition(o); | |
}, s.moveLeft = function() { | |
s.move(h); | |
}, s.moveRight = function() { | |
s.move(-h); | |
}, s.validatePosition = function(t) { | |
return t < x ? x : t > f ? f : t; | |
}, s.move = function(t) { | |
s.setState(function(e) { | |
var n = e.position, o = n + t; | |
return o = s.validatePosition(o), { | |
position: o | |
}; | |
}); | |
}, s.state = { | |
position: s.getStartPosition() | |
}, s; | |
} | |
return i(e, t), e.prototype.shouldComponentUpdate = function(t, e) { | |
return this.props.hero.get("id") != t.hero.get("id") || this.state.position != e.position; | |
}, e.prototype.render = function() { | |
var t = this.props.hero, e = Object.keys(y.heroStars), s = e.map(function(e) { | |
return p(l.default, { | |
hero: t, | |
promotionNeed: y.heroStars[e], | |
star: e, | |
key: e | |
}); | |
}); | |
return p("div", { | |
className: "girllvlall-box" | |
}, p("div", { | |
className: "girllvl-box" | |
}, p("div", { | |
className: "girllvl-name" | |
}, (0, c._tr)("girls levels")), p("div", { | |
className: "girl-box-scroll-box" | |
}, p("div", { | |
className: "girl-box-scroll", | |
style: { | |
left: this.state.position + "px" | |
} | |
}, s))), p("div", { | |
className: "scroll-btn-left", | |
onClick: this.moveLeft | |
}), p("div", { | |
className: "scroll-btn-right", | |
onClick: this.moveRight | |
})); | |
}, e; | |
}(u.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(26), u = s(9), c = s(180), y = n(c), d = s(14), p = n(d), x = s(1), f = x.createElement, h = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.onClick = function() { | |
var t = n.props, e = t.hero, s = t.promotionNeed, o = e.get("promotion"); | |
o < s && p.default.show({ | |
popup: { | |
type: "heroNextForm", | |
data: { | |
heroId: e.get("id") | |
} | |
} | |
}); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props, e = (t.form, t.hero), s = t.star, n = t.promotionNeed, o = e.get("promotion"), r = e.getStars(), i = e.getImageForm(s), a = o < n ? "disable" : "", c = r == s ? "active" : ""; | |
return f("div", { | |
className: "girl-box " + a + " " + c, | |
onClick: this.onClick | |
}, f("img", { | |
src: (0, u.cdnURL)(i) | |
}), f(y.default, { | |
stars: s | |
}), f("div", { | |
className: "girl-box-disable" | |
}, f("div", { | |
className: "block-icon" | |
}), f("div", { | |
className: "block-text" | |
}, (0, l._tr)("promote {times} times", { | |
times: n | |
})))); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
var e = t.text, s = t.cost, n = t.onClick; | |
return r("div", { | |
className: "lvlup-btn promote", | |
onClick: n | |
}, r("div", { | |
className: "essence-text-box" | |
}, r("div", { | |
className: "essence-icon" | |
}), r("div", { | |
className: "essence-text" | |
}, s)), r("div", { | |
className: "btn-text" | |
}, e)); | |
} | |
e.__esModule = !0, e.default = n; | |
var o = (s(1), s(1)), r = o.createElement; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(26), u = s(185), c = n(u), y = s(187), d = n(y), p = s(189), x = n(p), f = s(190), h = n(f), m = s(1), g = m.createElement, v = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.changeTab = function() { | |
n.props.changeTab("promotion"); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.hero; | |
return g("div", null, g("div", { | |
className: "right-side" | |
}, g(x.default, { | |
onClick: this.changeTab, | |
text: (0, l._tr)("promotion") | |
}), g(h.default, { | |
hero: t | |
}), g(d.default, { | |
hero: t | |
})), g(c.default, { | |
initialHeroId: t.get("id") | |
})); | |
}, e; | |
}(a.Component); | |
e.default = v; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(26), u = s(14), c = n(u), y = s(186), d = n(y), p = s(1), x = p.createElement, f = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.state = { | |
locked: !1, | |
heroId: null | |
}, n.getPosition = function(t) { | |
var e = n.state.heroId, s = n.props.initialHeroId, o = c.default.getUser().get("heroes"), r = e ? e : s; | |
return o.indexOf(o.get(r)) + t; | |
}, n.isPositionAvaliable = function(t) { | |
var e = c.default.getUser().get("heroes"), s = n.getPosition(t); | |
return s < e.length && s >= 0; | |
}, n.nextHero = function() { | |
n.setHeroState(1); | |
}, n.previousHero = function() { | |
n.setHeroState(-1); | |
}, n.setHeroState = function(t) { | |
if (n.isPositionAvaliable(t)) { | |
var e = c.default.getUser().get("heroes"), s = n.getPosition(t), o = e.at(s); | |
if (o && s >= 0) { | |
var r = o.get("id"); | |
c.default.events.trigger("updatePopup", { | |
type: "hero", | |
heroId: r | |
}), n.setState({ | |
heroId: r | |
}); | |
} | |
} | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.render = function() { | |
return x("div", { | |
className: "hero-nav" | |
}, x(d.default, { | |
direction: "left", | |
disabled: !this.isPositionAvaliable(-1), | |
onClick: this.previousHero, | |
text: (0, l._tr)("Prev. hero") | |
}), x(d.default, { | |
direction: "right", | |
disabled: !this.isPositionAvaliable(1), | |
onClick: this.nextHero, | |
text: (0, l._tr)("Next hero") | |
})); | |
}, e; | |
}(a.PureComponent); | |
e.default = f; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
var e = t.text, s = t.onClick, n = t.disabled, o = t.direction, i = "left" == o ? "prev" : "next", a = n ? "disabled" : ""; | |
return r("div", { | |
className: i + " " + a, | |
onClick: s | |
}, r("div", { | |
className: "arrow" | |
}), r("div", { | |
className: "text" | |
}, e)); | |
} | |
e.__esModule = !0, e.default = n; | |
var o = (s(1), s(1)), r = o.createElement; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t) { | |
var e = t.hero, s = e.get("abilities").map(function(t) { | |
return l(i.default, { | |
hero: e, | |
heroId: e.get("id"), | |
data: t, | |
key: t.get("id") | |
}); | |
}); | |
return l("ul", { | |
className: "hero-abils" | |
}, s); | |
} | |
e.__esModule = !0, e.default = o; | |
var r = (s(1), s(188)), i = n(r), a = s(1), l = a.createElement; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(164), c = n(u), y = s(9), d = s(26), p = s(14), x = (n(p), | |
s(7), s(24)), f = n(x), h = s(166), m = n(h), g = s(142), v = n(g), b = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.state = { | |
locked: !1 | |
}, n.__update = function() { | |
n.forceUpdate(); | |
}, n.onBuyClick = function() { | |
var t = n.props, e = t.data, s = t.heroId, o = e.isLocked(); | |
o || e.get("bought") || (n.setState({ | |
locked: !0 | |
}), e.buy(s).catch(n.onBuyFail).finally(function() { | |
return n.setState({ | |
locked: !1 | |
}); | |
})); | |
}, n.onBuyFail = function(t) { | |
f.default.log(t); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
t.prototype.componentDidMount.call(this); | |
var e = this.props, s = e.data, n = e.hero; | |
if (s.isLocked()) { | |
var o = s.get("lock"); | |
o.watch(n), o.on("complete", this.__update); | |
} | |
}, e.prototype.componentWillUnmount = function() { | |
t.prototype.componentWillUnmount.call(this); | |
var e = this.props.data; | |
e.get("lock") && e.get("lock").off("complete", this.__update); | |
}, e.prototype.render = function() { | |
var t = this, e = this.props.data, s = e.isLocked(), n = !s && e.get("bought"), o = s ? "disabled" : "", r = n ? "" : "locked"; | |
if (s) var i = e.get("lock").get("attrs"), a = i.level.gte, u = (0, d._tr)("{level} Level", { | |
level: a | |
}); | |
var c = e.getInfo(), p = e.get("name"); | |
return l.default.createElement("li", { | |
className: "abil " + r | |
}, l.default.createElement("img", { | |
className: "icon", | |
src: (0, y.cdnURL)(e.get("icon")) | |
}), l.default.createElement(v.default, { | |
topDistance: 25, | |
tooltipText: p, | |
className: "name" | |
}, p), l.default.createElement(v.default, { | |
topDistance: 25, | |
tooltipText: c, | |
className: "text" | |
}, c), (0, y.IF)(!n)(function() { | |
return (0, y.IF)(s)(function() { | |
return l.default.createElement("div", { | |
className: "btn-buy " + o | |
}, l.default.createElement("div", { | |
className: "price" | |
}, u)); | |
}, function() { | |
return l.default.createElement(m.default, { | |
locked: t.state.locked, | |
className: "btn-buy", | |
resource: "gold", | |
value: e.get("price").gold, | |
text: (0, d._tr)("Unlock"), | |
onClick: t.onBuyClick | |
}); | |
}); | |
})); | |
}, e; | |
}(c.default); | |
e.default = b; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
var e = t.text, s = t.onClick; | |
return r("div", { | |
className: "promote-btn-box" | |
}, r("div", { | |
className: "btn-buy promote", | |
onClick: s | |
}, r("div", { | |
className: "txt" | |
}, e))); | |
} | |
e.__esModule = !0, e.default = n; | |
var o = (s(1), s(1)), r = o.createElement; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(26), u = s(165), c = n(u), y = s(156), d = n(y), p = s(191), x = n(p), f = s(7), h = s(1), m = h.createElement, g = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, u = Array(a), c = 0; c < a; c++) u[c] = arguments[c]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(u))), n.__update = function() { | |
n.forceUpdate(); | |
}, n.getDpsData = function(t) { | |
return [ { | |
type: "dps", | |
name: (0, l._tr)("DPS"), | |
tooltipText: (0, l._tr)("Damage Per Second"), | |
value: t.getDPS(), | |
mult: t.getDPSMult() | |
} ]; | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = this.props.hero; | |
t.on("change", this.__update); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
var e = this.props.hero, s = t.hero; | |
e.off("change", this.__update), s.on("change", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = this.props.hero; | |
t.off("change", this.__update); | |
}, e.prototype.render = function() { | |
var t = this.props.hero, e = t.getPromotion(), s = this.getDpsData(t); | |
return m("div", { | |
className: "hero-params" | |
}, m("div", { | |
className: "lvl-box" | |
}, m(x.default, { | |
lvl: t.get("level") | |
}), m(c.default, { | |
hero: t, | |
source: "pop" | |
})), m(d.default, { | |
popup: !0, | |
data: s | |
}), m("div", { | |
className: "asc-lvl" | |
}, (0, f.formatBig)(e))); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
var e = t.lvl; | |
return i("div", { | |
className: "lvl" | |
}, i("div", { | |
className: "text" | |
}, (0, o._tr)("LVL")), i("div", { | |
className: "num" | |
}, e)); | |
} | |
e.__esModule = !0, e.default = n; | |
var o = (s(1), s(26)), r = s(1), i = r.createElement; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(193), u = n(l), c = s(14), y = (n(c), s(1)), d = y.createElement, p = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.hero; | |
return d(u.default, { | |
imageCommon: t.getImage(), | |
imageAdvanced: t.getAscendImage(), | |
showEvent: "showAdvancedHeroForm", | |
hideEvent: "hideAdvancedHeroForm" | |
}); | |
}, e; | |
}(a.Component); | |
e.default = p; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(9), u = s(14), c = n(u), y = s(1), d = y.createElement, p = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.state = { | |
showAdvanced: !1 | |
}, n.showAdvancedImage = function() { | |
n.setState({ | |
showAdvanced: !0 | |
}); | |
}, n.hideAdvancedImage = function() { | |
n.setState({ | |
showAdvanced: !1 | |
}); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = this.props, e = t.showEvent, s = t.hideEvent; | |
c.default.events.on(e, this.showAdvancedImage), c.default.events.on(s, this.hideAdvancedImage); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = this.props, e = t.showEvent, s = t.hideEvent; | |
c.default.events.off(e, this.showAdvancedImage), c.default.events.off(s, this.hideAdvancedImage); | |
}, e.prototype.render = function() { | |
var t = this.props, e = t.imageCommon, s = t.imageAdvanced, n = this.state.showAdvanced ? "show" : ""; | |
return d("div", { | |
className: "hero-image" | |
}, d("img", { | |
className: "hero", | |
src: (0, l.cdnURL)(e) | |
}), d("img", { | |
className: "hero ascend " + n, | |
src: (0, l.cdnURL)(s) | |
})); | |
}, e; | |
}(a.Component); | |
e.default = p; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
var e = t.name, s = t.description; | |
return r("div", { | |
className: "hero-info" | |
}, r("div", { | |
className: "name-box" | |
}, r("div", { | |
className: "name" | |
}, e), r("div", { | |
className: "info" | |
}, s))); | |
} | |
e.__esModule = !0, e.default = n; | |
var o = (s(1), s(1)), r = o.createElement; | |
}, function(t, e) {}, , function(t, e) {}, , function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = Object.assign || function(t) { | |
for (var e = 1; e < arguments.length; e++) { | |
var s = arguments[e]; | |
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]); | |
} | |
return t; | |
}, l = s(1), u = (s(9), s(202)), c = n(u), y = s(203), d = n(y), p = s(78), x = n(p), f = s(26), h = s(14); | |
n(h); | |
s(197); | |
var m = s(1), g = m.createElement, v = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.state = { | |
isStarsUp: !1, | |
animation: !1 | |
}, n.startAnimation = function() { | |
clearTimeout(n.animationTimeout), n.animationTimeout = setTimeout(function() { | |
n.setState({ | |
animation: !0 | |
}), clearTimeout(n.starTimout), n.starTimout = setTimeout(function() { | |
n.setState({ | |
isStarsUp: !0 | |
}); | |
}, 500); | |
}, 500); | |
}, n.getHeroStarImage = function() { | |
return n.state.isStarsUp ? n.getCurrentStarImage() : n.getPrevStarImage(); | |
}, n.getPrevStarImage = function() { | |
return n._getStarImage(-1); | |
}, n.getCurrentStarImage = function() { | |
return n._getStarImage(0); | |
}, n._getStarImage = function() { | |
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = n.props.data.heroId, s = x.default.getStars(e, t), o = d.default._getImg(e, "images", t); | |
return { | |
star: s, | |
image: o | |
}; | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
this.startAnimation(); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
this.setState({ | |
isStarsUp: !1, | |
animation: !1 | |
}), this.startAnimation(); | |
}, e.prototype.componentWillUnmount = function() { | |
clearTimeout(this.animationTimeout), clearTimeout(this.starTimout); | |
}, e.prototype.render = function() { | |
var t = this.getHeroStarImage(), e = this.state.animation; | |
return g("div", { | |
className: "m-popup zvezdadd" | |
}, g("div", { | |
className: "title" | |
}, (0, f._tr)("new star")), g(c.default, a({ | |
animation: e | |
}, t)), g("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(l.Component); | |
e.default = v; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(9), u = s(14); | |
n(u); | |
s(197); | |
var c = s(1), y = c.createElement, d = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.state = { | |
vzuh: !1, | |
vzuh2: !1 | |
}, n.startAnimation = function() { | |
clearTimeout(n.vzuhTimeout), n.vzuhTimeout = setTimeout(function() { | |
n.setState({ | |
vzuh: !0 | |
}), clearTimeout(n.vzuh2Timeout), n.vzuh2Timeout = setTimeout(function() { | |
n.setState({ | |
vzuh2: !0 | |
}); | |
}, 300); | |
}, 100); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.componentWillReceiveProps = function(t) { | |
!this.props.animation && t.animation && (this.setState({ | |
vzuh: !1, | |
vzuh2: !1 | |
}), this.componentWillUnmount(), this.startAnimation()); | |
}, e.prototype.componentWillUnmount = function() { | |
clearTimeout(this.vzuhTimeout), clearTimeout(this.vzuh2Timeout); | |
}, e.prototype.render = function() { | |
var t = this.props, e = t.star, s = t.image, n = t.next, o = this.state, r = o.vzuh, i = o.vzuh2, a = r ? "vzuh" : "", u = i ? "vzuh2" : "", c = n ? "next" : ""; | |
return y("div", { | |
className: "zvezd-girl-box " + a + " " + u + " " + c | |
}, y("div", { | |
className: "zvezd-girl" | |
}, y("img", { | |
src: (0, l.cdnURL)(s) | |
})), y("div", { | |
className: "herostar-box-200" | |
}, y("div", { | |
className: "herostar lvl0" + e | |
})), y("div", { | |
className: "bdiz" | |
}), y("div", { | |
className: "bdiz2" | |
})); | |
}, e; | |
}(a.Component); | |
e.default = d; | |
}, function(t, e, s) { | |
var n, o, r, i, a, l; | |
r = s(22), i = s(25), n = s(14), l = s(81), a = s(75).getHeroStar, t.exports = o = function() { | |
function t() {} | |
return t.getAllIcons = function() { | |
return l.map(function(t) { | |
return function(e) { | |
return t.getIcon(e.id); | |
}; | |
}(this)); | |
}, t.getImage = function(t) { | |
return this._getImg(t, "images", 0); | |
}, t.getNextImage = function(t) { | |
return this._getImg(t, "images", 1); | |
}, t.getIcon = function(t) { | |
return this._getImg(t, "icons", 0); | |
}, t.getNextIcon = function(t) { | |
return this._getImg(t, "icons", 1); | |
}, t._getImg = function(e, s, n) { | |
var o, r, i, l; | |
if (o = t._getHeroConf(e)) return i = t._getHeroPromotion(e), l = a(i) + n, r = t._getImgWithRatio(o, s), | |
l >= r.length ? r[r.length - 1] : r[l - 1]; | |
}, t._getImgWithRatio = function(t, e) { | |
var s; | |
return s = n.getDevicePixelRatio(), 2 === s && (e += "@2x"), t[e]; | |
}, t._getHeroPromotion = function(t) { | |
var e, s; | |
return s = n.getUser(), e = s.get("counters"), e.get("H#P:" + t); | |
}, t._getHeroConf = function(t) { | |
return l.find(function(e) { | |
return e.id === t; | |
}); | |
}, t; | |
}(); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = Object.assign || function(t) { | |
for (var e = 1; e < arguments.length; e++) { | |
var s = arguments[e]; | |
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]); | |
} | |
return t; | |
}, l = s(1), u = (s(9), s(202)), c = n(u), y = s(203), d = n(y), p = s(78), x = n(p), f = s(26), h = s(14); | |
n(h); | |
s(197); | |
var m = s(1), g = m.createElement, v = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.getHeroStarImage = function() { | |
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = n.props.data.heroId, s = x.default.getStars(e, t), o = d.default._getImg(e, "images", t); | |
return { | |
star: s, | |
image: o | |
}; | |
}, n.getNextHeroes = function() { | |
return { | |
prevHeroStarImage: n.getHeroStarImage(0), | |
nextHeroStarImage: n.getHeroStarImage(1) | |
}; | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.getNextHeroes(), e = t.prevHeroStarImage, s = t.nextHeroStarImage; | |
return g("div", { | |
className: "m-popup zvezdadd next-form" | |
}, g("div", { | |
className: "title" | |
}, (0, f._tr)("next star")), g("div", { | |
className: "strel-right" | |
}), g(c.default, e), g(c.default, a({}, s, { | |
next: !0 | |
})), g("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(l.Component); | |
e.default = v; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(24), d = (n(y), s(9), s(7), s(81)), p = n(d), x = s(26), f = s(8), h = (n(f), | |
s(206)), m = n(h), g = s(12), v = n(g); | |
s(207); | |
var b = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = (this.props.data, c.default.getUser()), e = t.get("heroes"), s = v.default.object(e.map(function(t) { | |
return [ t.get("id"), !0 ]; | |
})), n = v.default.filter(p.default, function(t) { | |
return !s[t.id] && !t.special; | |
}), o = e.map(function(t) { | |
return l.default.createElement(m.default, { | |
hero: t.attributes, | |
haveHero: !0, | |
key: t.get("id") | |
}); | |
}).reverse(); | |
return o = o.concat(v.default.map(n, function(t) { | |
return l.default.createElement(m.default, { | |
hero: t, | |
haveHero: !1, | |
key: t.id | |
}); | |
})), l.default.createElement("div", { | |
className: "ascend-3-random-popup hero-zvezd" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, x._tr)("Promote 3 random Heroes")), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("div", { | |
className: "scroll-box" | |
}, l.default.createElement("ul", { | |
className: "heroes-card-list" | |
}, o))), l.default.createElement("div", { | |
className: "process-box" | |
}, l.default.createElement("div", { | |
className: "btn-back", | |
onClick: this.props.close | |
}, l.default.createElement("div", { | |
className: "btn-text" | |
}, (0, x._tr)("back")))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = b; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t) { | |
var e = t.hero, s = t.haveHero, n = void 0 === s || s, o = i.default.getUser(), r = o.get("counters"), l = (o.get("heroes"), | |
e.id), c = parseInt(r.get("H#P:" + l)), d = c > 0 ? "" : "disabled", x = y.default.getIcon(l), f = u.default.getStars(l); | |
return p("li", { | |
className: "hero-card " + (d ? "disabled" : "") | |
}, p("div", { | |
className: "a-box" | |
}, p("img", { | |
className: "avatar " + (n ? "" : "disabled"), | |
src: (0, a.cdnURL)(x) | |
})), p("div", { | |
className: "name" | |
}, e.name), p("div", { | |
className: "asc-lvl" | |
}, c), p("div", { | |
className: "herostar-box-promotion" | |
}, p("div", { | |
className: "herostar lvl0" + f | |
}))); | |
} | |
e.__esModule = !0, e.default = o; | |
var r = s(14), i = n(r), a = (s(1), s(9)), l = s(78), u = n(l), c = s(203), y = n(c), d = s(1), p = d.createElement; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(81), d = n(y), p = s(26), x = s(206), f = n(x); | |
s(207); | |
var h = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.data, e = (c.default.getUser(), d.default.filter(function(e) { | |
return t.indexOf(e.id) > -1; | |
}).sort()), s = e.map(function(t) { | |
return l.default.createElement(f.default, { | |
hero: t, | |
isDisabled: !1, | |
key: t.id | |
}); | |
}); | |
return l.default.createElement("div", { | |
className: "m-popup pink ascend-3-heroes-res" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, p._tr)("Congratulations!")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("p", { | |
className: "text center" | |
}, (0, p._tr)("Congratulations! You promoted these 3 heroes:")), l.default.createElement("ul", { | |
className: "heroes-card-list hero-zvezd" | |
}, s)), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.props.close | |
}, (0, p._tr)("Cool! Thanks!")), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(12), c = n(u), y = s(8), d = n(y), p = s(164), x = (n(p), | |
s(9)), f = s(26), h = (s(7), s(14)), m = n(h), g = s(166), v = (n(g), s(211)), b = (n(v), | |
s(173)), _ = n(b), k = s(19), w = n(k); | |
s(213), s(215); | |
var C = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.state = { | |
style: null, | |
loading: !0, | |
pictureId: null | |
}, s.handleImageLoaded = s.handleImageLoaded.bind(s), s.nextPicture = s.nextPicture.bind(s), | |
s.openFullSize = s.openFullSize.bind(s), s.previousPicture = s.previousPicture.bind(s), | |
s.setPictureState = s.setPictureState.bind(s), s; | |
} | |
return i(e, t), e.prototype.getPicture = function() { | |
var t = null == this.state.pictureId ? this.props.meta.pictureId : this.state.pictureId; | |
return this.getPictureById(t); | |
}, e.prototype.getPictureById = function(t) { | |
var e = this.props.data; | |
return c.default.find(e, function(e) { | |
return e.get("id") == t; | |
}); | |
}, e.prototype.getPosition = function(t) { | |
var e = this.props.data, s = this.state.pictureId ? this.state.pictureId : this.props.meta.pictureId; | |
return e.indexOf(this.getPictureById(s)) + t; | |
}, e.prototype.isPositionAvaliable = function(t) { | |
return !0; | |
}, e.prototype.nextPicture = function() { | |
this.setPictureState(1); | |
}, e.prototype.previousPicture = function() { | |
this.setPictureState(-1); | |
}, e.prototype.setPictureState = function(t) { | |
if (this.isPositionAvaliable(t)) { | |
var e = this.props.data, s = this.getPosition(t), n = this.getPosition(0); | |
if (s == e.length && (s = 0), s === -1 && (s = e.length - 1), s != n) { | |
var o = e[s]; | |
if (o && s >= 0) { | |
var r = o.get("id"); | |
m.default.events.trigger("updatePopup", { | |
type: "picture", | |
data: e, | |
pictureId: r | |
}), this.setState({ | |
pictureId: r | |
}); | |
} | |
} | |
} | |
}, e.prototype.handleImageLoaded = function(t) { | |
this.setState({ | |
loading: !0 | |
}); | |
var e = (0, w.default)(".popup-layer .img-lightbox"), s = e.find(".place"), n = s.find("img"), o = { | |
w: s.width(), | |
h: s.height() | |
}, r = ({ | |
w: n.width(), | |
h: n.height() | |
}, { | |
w: o.w - n.width(), | |
h: o.h - n.height() | |
}), i = e.position().left + r.w / 2, a = e.position().top + r.h / 2; | |
e.animate({ | |
left: i, | |
right: i, | |
top: a, | |
bottom: a, | |
opacity: 1 | |
}, 150, "swing", function() { | |
this.setState({ | |
loading: !1 | |
}); | |
}.bind(this)); | |
}, e.prototype.openFullSize = function(t) { | |
t.stopPropagation(); | |
var e = (0, d.default)(m.default.getUser().get("vars").get("TUT_STEP") || 15); | |
if (!e.lt(15)) { | |
this.props.close(); | |
var s = this.getPicture(); | |
m.default.events.trigger("showLightBox", { | |
data: this.props.data, | |
pictureId: s.get("id") | |
}); | |
} | |
}, e.prototype.render = function() { | |
var t = this, e = this.getPicture(), s = e.getAuthor(), n = (0, d.default)(m.default.getUser().get("vars").get("TUT_STEP") || 15); | |
return l.default.createElement("div", { | |
className: "img-lightbox-wrapper" | |
}, l.default.createElement("div", { | |
className: "img-lightbox" | |
}, l.default.createElement("div", { | |
className: "place" | |
}, l.default.createElement("img", { | |
className: "img " + (n.gte(15) ? "zoom-in" : ""), | |
src: e.get("thb"), | |
onLoad: this.handleImageLoaded, | |
onClick: this.openFullSize, | |
style: { | |
visibility: this.state.loading ? "hidden" : "visible" | |
} | |
}), (0, x.IF)(this.state.loading)(function() { | |
return l.default.createElement(_.default, null); | |
})), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
}), l.default.createElement("div", { | |
className: "info" | |
}, (0, f._tr)("Artist: {name}", { | |
name: s | |
}), l.default.createElement("div", { | |
className: "price p" + e.get("stars") | |
})), (0, x.IF)(n.gte(15))(function() { | |
return l.default.createElement("div", { | |
className: "btn-fs", | |
onClick: t.openFullSize | |
}); | |
})), l.default.createElement("div", { | |
className: "scroll-controls" | |
}, l.default.createElement("div", { | |
className: "scroll-left " + (this.isPositionAvaliable(-1) ? "" : "disabled"), | |
onClick: this.previousPicture | |
}), l.default.createElement("div", { | |
className: "scroll-right " + (this.isPositionAvaliable(1) ? "" : "disabled"), | |
onClick: this.nextPicture | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = C; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(212), c = n(u), y = s(12), d = n(y), p = s(26), x = s(14), f = n(x), h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s.onEditTag = s.onEditTag.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = f.default.getUser(); | |
t.get("album").on("change:favTagsAmount", this.__update), t.get("counters").on("change:MFAVTG", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = f.default.getUser(); | |
t.get("album").off("change:favTagsAmount", this.__update), t.get("counters").off("change:MFAVTG", this.__update); | |
}, e.prototype.onEditTag = function() { | |
window.location.assign("#/galery"), this.props.close(); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.render = function() { | |
var t, e = this, s = f.default.getUser(), n = s.get("album").get("favTagsAmount"), o = s.get("album").get("tags").getFavTagsCount(), r = s.get("album").getFavoriteTags(); | |
return "popup" == this.props.usetype ? (t = d.default.map(r, function(t, e) { | |
var s = t.get("tag").split(" / ")[0]; | |
return l.default.createElement("li", { | |
key: e, | |
className: "line fav" | |
}, s); | |
}), l.default.createElement("li", { | |
className: "fav-tags" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, p._tr)("Favorite Tags"), l.default.createElement("div", { | |
className: "num" | |
}, n + "/" + o)), l.default.createElement("div", { | |
className: "list-box-scroll" | |
}, l.default.createElement("ul", { | |
className: "list" | |
}, t)), l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: this.onEditTag | |
}, l.default.createElement("div", { | |
className: "text1" | |
}, (0, p._tr)("Edit")), l.default.createElement("div", { | |
className: "edit-tag-ico" | |
}), l.default.createElement("div", { | |
className: "text2" | |
}, (0, p._tr)("Tag"))))) : (t = d.default.map(r, function(t, e) { | |
return l.default.createElement(c.default, { | |
item: t, | |
key: e | |
}); | |
}), l.default.createElement("li", { | |
onClick: function() { | |
return e.props.open("fav-tags"); | |
}, | |
className: "imgs fav-tags " + (this.props.opened ? "opened" : "") | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, p._tr)("Favorite Tags"), l.default.createElement("div", { | |
className: "num" | |
}, n + "/" + o)), l.default.createElement("ul", { | |
className: "list" | |
}, t))); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = (s(7), function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.state = { | |
selected: !1 | |
}, s.select = s.select.bind(s), s.favorite = s.favorite.bind(s), s.__update = s.__update.bind(s), | |
s.onClearSelected = s.onClearSelected.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
this.setState({ | |
fav: this.props.item.get("fav"), | |
selected: this.props.item.get("selected") | |
}), this.props.item.on("change", this.__update), c.default.events.on("clearSelected", this.onClearSelected); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
var e = !!t && t.item.get("fav"), s = !!t && t.item.get("selected"); | |
this.props.item && this.props.item.off("change", this.__update), t.item && t.item.on("change", this.__update), | |
this.setState({ | |
fav: e, | |
selected: s | |
}); | |
}, e.prototype.componentWillUnmount = function(t) { | |
c.default.events.off("clearSelected", this.onClearSelected), this.props.item.off("change", this.__update); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.onClearSelected = function(t) { | |
this.state.selected && (this.props.item.set("selected", !1), this.setState({ | |
selected: !1 | |
})); | |
}, e.prototype.select = function(t) { | |
var e = this.props.item; | |
t.stopPropagation(), this.state.selected || c.default.events.trigger("clearSelected"), | |
e.set("selected", !this.state.selected), this.setState({ | |
selected: !this.state.selected | |
}); | |
var s = e.get("selected") ? e.get("tag").split(" / ")[0] : ""; | |
c.default.events.trigger("selectedChanged", s); | |
}, e.prototype.favorite = function(t) { | |
t.stopPropagation(); | |
var e = c.default.getUser(), s = e.get("album").get("favTagsAmount"), n = e.get("album").get("tags").getFavTagsCount(), o = this.props.item, r = o.get("fav") ? "unfavorite" : s < n ? "favorite" : "limitfavorite"; | |
c.default.show({ | |
popup: { | |
type: r, | |
data: o | |
} | |
}); | |
}, e.prototype.render = function() { | |
var t = this.props.item, e = t.get("tag").split(" / ")[0]; | |
return l.default.createElement("li", { | |
onClick: this.select, | |
className: "line " + (t.get("selected") ? "selected" : "") | |
}, e, l.default.createElement("div", { | |
onClick: this.favorite, | |
className: "heart " + (t.get("fav") ? "fav" : "") | |
})); | |
}, e; | |
}(a.Component)); | |
e.default = y; | |
}, function(t, e) {}, , function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(12), c = n(u), y = s(8), d = n(y), p = s(164), x = n(p), f = (s(9), | |
s(26)), h = s(7), m = s(14), g = n(m), v = s(24), b = n(v), _ = s(166), k = n(_), w = s(211), C = n(w); | |
s(213); | |
var E = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onShardsChange = s.onShardsChange.bind(s), s.onClick = s.onClick.bind(s), | |
s.state = { | |
locked: !1 | |
}, s.mounted = !1, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
t.prototype.componentDidMount.call(this), g.default.getUser().get("resources").on("change:shards", this.onShardsChange); | |
}, e.prototype.componentWillUnmount = function() { | |
t.prototype.componentWillUnmount.call(this), g.default.getUser().get("resources").off("change:shards", this.onShardsChange); | |
}, e.prototype.onShardsChange = function(t) { | |
this.forceUpdate(); | |
}, e.prototype.onClick = function(t, e, s) { | |
var n = this; | |
t.stopPropagation(); | |
var o = g.default.getUser().get("album"); | |
this.setState({ | |
locked: !0 | |
}); | |
var r = function() { | |
this.props.close(); | |
}.bind(this); | |
o.tryBuyPicture(e, s, r).catch(this.onBuyFail).finally(function() { | |
return c.default.defer(function() { | |
return n.setState({ | |
locked: !1 | |
}); | |
}); | |
}); | |
}, e.prototype.onBuyFail = function(t) { | |
b.default.log(t); | |
}, e.prototype.render = function() { | |
var t = this, e = g.default.getUser(), s = e.get("album"), n = s.getPicPrice(2), o = n[0].shards, r = n[1].crowns, i = s.getPicPrice(1), a = i[0].shards, u = i[1].crowns, c = s.getPicPrice(0), y = c[0].shards, p = c[1].crowns, x = (0, | |
d.default)(e.get("resources").get("shards")), m = x.div(o).times(100).round(0, 0); | |
return m.gt(100) && (m = 100), l.default.createElement("div", { | |
className: "pics3-popup" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, f._tr)("Pictures")), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("div", { | |
className: "progressor" | |
}, l.default.createElement("div", { | |
className: "num" | |
}, (0, h.formatBig)(x), "/", (0, h.formatBig)(o)), l.default.createElement("div", { | |
className: "prg-box" | |
}, l.default.createElement("div", { | |
className: "prg", | |
style: { | |
width: m + "%" | |
} | |
})), l.default.createElement("div", { | |
className: "lvl1" | |
}), l.default.createElement("div", { | |
className: "lvl2" | |
}), l.default.createElement("div", { | |
className: "lvl3" | |
}), l.default.createElement("div", { | |
className: "prg-icon" | |
})), l.default.createElement("div", { | |
className: "cards" | |
}), l.default.createElement("div", { | |
className: "arrows" | |
}, l.default.createElement("div", { | |
className: "arrow n1" | |
}, l.default.createElement("div", { | |
className: "arr-dis" | |
}), l.default.createElement("div", { | |
className: "banner" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, (0, f._tr)("Random tag")), l.default.createElement(k.default, { | |
locked: this.state.locked, | |
className: "btn-buy", | |
resourceFallbackAlwaysEnabled: "true", | |
resource: "shards", | |
fallbackResource: "crowns", | |
value: y, | |
fallbackValue: p, | |
text: (0, f._tr)("Open"), | |
onClick: function(e, s) { | |
return t.onClick(e, 0, s); | |
} | |
}))), l.default.createElement("div", { | |
className: "arrow n2" | |
}, l.default.createElement("div", { | |
className: "arr-dis" | |
}), l.default.createElement("div", { | |
className: "banner" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, (0, f._tr)("25% Favorite tag")), l.default.createElement(k.default, { | |
locked: this.state.locked, | |
className: "btn-buy", | |
resourceFallbackAlwaysEnabled: "true", | |
resource: "shards", | |
fallbackResource: "crowns", | |
value: a, | |
fallbackValue: u, | |
text: (0, f._tr)("Open"), | |
onClick: function(e, s) { | |
return t.onClick(e, 1, s); | |
} | |
}))), l.default.createElement("div", { | |
className: "arrow n3" | |
}, l.default.createElement("div", { | |
className: "arr-dis" | |
}), l.default.createElement("div", { | |
className: "banner" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, (0, f._tr)("100% Favorite tag")), l.default.createElement(k.default, { | |
locked: this.state.locked, | |
className: "btn-buy", | |
resourceFallbackAlwaysEnabled: "true", | |
resource: "shards", | |
fallbackResource: "crowns", | |
value: o, | |
fallbackValue: r, | |
text: (0, f._tr)("Open"), | |
onClick: function(e, s) { | |
return t.onClick(e, 2, s); | |
} | |
})))), l.default.createElement(C.default, { | |
usetype: "popup", | |
close: this.props.close | |
}), l.default.createElement("div", { | |
className: "info help" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, (0, f._tr)("Here you can exchange your Memory shards for hentai pictures. Also, you can get pictures with fetish you interested in - use button “Edit tag” to do it.")))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(x.default); | |
e.default = E; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(26), d = s(24), p = n(d), x = s(7), f = s(12), h = (n(f), | |
s(164)), m = n(h), g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onReborn = s.onReborn.bind(s), s.onRebornBuy = s.onRebornBuy.bind(s), s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.onReborn = function(t) { | |
var e = this; | |
t.stopPropagation(), this.state.locked || (this.setState({ | |
locked: !0 | |
}), c.default.getUser().reborn().then(this.props.close).finally(function() { | |
return e.setState({ | |
locked: !1 | |
}); | |
})); | |
}, e.prototype.onRebornBuy = function(t) { | |
var e = this; | |
if (t.stopPropagation(), !this.state.locked) { | |
this.setState({ | |
locked: !0 | |
}); | |
var s = this.getRebornItem(); | |
this.props.close(), c.default.getUser().get("items").buy(s.typeId, "reborn_popup").catch(this.onBuyFail).finally(function() { | |
return e.setState({ | |
locked: !1 | |
}); | |
}); | |
} | |
}, e.prototype.onBuyFail = function(t) { | |
p.default.log(t); | |
}, e.prototype.getRebornItem = function() { | |
var t = c.default.getUser(), e = t.get("itemSale"), s = e.getItemsList(); | |
for (var n in s) { | |
var o = s[n], r = t.get("items").getDescriptor(parseInt(o)); | |
if ("reborn" == r.tag) return r; | |
} | |
return null; | |
}, e.prototype.render = function() { | |
var t = c.default.getUser(), e = [], s = t.getRebornReward(), n = s.res; | |
for (var o in n) n.hasOwnProperty(o) && e.push(l.default.createElement("div", { | |
key: o, | |
className: "price " + o | |
}, "+", (0, x.formatBig)(n[o]))); | |
var r = this.getRebornItem(), i = r.price.crowns; | |
return l.default.createElement("div", { | |
className: "reborn-popup" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("Reborn"), "!"), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("div", { | |
className: "text-0" | |
}, (0, y._tr)("You can reborn - start the game anew, converting all the hero levels you achieved to Gems!")), l.default.createElement("div", { | |
className: "text-1" | |
}, (0, y._tr)("You will keep:"), l.default.createElement("ol", null, l.default.createElement("li", null, (0, | |
y._tr)("All the achievements and achievement bonuses you received.")), l.default.createElement("li", null, (0, | |
y._tr)("All the guild progress and the bonuses.")), l.default.createElement("li", null, (0, | |
y._tr)("Gems and Crowns.")), l.default.createElement("li", null, (0, y._tr)("VIP status")), l.default.createElement("li", null, (0, | |
y._tr)("Pictures you found.")), l.default.createElement("li", null, (0, y._tr)("Your heroes' promotions")))), l.default.createElement("div", { | |
className: "text-2" | |
}, (0, y._tr)("You will get:"), e), l.default.createElement("div", { | |
className: "text-3" | |
}, (0, y._tr)("You will lose:"), l.default.createElement("ol", null, l.default.createElement("li", null, (0, | |
y._tr)("All the heroes, hero levels and abilities")), l.default.createElement("li", null, (0, | |
y._tr)("Gold and Memory shards")))), l.default.createElement("div", { | |
className: "text-4" | |
}, (0, y._tr)("You can reborn for a price without losing the progress - just get the bonus!")), l.default.createElement("div", { | |
className: "btn-box-1" | |
}, l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.onRebornBuy | |
}, (0, y._tr)("Reborn without losing progress for"), l.default.createElement("span", { | |
className: "price crowns" | |
}, (0, x.formatBig)(i))), l.default.createElement("div", { | |
className: "text-5" | |
}, (0, y._tr)("Reborn for FREE, losing progress:")), l.default.createElement("div", { | |
className: "btn-box-2", | |
onClick: this.onReborn | |
}, l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok-free" | |
}, (0, y._tr)("Yes"))), l.default.createElement("div", { | |
className: "btn-box-3", | |
onClick: this.props.close | |
}, l.default.createElement("div", { | |
className: "btn-simple-silver btn-cancel" | |
}, (0, y._tr)("No")))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
}))); | |
}, e; | |
}(m.default); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(26)), y = s(164), d = n(y); | |
s(215); | |
var p = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.locked = !1, s.onFavorite = s.onFavorite.bind(s), s; | |
} | |
return i(e, t), e.prototype.onFavorite = function(t) { | |
var e = this; | |
if (!this.locked) { | |
this.locked = !0, t.stopPropagation(); | |
var s = this.props.data; | |
s.favorite().then(this.props.close).catch(function() { | |
return e.locked = !1; | |
}); | |
} | |
}, e.prototype.render = function() { | |
var t = this.props.data; | |
return l.default.createElement("div", { | |
className: "m-popup pink fav-popup fav-add" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, c._tr)("Add favorite tag?")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("h2", null, (0, c._tr)("Confirm your choice")), l.default.createElement("p", null, (0, | |
c._tr)("Do you want to choose tag {tag} as a favorite?", { | |
tag: t.get("tag").split(" / ")[0] | |
})), l.default.createElement("p", null, l.default.createElement("span", { | |
className: "warn" | |
}, (0, c._tr)("Attention!")), " ", (0, c._tr)("You will be able to remove it only for the crowns")), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.onFavorite | |
}, (0, c._tr)("Yes")), l.default.createElement("div", { | |
className: "btn-simple-silver btn-cancel", | |
onClick: this.props.close | |
}, (0, c._tr)("No"))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(d.default); | |
e.default = p; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(12)), y = n(c), d = s(26), p = s(24), x = n(p), f = s(164), h = n(f); | |
s(215); | |
var m = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onUnfavorite = s.onUnfavorite.bind(s), s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.onUnfavorite = function(t, e) { | |
var s = this; | |
if (!this.state.locked) { | |
t.stopPropagation(); | |
var n = this.props.data; | |
this.props.close(), this.setState({ | |
locked: !0 | |
}), n.buyUnfavorite(e).catch(this.onBuyFail).finally(function() { | |
return y.default.defer(function() { | |
return s.setState({ | |
locked: !1 | |
}); | |
}); | |
}); | |
} | |
}, e.prototype.onBuyFail = function(t) { | |
x.default.log(t); | |
}, e.prototype.render = function() { | |
var t = this; | |
this.props.data; | |
return l.default.createElement("div", { | |
className: "m-popup pink fav-popup fav-remove" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, d._tr)("Remove favorite tag?")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("h2", null, (0, d._tr)("Do you want to remove this tag or remove all your favorite tags?")), l.default.createElement("div", { | |
className: "btn-box" | |
}, l.default.createElement("div", { | |
className: "btn-box-bg" | |
}, l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok " + (this.state.locked ? "disabled" : ""), | |
onClick: function(e) { | |
return t.onUnfavorite(e, "current"); | |
} | |
}, (0, d._tr)("Remove this: "), l.default.createElement("div", { | |
className: "price crown" | |
}, "50")), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok2 " + (this.state.locked ? "disabled" : ""), | |
onClick: function(e) { | |
return t.onUnfavorite(e, "all"); | |
} | |
}, (0, d._tr)("Remove all: "), l.default.createElement("div", { | |
className: "price crown" | |
}, "99")))), l.default.createElement("div", { | |
className: "btn-simple-silver btn-cancel", | |
onClick: this.props.close | |
}, (0, d._tr)("Cancel"))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(h.default); | |
e.default = m; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(12), c = (n(u), s(8)), y = (n(c), s(164)), d = n(y), p = s(9), x = s(26), f = (s(7), | |
s(14)), h = n(f), m = s(166), g = (n(m), s(211)), v = (n(g), s(173)), b = n(v); | |
s(213); | |
var _ = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onClick = s.onClick.bind(s), s.handleImageLoaded = s.handleImageLoaded.bind(s), | |
s.state = { | |
style: null, | |
loading: !0 | |
}, s; | |
} | |
return i(e, t), e.prototype.onClick = function(t, e, s) { | |
t.stopPropagation(); | |
var n = h.default.getUser().get("album"); | |
n.buyPicture(e, s); | |
}, e.prototype.handleImageLoaded = function(t) { | |
var e = t.target, s = e.naturalWidth, n = e.naturalHeight; | |
this.props.data.set({ | |
width: s, | |
height: n, | |
loaded: !0 | |
}); | |
var o = { | |
w: 694, | |
h: 540 | |
}, r = { | |
w: s, | |
h: n | |
}, i = r.w / o.w, a = r.h / o.h, l = 0, u = 0; | |
i > a ? (l = r.w / i, u = r.h / i) : (l = r.w / a, u = r.h / a); | |
var c = { | |
left: (o.w - l) / 2, | |
top: (o.h - u) / 2, | |
width: l, | |
height: u | |
}; | |
this.setState({ | |
style: c, | |
loading: !1 | |
}); | |
}, e.prototype.render = function() { | |
var t = this.props.data, e = t.getAuthor(); | |
return l.default.createElement("div", { | |
className: "m-popup newpic-popup open" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, x._tr)("New picture!")), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("div", { | |
className: "img-box" | |
}, l.default.createElement("img", { | |
className: "pic", | |
onLoad: this.handleImageLoaded, | |
src: t.get("thb"), | |
style: this.state.style | |
}), (0, p.IF)(this.state.loading)(function() { | |
return l.default.createElement(b.default, null); | |
})), l.default.createElement("div", { | |
className: "info" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, (0, x._tr)("Artist: {name}", { | |
name: e | |
})), l.default.createElement("div", { | |
className: "price p" + t.get("stars") | |
}))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(d.default); | |
e.default = _; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(12)), y = n(c), d = s(26), p = s(24), x = n(p), f = s(164), h = n(f); | |
s(215); | |
var m = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onUnfavorite = s.onUnfavorite.bind(s), s.onVip = s.onVip.bind(s), s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.onUnfavorite = function(t) { | |
var e = this; | |
if (!this.state.locked) { | |
t.stopPropagation(); | |
var s = this.props.data; | |
this.props.close(), this.setState({ | |
locked: !0 | |
}), s.buyUnfavorite("all").catch(this.onBuyFail).finally(function() { | |
return y.default.defer(function() { | |
return e.setState({ | |
locked: !1 | |
}); | |
}); | |
}); | |
} | |
}, e.prototype.onBuyFail = function(t) { | |
x.default.log(t); | |
}, e.prototype.onVip = function(t) { | |
t.stopPropagation(), this.props.close(), window.location.assign("#/bank/vip"); | |
}, e.prototype.render = function() { | |
this.props.data; | |
return l.default.createElement("div", { | |
className: "m-popup pink fav-popup fav-add-nospace" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, d._tr)("Favorite tags limit")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("h2", null, (0, d._tr)("No free tags")), l.default.createElement("p", null, (0, | |
d._tr)("You have reached favorite tags limit.")), l.default.createElement("p", null, (0, | |
d._tr)("Rise VIP level or remove one or few favorite tags.")), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.onVip | |
}, (0, d._tr)("VIP")), l.default.createElement("div", { | |
className: "btn-box" | |
}, l.default.createElement("div", { | |
className: "btn-box-bg" | |
}, l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok2 " + (this.state.locked ? "disabled" : ""), | |
onClick: this.onUnfavorite | |
}, (0, d._tr)("Remove all for"), " ", l.default.createElement("div", { | |
className: "price crown" | |
}, "99")))), l.default.createElement("div", { | |
className: "btn-simple-silver btn-cancel", | |
onClick: this.props.close | |
}, (0, d._tr)("Cancel"))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(h.default); | |
e.default = m; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(19), c = n(u), y = s(26), d = s(9), p = s(14), x = n(p), f = s(68), h = n(f), m = s(24), g = n(m), v = s(8), b = n(v), _ = s(12), k = (n(_), | |
function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onSignClick = s.onSignClick.bind(s), s.onSignupClick = s.onSignupClick.bind(s), | |
s.onRecoverClick = s.onRecoverClick.bind(s), s.onFieldChange = s.onFieldChange.bind(s), | |
s.setEl = s.setEl.bind(s), s.state = {}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
x.default.events.trigger("suspendTutorial"); | |
}, e.prototype.componentWillUnmount = function() { | |
x.default.events.trigger("resumeTutorial"); | |
}, e.prototype.setEl = function(t) { | |
this.el = t, t && (0, c.default)("input.username", t).focus(); | |
}, e.prototype.onFieldChange = function(t) { | |
var e = {}; | |
e[t.target.name] = t.target.value, this.setState(e); | |
}, e.prototype.onSignClick = function() { | |
var t = this, e = {}, s = this.state.username, n = this.state.password, o = !1; | |
if (s ? e.error = e.username_error = "" : (e.error = e.username_error = (0, y._tr)("Username is required"), | |
o = !0), n ? e.error = e.password_error = "" : (e.error = e.password_error = (0, | |
y._tr)("Password is required"), o = !0), o) return void this.setState(e); | |
var r = h.default.callMethod("user.signin", { | |
username: s, | |
password: n | |
}); | |
return r.then(function(s) { | |
return "fail" == s ? (e.error = (0, y._tr)("Sign in failed: Invalid username or password"), | |
t.setState(e)) : (t.props.close(), window.location.href = "/"), s; | |
}, function(t) { | |
return g.default.log(t); | |
}); | |
}, e.prototype.onSignupClick = function() { | |
this.props.close(), x.default.show({ | |
popup: { | |
type: "signup" | |
} | |
}); | |
}, e.prototype.onRecoverClick = function() { | |
this.props.close(), x.default.show({ | |
popup: { | |
type: "signinrecover" | |
} | |
}); | |
}, e.prototype.render = function() { | |
var t = (0, b.default)(x.default.getUser().get("vars").get("TUT_STEP") || 0).gte(15), e = this.state, s = e.username, n = e.password, o = e.error, r = e.username_error, i = e.password_error; | |
return l.default.createElement("div", { | |
ref: this.setEl, | |
className: "m-popup sand sign-in" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("Sign in")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content sign-in1 " + (o ? "error" : "") | |
}, (0, d.IF)(o)(l.default.createElement("div", { | |
className: "err-msg1" | |
}, o)), l.default.createElement("div", { | |
className: "sign-in-form" | |
}, l.default.createElement("div", { | |
className: "block-a" | |
}, l.default.createElement("label", { | |
className: "tfield username " + (r ? "error" : "") | |
}, (0, y._tr)("Username"), l.default.createElement("input", { | |
type: "text", | |
name: "username", | |
className: "itext username", | |
value: s || "", | |
onChange: this.onFieldChange | |
})), l.default.createElement("label", { | |
className: "tfield password " + (i ? "error" : "") | |
}, (0, y._tr)("Password"), l.default.createElement("input", { | |
type: "password", | |
name: "password", | |
className: "itext password", | |
value: n || "", | |
onChange: this.onFieldChange | |
}), l.default.createElement("div", { | |
className: "note", | |
onClick: this.onRecoverClick | |
}, (0, y._tr)("Forgot password?")))), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.onSignClick | |
}, (0, y._tr)("Sign in")), (0, d.IF)(t)(l.default.createElement("div", { | |
className: "alt-step" | |
}, (0, y._tr)("Don't have a password?"), " ", l.default.createElement("span", { | |
className: "go", | |
onClick: this.onSignupClick | |
}, (0, y._tr)("Sign up")))))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component)); | |
e.default = k; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(26), c = s(164), y = n(c), d = s(9), p = s(68), x = n(p), f = s(24), h = n(f), m = s(14), g = n(m), v = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onRecoverClick = s.onRecoverClick.bind(s), s.onSignupClick = s.onSignupClick.bind(s), | |
s.onSignClick = s.onSignClick.bind(s), s.onFieldChange = s.onFieldChange.bind(s), | |
s.setEl = s.setEl.bind(s), s.state = {}, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
g.default.events.trigger("suspendTutorial"); | |
}, e.prototype.componentWillUnmount = function() { | |
g.default.events.trigger("resumeTutorial"); | |
}, e.prototype.setEl = function(t) { | |
this.el = t, t && $("input.email", t).focus(); | |
}, e.prototype.onFieldChange = function(t) { | |
var e = {}; | |
e[t.target.name] = t.target.value, this.setState(e); | |
}, e.prototype.onRecoverClick = function() { | |
var t = this, e = this.state.email; | |
if (!e) return void this.setState({ | |
error_email: (0, u._tr)("Email is required") | |
}); | |
if (!/^.+@.+\..+$/.test(e)) return void this.setState({ | |
error_email: (0, u._tr)("Email is invalid") | |
}); | |
this.setState({ | |
error_email: "" | |
}); | |
var s = x.default.callMethod("user.restorePasswd", { | |
email: e | |
}); | |
return s.then(function(e) { | |
return "ok" == e ? t.setState({ | |
error: "", | |
done: !0, | |
text: (0, u._tr)("A message with the instructions was sent to the email specified.") | |
}) : e.error ? t.setState({ | |
error: (0, u._tr)("Failed: {error}", { | |
error: e.error | |
}) | |
}) : t.setState({ | |
error: (0, u._tr)("Failed to send the message") | |
}), e; | |
}, function(t) { | |
return h.default.log(t); | |
}); | |
}, e.prototype.onSignupClick = function() { | |
this.props.close(), g.default.show({ | |
popup: { | |
type: "signup" | |
} | |
}); | |
}, e.prototype.onSignClick = function() { | |
this.props.close(), g.default.show({ | |
popup: { | |
type: "signin" | |
} | |
}); | |
}, e.prototype.render = function() { | |
var t = this, e = this.state, s = e.email, n = e.text, o = e.error, r = e.error_email, i = e.done; | |
return l.default.createElement("div", { | |
className: "m-popup sand sign-in" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, u._tr)("Restore password")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content sign-in2 " + (o ? "error" : "") | |
}, l.default.createElement("div", { | |
className: "text1" | |
}, n || (0, u._tr)("Enter the email you entered when you signed up. We will send your a message with the instructions.")), (0, | |
d.IF)(o)(function() { | |
return l.default.createElement("div", { | |
className: "err-msg1" | |
}, o); | |
}), (0, d.IF)(!i)(function() { | |
return l.default.createElement("div", { | |
className: "sign-in-form" | |
}, l.default.createElement("div", { | |
className: "block-a" | |
}, l.default.createElement("label", { | |
className: "tfield email " + (r ? "error" : "") | |
}, (0, u._tr)("Email"), l.default.createElement("p", { | |
className: "error" | |
}, r), l.default.createElement("input", { | |
type: "text", | |
name: "email", | |
className: "itext email", | |
value: s || "", | |
onChange: t.onFieldChange | |
}))), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: t.onRecoverClick | |
}, (0, u._tr)("Recover password")), l.default.createElement("div", { | |
className: "alt-step" | |
}, (0, u._tr)("Not registered yet? "), l.default.createElement("div", { | |
className: "go", | |
onClick: t.onSignupClick | |
}, (0, u._tr)("Sign up")))); | |
}, function() { | |
return l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: t.onSignClick | |
}, (0, u._tr)("Sign in")); | |
})), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(y.default); | |
e.default = v; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(19), c = n(u), y = s(26), d = s(9), p = s(14), x = n(p), f = s(68), h = n(f), m = s(24), g = n(m), v = s(12), b = n(v), _ = s(10), k = n(_), w = s(63), C = n(w), E = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
s.inProcess = !1, s.onSignClick = s.onSignClick.bind(s), s.onBackClick = s.onBackClick.bind(s), | |
s.onVerifyHelpClick = s.onVerifyHelpClick.bind(s), s.onFieldChange = s.onFieldChange.bind(s), | |
s.setEl = s.setEl.bind(s), s.setEmail = s.setEmail.bind(s), s.handleVerify = s.handleVerify.bind(s), | |
s.handleHelp = s.handleHelp.bind(s), s.handleLogin = s.handleLogin.bind(s), s.handleComplete = s.handleComplete.bind(s); | |
var n = x.default.getUser(), i = { | |
errors: {}, | |
values: {} | |
}, a = n.get("email"); | |
return a ? (i.values.email = a, n.get("email_verified") ? n.get("registered") || (i.stage = "login") : i.stage = "verify") : i.stage = "start", | |
s.state = i, s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
x.default.events.trigger("suspendTutorial"), this.state && "start" == this.state.stage && h.default.addToBatch("user.log", { | |
action: "dlg.signup" | |
}); | |
}, e.prototype.componentWillUnmount = function() { | |
x.default.events.trigger("resumeTutorial"); | |
}, e.prototype.setEl = function(t) { | |
this.el = t, t && (0, c.default)(".uname", t).focus(); | |
}, e.prototype.onVerifyHelpClick = function() { | |
this.setState({ | |
stage: "help" | |
}); | |
}, e.prototype.onBackClick = function() { | |
this.setState({ | |
stage: "verify" | |
}); | |
}, e.prototype.onFieldChange = function(t) { | |
var e = b.default.clone(this.state.values || {}); | |
e[t.target.name] = t.target.value, this.setState({ | |
values: e | |
}); | |
}, e.prototype.onSignClick = function() { | |
switch (this.state.stage) { | |
case "start": | |
this.setEmail(); | |
break; | |
case "verify": | |
this.handleVerify(); | |
break; | |
case "help": | |
this.handleHelp(); | |
break; | |
case "login": | |
this.handleLogin(); | |
break; | |
case "complete": | |
this.handleComplete(); | |
} | |
}, e.prototype.setEmail = function() { | |
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.checkAgree, s = void 0 === e || e, n = t.apiMethod, o = void 0 === n ? "user.signStart" : n, r = { | |
email: this.state.values.email | |
}; | |
if (!r.email || !/^.+@.+\..+$/.test(r.email)) return void this.setState({ | |
errors: { | |
email: (0, y._tr)("Email is invalid") | |
} | |
}); | |
s && (r.agree = (0, c.default)("input.agree", this.el).prop("checked")); | |
var i = { | |
email: (0, y._tr)("Email is required"), | |
agree: (0, y._tr)("Must agree to continue") | |
}, a = this.processForm({ | |
fields: r, | |
errors: i, | |
button: (0, c.default)(".btn-ok", this.el), | |
apiMethod: o, | |
nextStage: "verify" | |
}); | |
return a ? a.then(function(t) { | |
if (!(null != t ? t.errors : void 0)) return x.default.getUser().set({ | |
email: r.email | |
}), t; | |
}) : void 0; | |
}, e.prototype.handleVerify = function() { | |
var t = { | |
code: this.state.values.code | |
}, e = { | |
code: (0, y._tr)("Code is required") | |
}, s = this.processForm({ | |
fields: t, | |
errors: e, | |
button: (0, c.default)(".btn-ok", this.el), | |
apiMethod: "user.signVerify", | |
nextStage: "login" | |
}); | |
if (s) return s.then(function(t) { | |
if (!(null != t ? t.errors : void 0)) return x.default.getUser().set({ | |
email_verified: !0 | |
}), t; | |
}); | |
}, e.prototype.handleHelp = function() { | |
return this.setEmail({ | |
checkAgree: !1, | |
apiMethod: "user.signChangeEmail" | |
}); | |
}, e.prototype.handleLogin = function() { | |
var t = { | |
username: this.state.values.username, | |
password: this.state.values.password | |
}, e = { | |
username: (0, y._tr)("Username is required"), | |
password: (0, y._tr)("Password is required") | |
}, s = this.processForm({ | |
fields: t, | |
errors: e, | |
button: (0, c.default)(".btn-ok", this.el), | |
apiMethod: "user.signFinish", | |
nextStage: "complete" | |
}); | |
if (s) return s.then(function(e) { | |
if (!(null != e ? e.errors : void 0)) { | |
var s = x.default.getUser(); | |
return s.set({ | |
username: t.username, | |
registered: !0 | |
}), e.reward && new C.default(e.reward).claim(x.default.getUser()), x.default.events.trigger("SignUp"), | |
k.default.registrationPixels && x.default.addMarker(k.default.registrationPixels), | |
x.default.analytics.send("event", { | |
eventCategory: "User", | |
eventAction: "SignUp" | |
}), x.default.analytics.amp_event("SignUp", { | |
user: s.id | |
}), x.default.analytics.dtd_custom_event("signup", { | |
user: s.id, | |
username: s.get("username") | |
}), e; | |
} | |
}); | |
}, e.prototype.handleComplete = function() { | |
this.props.close(); | |
}, e.prototype.processForm = function(t) { | |
var e = this, s = t.fields, n = t.errors, o = t.button, r = t.apiMethod, i = t.nextStage; | |
if (this.inProcess) return !1; | |
var a = !1, l = { | |
errors: {} | |
}; | |
for (var u in s) { | |
var c = s[u]; | |
c ? l.errors[u] = null : (l.errors[u] = n[u], a = !0); | |
} | |
if (this.setState(l), a) return !1; | |
var d = h.default.callMethod(r, s); | |
return this.lockButton(o), d.then(function(t) { | |
if (e.unlockButton(), t && t.errors) { | |
for (var n in s) t.errors[n] ? (l.errors[n] = t.errors[n], a = !0) : l.errors[n] = null; | |
e.setState(l); | |
} else e.setState({ | |
stage: i | |
}); | |
return t; | |
}, function(t) { | |
e.unlockButton(), x.default.show({ | |
dialog: { | |
type: "alert", | |
data: { | |
title: (0, y._tr)("Error occured"), | |
text: (0, y._tr)("The operation could not be completed. Please try again later.") | |
} | |
} | |
}), g.default.log(t); | |
}); | |
}, e.prototype.lockButton = function() { | |
this.inProcess = !0; | |
}, e.prototype.unlockButton = function() { | |
this.inProcess = !1; | |
}, e.prototype.render = function() { | |
var t = this, e = this.state, s = e.stage, n = e.errors, o = void 0 === n ? {} : n, r = e.values, i = void 0 === r ? {} : r, a = S(this)[s]; | |
return l.default.createElement("div", { | |
className: "m-popup red sign-up", | |
ref: this.setEl | |
}, l.default.createElement("div", { | |
className: "title" | |
}, a.title), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content " + a.className | |
}, l.default.createElement("div", { | |
className: "text-1" | |
}, a.text), l.default.createElement("div", { | |
className: "megapack-banner" | |
}, l.default.createElement("div", { | |
className: "g1" | |
}, l.default.createElement("div", { | |
className: "num" | |
}, "+100%"), l.default.createElement("div", { | |
className: "txt" | |
}, (0, y._tr)("Drop rate"))), l.default.createElement("div", { | |
className: "g2" | |
}, l.default.createElement("div", { | |
className: "num" | |
}, "+50"), l.default.createElement("div", { | |
className: "txt" | |
}, (0, y._tr)("Crowns"))), l.default.createElement("div", { | |
className: "g3" | |
}, l.default.createElement("div", { | |
className: "num" | |
}, "+10"), l.default.createElement("div", { | |
className: "txt" | |
}, (0, y._tr)("DPC")))), l.default.createElement("div", { | |
className: "sign-up-form" | |
}, (0, d.IF)(a.fields && a.fields.length)(function() { | |
return l.default.createElement("div", { | |
className: "block-a" | |
}, a.fields.map(function(e, s) { | |
var n = e.name, r = e.label, a = e.type; | |
return l.default.createElement("label", { | |
key: s, | |
className: "tfield " + n + " " + (o[n] ? "error" : "") | |
}, r, l.default.createElement("p", { | |
className: "error" | |
}, o[n]), l.default.createElement("input", { | |
type: a || "text", | |
name: n, | |
className: "itext " + n, | |
value: i[n] || "", | |
onChange: t.onFieldChange | |
})); | |
}), a.addChild && a.addChild()); | |
}), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.onSignClick | |
}, a.okText), a.addButton)), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component), S = function(t) { | |
return { | |
start: { | |
className: "sign-up1", | |
title: (0, y._tr)("Sign up"), | |
text: (0, y._tr)("Sign up and get bonus!"), | |
fields: [ { | |
label: (0, y._tr)("Email"), | |
name: "email" | |
} ], | |
okText: (0, y._tr)("Sign up"), | |
addChild: function(e) { | |
return l.default.createElement("label", { | |
className: "tfield check " + (t.state.errors.agree ? "error" : "") | |
}, l.default.createElement("input", { | |
type: "checkbox", | |
className: "icheck agree" | |
}), " ", l.default.createElement("span", { | |
dangerouslySetInnerHTML: { | |
__html: (0, y._tr)("I agree to the terms of the <a href='/privacy/' target='_blank'>Privacy Policy</a>") | |
} | |
})); | |
} | |
}, | |
verify: { | |
className: "sign-up2", | |
title: (0, y._tr)("Verify email"), | |
text: (0, y._tr)("We sent you an email with the verification code. Please enter it here"), | |
fields: [ { | |
label: (0, y._tr)("Verification code"), | |
name: "code" | |
} ], | |
okText: (0, y._tr)("Verify"), | |
addChild: function() { | |
return l.default.createElement("label", { | |
className: "tfield check" | |
}, (0, y._tr)("Got a problem?"), " ", l.default.createElement("a", { | |
className: "verifyHelp", | |
href: "#", | |
onClick: t.onVerifyHelpClick | |
}, (0, y._tr)("Click here!"))); | |
} | |
}, | |
help: { | |
className: "sign-up1", | |
title: (0, y._tr)("Verification help"), | |
text: (0, y._tr)("The code was sent to the email address you provided. Please ensure the email address you entered was correct or check your spam folder. If this does not solve your problem then try sending the code again using the form below."), | |
fields: [ { | |
label: (0, y._tr)("Email"), | |
name: "email" | |
} ], | |
okText: (0, y._tr)("Resend"), | |
addButton: l.default.createElement("div", { | |
className: "btn-simple-silver btn-back", | |
style: { | |
marginLeft: 10 | |
}, | |
onClick: t.onBackClick | |
}, (0, y._tr)("Cancel")) | |
}, | |
login: { | |
className: "sign-up3", | |
title: (0, y._tr)("Sign up: username and password"), | |
text: (0, y._tr)("Email is verified. Choose your Username and Password for the game to save the progress, and GET REWARDS!"), | |
fields: [ { | |
label: (0, y._tr)("Username"), | |
name: "username" | |
}, { | |
label: (0, y._tr)("Password"), | |
name: "password", | |
type: "password" | |
} ], | |
okText: (0, y._tr)("Sign up") | |
}, | |
complete: { | |
className: "sign-up4", | |
title: (0, y._tr)("Congratulations!"), | |
text: (0, y._tr)("You signed up successfully! To the game!"), | |
okText: (0, y._tr)("Get rewards!") | |
} | |
}; | |
}; | |
e.default = E; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(24), d = (n(y), s(9), s(7), s(227)), p = n(d), x = s(228), f = (n(x), | |
s(12)), h = (n(f), s(26)); | |
s(207); | |
var m = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.data, e = "popup" + (t.forced ? "_forced" : ""), s = t.type, n = s, o = c.default.getUser(), r = o.get("itemSale"), i = r.getItemsList(), a = []; | |
for (var u in i) { | |
var y = i[u], d = o.get("items").getDescriptor(parseInt(y)); | |
d.resource != s || "timeskip" != d.tag && 1 != d.addresource || a.push(l.default.createElement(p.default, { | |
buttonname: e, | |
timeLeft: r.timeLeft(), | |
item: d, | |
key: y | |
})), d.res_name && (n = d.res_name); | |
} | |
return l.default.createElement("div", { | |
className: "add-resources-popup" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, h._tr)("Buy some more {resName}!", { | |
resName: n | |
})), l.default.createElement("div", { | |
className: "res " + n | |
}, a), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = m; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(9), c = s(166), y = n(c), d = s(7), p = s(14), x = n(p), f = s(13), h = n(f), m = s(26), g = s(12), v = (n(g), | |
s(24)), b = n(v), _ = s(142), k = n(_), w = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onBuyItem = s.onBuyItem.bind(s), s.onBuyFail = s.onBuyFail.bind(s), s.getItemData = s.getItemData.bind(s), | |
s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.onBuyItem = function(t) { | |
var e = this, s = this.props.buttonname || "another_place"; | |
this.setState({ | |
locked: !0 | |
}), x.default.getUser().get("items").buy(t, s).catch(this.onBuyFail).finally(function() { | |
return e.setState({ | |
locked: !1 | |
}); | |
}); | |
}, e.prototype.onBuyFail = function(t) { | |
b.default.log(t); | |
}, e.prototype.getColor = function(t) { | |
var e = ""; | |
switch (t) { | |
case "gold": | |
e = "red"; | |
break; | |
case "shards": | |
e = "green"; | |
break; | |
case "gems": | |
e = "blue"; | |
break; | |
default: | |
e = "red"; | |
} | |
return e; | |
}, e.prototype.getType = function(t, e) { | |
var s = void 0; | |
switch (t) { | |
case "timeskip": | |
s = e; | |
break; | |
case "reborn": | |
s = "reborn"; | |
break; | |
case "balancer": | |
s = "balancer"; | |
break; | |
default: | |
s = "rate"; | |
} | |
return s; | |
}, e.prototype.getItemData = function(t) { | |
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "time", s = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], n = x.default.getUser(), o = this.getType(t.tag, e), r = void 0, i = [], a = [], c = void 0, y = void 0, p = void 0, f = !1, h = !0, m = !1; | |
if (o == e) { | |
var g = t.reward.timeskip; | |
c = g.res.join("-"), r = t.hours || g.time / 3600; | |
var v = n.get("battle").getTimeskipReward(g.res, g.time); | |
m = g.oldTime; | |
var b = v.res; | |
for (var _ in b) if (b[_].eq(0) && (f = !0), s) { | |
var k = void 0; | |
m ? (y = n.get("battle").getTimeskipReward(g.res, g.oldTime), p = y.res, k = l.default.createElement("span", null, (0, | |
d.formatBig)(p[_]), l.default.createElement("span", { | |
className: "pricenew" | |
}, (0, d.formatBig)(b[_])))) : k = (0, d.formatBig)(b[_]), i.push(l.default.createElement("span", { | |
key: _ | |
}, l.default.createElement("span", { | |
className: "price " + _ + " glow " + (m ? "old" : "") | |
}, k), (0, u.IF)(m)(l.default.createElement("br", null)))); | |
} else i.push((0, d.formatBig)(b[_])), m && (y = n.get("battle").getTimeskipReward(g.res, g.oldTime), | |
p = y.res, a.push((0, d.formatBig)(p[_]))); | |
h = !(m && i.length >= 2); | |
} else c = t.resource; | |
if ("reborn" == o) { | |
var w = n.getRebornReward(), C = w.res; | |
for (var E in C) C.hasOwnProperty(E) && i.push(l.default.createElement("div", { | |
key: E, | |
className: "price glow " + E | |
}, "+", (0, d.formatBig)(C[E]))); | |
var S = C.gems; | |
S.eq(0) && (f = !0), S = (0, d.formatBig)(S); | |
} | |
var T = t.price.crowns, N = (n.get("items").getStateDescriptor(t.typeId).price.crowns, | |
t.sale ? "sale" : ""), P = t.price && t.price.old && t.price.old.crowns ? t.price.old.crowns : null, O = this.getColor(c); | |
return { | |
sale: N, | |
resources: c, | |
type: o, | |
hours: r, | |
labelColor: O, | |
priceOld: P, | |
rewards: i, | |
oldRewards: a, | |
price: T, | |
showDescription: h, | |
isOldReward: m, | |
isItemOnSale: t.sale, | |
forceDisable: f, | |
gemsReward: S | |
}; | |
}, e.prototype.render = function() { | |
var t = this, e = this.props.item, s = this.getItemData(e), n = "reborn" == s.type || "balancer" == s.type ? "" : s.resources || "gems", o = s.rewards && s.rewards.length; | |
return l.default.createElement("div", { | |
className: "item " + s.sale | |
}, l.default.createElement("div", { | |
className: "icon " + n + " " + s.type | |
}, l.default.createElement("div", { | |
className: "reborn" | |
}, l.default.createElement("img", { | |
src: (0, u.cdnURL)("rc/ic-abil-reborn.png") | |
})), l.default.createElement("div", { | |
className: "gold" | |
}, l.default.createElement("img", { | |
src: (0, u.cdnURL)("rc/ic-abil-gold.png") | |
})), l.default.createElement("div", { | |
className: "shards" | |
}, l.default.createElement("img", { | |
src: (0, u.cdnURL)("rc/ic-abil-butil.png") | |
})), l.default.createElement("div", { | |
className: "gems" | |
}, l.default.createElement("img", { | |
src: (0, u.cdnURL)("rc/ic-abil-rubin.png") | |
})), l.default.createElement("div", { | |
className: "gold-shards" | |
}, l.default.createElement("img", { | |
src: (0, u.cdnURL)("rc/ic-abil-gold-but.png") | |
})), l.default.createElement("div", { | |
className: "newtime t" + s.hours + "h" | |
}, l.default.createElement("div", { | |
className: "newclocktime" | |
}, s.hours)), l.default.createElement("div", { | |
className: "rate " + s.labelColor | |
}, "+", e.mult, "%")), l.default.createElement("div", { | |
className: "desc-box " + (o ? "with-reward" : "") | |
}, l.default.createElement("div", { | |
className: "desc-title" | |
}, e.name), (0, u.IF)(o)(function() { | |
return l.default.createElement("div", { | |
className: "desc-price" | |
}, s.rewards); | |
}), (0, u.IF)(s.showDescription)(function() { | |
return l.default.createElement(k.default, { | |
topDistance: 45, | |
tooltipText: e.description, | |
className: "decs-text" | |
}, e.description); | |
})), l.default.createElement("div", { | |
className: "btn-panel" | |
}, l.default.createElement("div", { | |
className: "btn-box" | |
}, l.default.createElement(y.default, { | |
locked: this.state.locked, | |
className: "btn-buy", | |
resource: "crowns", | |
priceOld: s.priceOld, | |
forceDisable: s.forceDisable, | |
value: s.price, | |
text: (0, m._tr)("Buy"), | |
onClick: function() { | |
return t.onBuyItem(e.typeId); | |
} | |
})), (0, u.IF)(s.isItemOnSale)(function() { | |
return l.default.createElement("div", { | |
className: "sale-banner" | |
}, l.default.createElement("p", { | |
className: "text" | |
}, e.saleLabel || (0, m._tr)("{discount}% OFF", { | |
discount: e.discount | |
})), l.default.createElement("div", { | |
className: "timer" | |
}, l.default.createElement(h.default, { | |
cls: "time", | |
time: t.props.timeLeft + x.default.getTime() | |
}))); | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = w; | |
}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(24), d = (n(y), s(9), s(7), s(228)), p = (n(d), | |
s(13)), x = (n(p), s(230)), f = n(x), h = s(12), m = (n(h), s(26)); | |
s(207); | |
var g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.__update = s.__update.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
c.default.events.on("itemSaleStarted itemSaleFinished", this.__update), c.default.getUser().get("counters").on("change:vip", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
c.default.events.off("itemSaleStarted itemSaleFinished", this.__update), c.default.getUser().get("counters").off("change:vip", this.__update); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.render = function() { | |
for (var t = c.default.getUser(), e = t.get("itemSale"), s = e.getRealItemsList(), n = [], o = s, r = Array.isArray(o), i = 0, o = r ? o : o[Symbol.iterator](); ;) { | |
var a; | |
if (r) { | |
if (i >= o.length) break; | |
a = o[i++]; | |
} else { | |
if (i = o.next(), i.done) break; | |
a = i.value; | |
} | |
var u = a, y = t.get("items").getDescriptor(parseInt(u)); | |
n.push(l.default.createElement(f.default, { | |
pack: y, | |
key: u, | |
timeLeft: e.timeLeft() | |
})); | |
} | |
return l.default.createElement("div", { | |
className: "add-crowns-popup" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, m._tr)("Buy Crowns!")), l.default.createElement("div", { | |
className: "res crowns" | |
}, l.default.createElement("div", { | |
className: "corona-box" | |
}, n)), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(9), c = s(14), y = n(c), d = s(231), p = s(26), x = s(8), f = n(x), h = s(13), m = n(h), g = s(142), v = n(g), b = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onBuyItem = s.onBuyItem.bind(s), s.onBuyFail = s.onBuyFail.bind(s), s.enoughUpgrade = s.enoughUpgrade.bind(s), | |
s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.onBuyItem = function(t) { | |
this.setState({ | |
locked: !0 | |
}), (0, d.startPayment)(this.props.pack.typeId); | |
}, e.prototype.enoughUpgrade = function() { | |
var t = this.props.pack, e = y.default.vipModel, s = e.getVipData(), n = s.vipPoints, o = s.nextValue; | |
return (0, f.default)(n).plus(t.points).gte(o); | |
}, e.prototype.onBuyFail = function(t) { | |
Debug.log(t); | |
}, e.prototype.render = function() { | |
var t = this.props.pack, e = this.props.timeLeft + y.default.getTime(), s = t.saleLabel || t.discount, n = (0, | |
p._tr)("Points to increase your VIP level"), o = (t.price, this.enoughUpgrade() ? n + ". " + (0, | |
p._tr)("Your VIP level will be upgraded after this purchase.") : n); | |
return l.default.createElement("div", { | |
className: "pack-box" | |
}, l.default.createElement("div", { | |
className: "corons lvl" + t.crownsNumStyle | |
}), (0, u.IF)(s)(function() { | |
return l.default.createElement("div", { | |
className: "cor-timer" | |
}, l.default.createElement("div", { | |
className: "cor-percent" | |
}, t.saleLabel || t.discount + "%"), l.default.createElement(m.default, { | |
cls: "cor-time", | |
time: e | |
}), l.default.createElement("div", { | |
className: "cor-time-text" | |
}, (0, p._tr)("time left"))); | |
}), l.default.createElement(v.default, { | |
topDistance: -80, | |
tooltipText: o, | |
className: "cor-vip " + (this.enoughUpgrade() ? "upgrade" : "") | |
}, l.default.createElement("div", { | |
className: "vip-text" | |
}, (0, p._tr)("VIP")), l.default.createElement("div", { | |
className: "vip-plus" | |
}, "+", t.points)), (0, u.IF)("hot" == t.hren)(function() { | |
return l.default.createElement("div", { | |
className: "cor-hot-box" | |
}, l.default.createElement("div", { | |
className: "hot-text" | |
}, (0, p._tr)("Hot"))); | |
}), (0, u.IF)("best" == t.hren)(function() { | |
return l.default.createElement("div", { | |
className: "cor-choise-box" | |
}, l.default.createElement("div", { | |
className: "choice-text" | |
}, (0, p._tr)("Best choice"))); | |
}), l.default.createElement("div", { | |
className: "cor-price-box" | |
}, l.default.createElement("div", { | |
className: "cor-price" | |
}, t.amount), (0, u.IF)(t.oldAmount)(function() { | |
return l.default.createElement("div", { | |
className: "cor-price-new oldprice" | |
}, t.oldAmount); | |
}), (0, u.IF)(!t.oldAmount && t.extra_amount)(function() { | |
return l.default.createElement("div", { | |
className: "cor-price-new" | |
}, "(", t.extra_amount + " " + (0, p._tr)("Free"), ")"); | |
})), l.default.createElement("div", { | |
className: "cor-button", | |
onClick: this.onBuyItem | |
}, (0, u.IF)(s && t.price.old)(function() { | |
return l.default.createElement("div", { | |
className: "cor-but-price" | |
}, "$", t.price.old.real); | |
}), l.default.createElement("div", { | |
className: "cor-but-price-new" | |
}, "$", t.price.real))); | |
}, e; | |
}(a.Component); | |
e.default = b; | |
}, function(t, e, s) { | |
var n, o; | |
n = s(14), o = function(t, e, s) { | |
var o; | |
return null == e && (e = "misc"), null == s && (s = ""), o = "/payment/start/?i=" + t, | |
s && (o = o + "&bill=" + s), n.analytics.send("event", { | |
eventCategory: "Payment", | |
eventAction: e, | |
eventLabel: t, | |
hitCallback: function() { | |
return window.location.href = o; | |
} | |
}); | |
}, t.exports = { | |
startPayment: o | |
}; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(24), y = (n(c), s(9), s(7), s(233)), d = n(y), p = s(26), x = s(1), f = x.createElement, h = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = u.default.getUser(), e = t.get("itemSale"), s = e.getItemsList(), n = []; | |
for (var o in s) { | |
var r = s[o], i = t.get("items").getDescriptor(parseInt(r)); | |
"essence" == i.resource && n.push(f(d.default, { | |
onBuyItem: this.props.close, | |
pack: i, | |
key: r | |
})); | |
} | |
return f("div", { | |
className: "m-popup essence-buy" | |
}, f("div", { | |
className: "title" | |
}, (0, p._tr)("Buy Essence!")), n, f("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(24), l = n(a), u = s(1), c = s(14), y = n(c), d = s(26), p = s(7), x = s(9), f = s(1), h = f.createElement, m = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onBuyItem = s.onBuyItem.bind(s), s.onBuyFail = s.onBuyFail.bind(s), s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.onBuyItem = function() { | |
var t = this, e = this.props.pack.typeId; | |
this.setState({ | |
locked: !0 | |
}), this.props.onBuyItem && this.props.onBuyItem(), y.default.getUser().get("items").buy(e).catch(this.onBuyFail).finally(function() { | |
return t.setState({ | |
locked: !1 | |
}); | |
}); | |
}, e.prototype.onBuyFail = function(t) { | |
l.default.log(t); | |
}, e.prototype.render = function() { | |
var t = this.props.pack, e = t.lvl ? "lvl" + t.lvl : ""; | |
return h("div", { | |
className: "essence-card-box" | |
}, h("div", { | |
className: "essence-but-box " + e | |
}), h("div", { | |
className: "essence-price" | |
}, (0, p.formatBig)(t.reward.res.essence)), (0, x.IF)(t.extra_amount)(function() { | |
return h("div", { | |
className: "essence-bonus" | |
}, "+" + t.extra_amount + " " + (0, d._tr)("Free")); | |
}), h("div", { | |
className: "essebtn-box" | |
}, h("div", { | |
className: "essebtn", | |
onClick: this.onBuyItem | |
}, h("div", { | |
className: "coron-icon" | |
}), h("div", { | |
className: "coron-price" | |
}, (0, p.formatBig)(t.price.crowns))))); | |
}, e; | |
}(u.Component); | |
e.default = m; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(14), u = n(l), c = s(24), y = (n(c), s(9), s(7), s(235)), d = n(y), p = s(26), x = s(1), f = x.createElement, h = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = u.default.getUser(), e = this.props.data, s = t.get("itemSale"), n = s.getItemsList(), o = e.type, r = o, i = []; | |
for (var a in n) { | |
var l = n[a], c = t.get("items").getDescriptor(parseInt(l)); | |
c.resource == o && (i.push(f(d.default, { | |
onBuyItem: this.props.close, | |
pack: c, | |
key: l | |
})), c.res_name && (r = c.res_name)); | |
} | |
return f("div", { | |
className: "m-popup stone-buy" | |
}, f("div", { | |
className: "title" | |
}, (0, p._tr)("Buy some more {resName}!", { | |
resName: r | |
})), i, f("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(24), l = n(a), u = s(1), c = s(14), y = n(c), d = s(26), p = s(7), x = (s(9), | |
s(1)), f = x.createElement, h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onBuyItem = s.onBuyItem.bind(s), s.onBuyFail = s.onBuyFail.bind(s), s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.onBuyItem = function() { | |
var t = this, e = this.props.pack.typeId; | |
this.setState({ | |
locked: !0 | |
}), this.props.onBuyItem && this.props.onBuyItem(), y.default.getUser().get("items").buy(e).catch(this.onBuyFail).finally(function() { | |
return t.setState({ | |
locked: !1 | |
}); | |
}); | |
}, e.prototype.onBuyFail = function(t) { | |
l.default.log(t); | |
}, e.prototype.render = function() { | |
var t = this.props.pack, e = t.resource, s = (t.lvl ? "lvl" + t.lvl : "", t.stoneCls || ""), n = t.reward.res[e], o = t.extra_amount; | |
return f("div", { | |
className: "stone-card-box" | |
}, f("div", { | |
className: "stone-box-all" | |
}, f("div", { | |
className: "stone " + s | |
})), f("div", { | |
className: "stone-price" | |
}, (0, p.formatBig)(n)), o && f("div", { | |
className: "stone-bonus" | |
}, (0, d._tr)("+{bonus} bonus gems", { | |
bonus: o | |
})), f("div", { | |
className: "essebtn-box" | |
}, f("div", { | |
className: "essebtn", | |
onClick: this.onBuyItem | |
}, f("div", { | |
className: "coron-icon" | |
}), f("div", { | |
className: "coron-price" | |
}, (0, p.formatBig)(t.price.crowns))))); | |
}, e; | |
}(u.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(26), d = s(24), p = (n(d), s(227)), x = n(p), f = s(13), h = n(f), m = s(166), g = n(m), v = s(12), b = n(v), _ = s(142), k = n(_); | |
s(237); | |
var w = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onBuyItem = s.onBuyItem.bind(s), s.__update = s.__update.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
c.default.events.on("itemSaleStarted", this.__update), c.default.events.on("itemSaleFinished", this.props.close); | |
}, e.prototype.componentWillUnmount = function() { | |
c.default.events.off("itemSaleStarted", this.__update), c.default.events.off("itemSaleFinished", this.props.close); | |
}, e.prototype.__update = function() { | |
this.randId = null, this.forceUpdate(); | |
}, e.prototype.onBuyItem = function(t) { | |
var e = this; | |
this.setState({ | |
locked: !0 | |
}), c.default.getUser().get("items").buy(t, "sale_popup").catch(this.onBuyFail).finally(function() { | |
e.setState({ | |
locked: !1 | |
}); | |
}); | |
}, e.prototype.render = function() { | |
var t = this, e = c.default.getUser(), s = e.get("itemSale"), n = s.getItemsListOnSale(), o = this.randId = this.randId ? this.randId : parseInt(n[Math.round(Math.random() * (n.length - 1))]); | |
if (!o) return this.props.close(), null; | |
var r = e.get("items").getDescriptor(o), i = this.getItemData(r, "clock", !1), a = void 0, u = i.isOldReward; | |
a = u ? b.default.map(i.rewards, function(t, e) { | |
return l.default.createElement("div", { | |
className: "count" + (e + 1) + " oldprice", | |
key: e | |
}, i.oldRewards[e], l.default.createElement("div", { | |
className: "count" + (e + 1) | |
}, i.rewards[e])); | |
}) : b.default.map(i.rewards, function(t, e) { | |
return l.default.createElement("div", { | |
className: "count" + (e + 1), | |
key: e | |
}, i.rewards[e]); | |
}); | |
var d = 0, p = 0, x = 0, f = 0; | |
if (2 == i.rewards.length) { | |
var m = i.rewards; | |
if (d = m[0], p = m[1], u) { | |
var v = i.oldRewards; | |
x = v[0], f = v[1]; | |
} | |
} | |
var _ = u ? l.default.createElement("span", null, x, l.default.createElement("span", { | |
className: "newprice" | |
}, d)) : d, w = u ? l.default.createElement("span", null, f, l.default.createElement("span", { | |
className: "newprice" | |
}, p)) : p, C = "reborn" == i.type || "balancer" == i.type ? "rate" : i.resources || "gems", E = i.gemsReward || 0; | |
return l.default.createElement("div", { | |
className: "m-popup sales" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("Special Offer!")), l.default.createElement("div", { | |
className: "color-box sea" | |
}), l.default.createElement("div", { | |
className: "sale-offer" | |
}, l.default.createElement("div", { | |
className: "banner " + C + " " + i.type + " " + (u ? "old" : "") | |
}, l.default.createElement("div", { | |
className: "reborn" | |
}, l.default.createElement("div", { | |
className: "instant" | |
}, E)), l.default.createElement("div", { | |
className: "balancer" | |
}), l.default.createElement("div", { | |
className: "ban-back sea" | |
}), l.default.createElement("div", { | |
className: "clock t" + i.hours + "h" | |
}), l.default.createElement("div", { | |
className: "gold" | |
}, l.default.createElement("div", { | |
className: "g-count " + (u ? "oldprice" : "") | |
}, _)), l.default.createElement("div", { | |
className: "shards" | |
}, l.default.createElement("div", { | |
className: "s-count " + (u ? "oldprice" : "") | |
}, w)), l.default.createElement("div", { | |
className: "gems" | |
}), l.default.createElement("div", { | |
className: "gold-shards" | |
}), l.default.createElement("div", { | |
className: "counter" | |
}, a), l.default.createElement("div", { | |
className: "rate" | |
}, "+", r.mult, "%"), l.default.createElement("div", { | |
className: "rate-text" | |
}, r.name)), l.default.createElement("div", { | |
className: "sale-off" | |
}, l.default.createElement("div", { | |
className: "saletext" | |
}, r.saleLabel || (0, y._tr)("{discount}% OFF", { | |
discount: r.discount | |
}))), l.default.createElement("div", { | |
className: "sale-banner" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, l.default.createElement("p", { | |
className: "title-name" | |
}, r.name), l.default.createElement(k.default, { | |
topDistance: 25, | |
tooltipText: r.description, | |
className: "txt" | |
}, r.description)), l.default.createElement("div", { | |
className: "btn-box" | |
}, l.default.createElement(g.default, { | |
className: "btn-buy", | |
resource: "crowns", | |
locked: this.state.locked, | |
forceDisable: i.forceDisable, | |
priceOld: i.priceOld, | |
value: i.price, | |
text: (0, y._tr)("Buy"), | |
onClick: function() { | |
return t.onBuyItem(r.typeId); | |
} | |
}))), l.default.createElement("div", { | |
className: "timer" | |
}, l.default.createElement(h.default, { | |
cls: "time", | |
time: s.timeLeft() + c.default.getTime() | |
}), l.default.createElement("div", { | |
className: "text" | |
}, (0, y._tr)("time left")))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(x.default); | |
e.default = w; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(26)), y = s(9), d = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onSpendFreeChest = s.onSpendFreeChest.bind(s), s; | |
} | |
return i(e, t), e.prototype.onSpendFreeChest = function() { | |
this.props.close(); | |
}, e.prototype.render = function() { | |
return l.default.createElement("div", { | |
className: "m-popup pink vip-sunduk" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, c._tr)("Congratulations!")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("p", { | |
className: "sunduk" | |
}, l.default.createElement("img", { | |
className: "pic", | |
src: (0, y.cdnURL)("rc/sunduk.png") | |
})), l.default.createElement("p", { | |
className: "text" | |
}, (0, c._tr)("Congratulations! Get your daily VIP bonus!"))), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.onSpendFreeChest | |
}, (0, c._tr)("Thanks!")), l.default.createElement("div", { | |
className: "btn-close-x" | |
})); | |
}, e; | |
}(a.Component); | |
e.default = d; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(26), d = s(9), p = s(12), x = n(p), f = s(7), h = s(164), m = n(h); | |
s(241); | |
var g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.claiming = !1, s.claimReward = s.claimReward.bind(s), s.__update = s.__update.bind(s), | |
s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
var t = c.default.getUser().get("dailyQuest").objective; | |
if (t) { | |
var e = t.get("counter"); | |
c.default.getUser().get("counters").on("change:" + e, this.__update); | |
} | |
c.default.events.on("dailyQuestStarted dailyQuestFinished dailyQuestCompleted", this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
var t = c.default.getUser().get("dailyQuest").objective; | |
if (t) { | |
var e = t.get("counter"); | |
c.default.getUser().get("counters").off("change:" + e, this.__update); | |
} | |
c.default.events.off("dailyQuestStarted dailyQuestFinished dailyQuestCompleted", this.__update); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.claimReward = function() { | |
var t = this, e = c.default.getUser().get("dailyQuest"); | |
if (!this.claiming && e.isComplete() && !e.finished) { | |
this.claiming = !0; | |
var s = c.default.getUser().get("dailyQuest"), n = s.claimReward(); | |
n.finally(function() { | |
t.claiming = !1; | |
}); | |
} | |
}, e.prototype.render = function() { | |
var t = this, e = void 0, s = c.default.getUser(), n = s.get("dailyQuest"), o = n.getDescById(), r = (n.objective, | |
n.getProgressData()), i = r.progress, a = r.percentProgress, u = n.isComplete() && !n.finished ? "" : "disable"; | |
if (o) if ("timeskip" == o.rewardText) { | |
var p = o.reward.timeskip, h = s.get("battle").getTimeskipReward(p.res, p.time), m = h.res; | |
e = x.default.map(m, function(t, e) { | |
return (0, f.formatBig)(t); | |
}); | |
} else e = o.rewardText; | |
return l.default.createElement("div", { | |
className: "quest-popup stage-1" | |
}, l.default.createElement("div", { | |
className: "balloon" | |
}, (0, d.IF)(o)(function() { | |
return l.default.createElement("div", null, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("Complete quest and get the reward!")), l.default.createElement("p", { | |
className: "text" | |
}, o.description, o.rewardDescription), l.default.createElement("div", { | |
className: "progress" | |
}, l.default.createElement("div", { | |
className: "num" | |
}, i), l.default.createElement("div", { | |
className: "prg-box" | |
}, l.default.createElement("div", { | |
className: "prg", | |
style: { | |
width: "" + a | |
} | |
}))), l.default.createElement("div", { | |
className: "rewards" | |
}, l.default.createElement("p", { | |
className: "t" | |
}, (0, y._tr)("Reward"), ":"), l.default.createElement("p", { | |
className: "icon" | |
}, l.default.createElement("img", { | |
className: "img", | |
src: (0, d.cdnURL)(o.rewardIcon) | |
})), l.default.createElement("p", { | |
className: "n" | |
}, e))); | |
}, function() { | |
return l.default.createElement("div", null, l.default.createElement("div", { | |
className: "title no-quests" | |
}, (0, y._tr)("You have no active quests"), l.default.createElement("br", null), (0, | |
y._tr)("Check up tomorrow!"))); | |
}), l.default.createElement("div", { | |
className: "btn-box" | |
}, (0, d.IF)(o && n.isComplete() && !n.finished)(function() { | |
return l.default.createElement("div", { | |
className: "btn-simple-gold btn-get " + u, | |
onClick: t.claimReward | |
}, l.default.createElement("div", { | |
className: "txt" | |
}, (0, y._tr)("Get the reward"), "!")); | |
}, function() { | |
return l.default.createElement("div", { | |
className: "btn-simple-silver btn-close", | |
onClick: t.props.close | |
}, l.default.createElement("div", { | |
className: "txt" | |
}, (0, y._tr)("Close"))); | |
}))), l.default.createElement("div", { | |
className: "person" | |
})); | |
}, e; | |
}(m.default); | |
e.default = g; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(230), d = n(y), p = s(26), x = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.showMore = s.showMore.bind(s), s; | |
} | |
return i(e, t), e.prototype.showMore = function() { | |
this.props.close(), c.default.events.trigger("notEnough", "crowns"); | |
}, e.prototype.componentDidMount = function() { | |
c.default.events.on("itemSaleFinished", this.props.close); | |
}, e.prototype.componentWillUnmount = function() { | |
c.default.events.off("itemSaleFinished", this.props.close); | |
}, e.prototype.render = function() { | |
var t = c.default.getUser(), e = t.get("itemSale"); | |
return l.default.createElement("div", { | |
className: "m-popup red sale25x" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, p._tr)("Sale!")), l.default.createElement("div", { | |
className: "content sale sale25" | |
}, l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.showMore | |
}, (0, p._tr)("More")), l.default.createElement(d.default, { | |
pack: this.props.data.pack, | |
timeLeft: e.timeLeft() | |
})), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = x; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(24)), y = (n(c), s(9)), d = s(7), p = s(12), x = (n(p), | |
s(165)), f = n(x), h = s(26); | |
s(245); | |
var m = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this, e = this.props.data, s = e.hero, n = e.haveEnoughMoney, o = e.rewardGold, r = e.rewardShards; | |
return l.default.createElement("div", { | |
className: "back-popup " + (n ? "heroplus" : "") | |
}, l.default.createElement("div", { | |
className: "balloon-back" | |
}, l.default.createElement("div", { | |
className: "title-box" | |
}, (0, h._tr)("Welcome Back")), l.default.createElement("div", { | |
className: "back-text" | |
}, (0, h._tr)("While you was offline your heroes earned")), l.default.createElement("div", { | |
className: "rewards-box" | |
}, l.default.createElement("div", { | |
className: "rew-pres gold" | |
}, l.default.createElement("div", { | |
className: "gold-icon" | |
}), l.default.createElement("div", { | |
className: "gold-bonus" | |
}, (0, d.formatBig)(o))), l.default.createElement("div", { | |
className: "rew-pres shards" | |
}, l.default.createElement("div", { | |
className: "shards-icon" | |
}), l.default.createElement("div", { | |
className: "shards-bonus" | |
}, (0, d.formatBig)(r)))), l.default.createElement("div", { | |
className: "btn-box-back" | |
}, l.default.createElement("div", { | |
className: "btn-simple-gold btn-get", | |
onClick: this.props.close | |
}, l.default.createElement("div", { | |
className: "txt" | |
}, (0, h._tr)("Ok")))), l.default.createElement("div", { | |
className: "person-girl" | |
})), (0, y.IF)(n)(function() { | |
return l.default.createElement("div", { | |
className: "heroplus-box" | |
}, l.default.createElement("div", { | |
className: "herobox" | |
}, l.default.createElement("img", { | |
className: "img", | |
src: (0, y.cdnURL)(s.getImage()) | |
})), l.default.createElement("div", { | |
className: "back-ballon" | |
}, l.default.createElement("div", { | |
className: "ballon-text" | |
}, (0, h._tr)("Cool, now I can join your awesome team. You have enough gold to hire me."))), l.default.createElement(f.default, { | |
hero: s, | |
source: "wback", | |
onClick: t.props.close | |
})); | |
})); | |
}, e; | |
}(a.Component); | |
e.default = m; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(26), d = s(9), p = s(12), x = n(p), f = s(8), h = n(f), m = s(7), g = s(164), v = n(g); | |
s(241); | |
var b = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.claiming = !1, s.claimReward = s.claimReward.bind(s), s.__update = s.__update.bind(s), | |
s.subscribe = s.subscribe.bind(s), s.unsubscribe = s.unsubscribe.bind(s), s.objective = null, | |
s; | |
} | |
return i(e, t), e.prototype.getObjective = function(t) { | |
var e = t || this.props; | |
return e.data.get("objectives").first(); | |
}, e.prototype.componentDidMount = function() { | |
this.subscribe(); | |
}, e.prototype.componentWillReceiveProps = function(t) { | |
this.unsubscribe(), this.subscribe(t); | |
}, e.prototype.componentWillUnmount = function() { | |
this.unsubscribe(); | |
}, e.prototype.subscribe = function(t) { | |
var e = this.getObjective(t); | |
if (e) { | |
this.objective = e; | |
var s = e.get("counter"); | |
c.default.getUser().get("counters").on("change:" + s, this.__update); | |
} | |
}, e.prototype.unsubscribe = function() { | |
if (this.objective) { | |
var t = this.objective.get("counter"); | |
this.objective = null, c.default.getUser().get("counters").off("change:" + t, this.__update); | |
} | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.claimReward = function() { | |
var t = this, e = this.props.data; | |
if (!this.claiming && !e.get("claimed")) { | |
this.claiming = !0; | |
var s = e.claimNonAutoReward(); | |
s.finally(function() { | |
t.claiming = !1, e.set("claimed", !0), t.props.close(); | |
}); | |
} | |
}, e.prototype.getProgressData = function() { | |
var t = this.getObjective(), e = t.get("value"), s = t.getProgressValue(), n = (0, | |
m.formatBig)(s) + "/" + (0, m.formatBig)(e), o = (0, h.default)(s).div(e).times(100).toString() + "%"; | |
return { | |
progress: n, | |
percentProgress: o | |
}; | |
}, e.prototype.render = function() { | |
var t = this, e = void 0, s = void 0, n = void 0, o = void 0, r = void 0, i = this.props.data, a = c.default.getUser(), u = this.getProgressData(); | |
if (u && (s = u.progress, n = u.percentProgress, o = i && i.checkComplete() && !i.get("claimed"), | |
r = o ? "" : "disable"), i) if ("timeskip" == i.get("rewardText")) { | |
var p = i.get("reward").timeskip, f = a.get("battle").getTimeskipReward(p.res, p.time), h = f.res; | |
e = x.default.map(h, function(t, e) { | |
return (0, m.formatBig)(t); | |
}); | |
} else e = i.get("rewardText"); | |
return l.default.createElement("div", { | |
className: "quest-popup stage-1" | |
}, l.default.createElement("div", { | |
className: "balloon" | |
}, (0, d.IF)(i && u)(function() { | |
return l.default.createElement("div", null, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("Complete quest and get the reward!")), l.default.createElement("p", { | |
className: "text" | |
}, i.get("description"), i.get("rewardDescription")), l.default.createElement("div", { | |
className: "progress" | |
}, l.default.createElement("div", { | |
className: "num" | |
}, s), l.default.createElement("div", { | |
className: "prg-box" | |
}, l.default.createElement("div", { | |
className: "prg", | |
style: { | |
width: "" + n | |
} | |
}))), l.default.createElement("div", { | |
className: "rewards" | |
}, l.default.createElement("p", { | |
className: "t" | |
}, (0, y._tr)("Reward"), ":"), l.default.createElement("p", { | |
className: "icon" | |
}, l.default.createElement("img", { | |
className: "img", | |
src: (0, d.cdnURL)(i.get("rewardIcon")) | |
})), l.default.createElement("p", { | |
className: "n" | |
}, e))); | |
}, function() { | |
return l.default.createElement("div", null, l.default.createElement("div", { | |
className: "title no-quests" | |
}, (0, y._tr)("You finished this quest"))); | |
}), l.default.createElement("div", { | |
className: "btn-box" | |
}, (0, d.IF)(o)(function() { | |
return l.default.createElement("div", { | |
className: "btn-simple-gold btn-get " + r, | |
onClick: t.claimReward | |
}, l.default.createElement("div", { | |
className: "txt" | |
}, (0, y._tr)("Get the reward"), "!")); | |
}, function() { | |
return l.default.createElement("div", { | |
className: "btn-simple-silver btn-close", | |
onClick: t.props.close | |
}, l.default.createElement("div", { | |
className: "txt" | |
}, (0, y._tr)("Close"))); | |
}))), l.default.createElement("div", { | |
className: "person" | |
})); | |
}, e; | |
}(v.default); | |
e.default = b; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(24), d = (n(y), s(9)), p = s(7), x = s(13), f = n(x), h = s(78), m = (n(h), | |
s(81)), g = n(m), v = s(12), b = n(v), _ = s(26), k = s(231); | |
s(249); | |
var w = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onBuyItem = s.onBuyItem.bind(s), s.locked = !1, s; | |
} | |
return i(e, t), e.prototype.getMult = function(t, e) { | |
var s = t[0], n = (0, p.formatBig)(100 * t[1].value); | |
return l.default.createElement("div", { | |
key: s + e, | |
className: "more" + s + "-box " + e | |
}, l.default.createElement("div", { | |
className: "pack-pack" | |
}, l.default.createElement("div", { | |
className: "rate-text" | |
}, "+" + n + "%"), l.default.createElement("div", { | |
className: "more-text" | |
}, (0, _._tr)("More {res} Dropped", { | |
res: s | |
})))); | |
}, e.prototype.onBuyItem = function(t) { | |
this.locked || (this.locked = !0, (0, k.startPayment)(t)); | |
}, e.prototype.render = function() { | |
var t = this, e = this.props.data, s = e.getConfig(), n = e.getNoobPack(), o = e.getKingPack(), r = b.default.map(n.get("reward").mults, function(e) { | |
return t.getMult(e, "noob"); | |
}), i = b.default.map(o.get("reward").mults, function(e) { | |
return t.getMult(e, "king"); | |
}), a = b.default.find(g.default, function(t) { | |
return t.id == o.get("reward").hero.id; | |
}); | |
return l.default.createElement("div", { | |
className: "m-popup startpack" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, _._tr)("Starter pack")), l.default.createElement("div", { | |
className: "color-box startpack" | |
}), l.default.createElement("div", { | |
className: "noobpack-box" | |
}, l.default.createElement("div", { | |
className: "cardnameback" | |
}, l.default.createElement("div", { | |
className: "card-text" | |
}, n.get("name"))), r, l.default.createElement("div", { | |
className: "buy-box" | |
}, l.default.createElement("div", { | |
className: "buy-text-box" | |
}, l.default.createElement("div", { | |
className: "moregold-oldprice" | |
}, l.default.createElement("span", { | |
className: "ss" | |
}, n.get("price").old.real, "$")), l.default.createElement("div", { | |
className: "moregold-newprice" | |
}, (0, _._tr)("Now for only {dollars}", { | |
dollars: n.get("price").real | |
}), "$")), l.default.createElement("div", { | |
className: "btn-box", | |
onClick: function() { | |
return t.onBuyItem(n.get("typeId")); | |
} | |
}, l.default.createElement("div", { | |
className: "btn-simple-green btn-ok" | |
}, (0, _._tr)("Buy"))))), l.default.createElement("div", { | |
className: "kingpack-box" | |
}, l.default.createElement("div", { | |
className: "card-box" | |
}, l.default.createElement("div", { | |
className: "card" | |
}, l.default.createElement("img", { | |
className: "card-img", | |
src: (0, d.cdnURL)(a.images[0]) | |
})), l.default.createElement("div", { | |
className: "card-name" | |
}, l.default.createElement("span", { | |
className: "cn" | |
}, (0, _._tr)("Unique hero")), l.default.createElement("br", null), a.name), l.default.createElement("div", { | |
className: "cardnameback" | |
}, l.default.createElement("div", { | |
className: "card-text" | |
}, o.get("name")))), i, l.default.createElement("div", { | |
className: "buy-box" | |
}, l.default.createElement("div", { | |
className: "buy-text-box" | |
}, l.default.createElement("div", { | |
className: "moregold-oldprice" | |
}, l.default.createElement("span", { | |
className: "ss" | |
}, o.get("price").old.real, "$")), l.default.createElement("div", { | |
className: "moregold-newprice" | |
}, (0, _._tr)("Now for only {dollars}", { | |
dollars: o.get("price").real | |
}), "$")), l.default.createElement("div", { | |
className: "btn-box", | |
onClick: function() { | |
return t.onBuyItem(o.get("typeId")); | |
} | |
}, l.default.createElement("div", { | |
className: "btn-simple-green btn-ok" | |
}, (0, _._tr)("Buy"))))), l.default.createElement("div", { | |
className: "or-box" | |
}, (0, _._tr)("or")), l.default.createElement("div", { | |
className: "sale-box" | |
}, l.default.createElement("div", { | |
className: "sale-text" | |
}, (0, _._tr)("{percent} off", { | |
percent: s.discount + "%" | |
}))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
}), l.default.createElement("div", { | |
className: "start-timer-box" | |
}, l.default.createElement("div", { | |
className: "time-text" | |
}, (0, _._tr)("Time left")), l.default.createElement(f.default, { | |
cls: "time", | |
time: e.timeLeft() + c.default.getTime() | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = w; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(26), d = (s(9), s(252)), p = n(d), x = s(172), f = n(x), h = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props, e = t.setRef, s = t.loading, n = c.default.getUser(), o = this.props.data, r = o.get("reward").timeskip, i = n.get("battle").getTimeskipReward(r.res, r.time), a = i.res, u = []; | |
for (var d in a) { | |
var x = a[d]; | |
u.push(l.default.createElement("div", { | |
key: d, | |
className: "reward " + d | |
}, l.default.createElement(p.default, { | |
duration: 1500, | |
cls: "text", | |
format: "big", | |
desiredValue: x | |
}))); | |
} | |
return l.default.createElement("div", { | |
className: "m-popup red ts_confirm", | |
ref: e, | |
style: { | |
visibility: s ? "hidden" : "visible" | |
} | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("Congratulations!")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content sale ts_confirm" | |
}, l.default.createElement("div", { | |
className: "timer" | |
}, l.default.createElement("div", { | |
className: "clock" | |
}), l.default.createElement(p.default, { | |
duration: 1500, | |
cls: "time", | |
format: "time", | |
desiredValue: r.time | |
})), l.default.createElement("div", { | |
className: "rewards" | |
}, u)), l.default.createElement("div", { | |
className: "btn-simple-green btn-ok", | |
onClick: this.props.close | |
}, (0, y._tr)("Ok"))); | |
}, e; | |
}(a.Component); | |
h = (0, f.default)(h, !1, !0), e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(8), d = n(y), p = s(7), x = (s(75), | |
function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.state = { | |
value: 0 | |
}, s.lock = !1, s.animateValue = s.animateValue.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
this.startTime = c.default.getTime(), requestAnimationFrame(this.animateValue); | |
}, e.prototype.componentWillUnmount = function() { | |
this.lock = !0; | |
}, e.prototype.getCurrentValue = function() { | |
var t = this.props, e = t.duration, s = t.desiredValue, n = c.default.getTime(), o = this.startTime || n, r = (n - o) / e, i = (0, | |
d.default)(s).times(r); | |
return i; | |
}, e.prototype.formatValue = function(t, e) { | |
switch (t = t || 0, e) { | |
case "big": | |
return this.lock ? (0, p.formatBig)((0, d.default)(t)) : (0, p.formatBig)((0, d.default)(t), 4, !0); | |
case "time": | |
var s = new Date(1970, 0, 1); | |
s.setSeconds(t); | |
var n = Math.floor(t / 86400), o = 24 * n + s.getHours(), r = s.getMinutes(); | |
return this.twoDigitFormat(o) + "h " + this.twoDigitFormat(r) + "m"; | |
} | |
}, e.prototype.twoDigitFormat = function(t) { | |
return t < 10 && (t = "0" + t), t; | |
}, e.prototype.animateValue = function() { | |
this.isTimeout() || this.lock ? (this.lock = !0, this.setState({ | |
value: this.props.desiredValue | |
})) : (this.setState({ | |
value: this.getCurrentValue() | |
}), requestAnimationFrame(this.animateValue)); | |
}, e.prototype.isTimeout = function() { | |
var t = c.default.getTime(); | |
return t - this.startTime > this.props.duration; | |
}, e.prototype.render = function() { | |
var t = this.props, e = t.cls, s = t.format; | |
return l.default.createElement("div", { | |
className: e | |
}, this.formatValue(this.state.value, s)); | |
}, e; | |
}(a.Component)); | |
e.default = x; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(26), d = n(y), p = s(12), x = n(p), f = s(68), h = n(f), m = s(142), g = n(m); | |
s(254); | |
var v = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.locked = !1, s.change = s.change.bind(s), s; | |
} | |
return i(e, t), e.prototype.change = function(t) { | |
this.locked || (this.locked = !0, this.props.close(), t != c.default.locale && h.default.callMethod("user.changeLang", { | |
lang: t | |
}).then(function() { | |
return window.location.reload(!1); | |
}).catch(function(t) { | |
return console.log("Lang change fail", t); | |
})); | |
}, e.prototype.render = function() { | |
var t = (this.props.data, this.change), e = (0, x.default)(d.default.languages).map(function(e) { | |
return l.default.createElement(g.default, { | |
className: "lang-icon " + e, | |
key: e, | |
onClick: function() { | |
return t(e); | |
}, | |
tooltipText: d.default.get(e).name | |
}); | |
}); | |
return l.default.createElement("div", { | |
className: "m-popup language" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("Language")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content" | |
}, l.default.createElement("div", { | |
className: "h2" | |
}, (0, y._tr)("Select the language you prefer")), l.default.createElement("div", { | |
className: "lang-box" | |
}, e), l.default.createElement("div", { | |
className: "btn-simple-silver btn-cancel", | |
onClick: this.props.close | |
}, (0, y._tr)("Close"))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = v; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(257), u = n(l), c = s(14), y = n(c), d = s(24), p = (n(d), s(9)), x = s(7), f = s(258), h = n(f), m = s(12), g = n(m), v = s(26), b = s(76), _ = s(25), k = n(_), w = s(8), C = n(w); | |
s(260); | |
var E = s(1), S = E.createElement, T = 300, N = 10, P = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.chestBuy = s.chestBuy.bind(s), s.playChestAnimation = s.playChestAnimation.bind(s), | |
s.playRouletteAnimation = s.playRouletteAnimation.bind(s), s.getRandomHeroId = s.getRandomHeroId.bind(s), | |
s.playStarsAnimation = s.playStarsAnimation.bind(s), s.clearAnimation = s.clearAnimation.bind(s), | |
s.getPosById = s.getPosById.bind(s), s.onClose = s.onClose.bind(s), s.state = { | |
locked: !1 | |
}, s; | |
} | |
return i(e, t), e.prototype.chestBuy = function(t, e) { | |
var s = this, n = this.props.data, o = n.chestId, r = n.source, i = y.default.getUser().get("superChest"); | |
if (!this.state.locked && i.isAvailable(o)) { | |
this.setState({ | |
locked: !0 | |
}), this.clearAnimation(); | |
var a = i.buy(o, e, r); | |
a.then(this.playChestAnimation).then(function(t) { | |
return i.onAnimationEnd(t); | |
}).finally(function() { | |
return s.setState({ | |
locked: !1 | |
}); | |
}); | |
} | |
}, e.prototype.playChestAnimation = function(t) { | |
var e = this, s = t.heroId, n = t.stars; | |
this.setState({ | |
anim1: !0 | |
}); | |
var o = this.playRouletteAnimation(N); | |
return o.then(function() { | |
return e.setState({ | |
highlight: s, | |
highlight2: s | |
}), new k.default(function(t) { | |
return setTimeout(t, 300); | |
}); | |
}).then(function() { | |
return e.playStarsAnimation(s, n); | |
}).then(function() { | |
return e.changePictureAnimation(s); | |
}).then(function() { | |
return t; | |
}); | |
}, e.prototype.changePictureAnimation = function(t) { | |
var e = this; | |
return new k.default(function(s) { | |
e.setState({ | |
promoutedHero: t | |
}), setTimeout(function() { | |
e.setState({ | |
promoutedHero: null | |
}), s(); | |
}, 1e3); | |
}); | |
}, e.prototype.playStarsAnimation = function(t, e) { | |
var s = this, n = "", o = "", r = ""; | |
this.setState({ | |
open: !0 | |
}); | |
var i = this.getPosById(t); | |
return n = "anim-" + i, e > 1 && (o = "anim-" + i), e > 2 && (r = "anim-" + i), | |
this.setState({ | |
star1: n, | |
star2: o, | |
star3: r | |
}), new k.default(function(t) { | |
return setTimeout(function() { | |
t(), n = "", o = "", r = "", this.setState({ | |
star1: n, | |
star2: o, | |
star3: r | |
}); | |
}.bind(s), 200); | |
}); | |
}, e.prototype.clearAnimation = function() { | |
this.setState({ | |
anim1: "", | |
star1: "", | |
star2: "", | |
star3: "", | |
open: null, | |
highlight: null, | |
highlight2: null | |
}); | |
}, e.prototype.getPosById = function(t) { | |
for (var e = y.default.getUser().get("superChest"), s = this.props.data.chestId, n = e.getHeroesList(s), o = 0; o < n.length; o++) { | |
var r = n[o]; | |
if (r.get("id") == t) return o; | |
} | |
}, e.prototype.playRouletteAnimation = function(t) { | |
for (var e = this, s = 0; s < t; s++) setTimeout(function() { | |
var t = e.getRandomHeroId(); | |
e.setState({ | |
highlight: t | |
}); | |
}, T * s); | |
return new k.default(function(e) { | |
return setTimeout(e, T * t); | |
}); | |
}, e.prototype.getRandomHeroId = function() { | |
for (var t = y.default.getUser().get("superChest"), e = this.props.data.chestId, s = t.getHeroesList(e), n = this.lastNum; n == this.lastNum; ) n = (0, | |
b.randomInteger)(0, 3); | |
return this.lastNum = n, s[n].get("id"); | |
}, e.prototype.onClose = function() { | |
this.state.locked || this.props.close(); | |
}, e.prototype.render = function() { | |
var t = this, e = y.default.getUser(), s = this.props.data, n = s.chestId, o = (s.source, | |
this.state), r = o.anim1, i = o.open, a = o.star1, l = o.star2, c = o.star3, d = e.get("superChest"), f = this.state.locked || !d.isAvailable(n), m = d.getHeroesList(n), b = (0, | |
C.default)(e.get("resources").get("chests")); | |
r = r ? "anim1" : "", i = i ? "open" : ""; | |
var _ = g.default.map(m, function(e) { | |
return S(h.default, { | |
superHero: e, | |
key: e.get("id"), | |
parentState: t.state | |
}); | |
}); | |
return S("div", { | |
className: "m-popup shero-check " + r | |
}, S("div", { | |
className: "title" | |
}, (0, v._tr)("superheroes")), _, S("div", { | |
className: "sun-buy-box" | |
}, S(u.default, { | |
locked: f, | |
resourceCouldBeDisabled: !0, | |
resourceFallbackAlwaysEnabled: !0, | |
fallbackResource: "crowns", | |
resource: "chests", | |
value: d.getPrice(n, "chests").chests, | |
fallbackValue: d.getPrice(n, "crowns").crowns, | |
onClick: this.chestBuy | |
}), S("div", { | |
className: "sun-box " + i | |
}, S("div", { | |
className: "star1 " + a | |
}), S("div", { | |
className: "star2 " + l | |
}), S("div", { | |
className: "star3 " + c | |
})), (0, p.IF)(b.gt(0))(S("div", { | |
className: "sb-num-box" | |
}, S("div", { | |
className: "sb-num" | |
}, (0, x.formatBig)(b))))), S("div", { | |
className: "btn-close-x", | |
onClick: this.onClose | |
})); | |
}, e; | |
}(a.Component); | |
e.default = P; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(7)), y = s(9), d = s(166), p = n(d), x = s(26), f = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.getResourceDisabled() || this.props.locked, e = this.state.resourceDisabled && this.props.fallbackValue ? this.props.fallbackValue : this.props.value, s = this.getResource(); | |
return l.default.createElement("div", { | |
className: "essebtn-box" | |
}, l.default.createElement("div", { | |
className: "essebtn " + (t ? "disable" : ""), | |
onMouseLeave: this.props.onMouseLeave, | |
onMouseEnter: this.props.onMouseEnter, | |
onClick: this.onClick | |
}, (0, y.IF)("crowns" == s)(function() { | |
return l.default.createElement("div", null, l.default.createElement("div", { | |
className: "coron-icon" | |
}), l.default.createElement("div", { | |
className: "coron-price" | |
}, (0, c.formatBig)(e))); | |
}, function() { | |
return l.default.createElement("div", null, l.default.createElement("div", { | |
className: "coron-price" | |
}, (0, x._tr)("Free"))); | |
}))); | |
}, e; | |
}(p.default); | |
e.default = f; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(26), u = s(14), c = (n(u), s(9)), y = s(259), d = n(y), p = s(1), x = p.createElement, f = function(t) { | |
var e = t.superHero, s = t.promoutedHero, n = e.get("imageManager"); | |
return x("div", null, x("div", { | |
className: "shero-pic" | |
}, x("img", { | |
src: (0, c.cdnURL)(n.getImage()) | |
})), x("div", { | |
className: "shero-pic masked " + (s ? "fade-in" : "") | |
}, x("img", { | |
src: (0, c.cdnURL)(n.getNextImage()) | |
}))); | |
}, h = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props, e = t.superHero, s = t.parentState, n = s.highlight, o = s.highlight2, r = s.promoutedHero, i = e.get("id"), a = n == i ? "hi" : "", u = o == i ? "hi2" : "", c = (e.get("level"), | |
e.get("stars") || 0), y = 10 == c ? "complete" : ""; | |
return x("div", { | |
className: "shero-card-box " + a + " " + u + " " + y | |
}, x(f, { | |
superHero: e, | |
promoutedHero: r | |
}), x("div", { | |
className: "topname-box" | |
}, x("div", { | |
className: "lrare-box " + e.get("rare") | |
}), x("div", { | |
className: "lhero-name-box" | |
}, x("div", { | |
className: "lhero-name" | |
}, e.get("name")))), x(d.default, { | |
superHero: e, | |
type: "sp_popup", | |
activeBonusArgs: [ !0, {} ], | |
passiveBonusArgs: [ !1, {} ] | |
}), x("div", { | |
className: "star-bonus-box" | |
}), x("div", { | |
className: "big-herostar-box" | |
}, x("div", { | |
className: "big-hero-star lvl" + (c < 10 ? "0" + c : c) | |
})), x("div", { | |
className: "complete-banner" | |
}, x("p", { | |
className: "txt" | |
}, (0, l._tr)("Max Level!")))); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(26), u = s(14), c = (n(u), s(9)), y = s(1), d = y.createElement, p = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.getBonus = s.getBonus.bind(s), s; | |
} | |
return i(e, t), e.prototype.getBonus = function(t) { | |
var e = this.props, s = e.superHero, n = e.type, o = s.get("mult").type, r = "shards" == o || "gold" == o, i = s.getBonus.apply(s, t), a = "sp_popup" == n ? "pcbonus-num" : "abonus"; | |
return r ? d("div", { | |
className: "bn-price" | |
}, (0, l._tr)("+{percent}%", { | |
percent: i | |
}), d("div", { | |
className: "bn-icon " + o | |
})) : d("div", { | |
className: a | |
}, (0, l._tr)("+{percent}% {bonusType}", { | |
percent: i, | |
bonusType: o | |
})); | |
}, e.prototype.render = function() { | |
var t = this.props, e = t.cls, s = t.labelCls, n = t.label, o = t.type, r = t.activeBonusArgs, i = t.stars, a = t.passiveBonusArgs, u = this.getBonus(r), y = this.getBonus(a); | |
return "sp_popup" == o ? d("div", { | |
className: "acpass-bonus-box" | |
}, d("div", { | |
className: "acbonus-box" | |
}, d("div", { | |
className: "acbonus-text" | |
}, (0, l._tr)("active bonus")), u), d("div", { | |
className: "pcbonus-box" | |
}, d("div", { | |
className: "pcbonus-text" | |
}, (0, l._tr)("passive bonus")), y)) : "action_popup" == o ? d("div", { | |
className: "ashero-bonus-box" | |
}, d("div", { | |
className: "acbonus-box" | |
}, d("div", { | |
className: "acbonus-text" | |
}, (0, l._tr)("active bonus")), d("div", { | |
className: "acbonus-num" | |
}, u)), d("div", { | |
className: "pcbonus-box" | |
}, d("div", { | |
className: "pcbonus-text" | |
}, (0, l._tr)("passive bonus")), d("div", { | |
className: "pcbonus-num" | |
}, y))) : d("div", { | |
className: e | |
}, (0, c.IF)(i)(function() { | |
return d("div", { | |
className: "herostar-box" | |
}, d("div", { | |
className: "herostar lvl" + i | |
})); | |
}, function() { | |
return d("div", { | |
className: s | |
}, n); | |
}), d("div", { | |
className: "active-bonus-box" | |
}, d("div", { | |
className: "abonus-text" | |
}, (0, l._tr)("active bonus")), u), d("div", { | |
className: "passive-bonus-box" | |
}, d("div", { | |
className: "abonus-text" | |
}, (0, l._tr)("passive bonus")), y)); | |
}, e; | |
}(a.Component); | |
e.default = p; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(26), d = s(13), p = n(d), x = s(7), f = s(164), h = n(f), m = s(12), g = n(m); | |
s(215); | |
var v = s(8), b = n(v), _ = s(24), k = n(_), w = s(166), C = n(w), E = "__S_CH_QT_KEYS", S = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.state = { | |
locked: !1 | |
}, s.__update = s.__update.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
c.default.getUser().get("resources").on("change:keys", this.__update), c.default.getUser().get("counters").on("change:" + E, this.__update); | |
}, e.prototype.componentWillUnmount = function() { | |
c.default.getUser().get("resources").off("change:keys", this.__update), c.default.getUser().get("counters").off("change:" + E, this.__update); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.buy = function(t) { | |
var e = this; | |
if (!this.state.locked) { | |
this.setState({ | |
locked: !0 | |
}); | |
var s = c.default.getUser(), n = s.get("superChestQuest"); | |
n.buy(t).then(function() { | |
e.props.close(), c.default.show({ | |
popup: { | |
type: "superChest", | |
data: { | |
chestId: 1, | |
source: "chest_quest_popup" | |
} | |
} | |
}); | |
}).catch(this.onBuyFail).finally(function() { | |
return e.setState({ | |
locked: !1 | |
}); | |
}); | |
} | |
}, e.prototype.onBuyFail = function(t) { | |
k.default.log(t); | |
}, e.prototype.render = function() { | |
var t = this, e = c.default.getUser(), s = e.get("superChestQuest"), n = e.get("resources").get("keys"), o = (0, | |
b.default)(e.get("counters").get(E)), r = s.getConfig().chests, i = s.getKeysData(), a = i.keysRelation, u = i.keysPc, d = g.default.map(r, function(e) { | |
var s = o.gte(e.id) ? "block" : "", n = o.plus(1).eq(e.id), r = s || t.state.locked || !n; | |
return l.default.createElement("div", { | |
className: "qsun-box " + s, | |
key: e.id | |
}, l.default.createElement("div", { | |
className: "chest-box" | |
}), l.default.createElement(C.default, { | |
className: "btn-buy green", | |
locked: r, | |
resource: "keys", | |
value: e.price.keys, | |
resourceCouldBeDisabled: !0, | |
text: (0, y._tr)("open"), | |
onClick: function() { | |
return t.buy(e); | |
} | |
}), l.default.createElement("div", { | |
className: "end-banner" | |
}, l.default.createElement("p", { | |
className: "txt" | |
}, (0, y._tr)("Bought")))); | |
}); | |
return l.default.createElement("div", { | |
className: "m-popup chest-quest" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, y._tr)("chest quest")), l.default.createElement("div", { | |
className: "qhero-box" | |
}), l.default.createElement("div", { | |
className: "qhero-ballon-box" | |
}, l.default.createElement("div", { | |
className: "qhero-ballon-text" | |
}, (0, y._tr)("Hello, find keys by killing bosses at each 10 level and get these chests. But hurry, I don't have much time left."))), l.default.createElement("div", { | |
className: "qsun-all-box" | |
}, d), l.default.createElement("div", { | |
className: "uhave-box" | |
}, l.default.createElement("div", { | |
className: "uhave-text" | |
}, (0, y._tr)("you have")), l.default.createElement("div", { | |
className: "uhave-count" | |
}, (0, x.formatBig)(n)), l.default.createElement("div", { | |
className: "keys-icon" | |
})), l.default.createElement("div", { | |
className: "uhave-prg-box" | |
}, l.default.createElement("div", { | |
className: "prg-keys-box" | |
}, l.default.createElement("div", { | |
className: "prg-keys" | |
}, l.default.createElement("div", { | |
className: "prg-all", | |
style: { | |
width: u + "%" | |
} | |
})), l.default.createElement("div", { | |
className: "keys-num" | |
}, a), l.default.createElement("div", { | |
className: "keys-pic" | |
}))), l.default.createElement("div", { | |
className: "best-bigtimer-box" | |
}, l.default.createElement("div", { | |
className: "best-off" | |
}, (0, y._tr)("time left")), l.default.createElement(p.default, { | |
cls: "best-timer", | |
time: s.timeLeft() + c.default.getTime() | |
})), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(h.default); | |
e.default = S; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = s(257), u = (n(l), s(14)), c = n(u), y = (s(9), s(264)), d = n(y), p = s(12), x = n(p), f = s(26), h = s(1), m = h.createElement, g = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = c.default.getUser(), e = this.props.data.chestId, s = t.get("superChest"), n = s.getHeroesList(e), o = x.default.map(n, function(t) { | |
return m(d.default, { | |
superHero: t, | |
key: t.get("id") | |
}); | |
}); | |
return m("div", { | |
className: "m-popup action-start" | |
}, m("div", { | |
className: "title" | |
}, (0, f._tr)("breaking news")), m("div", { | |
className: "ashero-box" | |
}), m("div", { | |
className: "ashero-ballon-box" | |
}, m("div", { | |
className: "qhero-ballon-text" | |
}, (0, f._tr)("Hero, hurry! Those demons fled from Hell. Capture them to get yourself a good helpers!"))), m("div", { | |
className: "ashero-all-box" | |
}, o), m("div", { | |
className: "getmore-btn", | |
onClick: this.props.close | |
}, m("div", { | |
className: "btn-text" | |
}, (0, f._tr)("get them all!"))), m("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = (s(26), s(14)), u = (n(l), s(9)), c = s(259), y = n(c), d = s(1), p = d.createElement, x = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.superHero; | |
return p("div", { | |
className: "ashero-card" | |
}, p("div", { | |
className: "hero-pic-box" | |
}, p("div", { | |
className: "hero-pic" | |
}, p("img", { | |
src: (0, u.cdnURL)(t.get("imageManager").getIcon()) | |
}))), p("div", { | |
className: "rarn-zn " + t.get("rare") | |
}), p("div", { | |
className: "hero-name-box" | |
}, p("div", { | |
className: "hero-name" | |
}, t.get("name"))), p(y.default, { | |
superHero: t, | |
type: "action_popup", | |
activeBonusArgs: [ !0, {} ], | |
passiveBonusArgs: [ !1, {} ] | |
})); | |
}, e; | |
}(a.Component); | |
e.default = x; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(26), s(9)), y = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.data, e = t.image, s = t.name; | |
return l.default.createElement("div", { | |
className: "m-popup fullsuphero" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, s), l.default.createElement("div", { | |
className: "supherofull" | |
}, l.default.createElement("img", { | |
src: (0, c.cdnURL)(e) | |
})), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = y; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(26)), y = s(9), d = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.data, e = t.image, s = t.imageNext, n = t.name; | |
return l.default.createElement("div", { | |
className: "m-popup fullsuphero2" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, n), l.default.createElement("div", { | |
className: "supherofull-box" | |
}, l.default.createElement("div", { | |
className: "supheropic-box" | |
}, l.default.createElement("div", { | |
className: "supheropic-box-name" | |
}, (0, c._tr)("this level")), l.default.createElement("div", { | |
className: "supheropic" | |
}, l.default.createElement("img", { | |
src: (0, y.cdnURL)(e) | |
}))), l.default.createElement("div", { | |
className: "rarrow" | |
}), l.default.createElement("div", { | |
className: "supheropic-box next" | |
}, l.default.createElement("div", { | |
className: "supheropic-box-name" | |
}, (0, c._tr)("next level")), l.default.createElement("div", { | |
className: "supheropic" | |
}, l.default.createElement("img", { | |
src: (0, y.cdnURL)(s) | |
})))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = d; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(26), c = s(14), y = n(c), d = s(68), p = n(d); | |
s(268); | |
var x = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.onGoClick = function() { | |
n.props.close(), setTimeout(function() { | |
p.default.callMethod("user.resources.get").then(function(t) { | |
y.default.getUser().get("resources").set(t); | |
}); | |
}, 5e3); | |
}, n.onCancelClick = function() { | |
n.props.close(), p.default.callMethod("upsells.dismiss", { | |
offer_id: n.props.data.id | |
}); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.data; | |
return l.default.createElement("div", { | |
className: "m-popup red appsell01" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, t.title), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "content sale appsell01" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, t.description), l.default.createElement("div", { | |
className: "img" | |
}, l.default.createElement("img", { | |
src: t.img | |
})), l.default.createElement("div", { | |
className: "rewards" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, (0, u._tr)("Reward:")), l.default.createElement("div", { | |
className: "reward price crowns" | |
}, l.default.createElement("div", { | |
className: "text" | |
}, t.reward.res.crowns)))), l.default.createElement("div", { | |
className: "btn-footer" | |
}, l.default.createElement("a", { | |
href: t.click_url, | |
target: "_blank", | |
onClick: this.onGoClick | |
}, l.default.createElement("div", { | |
className: "btn-simple-green btn-ok" | |
}, (0, u._tr)("Get rewards!"))), l.default.createElement("div", { | |
className: "btn-simple-silver btn-cancel", | |
onClick: this.onCancelClick | |
}, (0, u._tr)("Close")))); | |
}, e; | |
}(a.Component); | |
e.default = x; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(26)), y = s(9), d = s(7); | |
s(271); | |
var p = function(t) { | |
var e = t.resName, s = t.resValue, n = "gems" == e ? "rc/reb-rub-100.png" : "rc/ms-stone-pink.png"; | |
return l.default.createElement("div", { | |
className: "congra-box" | |
}, l.default.createElement("div", { | |
className: "prize-box" | |
}, l.default.createElement("img", { | |
src: (0, y.cdnURL)(n) | |
})), l.default.createElement("div", { | |
className: "prize-text" | |
}, (0, d.formatBig)(s))); | |
}, x = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props.data, e = []; | |
for (var s in t.res) { | |
var n = t.res[s]; | |
e.push(l.default.createElement(p, { | |
key: s, | |
resName: s, | |
resValue: n | |
})); | |
} | |
return l.default.createElement("div", { | |
className: "m-popup pop-congra" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, c._tr)("Congratulations!")), l.default.createElement("div", { | |
className: "color-box" | |
}), l.default.createElement("div", { | |
className: "congra-content-box" | |
}, e), l.default.createElement("div", { | |
className: "btn-simple-green btn-ok", | |
onClick: this.props.close | |
}, (0, c._tr)("Ok"))); | |
}, e; | |
}(a.Component); | |
e.default = x; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = (s(7), s(14)), c = n(u), y = s(68), d = n(y), p = s(8), x = n(p), f = s(63), h = n(f), m = function(t) { | |
function e() { | |
var s, n, i; | |
o(this, e); | |
for (var a = arguments.length, l = Array(a), u = 0; u < a; u++) l[u] = arguments[u]; | |
return s = n = r(this, t.call.apply(t, [ this ].concat(l))), n.upRes = function(t, e) { | |
var s = c.default.getUser().get("resources"), n = (0, x.default)(s.get(t)); | |
n.lt(1) && (n = (0, x.default)(1)); | |
var o = d.default.callMethod("user.resources.add", { | |
name: t, | |
value: n.times(e) | |
}); | |
o.then(function() { | |
return s.add(t, n.times(e)); | |
}); | |
}, n.refreshSkills = function() { | |
d.default.callMethod("skills.refresh"); | |
}, n.unlockSkills = function() { | |
d.default.callMethod("skills.unlock"); | |
}, n.vipUp = function() { | |
var t = c.default.vipModel, e = (t.getVipLvl(), t.getVipLvl() < 10 ? t.getVipLvl() + 1 : t.getVipLvl(), | |
t.getVipData()), s = e.vipPoints, n = e.nextValue, o = (e.pc, n - s), r = d.default.callMethod("user.counters.vip", { | |
value: o | |
}); | |
r.then(function() { | |
return c.default.getUser().get("counters").increment("vip", o); | |
}); | |
}, n.tutorSkip = function() { | |
var t = { | |
vars: { | |
TUT: 4, | |
TUTALBUM: 13, | |
TUT_STEP: 15, | |
TUTALBUMREWARD: 1, | |
TUTGUILD: 5, | |
TUTGUILDREWARD: 1, | |
PICS: 1 | |
}, | |
counters: { | |
SW_SP: 1 | |
} | |
}; | |
new h.default(t).claim(c.default.getUser()); | |
}, i = s, r(n, i); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this; | |
return l.default.createElement("div", { | |
className: "admin-panel hero-popup", | |
style: { | |
left: "inherit", | |
width: "630px" | |
} | |
}, l.default.createElement("div", { | |
className: "right-side", | |
style: { | |
left: "30px" | |
} | |
}, l.default.createElement("ul", { | |
className: "hero-abils" | |
}, l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("gold", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price gold" | |
}, "x1000! Gold"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("shards", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price shards" | |
}, "x1000! Shards"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("crowns", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price crowns" | |
}, "x1000! Crowns"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("gems", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price gems" | |
}, "x1000! Gems"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("essence", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price essence" | |
}, "x1000! Essence"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("strength_res", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price essence" | |
}, "x1000! strength_res"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("charisma_res", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price essence" | |
}, "x1000! harizma_res"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("intelligence_res", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price essence" | |
}, "x1000! intellect_res"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.upRes("luck_res", 1e3); | |
} | |
}, l.default.createElement("div", { | |
className: "price essence" | |
}, "x1000! luck_res"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.vipUp(); | |
} | |
}, l.default.createElement("div", { | |
className: "price" | |
}, "VIP UP", l.default.createElement("br", null), "Zap!"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.tutorSkip(); | |
} | |
}, l.default.createElement("div", { | |
className: "price" | |
}, "Tutor SKIP"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.refreshSkills(); | |
} | |
}, l.default.createElement("div", { | |
className: "price" | |
}, "Refresh skills"))), l.default.createElement("li", { | |
className: "abil" | |
}, l.default.createElement("div", { | |
className: "btn-buy", | |
onClick: function(e) { | |
return t.unlockSkills(); | |
} | |
}, l.default.createElement("div", { | |
className: "price" | |
}, "Unlock skills"))))), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = m; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(19), c = n(u), y = s(14), d = n(y), p = s(9); | |
s(275); | |
var x = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.state = {}, s.onShowTooltipEvent = s.onShowTooltipEvent.bind(s), s.showTooltip = s.showTooltip.bind(s), | |
s.onHideTooltipEvent = s.onHideTooltipEvent.bind(s), s.onRootSet = s.onRootSet.bind(s), | |
s.onLeave = s.onLeave.bind(s), d.default.events.on("showTooltip", s.onShowTooltipEvent), | |
d.default.events.on("hideTooltip", s.onHideTooltipEvent), s; | |
} | |
return i(e, t), e.prototype.onShowTooltipEvent = function(t) { | |
var e = (0, c.default)(this.el).offset(), s = (0, c.default)(this.el).position(), n = t.style, o = { | |
top: n.top - e.top + s.top, | |
left: n.left - e.left + s.left, | |
width: n.width | |
}, r = { | |
children: t.children, | |
styles: o, | |
parent: t.parent | |
}; | |
this.showTooltip(r); | |
}, e.prototype.showTooltip = function(t) { | |
this.setState(t); | |
}, e.prototype.onLeave = function() { | |
this.hide(); | |
}, e.prototype.onHideTooltipEvent = function(t) { | |
t.parent == this.state.parent && this.hide(); | |
}, e.prototype.hide = function() { | |
this.setState({ | |
children: null, | |
styles: null, | |
parent: null | |
}); | |
}, e.prototype.onRootSet = function(t) { | |
this.el = t; | |
}, e.prototype.render = function() { | |
var t = this; | |
return l.default.createElement("div", { | |
className: "tooltip-layer", | |
ref: this.onRootSet | |
}, (0, p.IF)(this.state.children)(function() { | |
return l.default.createElement("div", { | |
className: "achiev-hint", | |
style: t.state.styles, | |
onMouseLeave: t.onLeave | |
}, t.state.children); | |
})); | |
}, e; | |
}(a.Component); | |
e.default = x; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(9), d = s(25), p = (n(d), s(12)), x = n(p), f = s(26), h = s(68), m = n(h); | |
s(278); | |
var g = s(280), v = n(g), b = s(283), _ = n(b), k = s(30), w = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.tutorials = [], s.byId = {}, s.isActive = !1, s.isSuspended = !1, s.currentLocation = "", | |
s.currentPopup = "", s.currentTutorial = null, s.currentTutorialCallbacks = {}, | |
s.el = null, s.onTutorialStageChanged = s.onTutorialStageChanged.bind(s), s.stopTutorials = s.stopTutorials.bind(s), | |
s.onSuspend = s.onSuspend.bind(s), s.onResume = s.onResume.bind(s), s.onLocationChange = s.onLocationChange.bind(s), | |
s.onPopupOpened = s.onPopupOpened.bind(s), s.onPopupClosed = s.onPopupClosed.bind(s), | |
s.onDialogOpened = s.onDialogOpened.bind(s), s.onDialogClosed = s.onDialogClosed.bind(s), | |
s.onOkClick = s.onOkClick.bind(s), s.setCurrentTutorial = s.setCurrentTutorial.bind(s), | |
s.setEl = s.setEl.bind(s), s.initialize(), s.state = { | |
render: 0 | |
}, s; | |
} | |
return i(e, t), e.prototype.initialize = function() { | |
var t = this; | |
if (_.default.forEach(function(e) { | |
var s = new v.default(e); | |
s.isComplete() || (t.tutorials.push(s), t.byId[s.id] = s); | |
}), this.tutorials.length) { | |
c.default.history.listen(this.onLocationChange); | |
var e = c.default.events; | |
e.on("popupOpened", this.onPopupOpened), e.on("popupClosed", this.onPopupClosed), | |
e.on("dialogOpened", this.onDialogOpened), e.on("dialogClosed", this.onDialogClosed), | |
e.on("suspendTutorial", this.onSuspend), e.on("resumeTutorial", this.onResume), | |
this.tutorials.forEach(function(e) { | |
e.on("change:currentStage", t.onTutorialStageChanged); | |
}), this.isActive = !0, this.step = c.default.getUser().get("vars").get("TUT_STEP") || 0, | |
this.setCurrentTutorial(); | |
} | |
}, e.prototype.onTutorialStageChanged = function(t) { | |
var e = t.get("stages"), s = e.get("currentStage"); | |
m.default.addToBatch("user.log", { | |
action: "tutor", | |
params: { | |
tutor: t.id, | |
n: s | |
} | |
}), c.default.analytics.dtd_custom_event("tutor", { | |
tutorId: t.id, | |
step: s | |
}); | |
var n = parseInt("" + t.id + (0, k.pad)("000", s)); | |
if (c.default.analytics.dtd_event("tutorialCompleted", [ n ]), this.sendAnalytics(), | |
e.isComplete()) { | |
t.off("change:currentStage", this.onTutorialStageChanged), t == this.currentTutorial && this.resetCurrentTutorial(); | |
var o = x.default.indexOf(this.tutorials, t); | |
o != -1 && (this.tutorials.splice(o, 1), delete this.byId[t.id], this.tutorials.length || this.stopTutorials()); | |
} | |
return this.setCurrentTutorial(), null; | |
}, e.prototype.sendAnalytics = function() { | |
var t = c.default.getUser().get("vars").get("TUT_STEP"); | |
t > this.step && (this.step = t, c.default.analytics.amp_event("Tutor", { | |
step: t | |
}), 15 == t ? c.default.analytics.amp_set("tutor_state", "tutor_finished") : 20 == t && c.default.analytics.amp_set("tutor_state", "guild_tutor_finished")); | |
}, e.prototype.onLocationChange = function(t) { | |
this.currentLocation = t.pathname, this.currentTutorial && this.currentTutorial.performAction({ | |
locationChange: this.currentLocation | |
}), this.setCurrentTutorial(); | |
}, e.prototype.onPopupOpened = function(t) { | |
this.currentPopup = t.props.meta.type, this.currentTutorial && this.currentTutorial.performAction({ | |
popupOpen: this.currentPopup | |
}), this.setCurrentTutorial(); | |
}, e.prototype.onPopupClosed = function(t) { | |
this.currentPopup = "", this.currentTutorial && this.currentTutorial.performAction({ | |
popupClose: t.props.meta.type | |
}), this.setCurrentTutorial(); | |
}, e.prototype.onDialogOpened = function(t) { | |
this.currentDialog = t.props.meta.type, this.currentTutorial && this.currentTutorial.performAction({ | |
dialogOpen: this.currentDialog | |
}), this.setCurrentTutorial(); | |
}, e.prototype.onDialogClosed = function(t) { | |
this.currentDialog = "", this.currentTutorial && this.currentTutorial.performAction({ | |
dialogClose: t.props.meta.type | |
}), this.setCurrentTutorial(); | |
}, e.prototype.onOkClick = function() { | |
this.currentTutorial && this.currentTutorial.performAction({ | |
clickOk: !0 | |
}); | |
}, e.prototype.setCurrentTutorial = function() { | |
var t = this; | |
if (this.resetCurrentTutorial(), this.isActive && !this.isSuspended) for (var e = this.tutorials.length, s = function(e) { | |
var s = t.tutorials[e]; | |
if (s.isValidFor(t.currentLocation, t.currentPopup, t.currentDialog)) { | |
var n = s.get("action"); | |
return n && n.events && n.events.forEach(function(e) { | |
var n = e.name, o = t.makeActionEventCallback(s, n); | |
t.currentTutorialCallbacks[n] = o, c.default.events.on(n, o); | |
}), t.currentTutorial = s, "break"; | |
} | |
}, n = 0; n < e; n++) { | |
var o = s(n); | |
if ("break" === o) break; | |
} | |
this.state && this.setState({ | |
render: this.state.render + 1 | |
}); | |
}, e.prototype.makeActionEventCallback = function(t, e) { | |
var s = this; | |
return function(n) { | |
t == s.currentTutorial && t.performAction({ | |
event: { | |
name: e, | |
value: n | |
} | |
}); | |
}; | |
}, e.prototype.resetCurrentTutorial = function() { | |
if (this.currentTutorialCallbacks) { | |
for (var t in this.currentTutorialCallbacks) c.default.events.off(t, this.currentTutorialCallbacks[t]); | |
this.currentTutorialCallbacks = {}; | |
} | |
this.currentTutorial = null; | |
}, e.prototype.stopTutorials = function() {}, e.prototype.onSuspend = function() { | |
this.isSuspended = !0, this.setState({ | |
render: this.state.render + 1 | |
}); | |
}, e.prototype.onResume = function() { | |
this.isSuspended = !1, this.setCurrentTutorial(), this.setState({ | |
render: this.state.render + 1 | |
}); | |
}, e.prototype.setEl = function(t) { | |
this.el = t; | |
}, e.prototype.render = function() { | |
var t = this, e = this.currentTutorial, s = this.isActive && !this.isSuspended && e && e.get("cssClass") ? l.default.createElement("div", { | |
ref: this.setEl, | |
className: "tutor-layer " + e.get("cssClass") | |
}, l.default.createElement("div", { | |
className: "blend" | |
}, l.default.createElement("div", { | |
className: "blend-1" | |
}), l.default.createElement("div", { | |
className: "blend-2" | |
}), l.default.createElement("div", { | |
className: "screen" | |
}), l.default.createElement("div", { | |
className: "blend-3" | |
}), l.default.createElement("div", { | |
className: "blend-4" | |
}), l.default.createElement("div", { | |
className: "blend-5" | |
}), l.default.createElement("div", { | |
className: "blend-6" | |
}), l.default.createElement("div", { | |
className: "blend-7" | |
})), l.default.createElement("div", { | |
className: "tut-pops" | |
}, l.default.createElement("div", { | |
className: "hero" | |
}), l.default.createElement("div", { | |
className: "tut-text-box" | |
}, l.default.createElement("div", { | |
className: "tut-text" | |
}, e.get("text")), l.default.createElement("div", { | |
className: "tut-icon" | |
}), (0, y.IF)(e.get("action") && e.get("action").clickOk)(function() { | |
return l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: t.onOkClick | |
}, (0, f._tr)("Ok")); | |
})))) : null; | |
return s || (this.el = null), s; | |
}, e; | |
}(a.Component); | |
e.default = w; | |
}, function(t, e) {}, , function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, a = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) l.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, l = {}.hasOwnProperty; | |
o = s(22), n = s(14), t.exports = r = function(t) { | |
function e() { | |
return this.isValidFor = i(this.isValidFor, this), this.isComplete = i(this.isComplete, this), | |
this.giveReward = i(this.giveReward, this), this.onGoalComplete = i(this.onGoalComplete, this), | |
this.processGoal = i(this.processGoal, this), this.performAction = i(this.performAction, this), | |
this.onStageChanged = i(this.onStageChanged, this), this.initStage = i(this.initStage, this), | |
this.initialize = i(this.initialize, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return a(e, t), e.schema({ | |
attributes: { | |
id: Number, | |
stages: s(281), | |
currentStage: Number, | |
url: Object, | |
popup: String, | |
dialog: String, | |
text: String, | |
cssClass: String, | |
action: Object, | |
goal: s(20), | |
reward: s(63), | |
goBtnText: String, | |
goBtnUrl: String, | |
highlight: Object | |
} | |
}), e.prototype.initialize = function() { | |
return e.__super__.initialize.apply(this, arguments), this.initStage(); | |
}, e.prototype.initStage = function() { | |
var t; | |
if (t = this.get("stages")) return t.user = n.getUser(), t.initCurrentStage(), t.setStageChanges(this), | |
t.isComplete() || (this.processGoal(), t.isComplete() || this.listenTo(t, "change:currentStage", this.onStageChanged)), | |
this.set("currentStage", t.get("currentStage")); | |
}, e.prototype.onStageChanged = function() { | |
var t, e, s; | |
e = this.get("goal"), e && (e.unwatch(), e.off("complete")), s = this.get("stages"); | |
for (t in this.attributes) "stages" !== t && delete this.attributes[t]; | |
return s.setStageChanges(this), s.isComplete() ? this.stopListening(s, "change:currentStage", this.onStageChanged) : this.processGoal(), | |
this.set("currentStage", s.get("currentStage")); | |
}, e.prototype.performAction = function(t) { | |
var e, s, n, o, r, i, a, u; | |
if (i = this.get("action")) { | |
s = !1; | |
for (e in t) if (l.call(t, e)) switch (u = t[e], e) { | |
case "locationChange": | |
!i.locationChange || "__any__" !== i.locationChange && i.locationChange !== u || (s = !0); | |
break; | |
case "clickOk": | |
i.clickOk && (s = !0); | |
break; | |
case "event": | |
if (i.events) for (a = i.events, o = 0, r = a.length; o < r; o++) if (n = a[o], | |
n.name = u.name && (n.value = "__any__")) { | |
s = !0; | |
break; | |
} | |
break; | |
case "popupOpen": | |
i.popupOpen && i.popupOpen === u && (s = !0); | |
break; | |
case "popupClose": | |
i.popupClose && i.popupClose === u && (s = !0); | |
break; | |
case "dialogOpen": | |
i.dialogOpen && i.dialogOpen === u && (s = !0); | |
break; | |
case "dialogClose": | |
i.dialogClose && i.dialogClose === u && (s = !0); | |
} | |
return s && this.giveReward(), s; | |
} | |
}, e.prototype.processGoal = function() { | |
var t, e, s, o, r; | |
if (o = this.get("stages"), r = n.getUser(), o) { | |
if (o.isComplete()) return; | |
if (s = o.getMaxStage(), t = o.get("currentStage"), o.get("currentStage") <= s && (e = this.get("goal"))) return e.test(r) ? this.giveReward() : e.on("complete", this.onGoalComplete); | |
} | |
}, e.prototype.onGoalComplete = function(t) { | |
return t.off("complete", this.onGoalComplete), this.giveReward(); | |
}, e.prototype.giveReward = function() { | |
var t; | |
return t = this.get("reward"), null != t ? t.claim(n.getUser()) : void 0; | |
}, e.prototype.isComplete = function() { | |
var t; | |
return t = this.get("stages"), t && t.isComplete(), !1; | |
}, e.prototype.isValidFor = function(t, e, s) { | |
var n, o, r, i; | |
if (null != (i = this.get("stages")) ? i.get("currentStage") : void 0) return r = this.get("url"), | |
o = this.get("popup"), n = this.get("dialog"), !(s && !n) && (!(!n || n !== s) || !(e && !o) && (!(!r || !(r instanceof Array && r.indexOf(t) !== -1 || r === t)) || !(!o || o !== e))); | |
}, e; | |
}(o); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, a = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) l.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, l = {}.hasOwnProperty; | |
o = s(22), n = s(14), t.exports = r = function(t) { | |
function e() { | |
return this.onStageComplete = i(this.onStageComplete, this), this.setStageChanges = i(this.setStageChanges, this), | |
this.getStageChanges = i(this.getStageChanges, this), this.getConditionForStage = i(this.getConditionForStage, this), | |
this.isComplete = i(this.isComplete, this), this.getMaxStage = i(this.getMaxStage, this), | |
this.get = i(this.get, this), this.initCurrentStage = i(this.initCurrentStage, this), | |
this.clear = i(this.clear, this), this.initialize = i(this.initialize, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return a(e, t), e.schema({ | |
attributes: { | |
currentStage: Number, | |
maxStage: Number, | |
stages: { | |
cls: s(23), | |
options: { | |
model: s(282) | |
} | |
} | |
} | |
}), e.prototype.user = null, e.prototype.initialize = function() { | |
if (e.__super__.initialize.apply(this, arguments), this.user) return this.initCurrentStage(); | |
}, e.prototype.clear = function() { | |
var t, s, n, o, r, i; | |
if (i = this.get("stages")) for (o = i.models, s = t = 0, n = o.length; t < n; s = ++t) r = o[s], | |
r.clear(), this.stopListening(r); | |
return e.__super__.clear.apply(this, arguments); | |
}, e.prototype.initCurrentStage = function() { | |
var t, e, s, n, o, r, i, a, l; | |
if (a = this.get("stages")) { | |
for (e = this.get("currentStage"), l = this.user, t = e, r = a.models, n = s = 0, | |
o = r.length; s < o; n = ++s) if (i = r[n], i.user = l, !(t > n)) { | |
if (!i.isComplete()) { | |
this.listenTo(i, "change:isComplete", this.onStageComplete); | |
break; | |
} | |
t += 1; | |
} | |
t > e && this.set("currentStage", t), t >= this.getMaxStage() && this.trigger("complete", this, e); | |
} | |
return this; | |
}, e.prototype.get = function(t) { | |
var s; | |
return s = e.__super__.get.call(this, t), "currentStage" === t ? s || 0 : s; | |
}, e.prototype.getMaxStage = function() { | |
var t; | |
return (null != (t = this.get("stages")) ? t.size() : void 0) || this.get("maxStage") || 0; | |
}, e.prototype.isComplete = function() { | |
return this.get("currentStage") >= this.getMaxStage(); | |
}, e.prototype.getConditionForStage = function(t) { | |
var e, s; | |
return s = this.get("stages"), s && t <= s.size() ? (null != (e = s.at(t - 1)) ? e.get("condition") : void 0) || null : null; | |
}, e.prototype.getStageChanges = function(t) { | |
var e, s, n; | |
return null == t && (t = -1), (t = t === -1 ? this.get("currentStage") : t) ? (n = this.get("stages"), | |
e = Math.min(n.size() - 1, t - 1), null != (s = n.at(e)) ? s.get("changes") : void 0) : null; | |
}, e.prototype.setStageChanges = function(t) { | |
var e; | |
if (e = this.getStageChanges()) return t.set(e); | |
}, e.prototype.onStageComplete = function(t) { | |
if (t.isComplete()) return this.stopListening(t, "change:isComplete", this.onStageComplete), | |
this.initCurrentStage(); | |
}, e; | |
}(o); | |
}, function(t, e, s) { | |
var n, o, r, i = function(t, e) { | |
return function() { | |
return t.apply(e, arguments); | |
}; | |
}, a = function(t, e) { | |
function s() { | |
this.constructor = t; | |
} | |
for (var n in e) l.call(e, n) && (t[n] = e[n]); | |
return s.prototype = e.prototype, t.prototype = new s(), t.__super__ = e.prototype, | |
t; | |
}, l = {}.hasOwnProperty; | |
o = s(22), n = s(14), t.exports = r = function(t) { | |
function e() { | |
return this.onConditionComplete = i(this.onConditionComplete, this), this.isComplete = i(this.isComplete, this), | |
this.clear = i(this.clear, this), e.__super__.constructor.apply(this, arguments); | |
} | |
return a(e, t), e.schema({ | |
attributes: { | |
isComplete: Boolean, | |
condition: s(20), | |
changes: Object, | |
reward: s(63) | |
} | |
}), e.prototype.user = null, e.prototype.clear = function() { | |
var t; | |
return t = this.get("condition"), t && t.unwatch(), e.__super__.clear.apply(this, arguments); | |
}, e.prototype.isComplete = function() { | |
var t, e, s; | |
return t = this.get("isComplete"), !(!t && (s = this.get("condition"))) || ((e = s.test(this.user)) ? (this.set("isComplete", !0), | |
!0) : (s.on("complete", this.onConditionComplete), !1)); | |
}, e.prototype.onConditionComplete = function() { | |
var t; | |
return null != (t = this.get("condition")) && t.off("complete", this.onConditionComplete), | |
this.set("isComplete", !0); | |
}, e; | |
}(o); | |
}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(19), c = n(u), y = s(14), d = n(y), p = s(9), x = s(173), f = n(x), h = s(12), m = n(h), g = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.state = { | |
data: null, | |
meta: null, | |
showing: !1, | |
pictureId: null, | |
loading: !0 | |
}, s.close = s.close.bind(s), s.handleImageLoaded = s.handleImageLoaded.bind(s), | |
s.nextPicture = s.nextPicture.bind(s), s.previousPicture = s.previousPicture.bind(s), | |
s.setPictureState = s.setPictureState.bind(s), s.onShowLightBox = s.onShowLightBox.bind(s), | |
s.zoomIn = s.zoomIn.bind(s), s.onRef = s.onRef.bind(s), s.zoom = !1, s.isPortrait = !1, | |
d.default.events.on("showLightBox", s.onShowLightBox), s; | |
} | |
return i(e, t), e.prototype.getPicture = function() { | |
var t = null == this.state.pictureId ? this.state.meta.pictureId : this.state.pictureId; | |
return this.getPictureById(t); | |
}, e.prototype.getPictureById = function(t) { | |
var e = this.state.data; | |
return m.default.find(e, function(e) { | |
return e.get("id") == t; | |
}); | |
}, e.prototype.getPosition = function(t) { | |
var e = this.state.data, s = this.state.pictureId ? this.state.pictureId : this.state.meta.pictureId; | |
return e.indexOf(this.getPictureById(s)) + t; | |
}, e.prototype.isPositionAvaliable = function(t) { | |
return !0; | |
}, e.prototype.nextPicture = function() { | |
this.setPictureState(1); | |
}, e.prototype.previousPicture = function() { | |
this.setPictureState(-1); | |
}, e.prototype.setPictureState = function(t) { | |
if (this.isPositionAvaliable(t)) { | |
var e = this.state.data, s = this.getPosition(0), n = this.getPosition(t); | |
if (n == e.length && (n = 0), n === -1 && (n = e.length - 1), n != s) { | |
var o = e[n]; | |
if (o && n >= 0) { | |
this.zoom = !1; | |
var r = o.get("id"); | |
this.setState({ | |
pictureId: r, | |
loading: !0 | |
}); | |
} | |
} | |
} | |
}, e.prototype.onShowLightBox = function(t) { | |
this.setState({ | |
data: t.data, | |
meta: t, | |
showing: !0 | |
}); | |
}, e.prototype.close = function() { | |
var t = this; | |
this.$el.fadeOut(150, function() { | |
t.zoom = !1, t.setState({ | |
data: null, | |
meta: null, | |
showing: null, | |
loading: !0, | |
pictureId: null | |
}); | |
}); | |
}, e.prototype.zoomIn = function() { | |
if (this.isPortrait) { | |
var t = this.$el, e = t.find(".place"), s = t.find("img"); | |
if (this.zoom) this.handleImageLoaded(), e.css({ | |
"overflow-y": "hidden" | |
}), this.zoom = !1, s.removeClass("zoom-out zoom-in"), s.addClass("zoom-in"); else { | |
if (e.css({ | |
"overflow-y": "scroll" | |
}), s.css({ | |
width: "initial", | |
height: "initial" | |
}), s.width() >= e.width()) s.css({ | |
left: 0, | |
width: "100%" | |
}); else { | |
var n = (e.width() - s.width()) / 2; | |
s.css({ | |
left: n | |
}); | |
} | |
s.removeClass("zoom-out zoom-in"), s.addClass("zoom-out"), this.zoom = !0; | |
} | |
} | |
}, e.prototype.onRef = function(t) { | |
t && (this.el = t, this.$el = (0, c.default)(t), this.$el.fadeIn(100)); | |
}, e.prototype.handleImageLoaded = function(t) { | |
this.setState({ | |
loading: !0 | |
}); | |
var e = this.$el, s = e.find(".place"), n = e.find("img"); | |
n.css({ | |
width: "initial", | |
height: "initial" | |
}); | |
var o = { | |
w: n.width(), | |
h: n.height() | |
}, r = { | |
w: s.width(), | |
h: s.height() | |
}, i = r.w / r.h, a = o.w / o.h; | |
this.isPortrait = i > a; | |
var l = 1; | |
l = this.isPortrait ? r.h / o.h : r.w / o.w, n.css({ | |
width: o.w * l, | |
height: o.h * l | |
}); | |
var u = { | |
w: r.w - n.width(), | |
h: r.h - n.height() | |
}, c = e.position().left + u.w / 2, y = e.position().top + u.h / 2; | |
n.css({ | |
left: c, | |
right: c, | |
top: y, | |
bottom: y, | |
opacity: 1 | |
}), n.removeClass("zoom-out zoom-in"), this.isPortrait && n.addClass("zoom-in"), | |
this.setState({ | |
loading: !1 | |
}); | |
}, e.prototype.render = function() { | |
if (!this.state.showing) return null; | |
var t = this.getPicture(); | |
return l.default.createElement("div", { | |
ref: this.onRef, | |
className: "fs-lightbox" | |
}, l.default.createElement("div", { | |
className: "place" | |
}, l.default.createElement("img", { | |
className: "img", | |
onClick: this.zoomIn, | |
onLoad: this.handleImageLoaded, | |
src: t.get("url"), | |
style: { | |
visibility: this.state.loading ? "hidden" : "visible" | |
} | |
}), (0, p.IF)(this.state.loading)(function() { | |
return l.default.createElement(f.default, null); | |
})), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.close | |
}), l.default.createElement("div", { | |
className: "scroll-controls" | |
}, l.default.createElement("div", { | |
className: "scroll-left " + (this.isPositionAvaliable(-1) ? "" : "disabled"), | |
onClick: this.previousPicture | |
}), l.default.createElement("div", { | |
className: "scroll-right " + (this.isPositionAvaliable(1) ? "" : "disabled"), | |
onClick: this.nextPicture | |
}))); | |
}, e; | |
}(a.Component); | |
e.default = g; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(19), c = n(u), y = s(14), d = n(y), p = (s(9), s(286)), x = n(p), f = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onShowDialogEvent = s.onShowDialogEvent.bind(s), s.close = s.close.bind(s), | |
s.onClosed = s.onClosed.bind(s), s.onDialogOpened = s.onDialogOpened.bind(s), s.onOk = s.onOk.bind(s), | |
s.onCancel = s.onCancel.bind(s), s.onExit = s.onExit.bind(s), d.default.events.on("showDialog", s.onShowDialogEvent), | |
s.state = {}, s.queue = [], s; | |
} | |
return i(e, t), e.prototype.onShowDialogEvent = function(t) { | |
var e = t.type; | |
if ("function" == typeof e) var s = e; else s = x.default[e] || x.default.default; | |
var n = { | |
DialogClass: s, | |
data: t.data, | |
meta: t | |
}; | |
this.state.data ? this.queueDialog(n) : this.showDialog(n); | |
}, e.prototype.showDialog = function(t) { | |
this.setState(t); | |
}, e.prototype.queueDialog = function(t) { | |
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "end"; | |
"end" === e ? this.queue.push(t) : this.queue.unshift(t); | |
}, e.prototype._doShowDialog = function(t) { | |
this.setState(t); | |
}, e.prototype.close = function() { | |
this._hideDialog(this.onClosed); | |
}, e.prototype.onClosed = function() { | |
this.openedDialog && d.default.events.trigger("dialogClosed", this.openedDialog), | |
this.openedDialog = null, this.queue.length ? (this.showDialog(this.queue.shift()), | |
(0, c.default)("#dialogContainer").show()) : ((0, c.default)("#dialogWrapper").fadeOut(50), | |
this.setState({ | |
data: null, | |
type: null | |
})); | |
}, e.prototype._hideDialog = function(t) { | |
(0, c.default)("#dialogContainer").fadeOut(150, t); | |
}, e.prototype.onDialogOpened = function(t) { | |
t && (this.openedDialog = t, (0, c.default)("#dialogContainer").show(), (0, c.default)("#dialogWrapper").fadeIn(100), | |
d.default.events.trigger("dialogOpened", t)); | |
}, e.prototype.onOk = function(t) { | |
"function" == typeof t && t(), this.close(); | |
}, e.prototype.onCancel = function(t) { | |
"function" == typeof t && t(), this.close(); | |
}, e.prototype.onExit = function(t) { | |
"function" == typeof t && t(), this.close(); | |
}, e.prototype.getColor = function() { | |
switch (this.state.data.type) { | |
case "error": | |
return "pink"; | |
case "warning": | |
return "sand"; | |
} | |
return "blue"; | |
}, e.prototype.getCurrentDialog = function() { | |
var t = this, e = this.state.data; | |
if (e && this.state.DialogClass) { | |
var s = this.state.DialogClass; | |
return l.default.createElement(s, { | |
data: e, | |
meta: this.state.meta, | |
ref: this.onDialogOpened, | |
color: this.getColor(), | |
onOk: function(s) { | |
return t.onOk(e.onOk); | |
}, | |
onCancel: function(s) { | |
return t.onCancel(e.onCancel); | |
}, | |
onExit: function(s) { | |
return t.onExit(e.onExit); | |
}, | |
close: this.close | |
}); | |
} | |
}, e.prototype.render = function() { | |
return l.default.createElement("div", { | |
id: "dialogWrapper", | |
className: "popup-layer" | |
}, l.default.createElement("div", { | |
className: "screen-blend-55" | |
}), l.default.createElement("div", { | |
id: "dialogContainer" | |
}, this.getCurrentDialog())); | |
}, e; | |
}(a.Component); | |
e.default = f; | |
}, function(t, e, s) { | |
t.exports = { | |
default: s(287).default | |
}; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(26)), y = s(9); | |
s(288); | |
var d = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props, e = t.data, s = t.meta, n = "blue"; | |
switch (e.style) { | |
case "error": | |
n = "pink"; | |
case "warning": | |
n = "sand"; | |
} | |
var o, r, i; | |
switch (s.type) { | |
case "confirm": | |
o = e.yesLabel || (0, c._tr)("Ok"), r = e.noLabel || (0, c._tr)("Cancel"); | |
break; | |
case "feedback": | |
i = "feedback", o = e.yesLabel || (0, c._tr)("Ok"); | |
break; | |
default: | |
o = e.yesLabel || (0, c._tr)("Ok"); | |
} | |
var a = e.text ? e.text.split(",").map(function(t, e) { | |
return l.default.createElement("p", { | |
key: e, | |
className: "text center" | |
}, t); | |
}) : ""; | |
return l.default.createElement("div", { | |
className: "m-popup " + i + " " + this.props.color | |
}, l.default.createElement("div", { | |
className: "title" | |
}, e.title), l.default.createElement("div", { | |
className: "color-box" | |
}), (0, y.IF)(e.content)(function() { | |
return e.content; | |
}, function() { | |
return l.default.createElement("div", { | |
className: "content" | |
}, a); | |
}), l.default.createElement("div", { | |
className: "btn-simple-gold btn-ok", | |
onClick: this.props.onOk | |
}, o), (0, y.IF)(r)(l.default.createElement("div", { | |
className: "btn-simple-silver btn-ok", | |
onClick: this.props.onCancel | |
}, r)), l.default.createElement("div", { | |
className: "btn-close-x", | |
onClick: this.props.onExit | |
})); | |
}, e; | |
}(a.Component); | |
e.default = d; | |
}, function(t, e) {}, , function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(19), c = n(u), y = s(14), d = n(y), p = (s(9), s(291)), x = n(p), f = "animationend animationEnd webkitAnimationEnd msAnimationEnd", h = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onShowSliderEvent = s.onShowSliderEvent.bind(s), s.close = s.close.bind(s), | |
s.onClosed = s.onClosed.bind(s), s.onSliderShow = s.onSliderShow.bind(s), s.timeout = null, | |
s.state = {}, s.queue = [], s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
d.default.events.on("showSlider", this.onShowSliderEvent); | |
}, e.prototype.componentWillUnmount = function() { | |
d.default.events.off("showSlider", this.onShowSliderEvent); | |
}, e.prototype.onShowSliderEvent = function(t) { | |
var e = t.type; | |
if ("function" == typeof e) var s = e; else s = x.default[e]; | |
if (s) { | |
var n = { | |
SliderClass: s, | |
data: t.data, | |
meta: t | |
}; | |
this.state.data ? this.queueSlider(n) : this.showSlider(n); | |
} | |
}, e.prototype.showSlider = function(t) { | |
this.onSliderShow(), this.setState(t); | |
}, e.prototype.queueSlider = function(t) { | |
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "end"; | |
"end" === e ? this.queue.push(t) : this.queue.unshift(t); | |
}, e.prototype._doShowSlider = function(t) { | |
this.setState(t); | |
}, e.prototype.close = function() { | |
this.timeout && (clearTimeout(this.timeout), this.timeout = null), this._hideSlider(this.onClosed); | |
}, e.prototype.onClosed = function() { | |
this.queue.length ? (this.showSlider(this.queue.shift()), (0, c.default)("#sliderContainer").show()) : ((0, | |
c.default)("#sliderWrapper").fadeOut(50), this.setState({ | |
data: null, | |
type: null | |
})); | |
}, e.prototype._hideSlider = function(t) { | |
(0, c.default)(".main .slider-layer .slider-popup").on(f, function() { | |
(0, c.default)(".main .slider-layer .slider-popup").off(f), (0, c.default)(this).removeClass("open").removeClass("close"), | |
(0, c.default)(".main .slider-layer").fadeOut(1, t); | |
}).addClass("close"); | |
}, e.prototype.onSliderShow = function() { | |
(0, c.default)(".main .slider-layer").delay(1e3).fadeIn(0, function() { | |
(0, c.default)(".main .slider-layer .slider-popup").addClass("open"), this.timeout = setTimeout(function() { | |
(0, c.default)(".main .slider-layer .slider-popup").fadeIn(1, function() { | |
this.close(); | |
}.bind(this)); | |
}.bind(this), 4e3); | |
}.bind(this)); | |
}, e.prototype.getCurrentSlider = function() { | |
var t = this.state.data; | |
if (t && this.state.SliderClass) { | |
var e = this.state.SliderClass; | |
return l.default.createElement(e, { | |
data: t, | |
meta: this.state.meta, | |
ref: this.onSliderOpened, | |
close: this.close | |
}); | |
} | |
}, e.prototype.render = function() { | |
return l.default.createElement("div", { | |
className: "slider-layer" | |
}, this.getCurrentSlider()); | |
}, e; | |
}(a.Component); | |
e.default = h; | |
}, function(t, e, s) { | |
t.exports = { | |
achievment: s(292).default | |
}; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = (n(u), s(26)), y = s(9), d = function(t) { | |
function e() { | |
return o(this, e), r(this, t.apply(this, arguments)); | |
} | |
return i(e, t), e.prototype.render = function() { | |
var t = this.props, e = t.data, s = (t.meta, e.achievment), n = s.get("title"); | |
return l.default.createElement("div", { | |
className: "slider-popup" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, c._tr)("New achievement: {title}!", { | |
title: n | |
})), l.default.createElement("div", { | |
className: "icon" | |
}, l.default.createElement("img", { | |
className: "img", | |
src: (0, y.cdnURL)(s.get("icon2x")) | |
})), l.default.createElement("div", { | |
className: "text" | |
}, s.get("description")), l.default.createElement("div", { | |
className: "rewards" | |
}, l.default.createElement("div", { | |
className: "title" | |
}, (0, c._tr)("Rewards:")), l.default.createElement("div", { | |
className: "txt" | |
}, s.get("rewardDescription"))), l.default.createElement("div", { | |
className: "close-btn", | |
onClick: this.props.close | |
})); | |
}, e; | |
}(a.Component); | |
e.default = d; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(14), c = n(u), y = s(7), d = s(26), p = s(8), x = n(p), f = s(140), h = n(f), m = s(19), g = n(m), v = s(12), b = n(v), _ = [ "#/", "#/achievments", "#/stats" ], k = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.onClick = s.onClick.bind(s), s.__update = s.__update.bind(s), s.changeState = s.changeState.bind(s), | |
s.state = { | |
showProgress: s.shouldBeVisible() | |
}, s; | |
} | |
return i(e, t), e.prototype.shouldBeVisible = function() { | |
var t = window.location.hash; | |
return b.default.include(_, t); | |
}, e.prototype.changeState = function() { | |
this.setState({ | |
showProgress: this.shouldBeVisible() | |
}); | |
}, e.prototype.componentDidMount = function() { | |
c.default.getUser().get("counters").on("change:ShowPicPrs change:Pictures", this.__update), | |
c.default.getUser().get("resources").on("change:shards", this.__update), (0, g.default)(window).on("hashchange", this.changeState); | |
}, e.prototype.__update = function() { | |
this.forceUpdate(); | |
}, e.prototype.componentWillUnmount = function() { | |
c.default.getUser().get("counters").off("change:ShowPicPrs change:Pictures", this.__update), | |
c.default.getUser().get("resources").off("change:shards", this.__update), (0, g.default)(window).off("hashchange", this.changeState); | |
}, e.prototype.onClick = function(t) { | |
t.stopPropagation(), c.default.show({ | |
popup: { | |
type: "buyPicture" | |
} | |
}); | |
}, e.prototype.render = function() { | |
var t = c.default.getUser().get("counters").get("ShowPicPrs") && this.state.showProgress; | |
if (!t) return null; | |
var e = this.props, s = e.onMouseLeave, n = e.onMouseEnter, o = e.setRef, r = c.default.getUser(), i = r.get("album"), a = i.getPicPrice(2), u = a[0].shards, p = (0, | |
x.default)(r.get("resources").get("shards")), f = p.gte(i.getPicPrice(0)[0].shards), h = p.gte(i.getPicPrice(1)[0].shards), m = p.gte(u), g = (0, | |
d._tr)("Progress of gathered Memory shards needed to open new pictures."), v = p.div(u).times(100).round(0, 0); | |
return v.gt(100) && (v = 100), l.default.createElement("div", { | |
className: "pic-prg", | |
onClick: this.onClick, | |
onMouseEnter: function() { | |
return n({ | |
tooltipText: g, | |
topDistance: 45 | |
}); | |
}, | |
onMouseLeave: s, | |
ref: o | |
}, l.default.createElement("div", { | |
className: "prg-box" | |
}, l.default.createElement("div", { | |
className: "prg", | |
style: { | |
width: v + "%" | |
} | |
})), l.default.createElement("div", { | |
className: "lvl1 " + (f ? "pulse" : "") | |
}), l.default.createElement("div", { | |
className: "lvl2 " + (h ? "pulse" : "") | |
}), l.default.createElement("div", { | |
className: "lvl3 " + (m ? "pulse" : "") | |
}), l.default.createElement("div", { | |
className: "num" | |
}, (0, y.formatBig)(p), "/", (0, y.formatBig)(u)), l.default.createElement("div", { | |
className: "icon " + (m ? "blink" : ""), | |
onClick: this.onClick | |
})); | |
}, e; | |
}(a.Component); | |
k = (0, h.default)(k), e.default = k; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function r(t, e) { | |
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !e || "object" != typeof e && "function" != typeof e ? t : e; | |
} | |
function i(t, e) { | |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); | |
t.prototype = Object.create(e && e.prototype, { | |
constructor: { | |
value: t, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); | |
} | |
e.__esModule = !0; | |
var a = s(1), l = n(a), u = s(295), c = n(u), y = function(t) { | |
function e() { | |
o(this, e); | |
var s = r(this, t.apply(this, arguments)); | |
return s.setBattleCont = s.setBattleCont.bind(s), s; | |
} | |
return i(e, t), e.prototype.componentDidMount = function() { | |
this.battleStage = new c.default(this.battleContainer); | |
}, e.prototype.setBattleCont = function(t) { | |
t && (this.battleContainer = t); | |
}, e.prototype.render = function() { | |
return l.default.createElement("div", { | |
className: "monster", | |
ref: this.setBattleCont | |
}); | |
}, e; | |
}(a.Component); | |
e.default = y; | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
e.__esModule = !0; | |
var r = s(296), i = n(r), a = s(297), l = n(a), u = s(7), c = s(14), y = n(c), d = s(100), p = n(d), x = s(25), f = n(x), h = s(298), m = n(h), g = s(320), v = n(g), b = s(321), _ = n(b), k = s(322), w = n(k), C = s(335), E = n(C), S = s(337), T = n(S), N = s(338), P = (n(N), | |
y.default.getDevicePixelRatio()), O = function() { | |
function t(e) { | |
o(this, t), this.layersConf = [ { | |
name: "locLayer", | |
cls: v.default | |
}, { | |
name: "monsterLayer", | |
cls: _.default | |
}, { | |
name: "skillsLayer", | |
cls: w.default | |
}, { | |
name: "hitLayer", | |
cls: E.default | |
}, { | |
name: "rewardLayer", | |
cls: T.default | |
} ], this.animInProgress = 0, this.isAnimating = !1, this.needRender = !1, this.initialize = this.initialize.bind(this), | |
this.getRendererSize = this.getRendererSize.bind(this), this.initBattleStage = this.initBattleStage.bind(this), | |
this.addLayer = this.addLayer.bind(this), this.render = this.render.bind(this), | |
this.animate = this.animate.bind(this), this._doAnimate = this._doAnimate.bind(this), | |
this._doRender = this._doRender.bind(this), this.incAnimProgress = this.incAnimProgress.bind(this), | |
this.decAnimProgress = this.decAnimProgress.bind(this), this.setLocation = this.setLocation.bind(this), | |
this.onLocationChanged = this.onLocationChanged.bind(this), this.preloadLocationResources = this.preloadLocationResources.bind(this), | |
this.onTabActiveChanged = this.onTabActiveChanged.bind(this), this.stopAnimations = this.stopAnimations.bind(this), | |
this.resumeAnimations = this.resumeAnimations.bind(this), this.setMonster = this.setMonster.bind(this), | |
this.removeMonster = this.removeMonster.bind(this), this.onMonsterKilled = this.onMonsterKilled.bind(this), | |
this.onMonsterSpawned = this.onMonsterSpawned.bind(this), this.onMonsterRemoved = this.onMonsterRemoved.bind(this), | |
this.onClick = this.onClick.bind(this), this.clickHandler = this.clickHandler.bind(this), | |
this.playRewardAnimation = this.playRewardAnimation.bind(this), this.onGoldenClick = this.onGoldenClick.bind(this); | |
var s = 474, n = 529, r = y.default.renderer = this.renderer = new i.default.autoDetectRenderer(s, n, { | |
resolution: P, | |
antialias: !0, | |
backgroundColor: 16777215 | |
}), a = r.view; | |
a.style.width = s + "px", a.style.height = n + "px", e.appendChild(r.view), this.initialize(); | |
} | |
return t.prototype.getRendererSize = function() { | |
return { | |
width: this.renderer.width / P, | |
height: this.renderer.height / P, | |
resolution: P | |
}; | |
}, t.prototype.initBattleStage = function(t) { | |
var e = this.setLocation().then(this.setMonster); | |
t.promise = t.promise.then(function() { | |
return e; | |
}); | |
}, t.prototype.initialize = function() { | |
y.default.initProgressIncrement(); | |
var t = this.stage = new i.default.Container(), e = y.default.events; | |
e.on("battleStarted", this.initBattleStage), e.on("locationChanged", this.onLocationChanged), | |
e.on("monsterKilled", this.onMonsterKilled), e.on("spawnMonster", this.onMonsterSpawned), | |
e.on("battleClicked", this.onClick), e.on("goldenClick", this.onGoldenClick), e.on("tabActiveChanged", this.onTabActiveChanged), | |
this.initLayers(), t.on("mousedown", this.clickHandler), t.on("touchstart", this.clickHandler), | |
this.stage.interactive = !0, this.render(), y.default.initProgressIncrement(), this.animationActive = y.default.tabActive; | |
}, t.prototype.initLayers = function() { | |
this.layersConf.forEach(this.addLayer); | |
}, t.prototype.addLayer = function(t) { | |
var e = t.name, s = t.cls; | |
s = s || i.default.Container; | |
var n = this[e] = new s(); | |
this.stage.addChild(n); | |
}, t.prototype.setLocation = function() { | |
var t = this; | |
return y.default.initProgressIncrement(), void 0 !== this.renderer.textureGC && this.renderer.textureGC.run(), | |
this.removeMonster().then(function() { | |
var e = y.default.getUser().get("battle"), s = e.get("locationId"), n = p.default.getLocationInfo(s), o = t.locLayer.setLocation(n); | |
return o.then(t.render).then(function() { | |
return t.preloadLocationResources(n); | |
}), o; | |
}); | |
}, t.prototype.preloadLocationResources = function(t) { | |
var e = p.default.getMobsInfo(t.allMobs), s = 0; | |
e.forEach(function(t) { | |
m.default.preload(t, P), s++; | |
}), t = p.default.getLocationInfo(t.id + 1), this.locLayer.preload(t), e = p.default.getMobsInfo(t.allMobs), | |
e.forEach(function(t) { | |
m.default.preload(t, P), s++; | |
}), y.default.initProgressIncrement(), y.default.events.trigger("startLoadMonsters", s); | |
}, t.prototype.onLocationChanged = function(t) { | |
var e = this.setLocation(); | |
t.promise = t.promise.then(function() { | |
return e; | |
}); | |
}, t.prototype.setMonster = function() { | |
var t = this, e = y.default.getUser().get("battle").getUnit(), s = this.monsterLayer.setMonster(e, P, this.animationActive); | |
return this.incAnimProgress(), this.animate(), s = s.catch(function() { | |
t.decAnimProgress(); | |
}); | |
}, t.prototype.removeMonster = function() { | |
var t = this.monsterLayer.removeMonster(this.animationActive, this.onMonsterRemoved); | |
return t ? t : f.default.resolve(); | |
}, t.prototype.onMonsterRemoved = function() { | |
this.decAnimProgress(), this.render(); | |
}, t.prototype.onMonsterKilled = function(t) { | |
var e = this, s = this.removeMonster().then(function() { | |
e.playRewardAnimation(t.unit.reward); | |
}); | |
t.promise = t.promise.then(function() { | |
return s; | |
}); | |
}, t.prototype.onMonsterSpawned = function(t) { | |
var e = this, s = this.setMonster(), n = !1; | |
clearTimeout(this.to), this.to = setTimeout(function() { | |
y.default.events.trigger("playMonsterLoading"), n = !0; | |
}, 500), s.finally(function() { | |
clearTimeout(e.to), n && y.default.events.trigger("stopMonsterLoading"); | |
}), t.promise = t.promise.then(function() { | |
return s; | |
}); | |
}, t.prototype.playRewardAnimation = function(t) { | |
var e = this; | |
if (this.animationActive) { | |
var s = this.getRendererSize(), n = s.width, o = s.height, r = n / 3 + 100, i = o / 3 - 100, a = { | |
x: r, | |
y: i, | |
width: n / 3, | |
height: 1 | |
}, l = this.rewardLayer.playAnimation(t, a).then(function() { | |
e.decAnimProgress(); | |
}); | |
return this.incAnimProgress(), l; | |
} | |
return f.default.resolve(); | |
}, t.prototype.clickHandler = function(t) { | |
y.default.events.trigger("battleClicked", t); | |
}, t.prototype.onClick = function(t) { | |
var e = {}; | |
if (y.default.events.trigger("battleStageClicked", e), e.dpc && this.animationActive) { | |
if (t) var s = t.data.global.x, n = t.data.global.y; else { | |
var o = this.getRendererSize(), r = o.width, i = o.height; | |
s = Math.floor(r / 4 + Math.random() * r / 2), n = Math.floor(i / 4 + Math.random() * i / 2); | |
} | |
this.hitLayer.playAnimation({ | |
text: (0, u.formatBig)(e.dpc), | |
x: s, | |
y: n, | |
resolution: P | |
}).then(this.decAnimProgress, this.decAnimProgress), this.incAnimProgress(), this.monsterLayer.playHit(), | |
this.animate(); | |
} | |
}, t.prototype.onGoldenClick = function(t) { | |
t.rewardPromise = this.playRewardAnimation(t.reward); | |
}, t.prototype.onTabActiveChanged = function(t) { | |
this.animationActive = t, t ? this.resumeAnimations() : this.stopAnimations(); | |
}, t.prototype.stopAnimations = function() { | |
this.monsterLayer.stop(); | |
}, t.prototype.resumeAnimations = function() { | |
this.monsterLayer.resume() && this.animate(); | |
}, t.prototype.animate = function() { | |
this.isAnimating || requestAnimationFrame(this._doAnimate); | |
}, t.prototype.incAnimProgress = function() { | |
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1; | |
return this.animInProgress += t; | |
}, t.prototype.decAnimProgress = function() { | |
return this.animInProgress = Math.max(0, this.animInProgress - 1); | |
}, t.prototype._doAnimate = function(t) { | |
this.animInProgress > 0 ? (requestAnimationFrame(this._doAnimate), l.default.update(t), | |
this.isAnimating = !0, this.renderer.render(this.stage)) : (0 != this.animInProgress && (this.animInProgress = 0), | |
this.isAnimating = !1); | |
}, t.prototype.render = function() { | |
this.needRender = !0, requestAnimationFrame(this._doRender); | |
}, t.prototype._doRender = function() { | |
this.needRender && (this.renderer.render(this.stage), this.needRender = !1); | |
}, t; | |
}(); | |
e.default = O; | |
}, function(t, e, s) { | |
t.exports = s(2)(30); | |
}, function(t, e, s) { | |
t.exports = s(2)(241); | |
}, function(t, e, s) { | |
"use strict"; | |
function n(t) { | |
return t && t.__esModule ? t : { | |
default: t | |
}; | |
} | |
function o(t, e) { | |
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
} | |
e.__esModule = !0; | |
var r = s(296), i = n(r), a = s(299), l = s(300), u = n(l), c = s(9), y = s(12), d = n(y), p = s(297), x = n(p), f = s(14), h = n(f), m = s(319), g = { | |
children: !0, | |
texture: !0, | |
baseTexture: !0 | |
}, v = function() { | |
function t(e, s, n) { | |
o(this, t), this.flashTween = null, this.changeClothes = this.changeClothes.bind(this), | |
this.resolution = n, this.library = e.library, this.unit = s; | |
var r = new e.stage(); | |
r.stop(), this.beast = r.children[0], this.beast.framerate = 24, this.beast.stop(); | |
var i = s.isBoss, a = this.flip = i ? 1 : 1 - 2 * Number(Math.random() < .5), l = this.scale = i ? 1 : .75 + .15 * Math.random(), u = 420; | |
r.setTransform(u / 2 + 10, u + (u * l - u) / 2 + 35 * l, l * a, l, 0, 0, 0, u / 2, u), | |
this.changeClothes(i), this.hue = 0, i || (this.hue = (0, m.rotateHue)(this.beast, n || h.default.getDevicePixelRatio())); | |
} | |
return t.prototype.changeClothes = function(t) { | |
var e = this, s = this.library; | |
[ "head", "body", "legs" ].forEach(function(n) { | |
e.beast.children.forEach(function(e) { | |
if (e instanceof s[n] && e instanceof a.MovieClip) { | |
e.autoReset = !1; | |
var o = 0; | |
o = t ? e._totalFrames - 1 : Math.floor(Math.random() * e._totalFrames), e.gotoAndStop(o); | |
} | |
}); | |
}); | |
}, t.prototype.gotoAndStop = function(t) { | |
this.beast.gotoAndStop(t); | |
}, t.prototype.play = function(t, e) { | |
this.stop(), a.Animator.play(this.beast, t, e); | |
}, t.prototype.stop = function() { | |
a.Animator.stop(this.beast), this.beast.stop(); | |
}, t.prototype.getContainer = function() { | |
return this.beast.parent; | |
}, t.prototype.flash = function() { | |
var t = this, e = Math.random(), s = this.getContainer(), n = this.beast, o = this.scale, r = this.flip, a = (this.hue, | |
o - .15 * e); | |
s.scale.x = a * r, s.scale.y = a, n.filters || (n.filters = []); | |
var l = new i.default.filters.ColorMatrixFilter(); | |
l.resolution = this.resolution, n.filters = n.filters.concat([ l ]), this.flashTween && (this.flashTween.stop(), | |
this.flashTween = null); | |
var u = function() { | |
s.scale.x = o * r, s.scale.y = o; | |
var e = d.default.indexOf(n.filters, l); | |
if (e != -1) { | |
var i = n.filters.concat(); | |
i.splice(e, 1), n.filters = i; | |
} | |
l = null, t.flashTween = null; | |
}; | |
this.flashTween = new x.default.Tween({ | |
k: 2 | |
}).to({ | |
k: 1 | |
}, 150).onUpdate(function() { | |
l.brightness(this.k); | |
}).onComplete(u).onStop(u).start(); | |
}, t.prototype.onDone = function(t) { | |
this.stop(), this.flashTween && (this.flashTween.stop(), this.flashTween = null), | |
this.beast.filters = null, this.beast.parent.destroy(g), this.beast = null, t && t(); | |
}, t.load = function(t, e, s) { | |
e = e || h.default.getDevicePixelRatio(), s = s || d.default.noop; | |
var n; | |
if (!(n = t.stage.assets.resolutions["@" + e + "x"])) for (var o = 1; o <= e; o++) { | |
var r = t.stage.assets.resolutions["@" + o + "x"]; | |
if (!r) break; | |
n = r; | |
} | |
if (n) { | |
var a = (0, c.cdnURL)("images/"), l = new i.default.loaders.Loader(), u = i.default.loader.resources, y = 0; | |
for (var p in n) u[p] || (l.add(p, a + n[p]), y++); | |
if (y) { | |
var x = function(t, e) { | |
h.default.events.trigger("monsterLoaded"), s(); | |
}; | |
l.once("complete", x).load(); | |
} else s(); | |
} | |
}, t.create = function(e, s) { | |
function n() { | |
var n = new t(o, e.unit, e.resolution); | |
s(n); | |
} | |
var o = u.default[e.unit.movie]; | |
t.load(o, e.resolution, n); | |
}, t.preload = function(e, s) { | |
var n = u.default[e.movie]; | |
t.load(n, s); | |
}, t; | |
}(); | |
e.default = v; | |
}, function(t, e, s) { | |
t.exports = s(2)(31); | |
}, function(t, e, s) { | |
t.exports = { | |
monster01: s(301), | |
monster02: s(302), | |
monster03: s(303), | |
monster04: s(304), | |
monster05: s(305), | |
monster06: s(306), | |
monster07: s(307), | |
monster08: s(308), | |
monster09: s(309), | |
monster10: s(310), | |
monster11: s(311), | |
monster12: s(312), | |
monster13: s(313), | |
monster14: s(314), | |
monster16: s(315), | |
monster17: s(316), | |
monster19: s(317), | |
monster27: s(318) | |
}; | |
}, function(t, e) { | |
"use strict"; | |
!function(t, e) { | |
var s = t.animate.MovieClip, n = t.Container, o = t.Sprite, r = function(e) { | |
return t.Texture.fromFrame("monster01#" + e); | |
}; | |
e.head = s.extend(function() { | |
s.call(this, { | |
duration: 2 | |
}); | |
var t = new o(r("Bitmap 1")), e = new o(r("Bitmap 2")).setTransform(11.95, 9.725); | |
this.addTimedChild(t).addTimedChild(e, 1, 1); | |
}), e.body = s.extend(function() { | |
s.call(this, { | |
duration: 4 | |
}); | |
var t = new o(r("Bitmap 3")).setTransform(-.5, -2.05), e = new o(r("Bitmap 4")).setTransform(55.925, 33.95), n = new o(r("Bitmap 5")).setTransform(31.825, 16.95), i = new o(r("Bitmap 6")).setTransform(1.775, 21); | |
this.addTimedChild(t).addTimedChild(e, 1, 3).addTimedChild(n, 2, 2).addTimedChild(i, 3, 1); | |
}), e.s4 = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 9")).setTransform(0, .6); | |
this.addChild(t); | |
}), e.s11 = s.extend(function() { | |
s.call(this, { | |
duration: 34 | |
}); | |
var t = new e.s4(); | |
this.addTimedChild(t, 0, 34, { | |
0: { | |
x: 0, | |
y: -.6, | |
sx: 1, | |
sy: 1, | |
c: [ 1, 0, 1, 0, 1, 0 ] | |
}, | |
1: { | |
x: -.075, | |
y: -.099, | |
sx: 1.001, | |
sy: .998, | |
c: [ .98, .02, .98, 0, .98, 0 ] | |
}, | |
2: { | |
x: -.175, | |
y: .402, | |
sx: 1.002, | |
sy: .997, | |
c: [ .95, .05, .95, .01, .95, .01 ] | |
}, | |
3: { | |
x: -.275, | |
y: .903, | |
sy: .995, | |
c: [ .92, .07, .92, .02, .92, .02 ] | |
}, | |
4: { | |
x: -.375, | |
y: 1.404, | |
sx: 1.003, | |
sy: .993, | |
c: [ .89, .09, .89, .04, .89, .04 ] | |
}, | |
5: { | |
x: -.475, | |
y: 1.88, | |
sx: 1.004, | |
sy: .992, | |
c: [ .87, .1, .87, .05, .87, .05 ] | |
}, | |
6: { | |
x: -.55, | |
y: 2.406, | |
sx: 1.005, | |
sy: .99, | |
c: [ .84, .11, .84, .08, .84, .08 ] | |
}, | |
7: { | |
x: -.65, | |
y: 2.882, | |
sx: 1.006, | |
sy: .988, | |
c: [ .81, .13, .81, .11, .81, .11 ] | |
}, | |
8: { | |
x: -.75, | |
y: 3.383, | |
sx: 1.007, | |
sy: .987, | |
c: [ .78, .13, .78, .15, .78, .15 ] | |
}, | |
9: { | |
x: -.85, | |
y: 3.884, | |
sy: .985, | |
c: [ .76, .13, .76, .18, .76, .18 ] | |
}, | |
10: { | |
x: -.95, | |
y: 4.385, | |
sx: 1.008, | |
sy: .983, | |
c: [ .73, .14, .73, .22, .73, .22 ] | |
}, | |
11: { | |
x: -1.05, | |
y: 4.861, | |
sx: 1.009, | |
sy: .982, | |
c: [ .7, .14, .7, .27, .7, .27 ] | |
}, | |
12: { | |
x: -1.125, | |
y: 5.387, | |
sx: 1.01, | |
sy: .98, | |
c: [ .67, .13, .67, .33, .67, .33 ] | |
}, | |
13: { | |
x: -.825, | |
y: 4.26, | |
sx: 1.007, | |
sy: .983, | |
c: [ .69, .12, .69, .31, .69, .3 ] | |
}, | |
14: { | |
x: -.5, | |
y: 3.159, | |
sx: 1.005, | |
sy: .985, | |
c: [ .7, .11, .7, .29, .7, .28 ] | |
}, | |
15: { | |
x: -.2, | |
y: 2.057, | |
sx: 1.002, | |
sy: .988, | |
c: [ .71, .1, .71, .27, .71, .26 ] | |
}, | |
16: { | |
x: .125, | |
y: 1.005, | |
sx: .999, | |
sy: .991, | |
c: [ .72, .09, .72, .26, .72, .24 ] | |
}, | |
17: { | |
x: .425, | |
y: -.096, | |
sx: .996, | |
sy: .994, | |
c: [ .73, .08, .73, .25, .73, .22 ] | |
}, | |
18: { | |
x: .75, | |
y: -1.223, | |
sx: .994, | |
sy: .996, | |
c: [ .74, .08, .74, .23, .74, .2 ] | |
}, | |
19: { | |
x: 1.05, | |
y: -2.324, | |
sx: .991, | |
sy: .999, | |
c: [ .75, .07, .75, .22, .75, .19 ] | |
}, | |
20: { | |
x: 1.375, | |
y: -3.401, | |
sx: .988, | |
sy: 1.002, | |
c: [ .76, .06, .76, .2, .76, .17 ] | |
}, | |
21: { | |
x: 1.675, | |
y: -4.503, | |
sx: .985, | |
sy: 1.005, | |
c: [ .77, .05, .77, .19, .77, .16 ] | |
}, | |
22: { | |
x: 2, | |
y: -5.604, | |
sx: .983, | |
sy: 1.007, | |
c: [ .78, .05, .78, .18, .78, .14 ] | |
}, | |
23: { | |
x: 2.325, | |
y: -6.706, | |
sx: .98, | |
sy: 1.01, | |
c: [ .79, .04, .79, .17, .79, .13 ] | |
}, | |
24: { | |
x: 2.075, | |
y: -6.08, | |
sx: .982, | |
sy: 1.009, | |
c: [ .82, .04, .82, .15, .82, .11 ] | |
}, | |
25: { | |
x: 1.85, | |
y: -5.48, | |
sx: .984, | |
sy: 1.008, | |
c: [ .84, .03, .84, .13, .84, .09 ] | |
}, | |
26: { | |
x: 1.625, | |
y: -4.854, | |
sx: .986, | |
sy: 1.007, | |
c: [ .86, .03, .86, .11, .86, .08 ] | |
}, | |
27: { | |
x: 1.4, | |
y: -4.254, | |
sx: .988, | |
sy: 1.006, | |
c: [ .88, .02, .88, .09, .88, .07 ] | |
}, | |
28: { | |
x: 1.175, | |
y: -3.628, | |
sx: .99, | |
sy: 1.005, | |
c: [ .9, .02, .9, .08, .9, .06 ] | |
}, | |
29: { | |
x: .925, | |
y: -3.027, | |
sx: .992, | |
sy: 1.004, | |
c: [ .92, .02, .92, .06, .92, .05 ] | |
}, | |
30: { | |
x: .7, | |
y: -2.427, | |
sx: .994, | |
sy: 1.003, | |
c: [ .94, .01, .94, .05, .94, .04 ] | |
}, | |
31: { | |
x: .475, | |
y: -1.801, | |
sx: .996, | |
sy: 1.002, | |
c: [ .96, .01, .96, .03, .96, .02 ] | |
}, | |
32: { | |
x: .25, | |
y: -1.201, | |
sx: .998, | |
sy: 1.001, | |
c: [ .98, 0, .98, .02, .98, .01 ] | |
}, | |
33: { | |
x: 0, | |
y: -.6, | |
sx: 1, | |
sy: 1, | |
c: [ 1, 0, 1, 0, 1, 0 ] | |
} | |
}); | |
}), e.legs = s.extend(function() { | |
s.call(this, { | |
duration: 2 | |
}); | |
var t = new o(r("Bitmap 7")).setTransform(65.15, 122.95), n = new o(r("Bitmap 8")).setTransform(60.925, 141.45), i = new e.s11().setTransform(0, .6); | |
this.addTimedChild(t).addTimedChild(n, 1, 1).addTimedChild(i); | |
}), e.monster01_1 = s.extend(function() { | |
s.call(this, { | |
duration: 123, | |
labels: { | |
born: 0, | |
born_stop: 10, | |
death: 20, | |
death_stop: 25, | |
breath: 39, | |
breath_loop: 61, | |
hit1: 84, | |
hit1_stop: 89, | |
hit2: 110, | |
hit2_stop: 115 | |
} | |
}); | |
var t = this.legs = new e.legs(), n = this.body = new e.body(), o = this.head = new e.head(); | |
this.addTimedChild(t, 0, 123, { | |
0: { | |
x: 84.475, | |
y: 351.85, | |
sx: .279, | |
sy: .044, | |
kx: 0, | |
a: 0 | |
}, | |
1: { | |
x: 68.843, | |
y: 296.461, | |
sx: .415, | |
sy: .209, | |
a: .25 | |
}, | |
2: { | |
x: 53.186, | |
y: 241.021, | |
sx: .551, | |
sy: .373, | |
a: .5 | |
}, | |
3: { | |
x: 37.53, | |
y: 185.607, | |
sx: .687, | |
sy: .537, | |
a: .75 | |
}, | |
4: { | |
x: 21.873, | |
y: 130.172, | |
sx: .823, | |
sy: .702, | |
a: 1 | |
}, | |
5: { | |
x: 15.61, | |
y: 108.039, | |
sx: .878, | |
sy: .767 | |
}, | |
6: { | |
x: 9.373, | |
y: 85.856, | |
sx: .932, | |
sy: .833 | |
}, | |
7: { | |
x: 3.11, | |
y: 63.678, | |
sx: .987, | |
sy: .899 | |
}, | |
8: { | |
x: -3.152, | |
y: 41.527, | |
sx: 1.041, | |
sy: .965 | |
}, | |
9: { | |
x: -9.415, | |
y: 19.344, | |
sx: 1.096, | |
sy: 1.03 | |
}, | |
10: { | |
x: 1.561, | |
y: 30.558, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 1.071, | |
y: 129.535, | |
sx: .999, | |
sy: .689, | |
a: .8 | |
}, | |
22: { | |
x: .532, | |
y: 228.492, | |
sy: .378, | |
a: .61 | |
}, | |
23: { | |
x: .017, | |
y: 327.444, | |
sx: .998, | |
sy: .067, | |
a: .42 | |
}, | |
24: { | |
x: 42.27, | |
y: 339.672, | |
sx: .639, | |
sy: .056, | |
a: .21 | |
}, | |
25: { | |
x: 84.474, | |
y: 351.845, | |
sx: .279, | |
sy: .044, | |
a: 0 | |
}, | |
26: { | |
x: 1.561, | |
y: 30.558, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 2.063, | |
y: 29.829, | |
sx: .996, | |
sy: 1.002 | |
}, | |
41: { | |
x: 2.572, | |
y: 29.08, | |
sx: .991, | |
sy: 1.004 | |
}, | |
42: { | |
x: 3.08, | |
y: 28.299, | |
sx: .987, | |
sy: 1.006 | |
}, | |
43: { | |
x: 3.562, | |
y: 27.551, | |
sx: .983, | |
sy: 1.008 | |
}, | |
44: { | |
x: 4.07, | |
y: 26.771, | |
sx: .978, | |
sy: 1.01 | |
}, | |
45: { | |
x: 4.579, | |
y: 26.016, | |
sx: .974, | |
sy: 1.012 | |
}, | |
46: { | |
x: 3.915, | |
sx: .98 | |
}, | |
47: { | |
x: 3.245, | |
sx: .986 | |
}, | |
48: { | |
x: 2.576, | |
sx: .991 | |
}, | |
49: { | |
x: 1.907, | |
sx: .997 | |
}, | |
50: { | |
x: 1.238, | |
sx: 1.003 | |
}, | |
51: { | |
x: .569, | |
sx: 1.009 | |
}, | |
52: { | |
x: .284, | |
y: 27.486, | |
sx: 1.011, | |
sy: 1.008 | |
}, | |
53: { | |
x: -.031, | |
y: 28.981, | |
sx: 1.014, | |
sy: 1.004 | |
}, | |
54: { | |
x: -.316, | |
y: 30.427, | |
sx: 1.017, | |
sy: 1 | |
}, | |
55: { | |
x: -.625, | |
y: 31.921, | |
sx: 1.019, | |
sy: .996 | |
}, | |
56: { | |
x: -.935, | |
y: 33.36, | |
sx: 1.022, | |
sy: .992 | |
}, | |
57: { | |
x: -.505, | |
y: 32.91, | |
sx: 1.018, | |
sy: .994 | |
}, | |
58: { | |
x: -.104, | |
y: 32.454, | |
sx: 1.014, | |
sy: .995 | |
}, | |
59: { | |
x: .325, | |
y: 31.972, | |
sx: 1.011, | |
sy: .996 | |
}, | |
60: { | |
x: .751, | |
y: 31.516, | |
sx: 1.007, | |
sy: .997 | |
}, | |
61: { | |
x: 1.155, | |
y: 31.064, | |
sx: 1.004, | |
sy: .999 | |
}, | |
62: { | |
x: 1.561, | |
y: 30.558, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: -9.838, | |
y: 30.516, | |
sy: 1.001, | |
kx: .031 | |
}, | |
86: { | |
x: -21.255, | |
y: 30.594, | |
sy: 1.002, | |
kx: .061 | |
}, | |
87: { | |
x: -13.456, | |
y: 30.524, | |
sy: 1.001, | |
kx: .04 | |
}, | |
88: { | |
x: -5.66, | |
y: 30.488, | |
kx: .018 | |
}, | |
89: { | |
x: 1.561, | |
y: 30.558, | |
sy: 1, | |
kx: 0 | |
}, | |
111: { | |
x: 11.334, | |
y: 30.554, | |
sy: 1.001, | |
kx: -.026 | |
}, | |
112: { | |
x: 21.101, | |
y: 30.597, | |
kx: -.053 | |
}, | |
113: { | |
x: 14.582, | |
y: 30.533, | |
kx: -.035 | |
}, | |
114: { | |
x: 8.076, | |
y: 30.559, | |
sy: 1, | |
kx: -.018 | |
}, | |
115: { | |
x: 1.561, | |
y: 30.558, | |
kx: 0 | |
} | |
}).addTimedChild(n, 0, 123, { | |
0: { | |
x: 102.425, | |
y: 352.9, | |
sx: .279, | |
sy: .044, | |
kx: 0, | |
ky: 0, | |
r: 0, | |
a: 0 | |
}, | |
1: { | |
x: 95.526, | |
y: 301.489, | |
sx: .415, | |
sy: .209, | |
a: .25 | |
}, | |
2: { | |
x: 88.603, | |
y: 250.028, | |
sx: .551, | |
sy: .373, | |
a: .5 | |
}, | |
3: { | |
x: 81.655, | |
y: 198.591, | |
sx: .687, | |
sy: .537, | |
a: .75 | |
}, | |
4: { | |
x: 74.732, | |
y: 147.136, | |
sx: .823, | |
sy: .702, | |
a: 1 | |
}, | |
5: { | |
x: 71.972, | |
y: 126.554, | |
sx: .878, | |
sy: .767 | |
}, | |
6: { | |
x: 69.213, | |
y: 105.972, | |
sx: .932, | |
sy: .833 | |
}, | |
7: { | |
x: 66.429, | |
y: 85.396, | |
sx: .987, | |
sy: .899 | |
}, | |
8: { | |
x: 63.67, | |
y: 64.82, | |
sx: 1.041, | |
sy: .965 | |
}, | |
9: { | |
x: 60.886, | |
y: 44.238, | |
sx: 1.096, | |
sy: 1.03 | |
}, | |
10: { | |
x: 65.66, | |
y: 54.714, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 65.205, | |
y: 146.177, | |
sx: .999, | |
sy: .689, | |
a: .8 | |
}, | |
22: { | |
x: 64.7, | |
y: 237.644, | |
sy: .378, | |
a: .61 | |
}, | |
23: { | |
x: 64.221, | |
y: 329.081, | |
sx: .998, | |
sy: .067, | |
a: .42 | |
}, | |
24: { | |
x: 83.334, | |
y: 341.015, | |
sx: .639, | |
sy: .056, | |
a: .21 | |
}, | |
25: { | |
x: 102.448, | |
y: 352.92, | |
sx: .279, | |
sy: .044, | |
a: 0 | |
}, | |
26: { | |
x: 65.66, | |
y: 54.714, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 65.881, | |
y: 53.461, | |
sx: .996, | |
sy: 1.006 | |
}, | |
41: { | |
x: 66.111, | |
y: 52.165, | |
sx: .991, | |
sy: 1.012 | |
}, | |
42: { | |
x: 66.338, | |
y: 50.867, | |
sx: .987, | |
sy: 1.019 | |
}, | |
43: { | |
x: 66.541, | |
y: 49.588, | |
sx: .983, | |
sy: 1.025 | |
}, | |
44: { | |
x: 66.769, | |
y: 48.291, | |
sx: .978, | |
sy: 1.031 | |
}, | |
45: { | |
x: 66.973, | |
y: 46.994, | |
sx: .974, | |
sy: 1.037 | |
}, | |
46: { | |
x: 66.683, | |
y: 47.59, | |
sx: .98, | |
sy: 1.033 | |
}, | |
47: { | |
x: 66.387, | |
y: 48.162, | |
sx: .986, | |
sy: 1.029 | |
}, | |
48: { | |
x: 66.115, | |
y: 48.752, | |
sx: .991, | |
sy: 1.025 | |
}, | |
49: { | |
x: 65.819, | |
y: 49.324, | |
sx: .997, | |
sy: 1.021 | |
}, | |
50: { | |
x: 65.524, | |
y: 49.921, | |
sx: 1.003, | |
sy: 1.016 | |
}, | |
51: { | |
x: 65.228, | |
y: 50.487, | |
sx: 1.009, | |
sy: 1.012 | |
}, | |
52: { | |
x: 65.111, | |
y: 52.324, | |
sx: 1.011, | |
sy: 1.003 | |
}, | |
53: { | |
x: 64.963, | |
y: 54.16, | |
sx: 1.014, | |
sy: .994 | |
}, | |
54: { | |
x: 64.846, | |
y: 55.997, | |
sx: 1.017, | |
sy: .985 | |
}, | |
55: { | |
x: 64.704, | |
y: 57.833, | |
sx: 1.019, | |
sy: .976 | |
}, | |
56: { | |
x: 64.587, | |
y: 59.646, | |
sx: 1.022, | |
sy: .967 | |
}, | |
57: { | |
x: 64.76, | |
y: 58.822, | |
sx: 1.018, | |
sy: .973 | |
}, | |
58: { | |
x: 64.952, | |
y: 58.028, | |
sx: 1.014, | |
sy: .978 | |
}, | |
59: { | |
x: 65.123, | |
y: 57.18, | |
sx: 1.011, | |
sy: .984 | |
}, | |
60: { | |
x: 65.315, | |
y: 56.381, | |
sx: 1.007, | |
sy: .989 | |
}, | |
61: { | |
x: 65.487, | |
y: 55.558, | |
sx: 1.004, | |
sy: .995 | |
}, | |
62: { | |
x: 65.66, | |
y: 54.714, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: 52.432, | |
y: 56.534, | |
sx: 1.001, | |
sy: .999, | |
kx: .044, | |
ky: -.04 | |
}, | |
86: { | |
x: 39.296, | |
y: 58.608, | |
sy: .998, | |
kx: .088, | |
ky: -.081 | |
}, | |
87: { | |
x: 48.213, | |
y: 57.202, | |
sy: .999, | |
kx: .058, | |
ky: -.054 | |
}, | |
88: { | |
x: 57.164, | |
y: 55.913, | |
sx: 1, | |
kx: 0, | |
ky: 0, | |
r: -.027 | |
}, | |
89: { | |
x: 65.66, | |
y: 54.714, | |
sy: 1, | |
r: 0 | |
}, | |
111: { | |
x: 78.103, | |
y: 53.197, | |
sx: 1.001, | |
sy: .998, | |
kx: -.048, | |
ky: .058 | |
}, | |
112: { | |
x: 90.656, | |
y: 51.809, | |
sx: 1.003, | |
sy: .997, | |
kx: -.097, | |
ky: .119 | |
}, | |
113: { | |
x: 82.438, | |
y: 52.659, | |
sx: 1.002, | |
sy: .998, | |
kx: -.066, | |
ky: .079 | |
}, | |
114: { | |
x: 73.798, | |
y: 53.78, | |
sx: 1.001, | |
sy: .999, | |
kx: -.031, | |
ky: .036 | |
}, | |
115: { | |
x: 65.66, | |
y: 54.714, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}).addTimedChild(o, 0, 123, { | |
0: { | |
x: 101.675, | |
y: 350.675, | |
sx: .279, | |
sy: .044, | |
kx: 0, | |
ky: 0, | |
a: 0 | |
}, | |
1: { | |
x: 94.41, | |
y: 291.07, | |
sx: .415, | |
sy: .209, | |
a: .25 | |
}, | |
2: { | |
x: 87.096, | |
y: 231.416, | |
sx: .551, | |
sy: .373, | |
a: .5 | |
}, | |
3: { | |
x: 79.782, | |
y: 171.811, | |
sx: .687, | |
sy: .537, | |
a: .75 | |
}, | |
4: { | |
x: 72.468, | |
y: 112.162, | |
sx: .823, | |
sy: .702, | |
a: 1 | |
}, | |
5: { | |
x: 69.562, | |
y: 88.292, | |
sx: .878, | |
sy: .767 | |
}, | |
6: { | |
x: 66.607, | |
y: 64.448, | |
sx: .932, | |
sy: .833 | |
}, | |
7: { | |
x: 63.701, | |
y: 40.609, | |
sx: .987, | |
sy: .899 | |
}, | |
8: { | |
x: 60.771, | |
y: 16.748, | |
sx: 1.041, | |
sy: .965 | |
}, | |
9: { | |
x: 57.84, | |
y: -7.097, | |
sx: 1.096, | |
sy: 1.03 | |
}, | |
10: { | |
x: 62.946, | |
y: 4.866, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 62.443, | |
y: 111.832, | |
sx: .999, | |
sy: .689, | |
a: .8 | |
}, | |
22: { | |
x: 61.89, | |
y: 218.778, | |
sy: .378, | |
a: .61 | |
}, | |
23: { | |
x: 61.337, | |
y: 325.719, | |
sx: .998, | |
sy: .067, | |
a: .42 | |
}, | |
24: { | |
x: 81.517, | |
y: 338.222, | |
sx: .639, | |
sy: .056, | |
a: .21 | |
}, | |
25: { | |
x: 101.698, | |
y: 350.695, | |
sx: .279, | |
sy: .044, | |
a: 0 | |
}, | |
26: { | |
x: 62.946, | |
y: 4.866, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 63.204, | |
y: 2.803, | |
sx: .996, | |
sy: 1.006 | |
}, | |
41: { | |
x: 63.445, | |
y: .747, | |
sx: .991, | |
sy: 1.012 | |
}, | |
42: { | |
x: 63.66, | |
y: -1.311, | |
sx: .987, | |
sy: 1.019 | |
}, | |
43: { | |
x: 63.899, | |
y: -3.4, | |
sx: .983, | |
sy: 1.025 | |
}, | |
44: { | |
x: 64.139, | |
y: -5.458, | |
sx: .978, | |
sy: 1.031 | |
}, | |
45: { | |
x: 64.355, | |
y: -7.515, | |
sx: .974, | |
sy: 1.037 | |
}, | |
46: { | |
x: 64.049, | |
y: -6.235, | |
sx: .98, | |
sy: 1.033 | |
}, | |
47: { | |
x: 63.762, | |
y: -5.006, | |
sx: .986, | |
sy: 1.029 | |
}, | |
48: { | |
x: 63.425, | |
y: -3.759, | |
sx: .991, | |
sy: 1.025 | |
}, | |
49: { | |
x: 63.113, | |
y: -2.479, | |
sx: .997, | |
sy: 1.021 | |
}, | |
50: { | |
x: 62.803, | |
y: -1.25, | |
sx: 1.003, | |
sy: 1.016 | |
}, | |
51: { | |
x: 62.466, | |
y: -.001, | |
sx: 1.009, | |
sy: 1.012 | |
}, | |
52: { | |
x: 62.392, | |
y: 2.784, | |
sx: 1.011, | |
sy: 1.003 | |
}, | |
53: { | |
x: 62.287, | |
y: 5.568, | |
sx: 1.014, | |
sy: .994 | |
}, | |
54: { | |
x: 62.188, | |
y: 8.327, | |
sx: 1.017, | |
sy: .985 | |
}, | |
55: { | |
x: 62.114, | |
y: 11.112, | |
sx: 1.019, | |
sy: .976 | |
}, | |
56: { | |
x: 61.99, | |
y: 13.873, | |
sx: 1.022, | |
sy: .967 | |
}, | |
57: { | |
x: 62.148, | |
y: 12.378, | |
sx: 1.018, | |
sy: .973 | |
}, | |
58: { | |
x: 62.324, | |
y: 10.889, | |
sx: 1.014, | |
sy: .978 | |
}, | |
59: { | |
x: 62.481, | |
y: 9.395, | |
sx: 1.011, | |
sy: .984 | |
}, | |
60: { | |
x: 62.632, | |
y: 7.9, | |
sx: 1.007, | |
sy: .989 | |
}, | |
61: { | |
x: 62.788, | |
y: 6.405, | |
sx: 1.004, | |
sy: .995 | |
}, | |
62: { | |
x: 62.946, | |
y: 4.866, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: 41.159, | |
y: 12.736, | |
sy: .999, | |
kx: .158, | |
ky: -.154 | |
}, | |
86: { | |
x: 20.576, | |
y: 21.837, | |
sx: 1.001, | |
sy: .997, | |
kx: .315, | |
ky: -.308 | |
}, | |
87: { | |
x: 34.17, | |
y: 15.674, | |
sx: 1, | |
sy: .998, | |
kx: .21, | |
ky: -.206 | |
}, | |
88: { | |
x: 48.492, | |
y: 9.903, | |
sy: .999, | |
kx: .102, | |
ky: -.101 | |
}, | |
89: { | |
x: 62.946, | |
y: 4.866, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
111: { | |
x: 84.951, | |
y: -.761, | |
sx: 1.001, | |
sy: .998, | |
kx: -.158, | |
ky: .168 | |
}, | |
112: { | |
x: 108.226, | |
y: -5.013, | |
sx: 1.002, | |
sy: .996, | |
kx: -.32, | |
ky: .342 | |
}, | |
113: { | |
x: 92.765, | |
y: -2.45, | |
sx: 1.001, | |
sy: .997, | |
kx: -.214, | |
ky: .228 | |
}, | |
114: { | |
x: 77.514, | |
y: .997, | |
sy: .999, | |
kx: -.105, | |
ky: .111 | |
}, | |
115: { | |
x: 62.946, | |
y: 4.866, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}); | |
}), e.monster01 = s.extend(function() { | |
s.call(this, { | |
duration: 1, | |
framerate: 24 | |
}); | |
var t = new e.monster01_1().setTransform(95, 15.8); | |
this.addChild(t); | |
}), e.monster01.assets = { | |
resolutions: { | |
"@1x": { | |
"monster01_atlas_1@1x": "monsters/monster01_atlas_1@1x.json" | |
}, | |
"@2x": { | |
"monster01_atlas_1@2x": "monsters/monster01_atlas_1@2x.json" | |
} | |
} | |
}; | |
}(PIXI, s = s || {}); | |
var s; | |
"undefined" != typeof t && t.exports && (t.exports = { | |
stage: s.monster01, | |
background: 16777215, | |
width: 840, | |
height: 840, | |
framerate: 24, | |
totalFrames: 1, | |
library: s | |
}); | |
}, function(t, e) { | |
"use strict"; | |
!function(t, e) { | |
var s = t.animate.MovieClip, n = t.Container, o = t.Sprite, r = function(e) { | |
return t.Texture.fromFrame("monster02#" + e); | |
}; | |
e.head = s.extend(function() { | |
s.call(this, { | |
duration: 2 | |
}); | |
var t = new o(r("Bitmap 1")).setTransform(3.9, 13.825), e = new o(r("Bitmap 2")); | |
this.addTimedChild(t).addTimedChild(e, 1, 1); | |
}), e.body = s.extend(function() { | |
s.call(this, { | |
duration: 5 | |
}); | |
var t = new o(r("Bitmap 3")).setTransform(0, 18.55), e = new o(r("Bitmap 4")).setTransform(15.975, 221.6), n = new o(r("Bitmap 6")).setTransform(13.55), i = new o(r("Bitmap 7")).setTransform(245.825, 102), a = new o(r("Bitmap 5")).setTransform(59.375, 126.925); | |
this.addTimedChild(t).addTimedChild(e, 1, 4).addTimedChild(n, 3, 2).addTimedChild(i, 4, 1).addTimedChild(a, 2, 3); | |
}), e.s6 = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 10")).setTransform(0, 5.65), e = new o(r("Bitmap 11")).setTransform(180.35); | |
this.addChild(t, e); | |
}), e.legs = s.extend(function() { | |
s.call(this, { | |
duration: 4 | |
}); | |
var t = new o(r("Bitmap 8")), n = new o(r("Bitmap 12")).setTransform(86.25, 77.275), i = new o(r("Bitmap 9")), a = new e.s6().setTransform(7.75, 119.775); | |
this.addTimedChild(t, 0, 1).addTimedChild(n, 3, 1).addTimedChild(i, 1, 3).addTimedChild(a, 2, 2); | |
}), e.monster02_1 = s.extend(function() { | |
s.call(this, { | |
duration: 123, | |
labels: { | |
born: 0, | |
born_stop: 10, | |
death: 20, | |
death_stop: 25, | |
breath: 39, | |
breath_loop: 61, | |
hit1: 84, | |
hit1_stop: 89, | |
hit2: 110, | |
hit2_stop: 115 | |
} | |
}); | |
var t = this.legs = new e.legs(), n = this.body = new e.body(), o = this.head = new e.head(); | |
this.addTimedChild(t, 0, 123, { | |
0: { | |
x: 133.55, | |
y: 341.9, | |
sx: .092, | |
sy: .038, | |
kx: 0, | |
a: 0 | |
}, | |
1: { | |
x: 111.895, | |
y: 313.163, | |
sx: .269, | |
sy: .189, | |
a: .33 | |
}, | |
2: { | |
x: 90.242, | |
y: 284.401, | |
sx: .445, | |
sy: .34, | |
a: .66 | |
}, | |
3: { | |
x: 68.584, | |
y: 255.653, | |
sx: .622, | |
sy: .49, | |
a: 1 | |
}, | |
4: { | |
x: 46.926, | |
y: 226.871, | |
sx: .799, | |
sy: .641 | |
}, | |
5: { | |
x: 25.273, | |
y: 198.124, | |
sx: .975, | |
sy: .792 | |
}, | |
6: { | |
x: 3.615, | |
y: 169.362, | |
sx: 1.152, | |
sy: .943 | |
}, | |
7: { | |
x: 11.005, | |
y: 181.812, | |
sx: 1.091, | |
sy: .952 | |
}, | |
8: { | |
x: 18.396, | |
y: 194.257, | |
sx: 1.031, | |
sy: .961 | |
}, | |
9: { | |
x: 20.29, | |
y: 190.613, | |
sx: 1.016, | |
sy: .981 | |
}, | |
10: { | |
x: 22.211, | |
y: 186.952, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 34.019, | |
y: 224.351, | |
sx: .904, | |
sy: .755 | |
}, | |
22: { | |
x: 45.799, | |
y: 261.731, | |
sx: .808, | |
sy: .509 | |
}, | |
23: { | |
x: 57.579, | |
y: 299.11, | |
sx: .712, | |
sy: .264 | |
}, | |
24: { | |
x: 95.564, | |
y: 320.584, | |
sx: .402, | |
sy: .138, | |
a: .5 | |
}, | |
25: { | |
x: 133.573, | |
y: 342.068, | |
sx: .092, | |
sy: .013, | |
a: 0 | |
}, | |
26: { | |
x: 22.211, | |
y: 186.952, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 22.54, | |
y: 186.411, | |
sx: .997, | |
sy: 1.003 | |
}, | |
41: { | |
x: 22.871, | |
y: 185.807, | |
sx: .995, | |
sy: 1.006 | |
}, | |
42: { | |
x: 23.202, | |
y: 185.258, | |
sx: .992, | |
sy: 1.009 | |
}, | |
43: { | |
x: 23.532, | |
y: 184.653, | |
sx: .989, | |
sy: 1.012 | |
}, | |
44: { | |
x: 23.861, | |
y: 184.104, | |
sx: .987, | |
sy: 1.014 | |
}, | |
45: { | |
x: 24.192, | |
y: 183.498, | |
sx: .984, | |
sy: 1.017 | |
}, | |
46: { | |
x: 24.548, | |
y: 182.949, | |
sx: .981, | |
sy: 1.02 | |
}, | |
47: { | |
x: 24.878, | |
y: 182.37, | |
sx: .979, | |
sy: 1.023 | |
}, | |
48: { | |
x: 25.207, | |
y: 181.771, | |
sx: .976, | |
sy: 1.026 | |
}, | |
49: { | |
x: 23.51, | |
sx: .99 | |
}, | |
50: { | |
x: 21.815, | |
sx: 1.003 | |
}, | |
51: { | |
x: 20.145, | |
sx: 1.017 | |
}, | |
52: { | |
x: 19.534, | |
y: 183.636, | |
sx: 1.022, | |
sy: 1.017 | |
}, | |
53: { | |
x: 18.95, | |
y: 185.506, | |
sx: 1.027, | |
sy: 1.007 | |
}, | |
54: { | |
x: 18.339, | |
y: 187.355, | |
sx: 1.032, | |
sy: .998 | |
}, | |
55: { | |
x: 17.754, | |
y: 189.226, | |
sx: 1.037, | |
sy: .989 | |
}, | |
56: { | |
x: 17.147, | |
y: 191.065, | |
sx: 1.041, | |
sy: .979 | |
}, | |
57: { | |
x: 17.969, | |
y: 190.409, | |
sx: 1.034, | |
sy: .983 | |
}, | |
58: { | |
x: 18.817, | |
y: 189.733, | |
sx: 1.028, | |
sy: .986 | |
}, | |
59: { | |
x: 19.668, | |
y: 189.041, | |
sx: 1.021, | |
sy: .99 | |
}, | |
60: { | |
x: 20.515, | |
y: 188.335, | |
sx: 1.014, | |
sy: .993 | |
}, | |
61: { | |
x: 21.363, | |
y: 187.652, | |
sx: 1.007, | |
sy: .997 | |
}, | |
62: { | |
x: 22.211, | |
y: 186.952, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: 18.987, | |
y: 186.964, | |
kx: .014 | |
}, | |
86: { | |
x: 15.599, | |
y: 186.956, | |
kx: .031 | |
}, | |
87: { | |
x: 17.74, | |
y: 186.975, | |
kx: .022 | |
}, | |
88: { | |
x: 20.047, | |
y: 186.962, | |
kx: .009 | |
}, | |
89: { | |
x: 22.211, | |
y: 186.952, | |
kx: 0 | |
}, | |
111: { | |
x: 26.331, | |
y: 186.968, | |
kx: -.018 | |
}, | |
112: { | |
x: 30.618, | |
y: 186.965, | |
sy: 1.001, | |
kx: -.04 | |
}, | |
113: { | |
x: 27.812, | |
y: 186.949, | |
kx: -.027 | |
}, | |
114: { | |
x: 25.028, | |
y: 186.939, | |
sy: 1, | |
kx: -.013 | |
}, | |
115: { | |
x: 22.211, | |
y: 186.952, | |
kx: 0 | |
} | |
}).addTimedChild(n, 0, 123, { | |
0: { | |
x: 131.525, | |
y: 335.1, | |
sx: .092, | |
sy: .038, | |
kx: 0, | |
ky: 0, | |
a: 0 | |
}, | |
1: { | |
x: 105.986, | |
y: 279.282, | |
sx: .269, | |
sy: .189, | |
a: .33 | |
}, | |
2: { | |
x: 80.449, | |
y: 223.464, | |
sx: .445, | |
sy: .34, | |
a: .66 | |
}, | |
3: { | |
x: 54.882, | |
y: 167.613, | |
sx: .622, | |
sy: .49, | |
a: 1 | |
}, | |
4: { | |
x: 29.365, | |
y: 111.8, | |
sx: .799, | |
sy: .641 | |
}, | |
5: { | |
x: 3.802, | |
y: 55.95, | |
sx: .975, | |
sy: .792 | |
}, | |
6: { | |
x: -21.74, | |
y: .106, | |
sx: 1.152, | |
sy: .943 | |
}, | |
7: { | |
x: -12.996, | |
y: 10.955, | |
sx: 1.091, | |
sy: .952 | |
}, | |
8: { | |
x: -4.227, | |
y: 21.725, | |
sx: 1.031, | |
sy: .961 | |
}, | |
9: { | |
x: -1.991, | |
y: 14.63, | |
sx: 1.016, | |
sy: .981 | |
}, | |
10: { | |
x: .221, | |
y: 7.492, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 14.142, | |
y: 88.974, | |
sx: .904, | |
sy: .755 | |
}, | |
22: { | |
x: 28.036, | |
y: 170.412, | |
sx: .808, | |
sy: .509 | |
}, | |
23: { | |
x: 41.929, | |
y: 251.85, | |
sx: .712, | |
sy: .264 | |
}, | |
24: { | |
x: 86.726, | |
y: 295.78, | |
sx: .402, | |
sy: .138, | |
a: .5 | |
}, | |
25: { | |
x: 131.548, | |
y: 339.692, | |
sx: .092, | |
sy: .013, | |
a: 0 | |
}, | |
26: { | |
x: .221, | |
y: 7.492, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: .609, | |
y: 6.135, | |
sx: .997, | |
sy: 1.003 | |
}, | |
41: { | |
x: .999, | |
y: 4.762, | |
sx: .995, | |
sy: 1.006 | |
}, | |
42: { | |
x: 1.389, | |
y: 3.393, | |
sx: .992, | |
sy: 1.009 | |
}, | |
43: { | |
x: 1.753, | |
y: 2.019, | |
sx: .989, | |
sy: 1.012 | |
}, | |
44: { | |
x: 2.166, | |
y: .676, | |
sx: .987, | |
sy: 1.014 | |
}, | |
45: { | |
x: 2.556, | |
y: -.698, | |
sx: .984, | |
sy: 1.017 | |
}, | |
46: { | |
x: 2.946, | |
y: -2.067, | |
sx: .981, | |
sy: 1.02 | |
}, | |
47: { | |
x: 3.311, | |
y: -3.441, | |
sx: .979, | |
sy: 1.023 | |
}, | |
48: { | |
x: 3.723, | |
y: -4.834, | |
sx: .976, | |
sy: 1.026 | |
}, | |
49: { | |
x: 1.722, | |
y: -3.984, | |
sx: .99 | |
}, | |
50: { | |
x: -.276, | |
y: -3.159, | |
sx: 1.003 | |
}, | |
51: { | |
x: -2.274, | |
y: -2.334, | |
sx: 1.017 | |
}, | |
52: { | |
x: -2.966, | |
y: 2.012, | |
sx: 1.022, | |
sy: 1.017 | |
}, | |
53: { | |
x: -3.682, | |
y: 6.362, | |
sx: 1.027, | |
sy: 1.007 | |
}, | |
54: { | |
x: -4.349, | |
y: 10.671, | |
sx: 1.032, | |
sy: .998 | |
}, | |
55: { | |
x: -5.066, | |
y: 15.021, | |
sx: 1.037, | |
sy: .989 | |
}, | |
56: { | |
x: -5.753, | |
y: 19.343, | |
sx: 1.041, | |
sy: .979 | |
}, | |
57: { | |
x: -4.755, | |
y: 17.389, | |
sx: 1.034, | |
sy: .983 | |
}, | |
58: { | |
x: -3.78, | |
y: 15.413, | |
sx: 1.028, | |
sy: .986 | |
}, | |
59: { | |
x: -2.752, | |
y: 13.451, | |
sx: 1.021, | |
sy: .99 | |
}, | |
60: { | |
x: -1.779, | |
y: 11.445, | |
sx: 1.014, | |
sy: .993 | |
}, | |
61: { | |
x: -.779, | |
y: 9.491, | |
sx: 1.007, | |
sy: .997 | |
}, | |
62: { | |
x: .221, | |
y: 7.492, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: -12.804, | |
y: 13.333, | |
sx: .998, | |
sy: .992, | |
kx: .058, | |
ky: -.027 | |
}, | |
86: { | |
x: -26.82, | |
y: 20.473, | |
sx: .995, | |
sy: .984, | |
kx: .124, | |
ky: -.057 | |
}, | |
87: { | |
x: -17.499, | |
y: 15.456, | |
sx: .997, | |
sy: .989, | |
kx: .08, | |
ky: -.036 | |
}, | |
88: { | |
x: -8.73, | |
y: 11.337, | |
sx: .998, | |
sy: .995, | |
kx: .04, | |
ky: -.018 | |
}, | |
89: { | |
x: .221, | |
y: 7.492, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
111: { | |
x: 9.402, | |
y: 3.918, | |
sx: 1.001, | |
sy: .999, | |
kx: -.031, | |
ky: .027 | |
}, | |
112: { | |
x: 19.408, | |
y: .034, | |
sy: .998, | |
kx: -.066, | |
ky: .057 | |
}, | |
113: { | |
x: 12.96, | |
y: 2.808, | |
sy: .999, | |
kx: -.044, | |
ky: .036 | |
}, | |
114: { | |
x: 6.598, | |
y: 5.118, | |
sx: 1, | |
kx: -.022, | |
ky: .018 | |
}, | |
115: { | |
x: .221, | |
y: 7.492, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}).addTimedChild(o, 0, 123, { | |
0: { | |
x: 139.375, | |
y: 334.3, | |
sx: .092, | |
sy: .038, | |
kx: 0, | |
ky: 0, | |
a: 0 | |
}, | |
1: { | |
x: 128.467, | |
y: 275.337, | |
sx: .269, | |
sy: .189, | |
a: .33 | |
}, | |
2: { | |
x: 117.561, | |
y: 216.349, | |
sx: .445, | |
sy: .34, | |
a: .66 | |
}, | |
3: { | |
x: 106.651, | |
y: 157.354, | |
sx: .622, | |
sy: .49, | |
a: 1 | |
}, | |
4: { | |
x: 95.742, | |
y: 98.371, | |
sx: .799, | |
sy: .641 | |
}, | |
5: { | |
x: 84.835, | |
y: 39.4, | |
sx: .975, | |
sy: .792 | |
}, | |
6: { | |
x: 73.926, | |
y: -19.612, | |
sx: 1.152, | |
sy: .943 | |
}, | |
7: { | |
x: 77.595, | |
y: -8.979, | |
sx: 1.091, | |
sy: .952 | |
}, | |
8: { | |
x: 81.264, | |
y: 1.648, | |
sx: 1.031, | |
sy: .961 | |
}, | |
9: { | |
x: 82.277, | |
y: -5.857, | |
sx: 1.016, | |
sy: .981 | |
}, | |
10: { | |
x: 83.267, | |
y: -13.409, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 89.245, | |
y: 73.172, | |
sx: .904, | |
sy: .755 | |
}, | |
22: { | |
x: 95.196, | |
y: 159.733, | |
sx: .808, | |
sy: .509 | |
}, | |
23: { | |
x: 101.172, | |
y: 246.319, | |
sx: .712, | |
sy: .264 | |
}, | |
24: { | |
x: 120.285, | |
y: 292.875, | |
sx: .402, | |
sy: .138, | |
a: .5 | |
}, | |
25: { | |
x: 139.373, | |
y: 339.413, | |
sx: .092, | |
sy: .013, | |
a: 0 | |
}, | |
26: { | |
x: 83.267, | |
y: -13.409, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 83.376, | |
y: -15.051, | |
sx: .997, | |
sy: 1.003 | |
}, | |
41: { | |
x: 83.511, | |
y: -16.686, | |
sx: .995, | |
sy: 1.006 | |
}, | |
42: { | |
x: 83.622, | |
y: -18.341, | |
sx: .992, | |
sy: 1.009 | |
}, | |
43: { | |
x: 83.758, | |
y: -20, | |
sx: .989, | |
sy: 1.012 | |
}, | |
44: { | |
x: 83.842, | |
y: -21.655, | |
sx: .987, | |
sy: 1.014 | |
}, | |
45: { | |
x: 83.978, | |
y: -23.314, | |
sx: .984, | |
sy: 1.017 | |
}, | |
46: { | |
x: 84.114, | |
y: -24.97, | |
sx: .981, | |
sy: 1.02 | |
}, | |
47: { | |
x: 84.225, | |
y: -26.629, | |
sx: .979, | |
sy: 1.023 | |
}, | |
48: { | |
x: 84.359, | |
y: -28.283, | |
sx: .976, | |
sy: 1.026 | |
}, | |
49: { | |
x: 83.61, | |
y: -26.783, | |
sx: .99 | |
}, | |
50: { | |
x: 82.887, | |
y: -25.283, | |
sx: 1.003 | |
}, | |
51: { | |
x: 82.165, | |
y: -23.783, | |
sx: 1.017 | |
}, | |
52: { | |
x: 81.835, | |
y: -20.341, | |
sx: 1.022, | |
sy: 1.017 | |
}, | |
53: { | |
x: 81.532, | |
y: -16.916, | |
sx: 1.027, | |
sy: 1.007 | |
}, | |
54: { | |
x: 81.203, | |
y: -13.46, | |
sx: 1.032, | |
sy: .998 | |
}, | |
55: { | |
x: 80.898, | |
y: -10.037, | |
sx: 1.037, | |
sy: .989 | |
}, | |
56: { | |
x: 80.571, | |
y: -6.618, | |
sx: 1.041, | |
sy: .979 | |
}, | |
57: { | |
x: 81.031, | |
y: -7.746, | |
sx: 1.034, | |
sy: .983 | |
}, | |
58: { | |
x: 81.469, | |
y: -8.869, | |
sx: 1.028, | |
sy: .986 | |
}, | |
59: { | |
x: 81.932, | |
y: -10.004, | |
sx: 1.021, | |
sy: .99 | |
}, | |
60: { | |
x: 82.367, | |
y: -11.107, | |
sx: 1.014, | |
sy: .993 | |
}, | |
61: { | |
x: 82.83, | |
y: -12.262, | |
sx: 1.007, | |
sy: .997 | |
}, | |
62: { | |
x: 83.267, | |
y: -13.409, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: 58.759, | |
y: -2.455, | |
sx: .985, | |
sy: 1.002, | |
kx: .218, | |
ky: -.188 | |
}, | |
86: { | |
x: 37.142, | |
y: 11.042, | |
sx: .969, | |
kx: .437, | |
ky: -.38 | |
}, | |
87: { | |
x: 51.321, | |
y: 1.668, | |
sx: .979, | |
sy: 1.001, | |
kx: .289, | |
ky: -.25 | |
}, | |
88: { | |
x: 66.929, | |
y: -6.56, | |
sx: .99, | |
kx: .141, | |
ky: -.123 | |
}, | |
89: { | |
x: 83.267, | |
y: -13.409, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
111: { | |
x: 107.037, | |
y: -23.411, | |
sy: .998, | |
kx: -.185, | |
ky: .163 | |
}, | |
112: { | |
x: 132.537, | |
y: -31.012, | |
sy: .996, | |
kx: -.377, | |
ky: .329 | |
}, | |
113: { | |
x: 115.497, | |
y: -26.299, | |
sy: .997, | |
kx: -.25, | |
ky: .219 | |
}, | |
114: { | |
x: 98.998, | |
y: -20.212, | |
sy: .999, | |
kx: -.123, | |
ky: .106 | |
}, | |
115: { | |
x: 83.267, | |
y: -13.409, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}); | |
}), e.monster02 = s.extend(function() { | |
s.call(this, { | |
duration: 1, | |
framerate: 24, | |
loop: !1 | |
}); | |
var t = new e.monster02_1().setTransform(65.15, 18.625); | |
this.addChild(t); | |
}), e.monster02.assets = { | |
resolutions: { | |
"@1x": { | |
"monster02_atlas_1@1x": "monsters/monster02_atlas_1@1x.json", | |
"monster02_atlas_2@1x": "monsters/monster02_atlas_2@1x.json" | |
}, | |
"@2x": { | |
"monster02_atlas_1@2x": "monsters/monster02_atlas_1@2x.json", | |
"monster02_atlas_2@2x": "monsters/monster02_atlas_2@2x.json" | |
} | |
} | |
}; | |
}(PIXI, s = s || {}); | |
var s; | |
"undefined" != typeof t && t.exports && (t.exports = { | |
stage: s.monster02, | |
background: 16777215, | |
width: 840, | |
height: 840, | |
framerate: 24, | |
totalFrames: 1, | |
library: s | |
}); | |
}, function(t, e) { | |
"use strict"; | |
!function(t, e) { | |
var s = t.animate.MovieClip, n = t.Container, o = t.Sprite, r = function(e) { | |
return t.Texture.fromFrame("monster03#" + e); | |
}; | |
e.legs = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 15")); | |
this.addChild(t); | |
}), e.body = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 1")); | |
this.addChild(t); | |
}), e.head = s.extend(function() { | |
s.call(this, { | |
duration: 4 | |
}); | |
var t = new o(r("Bitmap 14")).setTransform(0, 168.075), e = new o(r("Bitmap 13")).setTransform(17.65, 11.775), n = new o(r("Bitmap 12")).setTransform(303.975, 66.9), i = new o(r("Bitmap 11")).setTransform(28.575), a = new o(r("Bitmap 10")).setTransform(73.35, 87.775), l = new o(r("Bitmap 9")).setTransform(50.925, 37.25), u = new o(r("Bitmap 5")).setTransform(323.6, 43.125), c = new o(r("Bitmap 8")).setTransform(61.925, 145.825), y = new o(r("Bitmap 7")).setTransform(48.9, 111.175), d = new o(r("Bitmap 6")).setTransform(107.625, 95.125), p = new o(r("Bitmap 4")).setTransform(269.575, 92.95), x = new o(r("Bitmap 3")).setTransform(308.275, 142.575), f = new o(r("Bitmap 2")).setTransform(255.125, 176.525); | |
this.addTimedChild(t, 2, 2).addTimedChild(e, 2, 2).addTimedChild(n, 2, 2).addTimedChild(i).addTimedChild(a, 1, 3).addTimedChild(l, 1, 3).addTimedChild(u, 1, 3).addTimedChild(c, 3, 1).addTimedChild(y, 3, 1).addTimedChild(d, 3, 1).addTimedChild(p, 3, 1).addTimedChild(x, 3, 1).addTimedChild(f, 3, 1); | |
}), e.monster03_1 = s.extend(function() { | |
s.call(this, { | |
duration: 135, | |
labels: { | |
born: 0, | |
born_stop: 10, | |
death: 20, | |
death_stop: 25, | |
breath: 39, | |
breath_loop: 61, | |
hit1: 84, | |
hit1_stop: 89, | |
hit2: 110, | |
hit2_stop: 115 | |
} | |
}); | |
var t = this.head = new e.head(), n = this.body = new e.body(), o = this.legs = new e.legs(); | |
this.addTimedChild(t, 0, 135, { | |
0: { | |
x: 169.575, | |
y: 344.9, | |
sx: .123, | |
sy: .027, | |
kx: 0, | |
ky: 0, | |
a: 0 | |
}, | |
1: { | |
x: 141.742, | |
y: 287.941, | |
sx: .264, | |
sy: .139, | |
a: .2 | |
}, | |
2: { | |
x: 113.917, | |
y: 230.923, | |
sx: .405, | |
sy: .25, | |
a: .4 | |
}, | |
3: { | |
x: 86.113, | |
y: 173.93, | |
sx: .546, | |
sy: .361, | |
a: .6 | |
}, | |
4: { | |
x: 58.262, | |
y: 116.931, | |
sx: .687, | |
sy: .472, | |
a: .8 | |
}, | |
5: { | |
x: 30.455, | |
y: 59.927, | |
sx: .829, | |
sy: .583, | |
a: 1 | |
}, | |
6: { | |
x: 6.203, | |
y: 25.224, | |
sx: .95, | |
sy: .719 | |
}, | |
7: { | |
x: -18.027, | |
y: -9.484, | |
sx: 1.072, | |
sy: .854 | |
}, | |
8: { | |
x: -19.468, | |
y: 10.873, | |
sx: 1.07, | |
sy: .893 | |
}, | |
9: { | |
x: -20.835, | |
y: 31.227, | |
sx: 1.068, | |
sy: .933 | |
}, | |
10: { | |
x: -3.632, | |
y: 3.878, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: -6.164, | |
y: 63.258, | |
sx: 1.007, | |
sy: .846 | |
}, | |
22: { | |
x: -8.721, | |
y: 122.577, | |
sx: 1.015, | |
sy: .693 | |
}, | |
23: { | |
x: -11.277, | |
y: 181.957, | |
sx: 1.022, | |
sy: .539 | |
}, | |
24: { | |
x: 79.159, | |
y: 263.448, | |
sx: .573, | |
sy: .283, | |
a: .5 | |
}, | |
25: { | |
x: 169.572, | |
y: 344.9, | |
sx: .123, | |
sy: .027, | |
a: 0 | |
}, | |
26: { | |
x: -3.632, | |
y: 3.878, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: -2.401, | |
y: .814, | |
sx: .994, | |
sy: 1.008 | |
}, | |
41: { | |
x: -1.17, | |
y: -2.293, | |
sx: .988, | |
sy: 1.016 | |
}, | |
42: { | |
x: .036, | |
y: -5.36, | |
sx: .982, | |
sy: 1.024 | |
}, | |
43: { | |
x: 1.27, | |
y: -8.468, | |
sx: .976, | |
sy: 1.032 | |
}, | |
44: { | |
x: 2.501, | |
y: -11.552, | |
sx: .969, | |
sy: 1.04 | |
}, | |
45: { | |
x: 3.732, | |
y: -14.645, | |
sx: .963, | |
sy: 1.048 | |
}, | |
46: { | |
x: 4.938, | |
y: -17.731, | |
sx: .957, | |
sy: 1.055 | |
}, | |
47: { | |
x: 6.172, | |
y: -20.84, | |
sx: .951, | |
sy: 1.063 | |
}, | |
48: { | |
x: .763, | |
y: -18.106, | |
sx: .978, | |
sy: 1.055 | |
}, | |
49: { | |
x: -4.641, | |
y: -15.398, | |
sx: 1.005, | |
sy: 1.046 | |
}, | |
50: { | |
x: -10.046, | |
y: -12.695, | |
sx: 1.032, | |
sy: 1.038 | |
}, | |
51: { | |
x: -15.45, | |
y: -9.982, | |
sx: 1.059, | |
sy: 1.03 | |
}, | |
52: { | |
x: -15.297, | |
y: -3.007, | |
sx: 1.058, | |
sy: 1.013 | |
}, | |
53: { | |
x: -15.147, | |
y: 3.988, | |
sy: .996 | |
}, | |
54: { | |
x: -14.994, | |
y: 11.009, | |
sx: 1.057, | |
sy: .979 | |
}, | |
55: { | |
x: -14.819, | |
y: 17.989, | |
sx: 1.056, | |
sy: .962 | |
}, | |
56: { | |
x: -13.229, | |
y: 15.988, | |
sx: 1.048, | |
sy: .967 | |
}, | |
57: { | |
x: -11.616, | |
y: 13.973, | |
sx: 1.04, | |
sy: .973 | |
}, | |
58: { | |
x: -10.033, | |
y: 11.932, | |
sx: 1.032, | |
sy: .978 | |
}, | |
59: { | |
x: -8.418, | |
y: 9.93, | |
sx: 1.024, | |
sy: .984 | |
}, | |
60: { | |
x: -6.83, | |
y: 7.914, | |
sx: 1.016, | |
sy: .989 | |
}, | |
61: { | |
x: -5.218, | |
y: 5.924, | |
sx: 1.008, | |
sy: .995 | |
}, | |
62: { | |
x: -3.632, | |
y: 3.878, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: -20.226, | |
y: 22.604, | |
sx: .999, | |
kx: .079, | |
ky: -.097 | |
}, | |
86: { | |
x: -35.185, | |
y: 42.411, | |
sy: .999, | |
kx: .162, | |
ky: -.197 | |
}, | |
87: { | |
x: -47.924, | |
y: 61.829, | |
sx: .998, | |
kx: .241, | |
ky: -.294 | |
}, | |
88: { | |
x: -27.818, | |
y: 32.107, | |
sx: .999, | |
sy: 1, | |
kx: .119, | |
ky: -.145 | |
}, | |
89: { | |
x: -3.632, | |
y: 3.878, | |
sx: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
111: { | |
x: 14.02, | |
y: -15.579, | |
sx: 1.009, | |
sy: 1.001, | |
kx: -.066, | |
ky: .093 | |
}, | |
112: { | |
x: 33.813, | |
y: -35.398, | |
sx: 1.018, | |
sy: 1.002, | |
kx: -.136, | |
ky: .189 | |
}, | |
113: { | |
x: 54.996, | |
y: -54.119, | |
sx: 1.028, | |
kx: -.202, | |
ky: .281 | |
}, | |
114: { | |
x: 23.265, | |
y: -24.899, | |
sx: 1.014, | |
sy: 1.001, | |
kx: -.098, | |
ky: .137 | |
}, | |
115: { | |
x: -3.632, | |
y: 3.878, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}).addTimedChild(n, 0, 135, { | |
0: { | |
x: 173, | |
y: 346.475, | |
sx: .123, | |
sy: .027, | |
kx: 0, | |
ky: 0, | |
a: 0 | |
}, | |
1: { | |
x: 150.015, | |
y: 297.308, | |
sx: .264, | |
sy: .139, | |
a: .2 | |
}, | |
2: { | |
x: 126.986, | |
y: 248.132, | |
sx: .405, | |
sy: .25, | |
a: .4 | |
}, | |
3: { | |
x: 104.005, | |
y: 198.955, | |
sx: .546, | |
sy: .361, | |
a: .6 | |
}, | |
4: { | |
x: 80.976, | |
y: 149.798, | |
sx: .687, | |
sy: .472, | |
a: .8 | |
}, | |
5: { | |
x: 57.941, | |
y: 100.586, | |
sx: .829, | |
sy: .583, | |
a: 1 | |
}, | |
6: { | |
x: 38.118, | |
y: 76.156, | |
sx: .95, | |
sy: .719 | |
}, | |
7: { | |
x: 18.291, | |
y: 51.72, | |
sx: 1.072, | |
sy: .854 | |
}, | |
8: { | |
x: 18.619, | |
y: 74.499, | |
sx: 1.07, | |
sy: .893 | |
}, | |
9: { | |
x: 18.897, | |
y: 97.249, | |
sx: 1.068, | |
sy: .933 | |
}, | |
10: { | |
x: 30.471, | |
y: 77.24, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 46.192, | |
y: 122.969, | |
sx: .977, | |
sy: .861 | |
}, | |
22: { | |
x: 61.887, | |
y: 168.628, | |
sx: .953, | |
sy: .722 | |
}, | |
23: { | |
x: 77.583, | |
y: 214.312, | |
sx: .93, | |
sy: .583 | |
}, | |
24: { | |
x: 125.304, | |
y: 280.418, | |
sx: .526, | |
sy: .305, | |
a: .5 | |
}, | |
25: { | |
x: 172.997, | |
y: 346.475, | |
sx: .123, | |
sy: .027, | |
a: 0 | |
}, | |
26: { | |
x: 30.471, | |
y: 77.24, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 31.331, | |
y: 75.432, | |
sx: .994, | |
sy: 1.008 | |
}, | |
41: { | |
x: 32.191, | |
y: 73.577, | |
sx: .988, | |
sy: 1.016 | |
}, | |
42: { | |
x: 33.026, | |
y: 71.739, | |
sx: .982, | |
sy: 1.024 | |
}, | |
43: { | |
x: 33.864, | |
y: 69.886, | |
sx: .976, | |
sy: 1.032 | |
}, | |
44: { | |
x: 34.724, | |
y: 68.082, | |
sx: .969, | |
sy: 1.04 | |
}, | |
45: { | |
x: 35.559, | |
y: 66.219, | |
sx: .963, | |
sy: 1.048 | |
}, | |
46: { | |
x: 36.394, | |
y: 64.385, | |
sx: .957, | |
sy: 1.055 | |
}, | |
47: { | |
x: 37.231, | |
y: 62.531, | |
sx: .951, | |
sy: 1.063 | |
}, | |
48: { | |
x: 34.17, | |
y: 64.629, | |
sx: .973, | |
sy: 1.055 | |
}, | |
49: { | |
x: 31.087, | |
y: 66.728, | |
sx: .995, | |
sy: 1.046 | |
}, | |
50: { | |
x: 28.026, | |
y: 68.796, | |
sx: 1.016, | |
sy: 1.038 | |
}, | |
51: { | |
x: 24.942, | |
y: 70.899, | |
sx: 1.038, | |
sy: 1.03 | |
}, | |
52: { | |
x: 23.908, | |
y: 75.333, | |
sx: 1.043, | |
sy: 1.013 | |
}, | |
53: { | |
x: 22.873, | |
y: 79.735, | |
sx: 1.047, | |
sy: .996 | |
}, | |
54: { | |
x: 21.835, | |
y: 84.163, | |
sx: 1.052, | |
sy: .979 | |
}, | |
55: { | |
x: 20.801, | |
y: 88.576, | |
sx: 1.056, | |
sy: .962 | |
}, | |
56: { | |
x: 22.192, | |
y: 86.961, | |
sx: 1.048, | |
sy: .967 | |
}, | |
57: { | |
x: 23.58, | |
y: 85.355, | |
sx: 1.04, | |
sy: .973 | |
}, | |
58: { | |
x: 24.94, | |
y: 83.726, | |
sx: 1.032, | |
sy: .978 | |
}, | |
59: { | |
x: 26.356, | |
y: 82.11, | |
sx: 1.024, | |
sy: .984 | |
}, | |
60: { | |
x: 27.72, | |
y: 80.48, | |
sx: 1.016, | |
sy: .989 | |
}, | |
61: { | |
x: 29.109, | |
y: 78.875, | |
sx: 1.008, | |
sy: .995 | |
}, | |
62: { | |
x: 30.471, | |
y: 77.24, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: 20.508, | |
y: 84.725, | |
kx: .058, | |
ky: -.035 | |
}, | |
86: { | |
x: 10.36, | |
y: 92.792, | |
sx: 1.001, | |
kx: .119, | |
ky: -.074 | |
}, | |
87: { | |
x: .41, | |
y: 100.826, | |
kx: .18, | |
ky: -.11 | |
}, | |
88: { | |
x: 15.424, | |
y: 88.909, | |
sx: 1, | |
kx: .088, | |
ky: -.056 | |
}, | |
89: { | |
x: 30.471, | |
y: 77.24, | |
kx: 0, | |
ky: 0 | |
}, | |
111: { | |
x: 43.312, | |
y: 71.042, | |
sx: .998, | |
sy: 1.001, | |
kx: -.053, | |
ky: .054 | |
}, | |
112: { | |
x: 56.785, | |
y: 64.369, | |
sx: .996, | |
sy: 1.002, | |
kx: -.11, | |
ky: .115 | |
}, | |
113: { | |
x: 70.634, | |
y: 58.015, | |
sx: .995, | |
sy: 1.003, | |
kx: -.167, | |
ky: .176 | |
}, | |
114: { | |
x: 49.841, | |
y: 67.664, | |
sx: .997, | |
sy: 1.001, | |
kx: -.08, | |
ky: .085 | |
}, | |
115: { | |
x: 30.471, | |
y: 77.24, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}).addTimedChild(o, 0, 135, { | |
0: { | |
x: 180.175, | |
y: 347.375, | |
sx: .123, | |
sy: .027, | |
kx: 0, | |
a: 0 | |
}, | |
1: { | |
x: 160.934, | |
y: 312.147, | |
sx: .264, | |
sy: .139, | |
a: .2 | |
}, | |
2: { | |
x: 141.724, | |
y: 276.908, | |
sx: .405, | |
sy: .25, | |
a: .4 | |
}, | |
3: { | |
x: 122.487, | |
y: 241.669, | |
sx: .546, | |
sy: .361, | |
a: .6 | |
}, | |
4: { | |
x: 103.277, | |
y: 206.425, | |
sx: .687, | |
sy: .472, | |
a: .8 | |
}, | |
5: { | |
x: 84.036, | |
y: 171.177, | |
sx: .829, | |
sy: .583, | |
a: 1 | |
}, | |
6: { | |
x: 67.442, | |
y: 162.963, | |
sx: .95, | |
sy: .719 | |
}, | |
7: { | |
x: 50.87, | |
y: 154.718, | |
sx: 1.072, | |
sy: .854 | |
}, | |
8: { | |
x: 51.132, | |
y: 181.605, | |
sx: 1.07, | |
sy: .893 | |
}, | |
9: { | |
x: 51.418, | |
y: 208.464, | |
sx: 1.068, | |
sy: .933 | |
}, | |
10: { | |
x: 60.779, | |
y: 196.715, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 63.305, | |
y: 214.79, | |
sx: .977, | |
sy: .861 | |
}, | |
22: { | |
x: 65.831, | |
y: 232.846, | |
sx: .953, | |
sy: .722 | |
}, | |
23: { | |
x: 68.358, | |
y: 250.927, | |
sx: .93, | |
sy: .583 | |
}, | |
24: { | |
x: 124.266, | |
y: 299.164, | |
sx: .526, | |
sy: .305, | |
a: .5 | |
}, | |
25: { | |
x: 180.197, | |
y: 347.375, | |
sx: .123, | |
sy: .027, | |
a: 0 | |
}, | |
26: { | |
x: 60.779, | |
y: 196.715, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 61.144, | |
y: 195.821, | |
sx: .997, | |
sy: 1.005 | |
}, | |
41: { | |
x: 61.509, | |
y: 194.935, | |
sx: .995, | |
sy: 1.01 | |
}, | |
42: { | |
x: 61.874, | |
y: 194.046, | |
sx: .992, | |
sy: 1.016 | |
}, | |
43: { | |
x: 62.239, | |
y: 193.134, | |
sx: .99, | |
sy: 1.021 | |
}, | |
44: { | |
x: 62.604, | |
y: 192.24, | |
sx: .987, | |
sy: 1.026 | |
}, | |
45: { | |
x: 62.944, | |
y: 191.354, | |
sx: .984, | |
sy: 1.031 | |
}, | |
46: { | |
x: 63.309, | |
y: 190.432, | |
sx: .982, | |
sy: 1.036 | |
}, | |
47: { | |
x: 63.677, | |
y: 189.518, | |
sx: .979, | |
sy: 1.041 | |
}, | |
48: { | |
x: 62.157, | |
y: 190.052, | |
sx: .99, | |
sy: 1.038 | |
}, | |
49: { | |
x: 60.612, | |
y: 190.555, | |
sx: 1.001, | |
sy: 1.035 | |
}, | |
50: { | |
x: 59.07, | |
y: 191.088, | |
sx: 1.012, | |
sy: 1.033 | |
}, | |
51: { | |
x: 57.55, | |
y: 191.592, | |
sx: 1.024, | |
sy: 1.03 | |
}, | |
52: { | |
x: 56.438, | |
y: 194.548, | |
sx: 1.032, | |
sy: 1.013 | |
}, | |
53: { | |
x: 55.322, | |
y: 197.498, | |
sx: 1.04, | |
sy: .996 | |
}, | |
54: { | |
x: 54.181, | |
y: 200.447, | |
sx: 1.048, | |
sy: .979 | |
}, | |
55: { | |
x: 53.066, | |
y: 203.382, | |
sx: 1.056, | |
sy: .962 | |
}, | |
56: { | |
x: 54.188, | |
y: 202.445, | |
sx: 1.048, | |
sy: .967 | |
}, | |
57: { | |
x: 55.282, | |
y: 201.492, | |
sx: 1.04, | |
sy: .973 | |
}, | |
58: { | |
x: 56.374, | |
y: 200.539, | |
sx: 1.032, | |
sy: .978 | |
}, | |
59: { | |
x: 57.496, | |
y: 199.577, | |
sx: 1.024, | |
sy: .984 | |
}, | |
60: { | |
x: 58.59, | |
y: 198.624, | |
sx: 1.016, | |
sy: .989 | |
}, | |
61: { | |
x: 59.685, | |
y: 197.696, | |
sx: 1.008, | |
sy: .995 | |
}, | |
62: { | |
x: 60.779, | |
y: 196.715, | |
sx: 1, | |
sy: 1 | |
}, | |
85: { | |
x: 58.36, | |
y: 196.705, | |
kx: .013 | |
}, | |
86: { | |
x: 55.961, | |
y: 196.729, | |
sy: 1.001, | |
kx: .027 | |
}, | |
87: { | |
x: 53.54, | |
y: 196.749, | |
kx: .04 | |
}, | |
88: { | |
x: 57.304, | |
y: 196.729, | |
sy: 1, | |
kx: .018 | |
}, | |
89: { | |
x: 60.779, | |
y: 196.715, | |
kx: 0 | |
}, | |
111: { | |
x: 66.145, | |
y: 196.651, | |
sy: 1.001, | |
kx: -.031 | |
}, | |
112: { | |
x: 71.514, | |
y: 196.674, | |
sy: 1.003, | |
kx: -.061 | |
}, | |
113: { | |
x: 76.877, | |
y: 196.768, | |
sy: 1.004, | |
kx: -.092 | |
}, | |
114: { | |
x: 68.679, | |
y: 196.65, | |
sy: 1.002, | |
kx: -.044 | |
}, | |
115: { | |
x: 60.779, | |
y: 196.715, | |
sy: 1, | |
kx: 0 | |
} | |
}); | |
}), e.monster03 = s.extend(function() { | |
s.call(this, { | |
duration: 1, | |
framerate: 24, | |
loop: !1 | |
}); | |
var t = this.monster03 = new e.monster03_1().setTransform(14.5, 43.6); | |
this.addChild(t); | |
}), e.monster03.assets = { | |
resolutions: { | |
"@1x": { | |
"monster03_atlas_1@1x": "monsters/monster03_atlas_1@1x.json", | |
"monster03_atlas_2@1x": "monsters/monster03_atlas_2@1x.json" | |
}, | |
"@2x": { | |
"monster03_atlas_1@2x": "monsters/monster03_atlas_1@2x.json", | |
"monster03_atlas_2@2x": "monsters/monster03_atlas_2@2x.json" | |
} | |
} | |
}; | |
}(PIXI, s = s || {}); | |
var s; | |
"undefined" != typeof t && t.exports && (t.exports = { | |
stage: s.monster03, | |
background: 16777215, | |
width: 840, | |
height: 840, | |
framerate: 24, | |
totalFrames: 1, | |
library: s | |
}); | |
}, function(t, e) { | |
"use strict"; | |
!function(t, e) { | |
var s = t.animate.MovieClip, n = t.Container, o = t.Sprite, r = function(e) { | |
return t.Texture.fromFrame("monster04#" + e); | |
}; | |
e.head = s.extend(function() { | |
s.call(this, { | |
duration: 2 | |
}); | |
var t = new o(r("Bitmap 1")).setTransform(-44.825, -61.325), e = new o(r("Bitmap 2")).setTransform(-23.375, -64.225); | |
this.addTimedChild(t).addTimedChild(e, 1, 1); | |
}); | |
var i = s.extend(function(t) { | |
s.call(this, { | |
mode: t, | |
duration: 15, | |
loop: !1 | |
}); | |
var e = new o(r("Bitmap 4")).setTransform(-86.3, -165.55); | |
this.addTimedChild(e); | |
}), a = s.extend(function(t) { | |
s.call(this, { | |
mode: t, | |
duration: 15, | |
loop: !1 | |
}); | |
var e = new o(r("Bitmap 3")).setTransform(-83.775, -160.7); | |
this.addTimedChild(e); | |
}); | |
e.s5 = s.extend(function() { | |
s.call(this, { | |
duration: 15 | |
}); | |
var t = new a(s.SYNCHED), e = new i(s.SYNCHED); | |
this.addTimedChild(t, 0, 15, { | |
0: { | |
x: 304.575, | |
y: 163, | |
kx: 0, | |
ky: 0 | |
}, | |
1: { | |
x: 304.583, | |
y: 163.471, | |
kx: -.001, | |
ky: .005 | |
}, | |
2: { | |
x: 304.445, | |
y: 164.195, | |
kx: -.005, | |
ky: .014 | |
}, | |
3: { | |
x: 304.321, | |
y: 164.892, | |
kx: -.01, | |
ky: .023 | |
}, | |
4: { | |
x: 304.202, | |
y: 165.634, | |
kx: -.014, | |
ky: .032 | |
}, | |
5: { | |
x: 304.024, | |
y: 166.343, | |
kx: -.018, | |
ky: .041 | |
}, | |
6: { | |
x: 303.876, | |
y: 167.062, | |
kx: -.023, | |
ky: .049 | |
}, | |
7: { | |
x: 303.722, | |
y: 167.765, | |
kx: -.027, | |
ky: .058 | |
}, | |
8: { | |
x: 303.876, | |
y: 167.062, | |
kx: -.023, | |
ky: .049 | |
}, | |
9: { | |
x: 304.024, | |
y: 166.343, | |
kx: -.018, | |
ky: .041 | |
}, | |
10: { | |
x: 304.202, | |
y: 165.634, | |
kx: -.014, | |
ky: .032 | |
}, | |
11: { | |
x: 304.321, | |
y: 164.892, | |
kx: -.01, | |
ky: .023 | |
}, | |
12: { | |
x: 304.445, | |
y: 164.195, | |
kx: -.005, | |
ky: .014 | |
}, | |
13: { | |
x: 304.583, | |
y: 163.471, | |
kx: -.001, | |
ky: .005 | |
}, | |
14: { | |
x: 304.575, | |
y: 163, | |
kx: 0, | |
ky: 0 | |
} | |
}).addTimedChild(e, 0, 15, { | |
0: { | |
x: 86.3, | |
y: 165.55, | |
kx: 0, | |
ky: 0 | |
}, | |
1: { | |
x: 86.374, | |
y: 166.055, | |
kx: .001, | |
ky: -.005 | |
}, | |
2: { | |
x: 86.51, | |
y: 166.851, | |
kx: .005, | |
ky: -.014 | |
}, | |
3: { | |
x: 86.622, | |
y: 167.636, | |
kx: .01, | |
ky: -.023 | |
}, | |
4: { | |
x: 86.795, | |
y: 168.399, | |
kx: .014, | |
ky: -.032 | |
}, | |
5: { | |
x: 86.936, | |
y: 169.186, | |
kx: .018, | |
ky: -.04 | |
}, | |
6: { | |
x: 87.127, | |
y: 169.962, | |
kx: .023, | |
ky: -.049 | |
}, | |
7: { | |
x: 87.28, | |
y: 170.768, | |
kx: .027, | |
ky: -.058 | |
}, | |
8: { | |
x: 87.127, | |
y: 169.962, | |
kx: .023, | |
ky: -.049 | |
}, | |
9: { | |
x: 86.936, | |
y: 169.186, | |
kx: .018, | |
ky: -.04 | |
}, | |
10: { | |
x: 86.795, | |
y: 168.399, | |
kx: .014, | |
ky: -.032 | |
}, | |
11: { | |
x: 86.622, | |
y: 167.636, | |
kx: .01, | |
ky: -.023 | |
}, | |
12: { | |
x: 86.51, | |
y: 166.851, | |
kx: .005, | |
ky: -.014 | |
}, | |
13: { | |
x: 86.374, | |
y: 166.055, | |
kx: .001, | |
ky: -.005 | |
}, | |
14: { | |
x: 86.3, | |
y: 165.55, | |
kx: 0, | |
ky: 0 | |
} | |
}); | |
}), e.body = s.extend(function() { | |
s.call(this, { | |
duration: 5 | |
}); | |
var t = new e.s5().setTransform(-194.175, -331.075), n = new o(r("Bitmap 10")).setTransform(62.15, -135.45), i = new o(r("Bitmap 5")).setTransform(-86.2, -254.325), a = new o(r("Bitmap 6")).setTransform(-71.525, -183.85), l = new o(r("Bitmap 7")).setTransform(-13.725, -243.825), u = new o(r("Bitmap 8")).setTransform(-30.15, -228.575), c = new o(r("Bitmap 9")).setTransform(52.05, -137.15); | |
this.addTimedChild(t).addTimedChild(n, 4, 1).addTimedChild(i).addTimedChild(a, 1, 4).addTimedChild(l, 2, 3).addTimedChild(u, 3, 2).addTimedChild(c, 4, 1); | |
}), e.s4 = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 12")); | |
this.addChild(t); | |
}), e.s3 = s.extend(function() { | |
s.call(this, { | |
duration: 10 | |
}); | |
var t = new e.s4(); | |
this.addTimedChild(t, 0, 10, { | |
0: { | |
x: 0, | |
y: 0, | |
sx: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
1: { | |
x: .325, | |
y: -.1, | |
kx: -.01, | |
ky: .02 | |
}, | |
2: { | |
x: .725, | |
y: -.225, | |
kx: -.023, | |
ky: .046 | |
}, | |
3: { | |
x: 1.1, | |
y: -.375, | |
sx: 1.001, | |
kx: -.036, | |
ky: .072 | |
}, | |
4: { | |
x: 1.5, | |
y: -.5, | |
kx: -.049, | |
ky: .098 | |
}, | |
5: { | |
x: .7, | |
y: -.175, | |
kx: -.022, | |
ky: .036 | |
}, | |
6: { | |
x: -.1, | |
y: .2, | |
sx: 1.002, | |
kx: .005, | |
ky: -.027 | |
}, | |
7: { | |
x: -.975, | |
y: .6, | |
kx: .035, | |
ky: -.093 | |
}, | |
8: { | |
x: -.475, | |
y: .3, | |
sx: 1.001, | |
kx: .018, | |
ky: -.045 | |
}, | |
9: { | |
x: 0, | |
y: 0, | |
sx: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}); | |
}), e.legs = s.extend(function() { | |
s.call(this, { | |
duration: 2 | |
}); | |
var t = new e.s3().setTransform(-4.475, -204.35), n = new o(r("Bitmap 11")), i = new o(r("Bitmap 13")).setTransform(-117.65, -220.45); | |
this.addTimedChild(t).addTimedChild(n, 0, 1, { | |
0: { | |
x: -117.65, | |
y: -220.275 | |
} | |
}).addTimedChild(i, 1, 1); | |
}), e.monster04_1 = s.extend(function() { | |
s.call(this, { | |
duration: 69, | |
labels: { | |
born: 0, | |
born_stop: 11, | |
breath: 18, | |
breath_loop: 45, | |
hit1: 46, | |
hit1_stop: 51, | |
hit2: 54, | |
hit2_stop: 59, | |
death: 63, | |
death_stop: 68 | |
} | |
}); | |
var t = new e.legs(), n = new e.body(), o = new e.head(); | |
this.addTimedChild(t, 0, 69, { | |
0: { | |
x: 8.25, | |
y: 177.25, | |
sx: .289, | |
sy: .053, | |
kx: 0, | |
a: 0 | |
}, | |
1: { | |
x: 9.431, | |
y: 183.064, | |
sx: .426, | |
sy: .246, | |
a: .2 | |
}, | |
2: { | |
x: 10.613, | |
y: 188.855, | |
sx: .563, | |
sy: .439, | |
a: .4 | |
}, | |
3: { | |
x: 11.794, | |
y: 194.645, | |
sx: .7, | |
sy: .631, | |
a: .6 | |
}, | |
4: { | |
x: 12.95, | |
y: 200.461, | |
sx: .837, | |
sy: .824, | |
a: .8 | |
}, | |
5: { | |
x: 14.156, | |
y: 206.226, | |
sx: .974, | |
sy: 1.017, | |
a: 1 | |
}, | |
6: { | |
x: 14.147, | |
y: 205.258, | |
sx: .99, | |
sy: .997 | |
}, | |
7: { | |
x: 14.163, | |
y: 204.261, | |
sx: 1.005, | |
sy: .976 | |
}, | |
8: { | |
x: 14.154, | |
y: 203.293, | |
sx: 1.021, | |
sy: .956 | |
}, | |
9: { | |
x: 14.158, | |
y: 203.267, | |
sx: 1.014, | |
sy: .97 | |
}, | |
10: { | |
x: 14.162, | |
y: 203.24, | |
sx: 1.007, | |
sy: .985 | |
}, | |
11: { | |
x: 14.141, | |
y: 203.189, | |
sx: 1, | |
sy: 1 | |
}, | |
19: { | |
x: 14.16, | |
y: 203.213, | |
sx: .999, | |
sy: 1.001 | |
}, | |
20: { | |
x: 14.153, | |
sx: .998, | |
sy: 1.002 | |
}, | |
21: { | |
x: 14.146, | |
y: 203.212, | |
sx: .997, | |
sy: 1.003 | |
}, | |
22: { | |
x: 14.165, | |
y: 203.213, | |
sx: .996, | |
sy: 1.004 | |
}, | |
23: { | |
x: 14.159, | |
y: 203.189, | |
sx: .994, | |
sy: 1.005 | |
}, | |
24: { | |
x: 14.152, | |
sx: .993, | |
sy: 1.006 | |
}, | |
25: { | |
x: 14.146, | |
y: 203.188, | |
sx: .992, | |
sy: 1.007 | |
}, | |
26: { | |
x: 14.164, | |
y: 203.214, | |
sx: .991, | |
sy: 1.008 | |
}, | |
27: { | |
x: 14.158, | |
y: 203.215, | |
sx: .99, | |
sy: 1.009 | |
}, | |
28: { | |
x: 14.151, | |
y: 203.191, | |
sx: .989, | |
sy: 1.01 | |
}, | |
29: { | |
x: 14.145, | |
y: 203.189, | |
sx: .988, | |
sy: 1.011 | |
}, | |
30: { | |
x: 14.163, | |
y: 203.19, | |
sx: .987, | |
sy: 1.012 | |
}, | |
31: { | |
x: 14.157, | |
y: 203.189, | |
sx: .986, | |
sy: 1.013 | |
}, | |
32: { | |
x: 14.151, | |
y: 203.192, | |
sx: .985, | |
sy: 1.014 | |
}, | |
33: { | |
x: 14.148, | |
y: 202.913, | |
sx: .989, | |
sy: 1.01 | |
}, | |
34: { | |
x: 14.145, | |
y: 202.609, | |
sx: .993, | |
sy: 1.006 | |
}, | |
35: { | |
x: 14.143, | |
y: 202.33, | |
sx: .997, | |
sy: 1.002 | |
}, | |
36: { | |
x: 14.165, | |
y: 202.029, | |
sx: 1.002, | |
sy: .998 | |
}, | |
37: { | |
x: 14.162, | |
y: 201.75, | |
sx: 1.006, | |
sy: .994 | |
}, | |
38: { | |
x: 14.16, | |
y: 201.472, | |
sx: 1.01, | |
sy: .99 | |
}, | |
39: { | |
x: 14.148, | |
y: 201.692, | |
sx: 1.009, | |
sy: .991 | |
}, | |
40: { | |
x: 14.162, | |
y: 201.914, | |
sx: 1.008, | |
sy: .993 | |
}, | |
41: { | |
x: 14.15, | |
y: 202.11, | |
sx: 1.006, | |
sy: .994 | |
}, | |
42: { | |
x: 14.163, | |
y: 202.331, | |
sx: 1.005, | |
sy: .995 | |
}, | |
43: { | |
x: 14.151, | |
y: 202.551, | |
sx: 1.004, | |
sy: .996 | |
}, | |
44: { | |
x: 14.164, | |
y: 202.772, | |
sx: 1.003, | |
sy: .998 | |
}, | |
45: { | |
x: 14.153, | |
y: 202.993, | |
sx: 1.001, | |
sy: .999 | |
}, | |
46: { | |
x: 14.141, | |
y: 203.189, | |
sx: 1, | |
sy: 1 | |
}, | |
47: { | |
x: 13.378, | |
y: 203.186, | |
kx: -.004 | |
}, | |
48: { | |
x: 12.614, | |
y: 203.182, | |
kx: -.009 | |
}, | |
49: { | |
x: 11.822, | |
y: 203.177, | |
kx: -.013 | |
}, | |
50: { | |
x: 13.286, | |
y: 203.186, | |
kx: -.005 | |
}, | |
51: { | |
x: 14.141, | |
y: 203.189, | |
kx: 0 | |
}, | |
55: { | |
x: 14.543, | |
y: 203.216, | |
kx: -.005 | |
}, | |
56: { | |
x: 14.36, | |
y: 203.214, | |
kx: -.014 | |
}, | |
57: { | |
x: 14.199, | |
y: 203.206, | |
kx: -.022 | |
}, | |
58: { | |
x: 14.44, | |
y: 203.216, | |
kx: -.009 | |
}, | |
59: { | |
x: 14.141, | |
y: 203.189, | |
kx: 0 | |
}, | |
64: { | |
y: 203.475, | |
sy: .941 | |
}, | |
65: { | |
y: 203.765, | |
sy: .882 | |
}, | |
66: { | |
y: 204.051, | |
sy: .824 | |
}, | |
67: { | |
x: 13.334, | |
y: 205.353, | |
sx: .897, | |
sy: .543, | |
a: .5 | |
}, | |
68: { | |
x: 12.527, | |
y: 206.68, | |
sx: .794, | |
sy: .262, | |
a: 0 | |
} | |
}).addTimedChild(n, 0, 69, { | |
0: { | |
x: 5.85, | |
y: 173.375, | |
sx: .289, | |
sy: .053, | |
kx: 0, | |
ky: 0, | |
a: 0 | |
}, | |
1: { | |
x: 5.895, | |
y: 165.195, | |
sx: .426, | |
sy: .246, | |
a: .2 | |
}, | |
2: { | |
x: 5.915, | |
y: 156.991, | |
sx: .563, | |
sy: .439, | |
a: .4 | |
}, | |
3: { | |
x: 5.96, | |
y: 148.812, | |
sx: .7, | |
sy: .631, | |
a: .6 | |
}, | |
4: { | |
x: 6.005, | |
y: 140.607, | |
sx: .837, | |
sy: .824, | |
a: .8 | |
}, | |
5: { | |
x: 6.049, | |
y: 132.428, | |
sx: .974, | |
sy: 1.017, | |
a: 1 | |
}, | |
6: { | |
x: 5.962, | |
y: 132.741, | |
sx: .99, | |
sy: .997 | |
}, | |
7: { | |
x: 5.875, | |
y: 133.028, | |
sx: 1.005, | |
sy: .976 | |
}, | |
8: { | |
x: 5.787, | |
y: 133.316, | |
sx: 1.021, | |
sy: .956 | |
}, | |
9: { | |
x: 5.823, | |
y: 132.23, | |
sx: 1.014, | |
sy: .97 | |
}, | |
10: { | |
x: 5.859, | |
y: 131.143, | |
sx: 1.007, | |
sy: .985 | |
}, | |
11: { | |
x: 5.896, | |
y: 130.006, | |
sx: 1, | |
sy: 1 | |
}, | |
19: { | |
x: 5.923, | |
y: 129.96, | |
sx: .999, | |
sy: 1.001 | |
}, | |
20: { | |
x: 5.926, | |
y: 129.888, | |
sx: .998, | |
sy: 1.002 | |
}, | |
21: { | |
x: 5.928, | |
y: 129.817, | |
sx: .997, | |
sy: 1.003 | |
}, | |
22: { | |
x: 5.931, | |
y: 129.746, | |
sx: .996, | |
sy: 1.004 | |
}, | |
23: { | |
x: 5.934, | |
y: 129.677, | |
sx: .994, | |
sy: 1.005 | |
}, | |
24: { | |
x: 5.936, | |
y: 129.605, | |
sx: .993, | |
sy: 1.006 | |
}, | |
25: { | |
x: 5.939, | |
y: 129.534, | |
sx: .992, | |
sy: 1.007 | |
}, | |
26: { | |
x: 5.967, | |
y: 129.462, | |
sx: .991, | |
sy: 1.008 | |
}, | |
27: { | |
x: 5.969, | |
y: 129.394, | |
sx: .99, | |
sy: 1.009 | |
}, | |
28: { | |
x: 5.972, | |
y: 129.322, | |
sx: .989, | |
sy: 1.01 | |
}, | |
29: { | |
x: 5.975, | |
y: 129.25, | |
sx: .988, | |
sy: 1.011 | |
}, | |
30: { | |
x: 5.978, | |
y: 129.179, | |
sx: .987, | |
sy: 1.012 | |
}, | |
31: { | |
x: 5.98, | |
y: 129.108, | |
sx: .986, | |
sy: 1.013 | |
}, | |
32: { | |
x: 5.983, | |
y: 129.039, | |
sx: .985, | |
sy: 1.014 | |
}, | |
33: { | |
x: 5.97, | |
y: 128.997, | |
sx: .989, | |
sy: 1.01 | |
}, | |
34: { | |
x: 5.957, | |
y: 128.929, | |
sx: .993, | |
sy: 1.006 | |
}, | |
35: { | |
x: 5.918, | |
y: 128.837, | |
sx: .997, | |
sy: 1.002 | |
}, | |
36: { | |
x: 5.905, | |
y: 128.772, | |
sx: 1.002, | |
sy: .998 | |
}, | |
37: { | |
x: 5.867, | |
y: 128.705, | |
sx: 1.006, | |
sy: .994 | |
}, | |
38: { | |
x: 5.854, | |
y: 128.637, | |
sx: 1.01, | |
sy: .99 | |
}, | |
39: { | |
x: 5.853, | |
y: 128.818, | |
sx: 1.009, | |
sy: .991 | |
}, | |
40: { | |
x: 5.877, | |
y: 128.998, | |
sx: 1.008, | |
sy: .993 | |
}, | |
41: { | |
x: 5.876, | |
y: 129.154, | |
sx: 1.006, | |
sy: .994 | |
}, | |
42: { | |
x: 5.875, | |
y: 129.334, | |
sx: 1.005, | |
sy: .995 | |
}, | |
43: { | |
x: 5.899, | |
y: 129.49, | |
sx: 1.004, | |
sy: .996 | |
}, | |
44: { | |
x: 5.897, | |
y: 129.67, | |
sx: 1.003, | |
sy: .998 | |
}, | |
45: { | |
y: 129.851, | |
sx: 1.001, | |
sy: .999 | |
}, | |
46: { | |
x: 5.896, | |
y: 130.006, | |
sx: 1, | |
sy: 1 | |
}, | |
47: { | |
x: 9.374, | |
y: 130.143, | |
sx: .999, | |
kx: .022, | |
ky: -.013 | |
}, | |
48: { | |
x: 12.831, | |
y: 130.123, | |
sy: 1.001, | |
kx: .045, | |
ky: -.027 | |
}, | |
49: { | |
x: 16.768, | |
y: 130.075, | |
sx: .998, | |
kx: .07, | |
ky: -.044 | |
}, | |
50: { | |
x: 11.342, | |
y: 130.14, | |
sx: .999, | |
sy: 1, | |
kx: .035, | |
ky: -.022 | |
}, | |
51: { | |
x: 5.896, | |
y: 130.006, | |
sx: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
55: { | |
x: 6.78, | |
y: 130.133, | |
kx: -.005, | |
ky: .009 | |
}, | |
56: { | |
x: 7.178, | |
y: 130.235, | |
kx: -.013, | |
ky: .018 | |
}, | |
57: { | |
x: 7.609, | |
y: 130.264, | |
kx: -.022, | |
ky: .027 | |
}, | |
58: { | |
x: 6.965, | |
y: 130.148, | |
kx: -.009, | |
ky: .013 | |
}, | |
59: { | |
x: 5.896, | |
y: 130.006, | |
kx: 0, | |
ky: 0 | |
}, | |
64: { | |
x: 6.011, | |
y: 134.605, | |
sx: .98, | |
sy: .941 | |
}, | |
65: { | |
x: 6.126, | |
y: 139.181, | |
sx: .959, | |
sy: .882 | |
}, | |
66: { | |
x: 6.24, | |
y: 143.754, | |
sx: .939, | |
sy: .824 | |
}, | |
67: { | |
x: 6.213, | |
y: 165.609, | |
sx: .843, | |
sy: .543, | |
a: .5 | |
}, | |
68: { | |
x: 6.21, | |
y: 187.489, | |
sx: .746, | |
sy: .262, | |
a: 0 | |
} | |
}).addTimedChild(o, 0, 69, { | |
0: { | |
x: 8.4, | |
y: 160.875, | |
sx: .289, | |
sy: .053, | |
kx: 0, | |
ky: 0, | |
a: 0 | |
}, | |
1: { | |
x: 9.627, | |
y: 107.47, | |
sx: .426, | |
sy: .246, | |
a: .2 | |
}, | |
2: { | |
x: 10.855, | |
y: 54.012, | |
sx: .563, | |
sy: .439, | |
a: .4 | |
}, | |
3: { | |
x: 12.107, | |
y: .579, | |
sx: .7, | |
sy: .631, | |
a: .6 | |
}, | |
4: { | |
x: 13.334, | |
y: -52.879, | |
sx: .837, | |
sy: .824, | |
a: .8 | |
}, | |
5: { | |
x: 14.561, | |
y: -106.337, | |
sx: .974, | |
sy: 1.017, | |
a: 1 | |
}, | |
6: { | |
x: 14.635, | |
y: -101.787, | |
sx: .99, | |
sy: .997 | |
}, | |
7: { | |
x: 14.734, | |
y: -97.288, | |
sx: 1.005, | |
sy: .976 | |
}, | |
8: { | |
x: 14.808, | |
y: -92.762, | |
sx: 1.021, | |
sy: .956 | |
}, | |
9: { | |
x: 14.758, | |
y: -97.325, | |
sx: 1.014, | |
sy: .97 | |
}, | |
10: { | |
x: 14.734, | |
y: -101.888, | |
sx: 1.007, | |
sy: .985 | |
}, | |
11: { | |
x: 14.685, | |
y: -106.477, | |
sx: 1, | |
sy: 1 | |
}, | |
19: { | |
x: 14.707, | |
y: -106.775, | |
sx: 1.002, | |
sy: 1.001 | |
}, | |
20: { | |
x: 14.705, | |
y: -107.128, | |
sx: 1.003, | |
sy: 1.002 | |
}, | |
21: { | |
x: 14.727, | |
y: -107.477, | |
sx: 1.005, | |
sy: 1.003 | |
}, | |
22: { | |
x: 14.724, | |
y: -107.804, | |
sx: 1.007, | |
sy: 1.004 | |
}, | |
23: { | |
x: 14.747, | |
y: -108.125, | |
sx: 1.008, | |
sy: 1.005 | |
}, | |
24: { | |
x: 14.744, | |
y: -108.478, | |
sx: 1.01, | |
sy: 1.006 | |
}, | |
25: { | |
x: 14.742, | |
y: -108.802, | |
sx: 1.011, | |
sy: 1.007 | |
}, | |
26: { | |
x: 14.764, | |
y: -109.154, | |
sx: 1.013, | |
sy: 1.008 | |
}, | |
27: { | |
x: 14.761, | |
y: -109.5, | |
sx: 1.015, | |
sy: 1.009 | |
}, | |
28: { | |
x: 14.784, | |
y: -109.803, | |
sx: 1.016, | |
sy: 1.01 | |
}, | |
29: { | |
x: 14.781, | |
y: -110.152, | |
sx: 1.018, | |
sy: 1.011 | |
}, | |
30: { | |
x: 14.804, | |
y: -110.504, | |
sx: 1.02, | |
sy: 1.012 | |
}, | |
31: { | |
x: 14.801, | |
y: -110.828, | |
sx: 1.021, | |
sy: 1.013 | |
}, | |
32: { | |
x: 14.798, | |
y: -111.178, | |
sx: 1.023, | |
sy: 1.014 | |
}, | |
33: { | |
x: 14.787, | |
y: -110.396, | |
sx: 1.021, | |
sy: 1.01 | |
}, | |
34: { | |
x: 14.777, | |
y: -109.614, | |
sx: 1.019, | |
sy: 1.006 | |
}, | |
35: { | |
x: 14.766, | |
y: -108.858, | |
sx: 1.017, | |
sy: 1.002 | |
}, | |
36: { | |
x: 14.755, | |
y: -108.073, | |
sx: 1.014, | |
sy: .998 | |
}, | |
37: { | |
x: 14.769, | |
y: -107.317, | |
sx: 1.012, | |
sy: .994 | |
}, | |
38: { | |
x: 14.759, | |
y: -106.538, | |
sx: 1.01, | |
sy: .99 | |
}, | |
39: { | |
x: 14.746, | |
y: -106.547, | |
sx: 1.009, | |
sy: .991 | |
}, | |
40: { | |
x: 14.734, | |
y: -106.534, | |
sx: 1.008, | |
sy: .993 | |
}, | |
41: { | |
x: 14.721, | |
y: -106.521, | |
sx: 1.006, | |
sy: .994 | |
}, | |
42: { | |
x: 14.734, | |
y: -106.507, | |
sx: 1.005, | |
sy: .995 | |
}, | |
43: { | |
x: 14.722, | |
y: -106.491, | |
sx: 1.004, | |
sy: .996 | |
}, | |
44: { | |
x: 14.709, | |
y: -106.478, | |
sx: 1.003, | |
sy: .998 | |
}, | |
45: { | |
x: 14.697, | |
y: -106.465, | |
sx: 1.001, | |
sy: .999 | |
}, | |
46: { | |
x: 14.685, | |
y: -106.477, | |
sx: 1, | |
sy: 1 | |
}, | |
47: { | |
x: 14.018, | |
y: -107.098, | |
sx: .998, | |
sy: 1.001, | |
kx: .106, | |
ky: -.097 | |
}, | |
48: { | |
x: 13.334, | |
y: -107.873, | |
sx: .995, | |
sy: 1.002, | |
kx: .215, | |
ky: -.198 | |
}, | |
49: { | |
x: 12.577, | |
y: -108.757, | |
sx: .993, | |
sy: 1.003, | |
kx: .325, | |
ky: -.298 | |
}, | |
50: { | |
x: 13.683, | |
y: -107.525, | |
sx: .996, | |
sy: 1.002, | |
kx: .162, | |
ky: -.149 | |
}, | |
51: { | |
x: 14.685, | |
y: -106.477, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
55: { | |
x: 16.532, | |
y: -106.146, | |
sx: 1.001, | |
sy: .998, | |
kx: -.063, | |
ky: .066 | |
}, | |
56: { | |
x: 18.296, | |
y: -105.9, | |
sx: 1.003, | |
sy: .996, | |
kx: -.132, | |
ky: .136 | |
}, | |
57: { | |
x: 20.071, | |
y: -105.668, | |
sx: 1.004, | |
sy: .994, | |
kx: -.198, | |
ky: .202 | |
}, | |
58: { | |
x: 17.39, | |
y: -106.021, | |
sx: 1.002, | |
sy: .997, | |
kx: -.097, | |
ky: .101 | |
}, | |
59: { | |
x: 14.685, | |
y: -106.477, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
64: { | |
x: 14.333, | |
y: -87.992, | |
sx: .923, | |
sy: .941 | |
}, | |
65: { | |
x: 13.957, | |
y: -69.508, | |
sx: .847, | |
sy: .882 | |
}, | |
66: { | |
x: 13.581, | |
y: -51.023, | |
sx: .77, | |
sy: .824 | |
}, | |
67: { | |
x: 12.832, | |
y: 37.212, | |
sx: .691, | |
sy: .543, | |
a: .5 | |
}, | |
68: { | |
x: 12.058, | |
y: 125.423, | |
sx: .612, | |
sy: .262, | |
a: 0 | |
} | |
}); | |
}), e.monster04 = s.extend(function() { | |
s.call(this, { | |
duration: 1, | |
framerate: 24 | |
}); | |
var t = new e.monster04_1().setTransform(198.325, 208.075); | |
this.addChild(t); | |
}), e.monster04.assets = { | |
resolutions: { | |
"@1x": { | |
"monster04_atlas_1@1x": "monsters/monster04_atlas_1@1x.json", | |
"monster04_atlas_2@1x": "monsters/monster04_atlas_2@1x.json" | |
}, | |
"@2x": { | |
"monster04_atlas_1@2x": "monsters/monster04_atlas_1@2x.json", | |
"monster04_atlas_2@2x": "monsters/monster04_atlas_2@2x.json" | |
} | |
} | |
}; | |
}(PIXI, s = s || {}); | |
var s; | |
"undefined" != typeof t && t.exports && (t.exports = { | |
stage: s.monster04, | |
background: 16777215, | |
width: 840, | |
height: 840, | |
framerate: 24, | |
totalFrames: 1, | |
library: s | |
}); | |
}, function(t, e) { | |
"use strict"; | |
!function(t, e) { | |
var s = t.animate.MovieClip, n = t.Sprite, o = function(e) { | |
return t.Texture.fromFrame("monster05#" + e); | |
}; | |
e.head = s.extend(function() { | |
s.call(this, { | |
duration: 4 | |
}); | |
var t = new n(o("Bitmap 8")).setTransform(.625), e = new n(o("Bitmap 5")).setTransform(96.175, 108.375), r = new n(o("Bitmap 4")).setTransform(74.85, 105.525), i = new n(o("Bitmap 3")).setTransform(90.35, 39.95), a = new n(o("Bitmap 2")).setTransform(128.2, 62.85), l = new n(o("Bitmap 7")).setTransform(0, 128.7), u = new n(o("Bitmap 6")).setTransform(12.775, 41.9), c = new n(o("Bitmap 1")).setTransform(134.375, 38.275); | |
this.addTimedChild(t).addTimedChild(e, 1, 3).addTimedChild(r, 2, 2).addTimedChild(i, 2, 2).addTimedChild(a, 2, 2).addTimedChild(l, 3, 1).addTimedChild(u, 3, 1).addTimedChild(c, 3, 1); | |
}), e.body = s.extend(function() { | |
s.call(this, { | |
duration: 3 | |
}); | |
var t = new n(o("Bitmap 9")), e = new n(o("Bitmap 10")).setTransform(147.85, 53.35), r = new n(o("Bitmap 11")).setTransform(24.125, 183.325), i = new n(o("Bitmap 12")).setTransform(132.05, 173.1); | |
this.addTimedChild(t).addTimedChild(e, 1, 2).addTimedChild(r, 2, 1).addTimedChild(i, 2, 1); | |
}), e.legs = s.extend(function() { | |
s.call(this, { | |
duration: 2 | |
}); | |
var t = new n(o("Bitmap 13")).setTransform(0, 129.775), e = new n(o("Bitmap 14")).setTransform(224.075), r = new n(o("Bitmap 15")).setTransform(303.35, 109.7); | |
this.addTimedChild(t).addTimedChild(e).addTimedChild(r, 1, 1); | |
}), e.monster05_1 = s.extend(function() { | |
s.call(this, { | |
duration: 123, | |
labels: { | |
born: 0, | |
born_stop: 10, | |
death: 20, | |
death_stop: 25, | |
breath: 39, | |
breath_loop: 61, | |
hit1: 84, | |
hit1_stop: 89, | |
hit2: 110, | |
hit2_stop: 115 | |
} | |
}); | |
var t = this.legs = new e.legs(), n = this.body = new e.body(), o = this.head = new e.head(); | |
this.addTimedChild(t, 0, 123, { | |
0: { | |
x: 122.5, | |
y: 346.325, | |
sx: .387, | |
sy: .024, | |
kx: 0, | |
a: 0 | |
}, | |
1: { | |
x: 99.597, | |
y: 285.637, | |
sx: .502, | |
sy: .233, | |
a: .2 | |
}, | |
2: { | |
x: 76.694, | |
y: 224.924, | |
sx: .616, | |
sy: .442, | |
a: .4 | |
}, | |
3: { | |
x: 53.816, | |
y: 164.186, | |
sx: .731, | |
sy: .651, | |
a: .6 | |
}, | |
4: { | |
x: 30.913, | |
y: 103.498, | |
sx: .845, | |
sy: .86, | |
a: .8 | |
}, | |
5: { | |
x: 8.037, | |
y: 42.765, | |
sx: .96, | |
sy: 1.069, | |
a: 1 | |
}, | |
6: { | |
x: 4.589, | |
y: 51.417, | |
sx: .977, | |
sy: 1.047 | |
}, | |
7: { | |
x: 1.165, | |
y: 60.049, | |
sx: .994, | |
sy: 1.026 | |
}, | |
8: { | |
x: -2.259, | |
y: 68.68, | |
sx: 1.011, | |
sy: 1.004 | |
}, | |
9: { | |
x: -1.128, | |
y: 74.249, | |
sx: 1.006, | |
sy: 1.002 | |
}, | |
10: { | |
x: .006, | |
y: 79.794, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 19.018, | |
y: 148.505, | |
sx: .905, | |
sy: .744, | |
a: .88 | |
}, | |
22: { | |
x: 38.035, | |
y: 217.193, | |
sx: .81, | |
sy: .489, | |
a: .77 | |
}, | |
23: { | |
x: 57.026, | |
y: 285.857, | |
sx: .715, | |
sy: .233, | |
a: .66 | |
}, | |
24: { | |
x: 89.762, | |
y: 316.113, | |
sx: .551, | |
sy: .128, | |
a: .33 | |
}, | |
25: { | |
x: 122.523, | |
y: 346.345, | |
sx: .387, | |
sy: .024, | |
a: 0 | |
}, | |
26: { | |
x: .006, | |
y: 79.794, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: .542, | |
y: 79.815, | |
kx: -.001 | |
}, | |
41: { | |
x: 1.549, | |
y: 79.814, | |
kx: -.005 | |
}, | |
42: { | |
x: 2.573, | |
y: 79.81, | |
kx: -.009 | |
}, | |
43: { | |
x: 3.124, | |
y: 79.811, | |
kx: -.01 | |
}, | |
44: { | |
x: 4.135, | |
y: 79.813, | |
kx: -.014 | |
}, | |
45: { | |
x: 5.12, | |
y: 79.785, | |
kx: -.018 | |
}, | |
46: { | |
x: 5.691, | |
y: 79.789 | |
}, | |
47: { | |
x: 6.691, | |
y: 79.811, | |
kx: -.022 | |
}, | |
48: { | |
x: 7.714, | |
y: 79.813, | |
kx: -.026 | |
}, | |
49: { | |
x: 6.414, | |
kx: -.022 | |
}, | |
50: { | |
x: 5.12, | |
y: 79.785, | |
kx: -.018 | |
}, | |
51: { | |
x: 3.847, | |
y: 79.812, | |
kx: -.013 | |
}, | |
52: { | |
x: 2.573, | |
y: 79.81, | |
kx: -.009 | |
}, | |
53: { | |
x: 1.306, | |
y: 79.813, | |
kx: -.004 | |
}, | |
54: { | |
x: .006, | |
y: 79.794, | |
kx: 0 | |
}, | |
85: { | |
x: -4.326, | |
y: 79.785, | |
kx: .014 | |
}, | |
86: { | |
x: -9.116, | |
y: 79.813, | |
kx: .031 | |
}, | |
87: { | |
x: -6.251, | |
y: 79.81, | |
kx: .022 | |
}, | |
88: { | |
x: -2.869, | |
y: 79.808, | |
kx: .009 | |
}, | |
89: { | |
x: .006, | |
y: 79.794, | |
kx: 0 | |
}, | |
111: { | |
x: 7.557, | |
y: 79.776, | |
sy: 1.001, | |
kx: -.026 | |
}, | |
112: { | |
x: 15.11, | |
y: 79.837, | |
kx: -.053 | |
}, | |
113: { | |
x: 10.087, | |
y: 79.794, | |
kx: -.035 | |
}, | |
114: { | |
x: 5.037, | |
y: 79.773, | |
sy: 1, | |
kx: -.018 | |
}, | |
115: { | |
x: .006, | |
y: 79.794, | |
kx: 0 | |
} | |
}).addTimedChild(n, 0, 123, { | |
0: { | |
x: 149.575, | |
y: 345.475, | |
sx: .387, | |
sy: .024, | |
kx: 0, | |
ky: 0, | |
r: 0, | |
a: 0 | |
}, | |
1: { | |
x: 134.672, | |
y: 277.246, | |
sx: .502, | |
sy: .233, | |
a: .2 | |
}, | |
2: { | |
x: 119.77, | |
y: 208.993, | |
sx: .616, | |
sy: .442, | |
a: .4 | |
}, | |
3: { | |
x: 104.892, | |
y: 140.764, | |
sx: .731, | |
sy: .651, | |
a: .6 | |
}, | |
4: { | |
x: 89.99, | |
y: 72.511, | |
sx: .845, | |
sy: .86, | |
a: .8 | |
}, | |
5: { | |
x: 75.089, | |
y: 4.263, | |
sx: .96, | |
sy: 1.069, | |
a: 1 | |
}, | |
6: { | |
x: 72.84, | |
y: 13.665, | |
sx: .977, | |
sy: 1.047 | |
}, | |
7: { | |
x: 70.615, | |
y: 23.047, | |
sx: .994, | |
sy: 1.026 | |
}, | |
8: { | |
x: 68.366, | |
y: 32.451, | |
sx: 1.011, | |
sy: 1.004 | |
}, | |
9: { | |
x: 69.12, | |
y: 38.121, | |
sx: 1.006, | |
sy: 1.002 | |
}, | |
10: { | |
x: 69.877, | |
y: 43.765, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 88.291, | |
y: 113.49, | |
sx: .905, | |
sy: .744, | |
r: .044, | |
a: .88 | |
}, | |
22: { | |
x: 102.937, | |
y: 185.017, | |
sx: .81, | |
sy: .489, | |
r: .088, | |
a: .77 | |
}, | |
23: { | |
x: 113.792, | |
y: 258.095, | |
sx: .715, | |
sy: .233, | |
r: .132, | |
a: .66 | |
}, | |
24: { | |
x: 130.062, | |
y: 303.919, | |
sx: .551, | |
sy: .128, | |
r: .066, | |
a: .33 | |
}, | |
25: { | |
x: 149.598, | |
y: 345.495, | |
sx: .387, | |
sy: .024, | |
r: 0, | |
a: 0 | |
}, | |
26: { | |
x: 69.877, | |
y: 43.765, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 69.952, | |
y: 42.403, | |
sx: 1.005, | |
sy: 1.006, | |
kx: -.001 | |
}, | |
41: { | |
x: 70.584, | |
y: 40.972, | |
sx: 1.009, | |
sy: 1.012, | |
kx: -.004 | |
}, | |
42: { | |
x: 70.626, | |
y: 39.557, | |
sx: 1.014, | |
sy: 1.018, | |
kx: -.005 | |
}, | |
43: { | |
x: 71.284, | |
y: 38.132, | |
sx: 1.019, | |
sy: 1.024, | |
kx: -.009 | |
}, | |
44: { | |
x: 71.341, | |
y: 36.722, | |
sx: 1.023, | |
sy: 1.029 | |
}, | |
45: { | |
x: 71.994, | |
y: 35.328, | |
sx: 1.028, | |
sy: 1.035, | |
kx: -.013 | |
}, | |
46: { | |
x: 72.079, | |
y: 33.931, | |
sx: 1.033, | |
sy: 1.041, | |
kx: -.014 | |
}, | |
47: { | |
x: 72.732, | |
y: 32.511, | |
sx: 1.037, | |
sy: 1.047, | |
kx: -.018 | |
}, | |
48: { | |
x: 72.788, | |
y: 31.085, | |
sx: 1.042, | |
sy: 1.053 | |
}, | |
49: { | |
x: 71.704, | |
y: 34.519, | |
sx: 1.038, | |
sy: 1.037, | |
kx: -.014, | |
ky: -.001 | |
}, | |
50: { | |
x: 71.249, | |
y: 38.678, | |
sx: 1.033, | |
sy: 1.022, | |
kx: -.013, | |
ky: -.005 | |
}, | |
51: { | |
x: 70.228, | |
y: 42.85, | |
sx: 1.029, | |
sy: 1.006, | |
kx: -.009, | |
ky: -.009 | |
}, | |
52: { | |
x: 69.203, | |
y: 46.275, | |
sx: 1.024, | |
sy: .991, | |
kx: -.005, | |
ky: -.01 | |
}, | |
53: { | |
x: 68.216, | |
y: 50.453, | |
sx: 1.02, | |
sy: .975, | |
kx: -.001, | |
ky: -.014 | |
}, | |
54: { | |
x: 67.835, | |
y: 54.571, | |
sx: 1.015, | |
sy: .96, | |
kx: 0, | |
ky: -.018 | |
}, | |
55: { | |
x: 68.053, | |
y: 52.84, | |
sx: 1.013, | |
sy: .965, | |
ky: -.014 | |
}, | |
56: { | |
x: 68.336, | |
y: 51.857, | |
sx: 1.011, | |
sy: .97, | |
ky: -.013 | |
}, | |
57: { | |
x: 68.578, | |
y: 50.156, | |
sx: 1.009, | |
sy: .975, | |
ky: -.009 | |
}, | |
58: { | |
x: 68.855, | |
y: 49.169, | |
sx: 1.007, | |
sy: .98 | |
}, | |
59: { | |
x: 69.091, | |
y: 47.472, | |
sx: 1.006, | |
sy: .985, | |
ky: -.005 | |
}, | |
60: { | |
x: 69.367, | |
y: 46.481, | |
sx: 1.004, | |
sy: .99, | |
ky: -.004 | |
}, | |
61: { | |
x: 69.644, | |
y: 44.787, | |
sx: 1.002, | |
sy: .995, | |
ky: -.001 | |
}, | |
62: { | |
x: 69.877, | |
y: 43.765, | |
sx: 1, | |
sy: 1, | |
ky: 0 | |
}, | |
85: { | |
x: 65.148, | |
y: 51.042, | |
sy: .966, | |
kx: .014, | |
ky: -.022 | |
}, | |
86: { | |
x: 60.125, | |
y: 59.039, | |
sx: 1.001, | |
sy: .932, | |
kx: .031, | |
ky: -.048 | |
}, | |
87: { | |
x: 63.583, | |
y: 53.707, | |
sy: .955, | |
kx: .018, | |
ky: -.031 | |
}, | |
88: { | |
x: 66.668, | |
y: 48.385, | |
sx: 1, | |
sy: .977, | |
kx: .009, | |
ky: -.014 | |
}, | |
89: { | |
x: 69.877, | |
y: 43.765, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
111: { | |
x: 87.287, | |
y: 33.741, | |
sy: 1.015, | |
kx: -.066, | |
ky: .04 | |
}, | |
112: { | |
x: 105.969, | |
y: 23.882, | |
sx: .999, | |
sy: 1.03, | |
kx: -.136, | |
ky: .084 | |
}, | |
113: { | |
x: 93.882, | |
y: 29.938, | |
sx: 1, | |
sy: 1.02, | |
kx: -.092, | |
ky: .057 | |
}, | |
114: { | |
x: 81.412, | |
y: 37.021, | |
sy: 1.01, | |
kx: -.044, | |
ky: .027 | |
}, | |
115: { | |
x: 69.877, | |
y: 43.765, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}).addTimedChild(o, 0, 123, { | |
0: { | |
x: 135.175, | |
y: 344.475, | |
sx: .387, | |
sy: .024, | |
kx: 0, | |
ky: 0, | |
r: 0, | |
a: 0 | |
}, | |
1: { | |
x: 116.042, | |
y: 267.375, | |
sx: .502, | |
sy: .233, | |
a: .2 | |
}, | |
2: { | |
x: 96.91, | |
y: 190.275, | |
sx: .616, | |
sy: .442, | |
a: .4 | |
}, | |
3: { | |
x: 77.802, | |
y: 113.126, | |
sx: .731, | |
sy: .651, | |
a: .6 | |
}, | |
4: { | |
x: 58.67, | |
y: 36.026, | |
sx: .845, | |
sy: .86, | |
a: .8 | |
}, | |
5: { | |
x: 39.564, | |
y: -41.118, | |
sx: .96, | |
sy: 1.069, | |
a: 1 | |
}, | |
6: { | |
x: 36.627, | |
y: -30.805, | |
sx: .977, | |
sy: 1.047 | |
}, | |
7: { | |
x: 33.689, | |
y: -20.509, | |
sx: .994, | |
sy: 1.026 | |
}, | |
8: { | |
x: 30.752, | |
y: -10.22, | |
sx: 1.011, | |
sy: 1.004 | |
}, | |
9: { | |
x: 31.745, | |
y: -4.437, | |
sx: 1.006, | |
sy: 1.002 | |
}, | |
10: { | |
x: 32.715, | |
y: 1.319, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 28.129, | |
y: 108.843, | |
sx: .905, | |
sy: .744, | |
r: -.128, | |
a: .88 | |
}, | |
22: { | |
x: 34.895, | |
y: 212.922, | |
sx: .809, | |
sy: .488, | |
r: -.259, | |
a: .77 | |
}, | |
23: { | |
x: 52.447, | |
y: 310.979, | |
sx: .714, | |
sy: .233, | |
r: -.39, | |
a: .66 | |
}, | |
24: { | |
x: 93.832, | |
y: 321.674, | |
sx: .551, | |
sy: .128, | |
r: -.193, | |
a: .33 | |
}, | |
25: { | |
x: 135.198, | |
y: 344.495, | |
sx: .387, | |
sy: .024, | |
r: 0, | |
a: 0 | |
}, | |
26: { | |
x: 32.715, | |
y: 1.319, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 34.266, | |
y: -.619, | |
sy: 1.007, | |
kx: -.005, | |
ky: -.001 | |
}, | |
41: { | |
x: 35.795, | |
y: -2.53, | |
sy: 1.013, | |
kx: -.009 | |
}, | |
42: { | |
x: 37.333, | |
y: -3.95, | |
sy: 1.02, | |
kx: -.014, | |
ky: -.005 | |
}, | |
43: { | |
x: 39.362, | |
y: -5.874, | |
sy: 1.027, | |
kx: -.022 | |
}, | |
44: { | |
x: 40.933, | |
y: -7.242, | |
sx: .999, | |
sy: 1.033, | |
kx: -.027, | |
ky: -.009 | |
}, | |
45: { | |
x: 42.479, | |
y: -9.218, | |
sy: 1.04, | |
kx: -.031, | |
ky: -.01 | |
}, | |
46: { | |
x: 44.061, | |
y: -10.571, | |
sy: 1.047, | |
kx: -.036, | |
ky: -.013 | |
}, | |
47: { | |
x: 46.143, | |
y: -12.483, | |
sy: 1.053, | |
kx: -.044, | |
ky: -.014 | |
}, | |
48: { | |
x: 47.774, | |
y: -13.866, | |
sy: 1.06, | |
kx: -.048, | |
ky: -.018 | |
}, | |
49: { | |
x: 44.617, | |
y: -8.814, | |
sx: 1.002, | |
sy: 1.043, | |
kx: -.04 | |
}, | |
50: { | |
x: 41.523, | |
y: -3.185, | |
sx: 1.004, | |
sy: 1.027, | |
kx: -.031, | |
ky: -.022 | |
}, | |
51: { | |
x: 38.473, | |
y: 2.427, | |
sx: 1.007, | |
sy: 1.01, | |
kx: -.023, | |
ky: -.026 | |
}, | |
52: { | |
x: 35.405, | |
y: 7.5, | |
sx: 1.01, | |
sy: .993, | |
kx: -.014, | |
ky: -.027 | |
}, | |
53: { | |
x: 32.429, | |
y: 13.152, | |
sx: 1.012, | |
sy: .976, | |
kx: -.005, | |
ky: -.031 | |
}, | |
54: { | |
x: 29.948, | |
y: 18.825, | |
sx: 1.015, | |
sy: .96, | |
kx: 0, | |
ky: -.035 | |
}, | |
55: { | |
x: 30.281, | |
y: 16.647, | |
sx: 1.013, | |
sy: .965, | |
ky: -.031 | |
}, | |
56: { | |
x: 30.641, | |
y: 14.462, | |
sx: 1.011, | |
sy: .97, | |
ky: -.026 | |
}, | |
57: { | |
x: 30.964, | |
y: 12.278, | |
sx: 1.009, | |
sy: .975, | |
ky: -.022 | |
}, | |
58: { | |
x: 31.31, | |
y: 10.082, | |
sx: 1.008, | |
sy: .98, | |
ky: -.018 | |
}, | |
59: { | |
x: 31.642, | |
y: 7.884, | |
sx: 1.006, | |
sy: .985, | |
ky: -.013 | |
}, | |
60: { | |
x: 31.998, | |
y: 5.723, | |
sx: 1.004, | |
sy: .99, | |
ky: -.009 | |
}, | |
61: { | |
x: 32.367, | |
y: 3.538, | |
sx: 1.002, | |
sy: .995, | |
ky: -.004 | |
}, | |
62: { | |
x: 32.715, | |
y: 1.319, | |
sx: 1, | |
sy: 1, | |
ky: 0 | |
}, | |
85: { | |
x: 15.447, | |
y: 23.017, | |
sx: 1.025, | |
sy: .987, | |
kx: .079, | |
ky: -.105 | |
}, | |
86: { | |
x: .626, | |
y: 46.836, | |
sx: 1.051, | |
sy: .973, | |
kx: .157, | |
ky: -.214 | |
}, | |
87: { | |
x: 10.19, | |
y: 30.623, | |
sx: 1.034, | |
sy: .982, | |
kx: .105, | |
ky: -.14 | |
}, | |
88: { | |
x: 20.906, | |
y: 15.6, | |
sx: 1.017, | |
sy: .991, | |
kx: .052, | |
ky: -.07 | |
}, | |
89: { | |
x: 32.715, | |
y: 1.319, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
111: { | |
x: 69.503, | |
y: -20.043, | |
sx: .999, | |
sy: 1.002, | |
kx: -.172, | |
ky: .123 | |
}, | |
112: { | |
x: 109.279, | |
y: -37.127, | |
sx: .998, | |
sy: 1.003, | |
kx: -.351, | |
ky: .25 | |
}, | |
113: { | |
x: 82.751, | |
y: -26.456, | |
sx: .999, | |
sy: 1.002, | |
kx: -.233, | |
ky: .166 | |
}, | |
114: { | |
x: 57.015, | |
y: -13.582, | |
sy: 1.001, | |
kx: -.115, | |
ky: .083 | |
}, | |
115: { | |
x: 32.715, | |
y: 1.319, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
} | |
}); | |
}), e.monster05 = s.extend(function() { | |
s.call(this, { | |
duration: 1, | |
framerate: 24 | |
}); | |
var t = this.monster05 = new e.monster05_1().setTransform(10, 47.45); | |
this.addChild(t); | |
}), e.monster05.assets = { | |
resolutions: { | |
"@1x": { | |
"monster05_atlas_1@1x": "monsters/monster05_atlas_1@1x.json", | |
"monster05_atlas_2@1x": "monsters/monster05_atlas_2@1x.json", | |
"monster05_atlas_3@1x": "monsters/monster05_atlas_3@1x.json" | |
}, | |
"@2x": { | |
"monster05_atlas_1@2x": "monsters/monster05_atlas_1@2x.json", | |
"monster05_atlas_2@2x": "monsters/monster05_atlas_2@2x.json", | |
"monster05_atlas_3@2x": "monsters/monster05_atlas_3@2x.json" | |
} | |
} | |
}; | |
}(PIXI, s = s || {}); | |
var s; | |
"undefined" != typeof t && t.exports && (t.exports = { | |
stage: s.monster05, | |
background: 16777215, | |
width: 840, | |
height: 840, | |
framerate: 24, | |
totalFrames: 1, | |
library: s | |
}); | |
}, function(t, e) { | |
"use strict"; | |
!function(t, e) { | |
var s = t.animate.MovieClip, n = t.Container, o = t.Sprite, r = function(e) { | |
return t.Texture.fromFrame("monster06#" + e); | |
}; | |
e.head = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 1")); | |
this.addChild(t); | |
}), e.Symbol_2 = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 3")); | |
this.addChild(t); | |
}), e.s11 = s.extend(function() { | |
s.call(this, { | |
duration: 22 | |
}); | |
var t = new e.Symbol_2(); | |
this.addTimedChild(t, 0, 22, { | |
0: { | |
x: 0, | |
y: 0, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
1: { | |
x: -1.825, | |
y: 3.7, | |
sx: 1.001, | |
sy: .999, | |
kx: .013, | |
ky: -.022 | |
}, | |
2: { | |
x: -3.6, | |
y: 7.375, | |
sx: 1.002, | |
sy: .998, | |
kx: .027, | |
ky: -.044 | |
}, | |
3: { | |
x: -5.675, | |
y: 11.1, | |
sx: 1.003, | |
sy: .997, | |
kx: .044, | |
ky: -.066 | |
}, | |
4: { | |
x: -7.275, | |
y: 14.85, | |
sx: 1.004, | |
sy: .996, | |
kx: .057, | |
ky: -.088 | |
}, | |
5: { | |
x: -8.8, | |
y: 18.625, | |
sx: 1.005, | |
sy: .995, | |
kx: .071, | |
ky: -.11 | |
}, | |
6: { | |
x: -10.575, | |
y: 22.975, | |
sx: 1.006, | |
sy: .994, | |
kx: .088, | |
ky: -.136 | |
}, | |
7: { | |
x: -7.25, | |
y: 17.75, | |
sx: 1.005, | |
kx: .058, | |
ky: -.105 | |
}, | |
8: { | |
x: -4.175, | |
y: 12.625, | |
sx: 1.004, | |
sy: .995, | |
kx: .031, | |
ky: -.075 | |
}, | |
9: { | |
x: -.575, | |
y: 7.6, | |
sy: .996, | |
kx: .001, | |
ky: -.044 | |
}, | |
10: { | |
x: 2.375, | |
y: 2.7, | |
sx: 1.003, | |
sy: .997, | |
kx: -.022, | |
ky: -.014 | |
}, | |
11: { | |
x: 5.925, | |
y: -1.6, | |
sx: 1.002, | |
kx: -.049, | |
ky: .013 | |
}, | |
12: { | |
x: 10, | |
y: -5.75, | |
sx: 1.001, | |
sy: .998, | |
kx: -.079, | |
ky: .04 | |
}, | |
13: { | |
x: 13.825, | |
y: -10.35, | |
sy: .999, | |
kx: -.105, | |
ky: .071 | |
}, | |
14: { | |
x: 18.175, | |
y: -14.775, | |
sx: 1, | |
kx: -.135, | |
ky: .101 | |
}, | |
15: { | |
x: 15.8, | |
y: -13, | |
kx: -.118, | |
ky: .088 | |
}, | |
16: { | |
x: 13.425, | |
y: -11.225, | |
kx: -.101, | |
ky: .075 | |
}, | |
17: { | |
x: 11.075, | |
y: -9.375, | |
sy: 1, | |
kx: -.084, | |
ky: .062 | |
}, | |
18: { | |
x: 8.775, | |
y: -8, | |
kx: -.066, | |
ky: .052 | |
}, | |
19: { | |
x: 6.875, | |
y: -6.05, | |
kx: -.052, | |
ky: .039 | |
}, | |
20: { | |
x: 4.6, | |
y: -4.075, | |
kx: -.035, | |
ky: .026 | |
}, | |
21: { | |
x: 2.325, | |
y: -2.075, | |
kx: -.018, | |
ky: .013 | |
} | |
}); | |
}), e.Symbol_3 = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 4")); | |
this.addChild(t); | |
}), e.s10 = s.extend(function() { | |
s.call(this, { | |
duration: 15 | |
}); | |
var t = new e.Symbol_3(); | |
this.addTimedChild(t, 0, 15, { | |
0: { | |
x: 0, | |
y: 0, | |
sx: 1, | |
sy: 1 | |
}, | |
1: { | |
x: .9, | |
sx: .992, | |
sy: 1.017 | |
}, | |
2: { | |
x: 1.8, | |
sx: .984, | |
sy: 1.035 | |
}, | |
3: { | |
x: 2.675, | |
sx: .976, | |
sy: 1.052 | |
}, | |
4: { | |
x: 3.575, | |
y: .025, | |
sx: .968, | |
sy: 1.07 | |
}, | |
5: { | |
x: 1.8, | |
y: 0, | |
sx: .984, | |
sy: 1.041 | |
}, | |
6: { | |
x: .025, | |
sx: 1, | |
sy: 1.013 | |
}, | |
7: { | |
x: -1.75, | |
y: .025, | |
sx: 1.016, | |
sy: .984 | |
}, | |
8: { | |
x: -3.525, | |
sx: 1.032, | |
sy: .956 | |
}, | |
9: { | |
x: -5.3, | |
y: 0, | |
sx: 1.048, | |
sy: .927 | |
}, | |
10: { | |
x: -4.45, | |
y: .025, | |
sx: 1.041, | |
sy: .939 | |
}, | |
11: { | |
x: -3.6, | |
sx: 1.033, | |
sy: .95 | |
}, | |
12: { | |
x: -2.75, | |
sx: 1.025, | |
sy: .962 | |
}, | |
13: { | |
x: -1.9, | |
sx: 1.017, | |
sy: .974 | |
}, | |
14: { | |
x: -1.05, | |
y: 0, | |
sx: 1.01, | |
sy: .985 | |
} | |
}); | |
}), e.Symbol_1 = n.extend(function() { | |
n.call(this); | |
var t = new o(r("Bitmap 2")); | |
this.addChild(t); | |
}), e.s9 = s.extend(function() { | |
s.call(this, { | |
duration: 22 | |
}); | |
var t = new e.Symbol_1(); | |
this.addTimedChild(t, 0, 22, { | |
0: { | |
x: 0, | |
y: 0, | |
sx: 1, | |
sy: 1, | |
kx: 0, | |
ky: 0 | |
}, | |
1: { | |
x: 1.65, | |
y: .15, | |
sx: 1.002, | |
sy: .998, | |
kx: -.013, | |
ky: .031 | |
}, | |
2: { | |
x: 3.25, | |
y: .275, | |
sx: 1.005, | |
sy: .997, | |
kx: -.026, | |
ky: .062 | |
}, | |
3: { | |
x: 4.875, | |
y: .425, | |
sx: 1.007, | |
sy: .995, | |
kx: -.039, | |
ky: .093 | |
}, | |
4: { | |
x: 6.475, | |
y: .6, | |
sx: 1.01, | |
sy: .994, | |
kx: -.052, | |
ky: .127 | |
}, | |
5: { | |
x: 8.1, | |
y: .8, | |
sx: 1.012, | |
sy: .992, | |
kx: -.066, | |
ky: .158 | |
}, | |
6: { | |
x: 9.725, | |
y: 1, | |
sx: 1.015, | |
sy: .991, | |
kx: -.079, | |
ky: .189 | |
}, | |
7: { | |
x: 11.325, | |
y: 1.25, | |
sx: 1.017, | |
sy: .989, | |
kx: -.092, | |
ky: .223 | |
}, | |
8: { | |
x: 7.65, | |
y: .9, | |
sx: 1.015, | |
sy: .991, | |
kx: -.062, | |
ky: .18 | |
}, | |
9: { | |
x: 4.35, | |
y: .7, | |
sx: 1.013, | |
sy: .992, | |
kx: -.035, | |
ky: .14 | |
}, | |
10: { | |
x: 1.1, | |
y: .575, | |
sx: 1.011, | |
sy: .993, | |
kx: -.009, | |
ky: .097 | |
}, | |
11: { | |
x: -2.2, | |
y: .55, | |
sx: 1.009, | |
sy: .995, | |
kx: .018, | |
ky: .057 | |
}, | |
12: { | |
x: -5.5, | |
y: .65, | |
sx: 1.007, | |
sy: .996, | |
kx: .044, | |
ky: .014 | |
}, | |
13: { | |
x: -9.2, | |
y: .8, | |
sx: 1.004, | |
sy: .997, | |
kx: .074, | |
ky: -.022 | |
}, | |
14: { | |
x: -12.5, | |
y: 1.075, | |
sx: 1.002, | |
sy: .998, | |
kx: .101, | |
ky: -.066 | |
}, | |
15: { | |
x: -10.875, | |
y: .85, | |
kx: .088, | |
ky: -.057 | |
}, | |
16: { | |
x: -9.25, | |
y: .675, | |
sx: 1.001, | |
sy: .999, | |
kx: .075, | |
ky: -.048 | |
}, | |
17: { | |
x: -7.625, | |
y: .5, | |
kx: .062, | |
ky: -.04 | |
}, | |
18: { | |
x: -6, | |
y: .375, | |
kx: .048, | |
ky: -.031 | |
}, | |
19: { | |
x: -4.375, | |
y: .25, | |
kx: .035, | |
ky: -.022 | |
}, | |
20: { | |
x: -2.75, | |
y: .15, | |
sx: 1, | |
sy: 1, | |
kx: .022, | |
ky: -.014 | |
}, | |
21: { | |
x: -1.125, | |
y: .05, | |
kx: .009, | |
ky: -.005 | |
} | |
}); | |
}), e.body = s.extend(function() { | |
s.call(this, { | |
duration: 3 | |
}); | |
var t = new e.s9().setTransform(223.7, 1.15), n = new e.s10().setTransform(79.275, 26.45), i = new e.s11().setTransform(0, .025), a = new o(r("Bitmap 5")).setTransform(144.85, 119.45), l = new o(r("Bitmap 6")), u = new o(r("Bitmap 9")), c = new o(r("Bitmap 11")), y = new o(r("Bitmap 7")).setTransform(133.45, 198.175), d = new o(r("Bitmap 10")).setTransform(141.325, 53.775), p = new o(r("Bitmap 12")).setTransform(220.7, 146.9), x = new o(r("Bitmap 8")).setTransform(134.7, 189.525), f = new o(r("Bitmap 14")).setTransform(215.025, 77.55), h = new o(r("Bitmap 13")).setTransform(223.075, 143.25), m = new o(r("Bitmap 15")).setTransform(153.125, 98.175), g = new o(r("Bitmap 16")).setTransform(165.55, 66.9); | |
this.addTimedChild(t).addTimedChild(n).addTimedChild(i).addTimedChild(a).addTimedChild(l, 0, 1, { | |
0: { | |
x: 133.45, | |
y: 198.175 | |
} | |
}).addTimedChild(u, 0, 1, { | |
0: { | |
x: 141.325, | |
y: 53.775 | |
} | |
}).addTimedChild(c, 0, 1, { | |
0: { | |
x: 220.7, | |
y: 146.875 | |
} | |
}).addTimedChild(y, 1, 2).addTimedChild(d, 1, 2).addTimedChild(p, 1, 2).addTimedChild(x, 1, 2).addTimedChild(f, 1, 2).addTimedChild(h, 1, 2).addTimedChild(m, 2, 1).addTimedChild(g, 2, 1); | |
}), e.legs = s.extend(function() { | |
s.call(this, { | |
duration: 3 | |
}); | |
var t = new o(r("Bitmap 17")), e = new o(r("Bitmap 18")).setTransform(-.025, -.75), n = new o(r("Bitmap 19")).setTransform(73.775, 128.05), i = new o(r("Bitmap 20")).setTransform(17.7, 92.225); | |
this.addTimedChild(t, 0, 1).addTimedChild(e, 1, 2).addTimedChild(n, 2, 1).addTimedChild(i, 2, 1); | |
}), e.monster06_1 = s.extend(function() { | |
s.call(this, { | |
duration: 135, | |
labels: { | |
born: 0, | |
born_stop: 10, | |
death: 20, | |
death_stop: 25, | |
breath: 39, | |
breath_loop: 61, | |
hit1: 84, | |
hit1_stop: 89, | |
hit2: 110, | |
hit2_stop: 115 | |
} | |
}); | |
var t = this.legs = new e.legs(), n = this.body = new e.body(), o = this.head = new e.head(); | |
this.addTimedChild(t, 0, 135, { | |
0: { | |
x: 179.4, | |
y: 367.05, | |
sx: .223, | |
sy: .025, | |
kx: 0, | |
a: 0 | |
}, | |
1: { | |
x: 169.212, | |
y: 317.021, | |
sx: .363, | |
sy: .162, | |
a: .2 | |
}, | |
2: { | |
x: 158.991, | |
y: 266.999, | |
sx: .504, | |
sy: .299, | |
a: .4 | |
}, | |
3: { | |
x: 148.794, | |
y: 216.952, | |
sx: .644, | |
sy: .437, | |
a: .6 | |
}, | |
4: { | |
x: 138.57, | |
y: 166.904, | |
sx: .785, | |
sy: .574, | |
a: .8 | |
}, | |
5: { | |
x: 128.36, | |
y: 116.851, | |
sx: .925, | |
sy: .711, | |
a: 1 | |
}, | |
6: { | |
x: 125.309, | |
y: 137.129, | |
sx: .967, | |
sy: .791 | |
}, | |
7: { | |
x: 122.273, | |
y: 157.427, | |
sx: 1.009, | |
sy: .871 | |
}, | |
8: { | |
x: 119.211, | |
y: 177.698, | |
sx: 1.051, | |
sy: .95 | |
}, | |
9: { | |
x: 121.177, | |
y: 170.029, | |
sx: 1.025, | |
sy: .975 | |
}, | |
10: { | |
x: 123.106, | |
y: 162.359, | |
sx: 1, | |
sy: 1 | |
}, | |
21: { | |
x: 130.59, | |
y: 208.881, | |
sx: .897, | |
sy: .733, | |
a: .8 | |
}, | |
22: { | |
x: 138.048, | |
y: 255.403, | |
sx: .794, | |
sy: .465, | |
a: .6 | |
}, | |
23: { | |
x: 145.482, | |
y: 301.899, | |
sx: .69, | |
sy: .198, | |
a: .4 | |
}, | |
24: { | |
x: 162.447, | |
y: 334.484, | |
sx: .457, | |
sy: .111, | |
a: .2 | |
}, | |
25: { | |
x: 179.397, | |
y: 367.069, | |
sx: .223, | |
sy: .025, | |
a: 0 | |
}, | |
26: { | |
x: 123.106, | |
y: 162.359, | |
sx: 1, | |
sy: 1, | |
a: 1 | |
}, | |
40: { | |
x: 123.529, | |
y: 161.868, | |
sx: .995, | |
sy: 1.002 | |
}, | |
41: { | |
x: 123.912, | |
y: 161.352, | |
sx: .989, | |
sy: 1.004 | |
}, | |
42: { | |
x: 124.324, | |
y: 160.859, | |
sx: .984, | |
sy: 1.006 | |
}, | |
43: { | |
x: 124.708, | |
y: 160.348, | |
sx: .978, | |
sy: 1.009 | |
}, | |
44: { | |
x: 125.094, | |
y: 159.83, | |
sx: .973, | |
sy: 1.011 | |
}, | |
45: { | |
x: 125.478, | |
y: 159.338, | |
sx: .967, | |
sy: 1.013 | |
}, | |
46: { | |
x: 125.865, | |
y: 158.822, | |
sx: .962, | |
sy: 1.015 | |
}, | |
47: { | |
x: 126.248, | |
y: 158.286, | |
sx: .957, | |
sy: 1.017 | |
}, | |
48: { | |
x: 125.492, | |
y: 159.593, | |
sx: .967, | |
sy: 1.012 | |
}, | |
49: { | |
x: 124.697, | |
y: 160.896, | |
sx: .978, | |
sy: 1.006 | |
}, | |
50: { | |
x: 123.913, | |
y: 162.205, | |
sx: .989, | |
sy: 1.001 | |
}, | |
51: { | |
x: 123.117, | |
y: 163.513, | |
sx: 1, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment