! function() {
    define("splash", [], function() {
        function e(e) {
            var t, a = window.location.search.match(/&?language=(\w+)&?/)[1],
                o = window.location.search.match(/&?skincode=(\w+)&?/)[1];
            n("i18n/" + a + ".json", function(n) {
                var i = n.target;
                if (404 !== i.status) {
                    var s = JSON.parse(i.responseText),
                        r = s[a];
                    t = r.indexOf(a + "/" + o + ".json") > -1 ? "i18n/" + a + "/" + o : "i18n/" + a + "/default"
                }
                e(t)
            })
        }

        function t(t, a) {
            var o = "assetPacks/" + t;
            e(function(e) {
                n(e + ".json", function(i) {
                    var s = i.target;
                    if (404 !== s.status) {
                        var r = JSON.parse(s.responseText);
                        if (r.assetPacks) {
                            var l = e.substring(e.lastIndexOf("/") + 1);
                            r.assetPacks.indexOf(l + "/assetPacks/" + f + ".json") > -1 && n(e + "/assetPacks/" + f + ".json", function(n) {
                                var i = n.target;
                                if (404 !== i.status) {
                                    var s = JSON.parse(i.responseText);
                                    for (var r in s)
                                        if (s[r].indexOf(t) > -1) {
                                            o = e + "/assetPacks/" + t;
                                            break
                                        }
                                }
                                a(o)
                            })
                        } else a(o)
                    }
                })
            })
        }

        function n(e, t) {
            var n = new XMLHttpRequest;
            n.withCredentials = !0, n.addEventListener("load", function(e) {
                e.target.status >= 200 && e.target.status < 300 && t(e)
            }), n.open("GET", e), n.send()
        }

        function a(e) {
            n(e, function(e) {
                var t = e.target;
                if (404 !== t.status) {
                    var n = JSON.parse(t.responseText);
                    Object.freeze(n), w = n.splashScreen.footer.shortVersion
                }
            })
        }

        function o() {
            g.beginPath(), g.fillStyle = "#666666", g.moveTo(279 * h, 422 * h), g.lineTo(681 * h, 422 * h), g.arcTo(685 * h, 422 * h, 685 * h, 426 * h, 4 * h), g.arcTo(685 * h, 430 * h, 681 * h, 430 * h, 4 * h), g.lineTo(279 * h, 430 * h), g.arcTo(275 * h, 430 * h, 275 * h, 426 * h, 4 * h), g.arcTo(275 * h, 422 * h, 279 * h, 422 * h, 4 * h), g.closePath(), g.fill()
        }

        function i() {
            var e = 4 * m;
            g.beginPath();
            var t = g.createLinearGradient(280 * h, 424 * h, (280 + e) * h, 424 * h);
            t.addColorStop(0, "#FFD900"), t.addColorStop(.25, "#FF9900"), t.addColorStop(.5, "#FF3300"), t.addColorStop(.75, "#FF9900"), t.addColorStop(1, "#FFD900"), g.fillStyle = t, g.moveTo(280 * h, 424 * h), g.lineTo((280 + e) * h, 424 * h), g.arcTo((280 + e + 2) * h, 424 * h, (280 + e + 2) * h, 426 * h, 2 * h), g.arcTo((280 + e + 2) * h, 428 * h, (280 + e) * h, 428 * h, 2 * h), g.lineTo(280 * h, 428 * h), g.arcTo(278 * h, 428 * h, 278 * h, 426 * h, 2 * h), g.arcTo(278 * h, 424 * h, 280 * h, 424 * h, 2 * h), g.closePath(), g.fill()
        }

        function s() {
            v && (g.drawImage(v, 278.5 * h, 107 * h, 403 * h, 326 * h), v = null, u.style.backgroundColor = "black")
        }

        function r() {
            w && (g.save(), g.textBaseline = "middle", g.textAlign = "center", g.font = "desktop" === f ? 16 * h + "px Arial" : 24 * h + "px Arial", g.fillStyle = "#FFFFFF", g.fillText(w, 480 * h, 520 * h), g.restore(), w = null)
        }

        function l() {
            s(), o(), i(), r(), m < 100 && c(l)
        }

        function c(e) {
            window.requestAnimationFrame ? requestAnimationFrame(e) : setTimeout(e, 100)
        }

        function d() {
            var e = Number(document.documentElement.clientWidth),
                t = Number(document.documentElement.clientHeight),
                n = u.style;
            if (t / e > .5625) {
                var a = e / 1920;
                n.width = e + "px", n.height = Math.floor(1080 * a) + "px", n.top = Math.floor((t - 1080 * a) / 2) + "px", n.left = "0px"
            } else {
                var a = t / 1080;
                n.width = Math.floor(1920 * a) + "px", n.height = t + "px", n.top = "0px", n.left = Math.floor((e - 1920 * a) / 2) + "px"
            }
        }
        var f = window.location.search.match(/&?assetPack=(\w+)&?/)[1],
            u = document.getElementById("loadingCanvas"),
            h = 1,
            p = window._cacheFlag.queryStr;
        "desktop" === f && (u.width = 1920, u.height = 1080, h = 2);
        var v, w, g = u.getContext("2d"),
            m = 0;
        ! function() {
            var e = new Image;
            e.onload = function() {
                v = e
            }, t(f + "/splash/loading.png", function(t) {
                e.src = t + p
            })
        }(),
        function() {
            var e = window.location.search.match(/&?language=(\w+)&?/)[1],
                t = window.location.search.match(/&?skincode=(\w+)&?/)[1];
            n("i18n/" + e + ".json", function(n) {
                var o = n.target;
                if (404 !== o.status) {
                    for (var i = "i18n/" + e + "/default/splash.json", s = JSON.parse(o.responseText), r = s[e], l = 0; l < r.length; l++)
                        if (r[l].indexOf(e + "/" + t + ".json") > -1) {
                            i = "i18n/" + e + "/" + t + "/splash.json";
                            break
                        }
                    a(i)
                }
            })
        }(), c(l), window.addEventListener("message", function(e) {
            var t = e.data.loaded || null;
            null !== t && (m = Number(t))
        }, !1), d(), window.addEventListener("load", d), window.addEventListener("resize", d)
    })
}();