! function() {
    define("skbJet/component/resourceLoader/resourceLib", [], function() {
        return {}
    }), define("skbJet/component/resourceLoader/Util", [], function() {
        var e = {};
        return e.httpGetJson = function(t, n, o) {
            e.httpGetText(t, function(e) {
                n(JSON.parse(e))
            }, o)
        }, e.httpGetText = function(e, t, n) {
            var o = new XMLHttpRequest;
            o.addEventListener("load", function(e) {
                e.target.status >= 200 && e.target.status < 300 ? t(e.target.responseText) : n()
            }), o.addEventListener("error", n), o.addEventListener("timeout", n), o.open("GET", e), o.send()
        }, e.removeQueryStr = function(e) {
            var t = e.match(/(.*)\?/);
            return t ? t[1] : e
        }, e.getFileNameFromPath = function(e) {
            var t = e.match(/\/?([^\/]+)$/);
            return t ? t[1] : e
        }, e.getFileExt = function(t, n) {
            t = e.removeQueryStr(t), t = e.getFileNameFromPath(t);
            var o = t.match(/\.(\w+)$/);
            return o && o[1] ? n ? o[1].toLowerCase() : o[1] : null
        }, e.getFileNameWithoutExt = function(t) {
            t = e.removeQueryStr(t), t = e.getFileNameFromPath(t);
            var n = t.match(/(.*)(\.\w+)+$/);
            return n ? n[1] : t
        }, e.getParentFolder = function(t) {
            t = e.removeQueryStr(t);
            var n = e.getFileNameFromPath(t);
            return t.substring(0, t.length - n.length)
        }, e
    }), define("skbJet/component/resourceLoader/LoaderContext", [], function() {
        function e(e, t, n) {
            this.assetPackUrl = e, this.languageCode = t, this.skinCode = n, this.totalResAmount = 0, this.currentLoaded = 0, this.gameFolder = null, this.i18nParent = null, this.queryStr = "", window._cacheFlag && window._cacheFlag.queryStr && (this.queryStr = window._cacheFlag.queryStr), this.fileListMap = {
                i18n: null
            }, this.subLoaderMap = {}, this.onFileLoaded = function() {}, this.onLoadFailed = function() {}
        }
        return e
    }), define("skbJet/component/resourceLoader/LoaderChainHandler", [], function() {
        function e() {}
        return e.prototype.next = null, e.prototype.handle = null, e
    }), define("skbJet/component/resourceLoader/handlers/languageListHandler", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderChainHandler"], function(e, t) {
        function n(e, t) {
            for (var n = {}, o = 0; o < e.length; o++) n[e[o]] = [e[o].toLowerCase()], e[o].indexOf("_") > -1 ? n[e[o]].push(e[o].replace("_", "-").toLowerCase()) : e[o].indexOf("-") > -1 && n[e[o]].push(e[o].replace("-", "_").toLowerCase());
            var r;
            for (var a in n)
                if (n[a].indexOf("i18n/" + t.languageCode.toLowerCase() + ".json") >= 0) {
                    r = a.substring(a.lastIndexOf("/") + 1, a.lastIndexOf("."));
                    break
                }
            if (!r)
                for (var a in n)
                    if (n[a].indexOf("i18n/default.json") >= 0) {
                        r = a.substring(a.lastIndexOf("/") + 1, a.lastIndexOf("."));
                        break
                    }
            if (!r)
                for (var a in n)
                    if (n[a].indexOf("i18n/en.json") >= 0) {
                        r = a.substring(a.lastIndexOf("/") + 1, a.lastIndexOf("."));
                        break
                    }
            return !!r && (t.languageCode = r, !0)
        }

        function o(t) {
            var n = t.gameFolder,
                o = !1;
            if (window.location.search.match(/&?custom=true&?/) && (o = !0), window.gtk && window.gtk.jLottery && window.gtk.jLottery.embeddedParams && window.gtk.jLottery.embeddedParams.custom && (o = !0), o) {
                var r, a = window.location.pathname;
                a.match(/\/splash\.html$/) || a.match(/\/launcher\.html$/) ? (r = e.getParentFolder(a), r = r.match(/\/([^\/]+\/)$/)[1]) : r = t.gameFolder.match(/\/([^\/]+\/)$/)[1], n = "/custom_lang/" + t.skinCode + "/" + r
            }
            return n
        }
        var r = new t;
        return r.handle = function(t) {
            t.languageCode = t.languageCode || "default", t.languageCode = t.languageCode.toLowerCase();
            var a = t.assetPackUrl.substring(0, t.assetPackUrl.lastIndexOf("/"));
            t.gameFolder = a.substring(0, a.lastIndexOf("/") + 1), t.i18nParent = o(t), e.httpGetJson(t.i18nParent + "i18n.json" + t.queryStr, function(e) {
                n(e.i18n, t) ? r.next.handle(t) : t.onLoadFailed()
            }, t.onLoadFailed)
        }, r
    }), define("skbJet/component/resourceLoader/handlers/skinListHandler", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderChainHandler"], function(e, t) {
        function n(e, t) {
            for (var n = 0; n < e.length; n++) {
                var o = e[n];
                if (o = o.substring(o.lastIndexOf("/") + 1, o.lastIndexOf(".")), t.skinCode.toLowerCase() === o.toLowerCase()) return
            }
            t.skinCode = "default"
        }
        var o = new t;
        return o.handle = function(t) {
            t.skinCode = t.skinCode || "default";
            var r = t.i18nParent + "i18n/" + t.languageCode + ".json" + t.queryStr;
            e.httpGetJson(r, function(e) {
                n(e[t.languageCode], t), o.next.handle(t)
            }, t.onLoadFailed)
        }, o
    }), define("skbJet/component/resourceLoader/handlers/fileListHandler", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderChainHandler"], function(e, t) {
        function n(e, t, n, o) {
            o.fileListMap[e] || (o.fileListMap[e] = {});
            for (var r = 0; r < t.length; r++) o.fileListMap[e][t[r]] = n
        }

        function o(t, o) {
            var a = t.assetPackUrl + ".json" + t.queryStr;
            e.httpGetJson(a, function(e) {
                for (var a in e) n(a, e[a], t.gameFolder + "assetPacks/", t);
                var s = t.assetPackUrl.substring(t.assetPackUrl.lastIndexOf("assetPacks"));
                o && o.indexOf(t.skinCode + "/" + s + ".json") > -1 ? r(t, s) : i.next.handle(t)
            }, t.onLoadFailed)
        }

        function r(t, o) {
            var r = t.i18nParent + "i18n/" + t.languageCode + "/" + t.skinCode + "/",
                a = r + o + ".json" + t.queryStr;
            e.httpGetJson(a, function(e) {
                for (var o in e) n(o, e[o], r + "assetPacks/", t);
                i.next.handle(t)
            }, t.onLoadFailed)
        }

        function a(t) {
            var r = t.i18nParent + "i18n/",
                a = r + t.languageCode + "/",
                i = a + t.skinCode + ".json" + t.queryStr;
            e.httpGetJson(i, function(e) {
                n("i18n", e[t.skinCode], a, t), o(t, e.assetPacks)
            }, t.onLoadFailed)
        }
        var i = new t;
        return i.handle = a, i
    }), define("skbJet/component/resourceLoader/handlers/fileLoadHandler", ["skbJet/component/resourceLoader/LoaderChainHandler"], function(e) {
        function t(e, t, n) {
            setTimeout(function() {
                e.load(t, n)
            }, 1)
        }
        var n = new e;
        return n.handle = function(e) {
            for (var n in e.fileListMap) e.subLoaderMap[n] && t(e.subLoaderMap[n], e.fileListMap[n], {
                onFileLoaded: e.onFileLoaded,
                onLoadFailed: e.onLoadFailed,
                queryStr: e.queryStr
            })
        }, n.addSubLoader = function(e, t, n) {
            e.subLoaderMap[t] = n
        }, n.summary = function(e) {
            var t = 0,
                n = 0,
                o = !0;
            for (var r in e.fileListMap) e.subLoaderMap[r] && (t += e.subLoaderMap[r].getTotal(), n += e.subLoaderMap[r].getCurrent(), o = o && e.subLoaderMap[r].isComplete());
            return {
                total: t,
                current: n,
                complete: o
            }
        }, n
    }), define("skbJet/component/resourceLoader/ResourceLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderContext", "skbJet/component/resourceLoader/handlers/languageListHandler", "skbJet/component/resourceLoader/handlers/skinListHandler", "skbJet/component/resourceLoader/handlers/fileListHandler", "skbJet/component/resourceLoader/handlers/fileLoadHandler"], function(e, t, n, o, r, a) {
        function i(e, i, s) {
            this.context = new t(e, i, s), this.loadChain = [n, o, r, a]
        }
        var s;
        return i.prototype.load = function(e, t) {
            for (var n = 0; n < this.loadChain.length - 1; n++) this.loadChain[n].next = this.loadChain[n + 1];
            this.context.onFileLoaded = e, this.context.onLoadFailed = t, this.loadChain[0].handle(this.context)
        }, i.prototype.addSubLoader = function(e, t) {
            a.addSubLoader(this.context, e, t)
        }, i.prototype.currentProgress = function() {
            return a.summary(this.context)
        }, i.initDefault = function(e, t, n) {
            if (s) throw "Default loader already inited.";
            s = new i(e, t, n)
        }, i.getDefault = function() {
            return s
        }, i.setDefault = function(e) {
            s = e
        }, i.prototype.addHeartBeat = function(e, t) {
            function n() {
                var t = o.currentProgress();
                if (t.complete) return clearInterval(o.heartBeatInterval), void(o.heartBeatInterval = null);
                e(t)
            }
            var o = this;
            o.heartBeatInterval && (clearInterval(o.heartBeatInterval), o.heartBeatInterval = null), t || (t = 5e3), o.heartBeatInterval = setInterval(n, t)
        }, i.prototype.removeHeartBeat = function() {
            var e = this;
            if (e.heartBeatInterval) return clearInterval(e.heartBeatInterval), void(e.heartBeatInterval = null)
        }, i
    }), define("skbJet/component/resourceLoader/AbstractSubLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/resourceLib"], function(e, t) {
        function n() {}

        function o() {}
        return o.prototype._initOptions = function(e, n) {
            this._count = {
                total: 0,
                current: 0,
                complete: !1
            }, this.options = n || {}, this.options.type = this.options.type || e, t[this.options.type] || (t[this.options.type] = {})
        }, o.prototype.getTotal = function() {
            return this._count.total
        }, o.prototype.getCurrent = function() {
            return this._count.current
        }, o.prototype.isComplete = function() {
            return this._count.complete
        }, o.prototype._prepareLoad = function(e) {
            e = e || {}, this._count.total = 0, this._count.current = 0, e.queryStr = e.queryStr ? e.queryStr : "", e.onFileLoaded = e.onFileLoaded ? e.onFileLoaded : n, e.onLoadFailed = e.onLoadFailed ? e.onLoadFailed : n;
            for (var t in e) this.options[t] = e[t]
        }, o.prototype.load = function(n, o) {
            this._prepareLoad(o);
            var r = [];
            for (var a in n)
                if (n[a]) {
                    if (this.options.fileExtFilterList) {
                        var i = e.getFileExt(a, !0);
                        if (this.options.fileExtFilterList.indexOf(i) < 0) continue
                    }
                    this._count.total++, r.push(a)
                }
            if (0 === this._count.total) return this._count.complete = !0, void this.options.onFileLoaded();
            for (var s = this, d = 0; d < r.length; d++) {
                var a = r[d];
                this._doLoadFile(n[a] + a + this.options.queryStr, function(e) {
                    return function(n) {
                        s._count.current++, s._count.current === s._count.total && (s._count.complete = !0), t[s.options.type] = t[s.options.type] || {}, t[s.options.type][e] = n, s.options.onFileLoaded()
                    }
                }(e.getFileNameWithoutExt(a)), this.options.onLoadFailed)
            }
        }, o.prototype._doLoadFile = function(e, t, n) {
            throw "Not implemented yet. Params: url:" + e + "   success:" + t + "   fail:" + n
        }, o
    }), define("game/loaders/locHtmlTagSubLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/AbstractSubLoader"], function(e, t) {
        function n(e, t) {
            this._initOptions("_html_tags", e), o = "default", ["en-us", "en-ca", "fr-ca"].indexOf(t.toLowerCase()) >= 0 && (o = "us")
        }
        var o = "default";
        return n.prototype = new t, n.prototype._doLoadFile = function(e, t, n) {
            var r = document.createElement(this.options.tagName);
            if (e.indexOf("/" + o + "/") < 0) t(r);
            else {
                var r = document.createElement(this.options.tagName);
                if (r.onload = function() {
                        t(r)
                    }, r.onerror = n, this.options.parentTag && this.options.parentTag.appendChild(r), this.options.tagAttributes)
                    for (var a in this.options.tagAttributes) r.setAttribute(a, this.options.tagAttributes[a]);
                r.src = e
            }
        }, n
    }), define("skbJet/component/resourceLoader/subLoaders/TextFilesSubLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/AbstractSubLoader"], function(e, t) {
        function n(e) {
            this._initOptions("_text_files", e)
        }
        return n.prototype = new t, n.prototype._doLoadFile = function(t, n, o) {
            "json" === e.getFileExt(t, !0) && this.options.parseJson ? e.httpGetJson(t, n, o) : e.httpGetText(t, n, o)
        }, n
    }), define("splash/loadController", ["skbJet/component/resourceLoader/ResourceLoader", "game/loaders/locHtmlTagSubLoader", "skbJet/component/resourceLoader/subLoaders/TextFilesSubLoader"], function(e, t, n) {
        function o(o) {
            var r = window.location.search.match(/&?assetPack=(\w+)&?/)[1],
                a = window.location.search.match(/&?language=([^&]+)&?/)[1],
                i = window.location.search.match(/&?skincode=(\w+)&?/)[1];
            e.initDefault("assetPacks/" + r, a, i);
            var s = e.getDefault(),
                d = new n({
                    type: "i18n",
                    parseJson: !0
                });
            d.origLoad = d.load, d.load = function(e, t) {
                for (var n in e) n.match(/splash\.json$/) || delete e[n];
                this.origLoad(e, t)
            }, s.addSubLoader("i18n", d), s.addSubLoader("splashSprites", new n({
                type: "splash",
                parseJson: !0,
                fileExtFilterList: ["json"]
            })), s.addSubLoader("splash", new t({
                type: "splash",
                tagName: "img",
                fileExtFilterList: ["jpg", "png"]
            }, a)), s.load(function() {
                s.currentProgress().complete && o && o()
            }, function() {})
        }
        return {
            load: o
        }
    }), define("splash", ["skbJet/component/resourceLoader/resourceLib", "splash/loadController"], function(e, t) {
        function n() {
            f.clearRect(0, 0, h.width, h.height);
            var t = h.width > h.height,
                n = 1,
                o = e.splash.activityAnimBackground;
            h.height < o.height * (t ? 3.6 : 4) ? n = h.height / (t ? 810 : 1440) * 2 : h.width < 1.5 * o.width && (n = h.width / (1.5 * o.width));
            var i = 30 * n,
                s = h.height - (o.height * n >> 1) - i,
                d = o.width * n,
                l = o.height * n,
                u = -(d >> 1) + (h.width >> 1),
                c = -(l >> 1) + s - h.height / 8;
            if (a(s, l), f.drawImage(o, u, c, d, l), y) {
                var g = 12 * n,
                    m = 12 * n,
                    w = u + m,
                    v = c + g,
                    b = (d - 2 * m) / (100 / L),
                    k = l - 2 * g,
                    x = f.createLinearGradient(0, 0, 0, v - k + 40);
                x.addColorStop(1, "black"), x.addColorStop(.99, "#8B7900"), x.addColorStop(.98, "#FFDA00"), f.fillStyle = x, f.fillRect(w, v, b, k), f.save()
            }
            var F = e.splash.igtLogo,
                C = F.width * n,
                J = F.height * n,
                S = u + d - C,
                _ = c - J - 30;
            f.drawImage(F, S, _, C, J), f.fillStyle = "#FFFFFF", f.textAlign = "center", f.textBaseline = "middle", f.lineWidth = 3, f.strokeStyle = "black";
            var P = 20 * (n + .2);
            n < .5 ? (f.font = 20 * (n + .2) + "px Arial", P = 20 * (n + .3)) : f.font = 20 * n + "px Arial";
            for (var I = h.width >> 1, O = c + l + 30, E = p.split("\n"), T = 0; T < E.length; T++) f.strokeText(E[T], I, O + T * P), f.fillText(E[T], I, O + T * P);
            y || r(), f.restore()
        }

        function o() {
            if (window.WebGLRenderingContext) {
                var e = document.createElement("canvas"),
                    t = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"],
                    n = !1;
                for (var o in t) try {
                    if (null !== (n = e.getContext(t[o])) && n instanceof WebGLRenderingContext) return !0
                } catch (e) {
                    return !1
                }
                return !1
            }
            return !1
        }

        function r() {
            var t = e.i18n.splash.splashScreen.webGLError,
                n = 0,
                o = 0,
                r = 1;
            f.textAlign = "center", f.textBaseline = "middle", f.font = "40px Arial";
            for (var a = t.split("\n"), i = 0; i < a.length; i++) {
                var s = f.measureText(a[i]).width + 50;
                s > n && (n = s), o += 50
            }
            o += 50, n >= h.width - 20 && (r = (h.width - 20) / n, n = h.width - 20);
            var d = h.width >> 1,
                l = h.height >> 1,
                u = d - n / 2,
                c = l - o / 2;
            f.fillStyle = "#f9dcac", f.lineJoin = "round", f.lineWidth = 20, f.strokeRect(u + 10, c + 10, n - 20, o - 20), f.fillRect(u + 10, c + 10, n - 20, o - 20), c += 50, f.lineWidth = 1, f.fillStyle = "#000000", f.textAlign = "center", f.textBaseline = "middle", f.font = 40 * r + "px Arial";
            for (var a = t.split("\n"), i = 0; i < a.length; i++) f.strokeText(a[i], d, c + 50 * i), f.fillText(a[i], d, c + 50 * i)
        }

        function a(t, n) {
            var o = e.splash.TPIR_splashBG,
                r = o.height / o.width,
                a = t + (n >> 1) >> 1,
                i = t,
                s = o.width * (i / o.height);
            h.width < .6 * s && (s = h.width + .4 * h.width, i = s * r), v = (h.width >> 1) - (s >> 1), b = a - (i >> 1), k = s, x = i, f.drawImage(o, v, b, k, x)
        }

        function i(e) {
            e.data && e.data.loaded && (L = e.data.loaded)
        }

        function s() {
            h.width = window.innerWidth, h.height = window.innerHeight
        }

        function d() {
            var e = Date.now(),
                t = Math.min(50, e - g);
            (L < 100 || window.frameElement && "block" === window.frameElement.style.display) && (g = e, requestAnimationFrame(d)), m += t / (1e3 / 30), n()
        }

        function l() {
            document.body.style.backgroundColor = "desktop" === w ? "#000000" : "#00204A"
        }

        function u() {
            p = e.i18n.splash.splashScreen.footer.shortVersion, c = e.splash.loaderSprite.frames, w = window.location.search.match(/&?assetPack=([^&]+)&?/)[1], s(), d(), window.addEventListener("resize", s), window.addEventListener("message", i, !1)
        }
        var c, h = document.getElementById("loadingCanvas"),
            f = h.getContext("2d"),
            p = "",
            L = 0,
            g = Date.now(),
            m = 0,
            w = null,
            v = null,
            b = null,
            k = null,
            x = null,
            y = !0;
        return function() {
            y = o(), t.load(u), w = window.location.search.match(/&?assetPack=([^&]+)&?/)[1], l()
        }(), {}
    })
}();