<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">! function() {
    "use strict";
    class s {
        static getInstance() {
            return s.instance ? s.instance : s.instance = new s
        }
        constructor() {
            this.allCache = {}, this.singleCache = {}, this.aliveList = []
        }
        addRes(s, o) {
            this.singleCache[s] = o
        }
        produceNode(s, o) {
            var d = this.getFromCatch(s);
            d || (d = Laya.Sprite3D.instantiate(this.getSingleRes(s))), o.addChild(d), d.active = !0, d.visible = !0;
            let h = o._children.length;
            return d.zOrder = h, d.transform.localScale = new Laya.Vector3(1, 1, 1), d.transform.localPosition = new Laya.Vector3(0, 0, 0), this.aliveList.find(s =&gt; s == d) || this.aliveList.push(d), d
        }
        addToCatch(s) {
            s.active = !1, s.removeSelf();
            for (var o = 0; o &lt; this.aliveList.length; o++)
                if (this.aliveList[o] == s) {
                    this.aliveList.splice(o, 1);
                    break
                }
            let d = s.name,
                h = this.allCache[d];
            h || (h = [], this.allCache[d] = h), h.find(o =&gt; o == s) || this.allCache[d].push(s)
        }
        changeAliveToCache() {
            for (var s = 0; s &lt; this.aliveList.length; s++) {
                let o = this.aliveList[s];
                o.active = !1, o.removeSelf();
                let d = o.name;
                this.allCache[d].push(o)
            }
            this.aliveList.splice(0, this.aliveList.length)
        }
        getFromCatch(s) {
            let o = this.allCache[s];
            if (!o) return this.allCache[s] = [], null;
            if (o.length &gt; 0) {
                return o.splice(o.length - 1, 1)[0]
            }
            return null
        }
        getSingleRes(s) {
            return this.singleCache[s]
        }
        DoDestroy() {
            for (var s in this.allCache) {
                let d = this.allCache[s];
                for (var o = 0; d &amp;&amp; o &lt; d.length; o++) d[o].destroy();
                d.splice(0, d.length)
            }
            for (o = 0; o &lt; this.aliveList.length; o++) {
                let s = this.aliveList[o];
                s &amp;&amp; s.destroy()
            }
            this.aliveList.splice(0, this.aliveList.length)
        }
    }
    class o {}
    o.collider_tag = {}, o.state_para = {}, o.game_state = {}, o.shareIdConfig = {}, o.gameType = {
        infinite: 0,
        level: 1
    }, o.prefab_path = {
        fight: "prefabs/fight_pb.json",
        rank: "prefabs/rank_pb.json",
        main: "prefabs/main_pb.json",
        sucDialog: "prefabs/sucDialog_pb.json",
        shop: "prefabs/shop.json",
        failDialog: "prefabs/failDialog_pb.json",
        getVitalityDialog: "prefabs/getVitalityDialog_pb.json",
        relife: "prefabs/layer_relife_pb.json",
        sign: "prefabs/sign_pb.json",
        getSkin: "prefabs/getSkin_pb.json",
        guide: "prefabs/guide_pb.json"
    }, o.parent_path = {
        main: "main_ui",
        fight: "fight_ui",
        top: "top_ui",
        dialog: "dialog_ui"
    }, o.laya_event = {
        createBridge: "LAYA_EVENT_CREATEBRIDGE",
        passLevel: "LAYA_EVENT_PASSLEVEL",
        changeAim: "LAYA_EVENT_CHANGEAIM",
        startGame: "LAYA_EVENT_STARTGAME",
        showMain: "LAYA_EVENT_SHOWMAIN",
        changeSkin: "LAYA_EVENT_CHANGESKIN",
        playFlash: "LAYA_EVENT_PLAYFLASH",
        showWord: "LAYA_EVENT_SHOWWORD",
        cameraShake: "LAYA_EVENT_CAMERASHAKE",
        saveRole: "LAYA_EVENT_SAVEROLE",
        changeCoin: "LAYA_EVENT_CHANGECOIN",
        changeVitality: "LAYA_EVENT_CHANGEVIT",
        showRank: "LAYA_EVENT_SHOWRANK",
        hideRank: "LAYA_EVENT_HIDERANK",
        showSkin: "LAYA_EVENT_SHOWSKIN",
        hideSkin: "LAYA_EVENT_HIDESKIN",
        showFailDialog: "LAYA_EVENT_SHOWFAILDIALOG",
        hideFailDialog: "LAYA_EVENT_HIDEFAILDIALOG",
        showGetVitality: "LAYA_EVENT_SHOWGETVITALITY",
        hideGetVitality: "LAYA_EVENT_HIDEGETVITALITY",
        showRelife: "LAYA_EVENT_SHOWRELIFE",
        hideRelife: "LAYA_EVENT_HIDERELIFE",
        showSucDialog: "LAYA_EVENT_SHOWSUCDIALOG",
        hideSucDialog: "LAYA_EVENT_HIDESUCDIALOG",
        showFight: "LAYA_EVENT_SHOWFIGHT",
        hideFight: "LAYA_EVENT_HIDEFIGHT",
        showSign: "LAYA_EVENT_SHOWSIGN",
        hideSign: "LAYA_EVENT_HIDESIGN",
        showGetSkin: "LAYA_EVENT_SHOWGETSKIN",
        hideGetSkin: "LAYA_EVENT_HIDEGETSKIN",
        showGuide: "LAYA_EVENT_SHOWGUIDE",
        hideGuide: "LAYA_EVENT_HIDEGUIDE"
    };
    class d {
        constructor() {}
    }
    d.findChild = function(s, o) {
        var d;
        if (null != (d = s.getChildByName(o))) return d;
        for (var h = null, p = 0; p &lt; s.numChildren; p++)
            if (null != (h = this.findChild(s.getChildAt(p), o))) return h;
        return null
    }, d.getAllChildrenByName = function(s, o) {
        var d = [];
        if (0 == s._children.length) return [];
        for (let h = 0; h &lt; s._children.length; h++) {
            let p = s._children[h];
            if (p.name == o) d.push(p);
            else {
                let s = this.getAllChildrenByName(p, o);
                d = d.concat(s)
            }
        }
        return d
    }, d.Clamp = function(s, o, d) {
        return s &lt; d ? d : s &gt; o ? o : s
    }, d._noNULL = function(s) {
        return null != s &amp;&amp; null != s &amp;&amp; "" != s || 0 == s
    }, d.dateFormat = function(s) {
        var o = parseInt(s / 6e4).toString(),
            d = parseInt(s % 6e4 / 1e3).toString();
        return "0" + o + ":" + (d = 1 == d.length ? "0" + d : d)
    }, d.isSameDay = function(s, o) {
        let d = new Date(s),
            h = new Date(o);
        return d.setHours(0, 0, 0, 0) == h.setHours(0, 0, 0, 0)
    };
    class h extends Laya.Script3D {
        constructor() {
            super()
        }
        onAwake() {
            this.moveIndex = null, Laya.eventMgr.on(o.laya_event.createBridge, this, s =&gt; {
                d._noNULL(this.moveIndex) &amp;&amp; (this.moveIndex += s, this.achieveRoad = !1, Laya.timer.clear(this, this.roleMove), this.animator.play("pao"), Laya.timer.loop(20, this, this.roleMove))
            }), this.animator = this.owner.getChildByName("role").getComponent(Laya.Animator), Laya.eventMgr.on(o.laya_event.passLevel, this, this.runToStayPos), this.emojsAnimator = this.owner.getChildByName("Quad").getComponent(Laya.Animator)
        }
        onEnable() {
            this.moveIndex = null, this.realIndex = null, this.owner.getComponent(Laya.PhysicsCollider).enabled = !0;
            var s = parseInt(7 * Math.random() + 6, 10);
            Laya.timer.loop(.5 * s * 1e3, this, this.showEmojsTime)
        }
        onDisable() {
            this.moveIndex = null, this.realIndex = null, Laya.timer.clear(this, this.showEmojsTime), Laya.timer.clear(this, this.roleMove)
        }
        getCurvePoint(s, o, h) {
            h = d.Clamp(h, 1, 0);
            var p = s.x + (o.x - s.x) * h,
                A = s.y + (o.y - s.y) * h,
                S = s.z + (o.z - s.z) * h;
            return new Laya.Vector3(p, A, S)
        }
        onTriggerEnter(s) {
            -1 == Laya.roleGrp.indexOf(this.owner) &amp;&amp; (Laya.timer.clear(this, this.showEmojsTime), this.owner.getComponent(Laya.PhysicsCollider).enabled = !1, Laya.roleGrp.push(this.owner), this.detailTime = 0, this.realIndex = Laya.roleGrp.indexOf(this.owner), this.moveIndex = Laya.roleGrp.indexOf(this.owner), this.nowIndex = this.owner.transform.position.clone(), this.distance = Laya.Vector3.distance(this.nowIndex, Laya.moveIndexArr[this.moveIndex].transform.position), this.animator.play("pao"), Laya.timer.loop(20, this, this.roleMove), Laya.eventMgr.event(o.laya_event.saveRole))
        }
        showEmojsTime() {
            this.emojsAnimator.play("emojs", 0, 0)
        }
        runToStayPos() {
            if (this.realIndex || 0 == this.realIndex) {
                Laya.timer.clear(this, this.roleMove), this.endDetailTime = 0, this.stayIndex = this.realIndex, this.realIndex &gt;= Laya.endStayPos._children.length &amp;&amp; (this.stayIndex = this.realIndex % Laya.endStayPos._children.length);
                var s = Laya.endStayPos._children[this.stayIndex];
                this.nowIndex = this.owner.transform.position.clone(), this.distanceEnd = Laya.Vector3.distance(this.nowIndex, s.transform.position), Laya.timer.loop(20, this, this.roleMoveEndPos)
            }
        }
        roleMoveEndPos() {
            this.endDetailTime += 20;
            var s = 5e3 * this.distanceEnd,
                o = this.endDetailTime / s,
                d = this.getCurvePoint(this.nowIndex, Laya.endStayPos._children[this.stayIndex].transform.position, o);
            this.owner.transform.position = d, o &gt;= 1 &amp;&amp; (this.endDetailTime = 0, console.log("end"), Laya.timer.clear(this, this.roleMoveEndPos))
        }
        roleMove() {
            this.detailTime += 20;
            var s = 1e4 * this.distance,
                o = this.detailTime / s,
                d = this.getCurvePoint(this.nowIndex, Laya.moveIndexArr[this.moveIndex].transform.position, o);
            if (this.owner.transform.lookAt(d, new Laya.Vector3(0, 1, 0), !1), this.owner.transform.rotationEuler = new Laya.Vector3(this.owner.transform.rotationEuler.x, this.owner.transform.rotationEuler.y + 180, this.owner.transform.rotationEuler.z), this.owner.transform.position = d, o &gt;= 1)
                if (this.detailTime = 0, this.moveIndex == this.realIndex) this.animator.play("dance"), console.log("åˆ°è¾¾ç»ˆç‚¹"), this.achieveRoad = !0, Laya.timer.clear(this, this.roleMove);
                else {
                    this.moveIndex--, this.nowIndex = this.owner.transform.position.clone();
                    var h = Laya.moveIndexArr[this.moveIndex].transform.position.clone();
                    this.distance = Laya.Vector3.distance(this.nowIndex, h)
                }
        }
    }
    class p extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            console.error("hwenge layer_base. onAwake.................................."), this.blockEvent &amp;&amp; (this.owner.on(Laya.Event.MOUSE_UP, this, (function(s) {
                s.stopPropagation()
            })), this.owner.on(Laya.Event.MOUSE_DOWN, this, (function(s) {
                s.stopPropagation()
            })))
        }
        show(s, o) {
            this.uiMgr = o, this.paraData = s, this.onShow()
        }
        preload(s, o) {
            this.uiMgr = o, this.paraData = s, this.owner.active = !1, this.owner.visible = !1, this.onPreload()
        }
        hide() {
            this.onHidden()
        }
        onShow() {}
        onPreload() {}
        onHidden() {}
    }
    class A {
        static getInstance() {
            return A.instance ? A.instance : A.instance = new A
        }
        constructor() {
            this._uiList = []
        }
        setBaseNode(s) {
            this.parentNode = s
        }
        show(s, o, d, h, A = !1) {
            let S = this.getParentNode(o),
                comShow = s =&gt; {
                    s.visible = !0, s.active = !0, A &amp;&amp; (s.alpha = 0, Laya.Tween.to(s, {
                        alpha: 1
                    }, 500, Laya.Ease.linearIn, Laya.Handler.create(this, () =&gt; {})));
                    let o = s.getComponent(p);
                    o &amp;&amp; o.show(d, this), h &amp;&amp; h(s)
                },
                E = this.getFromCatch(s);
            E ? comShow(E) : Laya.loader.load(s, Laya.Handler.create(this, o =&gt; {
                var d = new Laya.Prefab;
                d.json = o;
                let h = d.create();
                h.x = 0, h.y = 0, S.addChild(h), comShow(h), this._uiList.push({
                    key: s,
                    value: h
                })
            }))
        }
        preload(s, o, d, h) {
            let A = this.getParentNode(o),
                comShow = s =&gt; {
                    let o = s.getComponent(p);
                    o &amp;&amp; o.preload(d, this), h &amp;&amp; h(s)
                },
                S = this.getFromCatch(s);
            S ? comShow(S) : Laya.loader.create(s, Laya.Handler.create(this, o =&gt; {
                var d = new Laya.Prefab;
                d.json = o;
                let h = d.create();
                h.x = 0, h.y = 0, A.addChild(h), comShow(h), this._uiList.push({
                    key: s,
                    value: h
                })
            }))
        }
        getFromCatch(s) {
            for (var o = this._uiList.length - 1; o &gt;= 0; o--) {
                let d = this._uiList[o];
                if (d.value &amp;&amp; d.key == s) return d.value
            }
            return null
        }
        hide(s, o = !1) {
            o ? Laya.Tween.to(s, {
                alpha: 0
            }, 500, Laya.Ease.linearOut, Laya.Handler.create(this, () =&gt; {
                s.visible = !1, s.active = !1
            })) : (s.visible = !1, s.active = !1);
            let d = s.getComponent(p);
            d &amp;&amp; d.hide()
        }
        hidePath(s) {
            let o = this.getFromCatch(s);
            o &amp;&amp; this.hide(o)
        }
        showThembe() {
            Laya.loader.create("prefab/layer_thembe_pb.json", Laya.Handler.create(this, s =&gt; {
                var o = new Laya.Prefab;
                o.json = s;
                let d = o.create();
                d.x = 0, d.y = 0, Laya.stage.addChildAt(d, 0)
            }))
        }
        getParentNode(s) {
            return this.parentNode.getChildByName(s)
        }
    }
    class S extends Laya.Script3D {
        constructor() {
            super()
        }
        onAwake() {
            this.shakeTime = 0, this.shakeNum = .001, Laya.eventMgr.on(o.laya_event.cameraShake, this, () =&gt; {
                this.shakeTime = 300
            }), this.camera = this.owner.getChildByName("Camera"), Laya.timer.loop(20, this, this.cameraShake)
        }
        cameraShake() {
            this.shakeTime &lt;= 0 || (this.shakeTime -= 20, this.camera.transform.localPositionX &lt;= -.002 ? this.shakeNum = .002 : this.camera.transform.localPositionX &gt;= .002 &amp;&amp; (this.shakeNum = -.002), this.camera.transform.localPositionX += this.shakeNum)
        }
    }
    class E extends Laya.Script3D {
        constructor() {
            super()
        }
        onAwake() {
            Laya.timer.loop(20, this, () =&gt; {
                this.owner.meshRenderer.material.tilingOffsetW -= .01
            })
        }
    }
    class L extends Laya.Script3D {
        constructor() {
            super()
        }
        onAwake() {
            Laya.eventMgr.on(o.laya_event.changeAim, this, s =&gt; {
                s ? (this.flashState = 0, Laya.timer.loop(100, this, this.playFlash)) : (this.BridgeMiddle.active = !0, this.BridgeMiddleBlue.active = !1, this.BridgeMiddleRed.active = !1, Laya.timer.clear(this, this.playFlash))
            });
            var s = this.owner.getChildByName("Bridge Root").getChildByName("BridgeAssetIndicator").getChildByName("BridgeAssetNew");
            this.BridgeMiddleBlue = s.getChildByName("BridgeMiddleBlue"), this.BridgeMiddleRed = s.getChildByName("BridgeMiddleRed"), this.BridgeMiddle = s.getChildByName("BridgeMiddle")
        }
        playFlash() {
            this.BridgeMiddle.active = 0 == this.flashState, this.BridgeMiddleBlue.active = 1 == this.flashState, this.BridgeMiddleRed.active = 2 == this.flashState, this.flashState++, this.flashState &gt; 2 &amp;&amp; (this.flashState = 0)
        }
    }
    let w = Laya.SoundManager;
    var b = new class {
        constructor() {
            this._bgId = null, this._audioStatus = !0, this._muted = !1, this._shakeStatus = !0, this._soundExt = null, this._lastBgUrl = null, this._bgStatus = "", w.useAudioMusic = !0, w.autoReleaseSound = !1
        }
        get audioStatus() {
            return this._audioStatus
        }
        set audioStatus(s) {
            this._audioStatus = s, this.muted = !s
        }
        get muted() {
            return this._muted
        }
        set muted(s) {
            if (s || this._audioStatus) switch (this._muted = s, Lq.pfName) {
                case "cy":
                case "hago":
                    w.muted = s;
                    break;
                default:
                    let o = s ? 0 : 1;
                    w.setMusicVolume(o), w.setSoundVolume(o)
            }
        }
        get shakeStatus() {
            return this._shakeStatus
        }
        set shakeStatus(s) {
            this._shakeStatus = s
        }
        get soundExt() {
            if (null !== this._soundExt) return this._soundExt;
            let s = ".mp3";
            return window.conch &amp;&amp; (s = ".wav"), this._soundExt = s, s
        }
        init(s) {}
        playMusic(s = "play", o, d = 0, h) {
            switch (h = h || function() {}, s) {
                case "play":
                    if (!this._audioStatus || this._muted || !o) return;
                    if (o = this.formatUrl(o), this._lastBgUrl === o &amp;&amp; this._bgId) switch (this._bgStatus) {
                        case "play":
                            return this._bgId;
                        case "pause":
                            return this._bgId.resume(), this._bgStatus = "play", this._bgId
                    }
                    return this._lastBgUrl = o, this._bgId = w.playMusic(o, d, new Laya.Handler(this, h)), this._bgStatus = "play", this._bgId;
                case "pause":
                    if (!this._bgId || this._bgId.isStopped) return;
                    setTimeout(() =&gt; {
                        this._bgId.pause(), this._bgStatus = "pause"
                    }, 10);
                    break;
                case "resume":
                    if (!this._audioStatus || !this._bgId) return;
                    setTimeout(() =&gt; {
                        this._bgId.resume(), this._bgStatus = "play"
                    }, 10);
                    break;
                case "stop":
                    if (!this._bgId) return;
                    setTimeout(() =&gt; {
                        this._bgId.stop(), this._lastBgUrl = null, this._bgStatus = "stop"
                    }, 10)
            }
        }
        playSound(s, o = 1, d) {
            this._audioStatus &amp;&amp; !this._muted &amp;&amp; s &amp;&amp; (s = this.formatUrl(s), d = d || function() {}, w.playSound(s, o, new Laya.Handler(this, d)))
        }
        stopSound(s) {
            s &amp;&amp; (s = this.formatUrl(s), w.stopSound(s))
        }
        shake() {}
        formatUrl(s) {
            return s.lastIndexOf(".") &gt; -1 &amp;&amp; (s = s.substring(0, s.lastIndexOf("."))), s + this.soundExt
        }
    };
    class _ extends Laya.Scene {
        constructor() {
            super(), this.landColor = [new Laya.Vector4(.7450981, .2745098, .3529412, 1), new Laya.Vector4(.7450981, .2352941, .1960784, 1), new Laya.Vector4(.5882353, .4705882, .1568628, 1), new Laya.Vector4(.1960784, .5882353, .1960784, 1)], this.invincibleTime = 0, this.lvInfo = {
                curLv: 0,
                curScene: null,
                nextLv: 0,
                nextScene: null,
                isFirst: !0,
                isLoading: !1
            }
        }
        onAwake() {
            this.rotateSpeed = .12, this.loadScene(), A.getInstance().setBaseNode(this), this.main_ui = this.getChildByName("main_ui"), this.main_pb = this.main_ui.getChildByName("main_pb"), this.fight_ui = this.getChildByName("fight_ui"), Laya.eventMgr.on(o.laya_event.changeAim, this, s =&gt; {
                Laya.invincible = !!s, s &amp;&amp; (this.invincibleTime = 3);
                var o = s ? 1.5 : 1;
                this.bridgeAim.transform.scale = new Laya.Vector3(o, o, o)
            }), Laya.eventMgr.on(o.laya_event.startGame, this, () =&gt; {
                if (this.levelScene) {
                    if (Laya.userData.Vitality &lt;= 0) return console.log("ä½“åŠ›ä¸è¶³"), void Laya.eventMgr.event(o.laya_event.showGetVitality);
                    Laya.userData.Vitality == Laya.curWx.MoreConfig.maxVatality &amp;&amp; (Laya.userData.AddVitalityTime = (new Date).getTime()), Laya.userData.Vitality--, Laya.eventMgr.event(o.laya_event.refreshTitle), this.main_pb.visible = !1, this.main_pb.active = !1, this.fight_ui.visible = !0, this.fight_ui.active = !0, Laya.timer.once(500, this, () =&gt; {
                        Laya.inFight = !0
                    }), Laya.eventMgr.event(o.laya_event.showFight), this.lvInfo.isFirst ? (this.lvInfo.isFirst = !1, this.loadLevel((s, o) =&gt; {
                        this.lvInfo.nextLv = s, this.lvInfo.nextScene = o
                    })) : this.refreshLevel()
                }
            }), Laya.eventMgr.on(o.laya_event.changeSkin, this, () =&gt; {
                let s = "res/skin/" + Laya.userData.HeroId + ".png";
                Laya.Texture2D.load(s, Laya.Handler.create(null, s =&gt; {
                    this.frontLevel.getChildByName("BridgePrefabTemp").meshRenderer.sharedMaterial.albedoTexture = s
                }))
            }), Laya.eventMgr.on(o.laya_event.showMain, this, () =&gt; {
                this.main_pb.visible = !0, this.main_pb.active = !0, Laya.eventMgr.event(o.laya_event.hideFight), this.refreshLevel()
            }), Laya.eventMgr.on(o.laya_event.showRank, this, () =&gt; {
                Laya.curWx.postMessageToChild({
                    action: "FriendRank"
                }), A.getInstance().show(o.prefab_path.rank, o.parent_path.main)
            }), Laya.eventMgr.on(o.laya_event.hideRank, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.rank)
            }), Laya.eventMgr.on(o.laya_event.showSkin, this, () =&gt; {
                A.getInstance().show(o.prefab_path.shop, o.parent_path.main)
            }), Laya.eventMgr.on(o.laya_event.hideSkin, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.shop)
            }), Laya.eventMgr.on(o.laya_event.showGetVitality, this, () =&gt; {
                A.getInstance().show(o.prefab_path.getVitalityDialog, o.parent_path.main)
            }), Laya.eventMgr.on(o.laya_event.hideGetVitality, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.getVitalityDialog)
            }), Laya.eventMgr.on(o.laya_event.showRelife, this, () =&gt; {
                A.getInstance().show(o.prefab_path.relife, o.parent_path.top)
            }), Laya.eventMgr.on(o.laya_event.hideRelife, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.relife)
            }), Laya.eventMgr.on(o.laya_event.showFailDialog, this, () =&gt; {
                A.getInstance().show(o.prefab_path.failDialog, o.parent_path.dialog)
            }), Laya.eventMgr.on(o.laya_event.hideFailDialog, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.failDialog)
            }), Laya.eventMgr.on(o.laya_event.showSucDialog, this, () =&gt; {
                A.getInstance().show(o.prefab_path.sucDialog, o.parent_path.dialog)
            }), Laya.eventMgr.on(o.laya_event.hideSucDialog, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.sucDialog)
            }), Laya.eventMgr.on(o.laya_event.showFight, this, () =&gt; {
                A.getInstance().show(o.prefab_path.fight, o.parent_path.main)
            }), Laya.eventMgr.on(o.laya_event.hideFight, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.fight)
            }), Laya.eventMgr.on(o.laya_event.showSign, this, () =&gt; {
                A.getInstance().show(o.prefab_path.sign, o.parent_path.dialog)
            }), Laya.eventMgr.on(o.laya_event.hideSign, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.sign)
            }), Laya.eventMgr.on(o.laya_event.showGetSkin, this, s =&gt; {
                A.getInstance().show(o.prefab_path.getSkin, o.parent_path.dialog, s)
            }), Laya.eventMgr.on(o.laya_event.hideGetSkin, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.getSkin)
            }), Laya.eventMgr.on(o.laya_event.showGuide, this, s =&gt; {
                A.getInstance().show(o.prefab_path.guide, o.parent_path.top, s)
            }), Laya.eventMgr.on(o.laya_event.hideGuide, this, () =&gt; {
                A.getInstance().hidePath(o.prefab_path.guide)
            }), Laya.inFight = !1, Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown)
        }
        loadScene() {
            Laya.Scene3D.load("res/subpackages/layascene/LayaScene_SampleScene/Conventional/SampleScene.ls", Laya.Handler.create(this, this.loadSceneComplete))
        }
        loadSceneComplete(o) {
            this.getChildByName("fight_ui").addChild(o), this.cur3dScene = o, this.camera = o.getChildByName("Camera"), this.camera.addComponent(S), this.water = o.getChildByName("Plane"), this.water.addComponent(E), s.getInstance().addRes("bridge", o.getChildByName("BridgePrefab")), s.getInstance().addRes("bridgeBig", o.getChildByName("BridgePrefab_big")), s.getInstance().addRes("bridgeAim", o.getChildByName("bridgeAim")), s.getInstance().addRes("role1", o.getChildByName("role1")), s.getInstance().addRes("role2", o.getChildByName("role2")), s.getInstance().addRes("role3", o.getChildByName("role3")), this.bridgeAim = o.getChildByName("bridgeAim"), this.bridgeAim.addComponent(L), this.frontLevel = o.getChildByName("AllLevel"), this.targetIndex = o.getChildByName("startTarget"), this.nowLevel = o.getChildByName("NowLevel");
            let d = "res/skin/" + Laya.userData.HeroId + ".png";
            Laya.Texture2D.load(d, Laya.Handler.create(null, s =&gt; {
                this.frontLevel.getChildByName("BridgePrefabTemp").meshRenderer.sharedMaterial.albedoTexture = s
            })), Laya.moveIndexArr = [], Laya.roleGrp = [], this.loadLevel((s, o) =&gt; {
                this.lvInfo.curLv = s, this.lvInfo.curScene = o, this.createLevel(), Lq.loadingOver(Lq.timer.loadingProgress)
            })
        }
        loadLevel(s) {
            this.lvInfo.isLoading = !0;
            var o = Laya.userData.getRealLevel(Laya.userData.Level);
            let d = `res/${o&lt;4?"subpackages":"subpackages2"}/layascene/LayaScene_SampleScene/Conventional/lv${o}.ls`;
            Laya.Scene3D.load(d, Laya.Handler.create(this, d =&gt; {
                this.lvInfo.isLoading = !1, s &amp;&amp; s(o, d)
            }))
        }
        createLevel() {
            this.detailTime = 0, this.rotateNum = 0, this.continueTimes = 0, this.allLevel = this.frontLevel, this.allLevel.getChildByName("meshTemp").meshRenderer.sharedMaterials[0].albedoColor = this.landColor[Laya.userData.Level % 4];
            let o = this.lvInfo.curLv;
            this.levelScene = this.lvInfo.curScene.clone(), this.levelScene.active = !0, this.nowLevel.addChild(this.levelScene), this.levelScene.transform.position = new Laya.Vector3(0, 0, 0);
            var d = this.levelScene.getChildByName("Start Pivot").getChildByName("LevelIslandClusterStart").getChildByName("Start Pivot");
            this.bridgeAim = s.getInstance().produceNode("bridgeAim", this.cur3dScene), this.bridgeAim.getComponent(L) || this.bridgeAim.addComponent(L), this.bridgeAim.active = !0, d.addChild(this.bridgeAim), this.bridgeAim.transform.localPosition = new Laya.Vector3(0, .012, 0), this.camera.transform.localPositionX = this.bridgeAim.transform.position.x, this.camera.transform.localPositionZ = this.bridgeAim.transform.position.z - .2;
            var p = this.levelScene.getChildByName("role_level_" + o);
            Laya.allRoleNum = p._children.length;
            for (let o = 0; o &lt; p._children.length; o++) {
                let d = p._children[o],
                    A = Math.ceil(3 * Math.random()),
                    S = s.getInstance().produceNode("role" + A, d);
                S.active = !0, S.transform.localPosition = new Laya.Vector3(0, 0, 0), S.transform.rotationEuler = d.transform.rotationEuler.clone(), S.getComponent(h) || S.addComponent(h)
            }
            var A = [],
                S = this.levelScene.getChildByName("Start Pivot").getChildByName("LevelIslandClusterStart").getChildByName("Bridges")._children[0].getChildByName("indexArr");
            for (let s = 0; s &lt; S._children.length; s++) A.push(S._children[S._children.length - 1 - s]);
            Laya.moveIndexArr = A, Laya.endStayPos = this.levelScene.getChildByName("Top Pivot").getChildByName("LevelIslandClusterGoal").getChildByName("stayPos"), Laya.timer.loop(20, this, this.rotateBridge)
        }
        refreshLevel() {
            this.clearLevel(), this.lvInfo.isLoading ? this.createLevel() : (this.lvInfo.nextLv &amp;&amp; (this.lvInfo.curLv = this.lvInfo.nextLv, this.lvInfo.curScene = this.lvInfo.nextScene), this.createLevel(), this.loadLevel((s, o) =&gt; {
                this.lvInfo.nextLv = s, this.lvInfo.nextScene = o
            }))
        }
        clearLevel() {
            Laya.moveIndexArr = [], Laya.roleGrp = [], Laya.invincible = !1, Laya.invincibleTime = 0;
            var o = d.getAllChildrenByName(this.levelScene, "role");
            for (let d = 0; d &lt; o.length; d++) s.getInstance().addToCatch(o[d]);
            this.levelScene &amp;&amp; this.levelScene.destroy(), this.nowLevel.destroyChildren()
        }
        mouseDown() {
            if (Laya.inFight)
                if (this.mouseDelayTime &amp;&amp; this.mouseDelayTime &lt; 200) console.log("this.mouseDelayTime: " + this.mouseDelayTime);
                else {
                    this.mouseDelayTime = 0;
                    var h = "fail";
                    for (let s = 0; s &lt; 3; s++) {
                        let o = d.findChild(this.bridgeAim, "RaycastPoint" + s).transform.position.clone(),
                            p = new Laya.Vector3(o.x, o.y - 10, o.z),
                            A = new Laya.HitResult;
                        this.cur3dScene.physicsSimulation.raycastFromTo(o, p, A);
                        if (A &amp;&amp; A.collider) {
                            if (-1 != A.collider.owner.name.indexOf("Ground") || -1 != ["EasyGroundBase", "LevelIslandClusterStart", "IslandCubeBase 1"].indexOf(A.collider.owner.name)) {
                                h = "suc";
                                break
                            }
                            "GoalIslandNew" == A.collider.owner.name &amp;&amp; (h = "achieve")
                        }
                    }
                    "fail" == h &amp;&amp; Laya.invincible &amp;&amp; (h = "suc");
                    var p = Laya.invincible ? "bridgeBig" : "bridge",
                        A = "music/bridge1.mp3";
                    switch (this.continueTimes &gt; 1 &amp;&amp; (Laya.eventMgr.event(o.laya_event.playFlash, this.continueTimes - 1), A = "music/bridge" + (this.continueTimes - 1) + ".mp3"), Laya.invincible &amp;&amp; (A = "music/bridge" + (7 - this.invincibleTime) + ".mp3"), h) {
                        case "suc":
                            console.log("æ”¾ç½®æˆåŠŸ"), b.shake(), this.rotateNum &lt;= 360 &amp;&amp; !Laya.invincible ? (this.continueTimes++, this.continueTimes &gt; 1 &amp;&amp; Laya.eventMgr.event(o.laya_event.playFlash, this.continueTimes - 1), console.log("è¿žå‡»++", this.continueTimes)) : this.continueTimes = 0, Laya.invincible &amp;&amp; (Laya.eventMgr.event(o.laya_event.playFlash, 7 - this.invincibleTime), Laya.eventMgr.event(o.laya_event.cameraShake), this.invincibleTime--), b.playSound(A);
                            var S = s.getInstance().produceNode(p, this.levelScene),
                                E = this.bridgeAim.transform.position.clone();
                            S.transform.position = new Laya.Vector3(E.x, .14, E.z), S.transform.rotationEuler = this.bridgeAim.transform.rotationEuler.clone();
                            var L = [],
                                w = S.getChildByName("indexArr");
                            for (let s = 0; s &lt; w._children.length; s++) L.push(w._children[w._children.length - 1 - s]);
                            L.push.apply(L, Laya.moveIndexArr), Laya.moveIndexArr = L;
                            var _ = w._children[w._children.length - 1].transform.position.clone(),
                                I = this.bridgeAim.transform.rotationEuler.clone();
                            this.bridgeAim.transform.position = new Laya.Vector3(_.x, 0, _.z), this.bridgeAim.transform.localPositionY = .012, this.bridgeAim.transform.rotationEuler = new Laya.Vector3(I.x, I.y - 180, I.z), this.rotateNum = 0, this.rotateSpeed = -this.rotateSpeed, Laya.Tween.to(this.camera.transform, {
                                localPositionX: this.bridgeAim.transform.position.x,
                                localPositionZ: this.bridgeAim.transform.position.z - .2
                            }, 200);
                            var T = w._children.length;
                            Laya.eventMgr.event(o.laya_event.createBridge, T), this.continueTimes &gt;= 4 ? Laya.eventMgr.event(o.laya_event.changeAim, 1) : Laya.invincible &amp;&amp; this.invincibleTime &lt;= 0 &amp;&amp; Laya.eventMgr.event(o.laya_event.changeAim, 0);
                            break;
                        case "achieve":
                            console.log("æˆåŠŸè¿‡å…³"), Laya.inFight = !1, Laya.curWx.postMessageToChild({
                                action: "UserCloudStaroge",
                                key: "lv_max_score",
                                value: Laya.userData.Level
                            }), Laya.userData.Level++, b.playSound(A);
                            S = s.getInstance().produceNode(p, this.levelScene), E = this.bridgeAim.transform.position.clone();
                            S.transform.position = new Laya.Vector3(E.x, .14, E.z), S.transform.rotationEuler = this.bridgeAim.transform.rotationEuler.clone(), Laya.eventMgr.event(o.laya_event.passLevel), Laya.timer.once(1500, this, () =&gt; {
                                b.playSound("music/sucDialog.mp3"), Laya.eventMgr.event(o.laya_event.showSucDialog)
                            });
                            break;
                        case "fail":
                            Laya.inFight = !1, b.playSound("music/makeBridgeFail.mp3"), Laya.eventMgr.event(o.laya_event.showRelife), console.log("çˆ†ç‚¸")
                    }
                }
        }
        rotateBridge() {
            if (Laya.inFight) {
                (this.mouseDelayTime || 0 == this.mouseDelayTime) &amp;&amp; (this.mouseDelayTime += 20);
                var s = 1;
                s = this.rotateNum &gt;= 360 ? .5 : 1, this.rotateNum += 6.75 * s, this.bridgeAim.transform.rotate(new Laya.Vector3(0, this.rotateSpeed * s, 0))
            }
        }
        getCurvePoint(s, o, d) {
            d = this.Clamp(d, 1, 0);
            var h = s.x + (o.x - s.x) * d,
                p = s.y + (o.y - s.y) * d,
                A = s.z + (o.z - s.z) * d;
            return new Laya.Vector3(h, p, A)
        }
        Clamp(s, o, d) {
            return s &lt; d ? d : s &gt; o ? o : s
        }
    }
    class I extends Laya.Script {
        constructor() {
            super()
        }
        onEnable() {
            this.owner.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown1), this.owner.on(Laya.Event.MOUSE_UP, this, this.onMouseUp1), this.owner.on(Laya.Event.MOUSE_OUT, this, this.onMouseUp1)
        }
        onDisable() {
            this.owner.off(Laya.Event.MOUSE_DOWN, this, this.onMouseDown1), this.owner.off(Laya.Event.MOUSE_UP, this, this.onMouseUp1), this.owner.off(Laya.Event.MOUSE_OUT, this, this.onMouseUp1)
        }
        onMouseDown1(s) {
            b.playSound("music/snd_button_generic.mp3"), this.owner.scaleX = 1.1, this.owner.scaleY = 1.1
        }
        onMouseUp1(s) {
            1 == this.owner.scaleX &amp;&amp; 1 == this.owner.scaleY || (this.owner.scaleX = 1, this.owner.scaleY = 1)
        }
    }
    class T extends p {
        constructor() {
            super()
        }
        onAwake() {
            this.startbtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                Laya.eventMgr.event(o.laya_event.startGame)
            }), this.rankBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                Laya.eventMgr.event(o.laya_event.showRank)
            }), this.skinBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                Laya.eventMgr.event(o.laya_event.showSkin)
            }), this.signBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                Laya.eventMgr.event(o.laya_event.showSign)
            }), this.alphaNum = 1, this.spMaskAdd = 2, this.spImgAdd = 3, this.maskRadius = 30, this.delayTime = 0, this.startBtn = this.maskGrp.getChildByName("startBtn"), this.interactionArea = new Laya.Sprite, this.interactionArea.blendMode = "destination-out", this.maskGrp.addChild(this.interactionArea), this.interactionArea.graphics.drawCircle(100, 100, this.maskRadius, "#000000")
        }
        onEnable() {
            if (0 != Laya.userData.GuideNum &amp;&amp; Laya.userData.GuideNum &lt; 3) {
                var s = {};
                s.pos = new Laya.Point(109, 786), s.cb = function(s) {
                    Laya.userData.GuideNum = 2, Laya.eventMgr.event(o.laya_event.showSkin)
                }, s.target = this, Laya.eventMgr.event(o.laya_event.showGuide, s)
            }
            Laya.timer.loop(10, this, this.playGuide)
        }
        playGuide() {
            this.delayTime++, this.interactionArea.graphics.clear(), this.maskRadius += this.spMaskAdd, this.interactionArea.graphics.drawCircle(100, 100, this.maskRadius, "#000000"), this.startBtn.width += this.spImgAdd, this.startBtn.height += this.spImgAdd, this.delayTime &lt;= 30 ? (this.hand.scaleX += .005, this.hand.scaleY += .005) : this.delayTime &lt; 50 ? (this.spMaskAdd = 2.5, this.hand.scaleX += .005, this.hand.scaleY += .005) : this.delayTime &lt;= 75 ? (this.spMaskAdd = 0, this.spImgAdd = 0, this.hand.scaleX -= .01, this.hand.scaleY -= .01) : (this.delayTime = 0, this.spMaskAdd = 2, this.spImgAdd = 3, this.maskRadius = 30, this.startBtn.width = 100, this.startBtn.height = 100, this.hand.scaleX = 1, this.hand.scaleY = 1)
        }
    }
    class x extends Laya.Script {
        constructor() {
            super();
            this.isCountDown = !1
        }
        onAwake() {
            Laya.isBigScreen ? (this.goldBox.y = 90, this.vitalityBox.y = 90) : (this.goldBox.y = 50, this.vitalityBox.y = 50), this.addBtn.on(Laya.Event.MOUSE_UP, this, this.onClickAdd), Laya.eventMgr.on(o.laya_event.refreshTitle, this, s =&gt; {
                this.dataChange(s)
            }), Laya.eventMgr.on(o.laya_event.changeCoin, this, () =&gt; {
                this.goldBox.getChildByName("goldNum").text = Laya.userData.Coin
            }), Laya.eventMgr.on("changeVitality", this, () =&gt; {
                this.haveVitality.text = Laya.userData.Vitality
            }), Laya.eventMgr.on("hideTitleBar", this, () =&gt; {
                this.owner.visible = !1
            }), Laya.eventMgr.on("showTitleBar", this, () =&gt; {
                this.owner.visible = !0
            }), Laya.eventMgr.on("startCountDown", this, () =&gt; {
                this.isCountDown || (this.isCountDown = !0, Laya.timer.loop(1e3, this, this.showAddTime))
            }), Laya.eventMgr.on("stopCountDown", this, () =&gt; {
                Laya.timer.clear(this, this.showAddTime), this.addTime.text = Lq.lang("ä½“åŠ›å·²æ»¡"), this.isCountDown = !1
            })
        }
        onEnable() {
            this.dataChange()
        }
        onDestroy() {}
        dataChange(s) {
            this.goldBox.getChildByName("goldNum").text = Laya.userData.Coin + "";
            var o = parseInt(Laya.userData.AddVitalityTime);
            o || (o = (new Date).getTime(), Laya.userData.AddVitalityTime = o);
            var d = parseInt(Laya.userData.Vitality);
            let h = Laya.curWx.MoreConfig.maxVatality;
            if (d &gt;= h) Laya.eventMgr.event("stopCountDown");
            else {
                var p = (new Date).getTime(),
                    A = parseInt((p - o) / (60 * Laya.curWx.MoreConfig.addVatalityTime * 1e3));
                if ((d += A) &gt;= h) d = h, Laya.userData.Vitality = d, Laya.userData.AddVitalityTime = p;
                else {
                    var S = o + (A + 1) * Laya.curWx.MoreConfig.addVatalityTime * 60 * 1e3;
                    this.delayTime = S - p, Laya.userData.Vitality = d, Laya.userData.AddVitalityTime = o + 60 * A * 1e3, Laya.eventMgr.event("startCountDown")
                }
            }
            this.haveVitality.text = d
        }
        showAddTime() {
            this.delayTime -= 1e3, this.delayTime &lt;= 0 ? (Laya.userData.Vitality += 1, Laya.userData.AddVitalityTime = (new Date).getTime(), this.dataChange()) : this.addTime.text = this.dateFormat(this.delayTime)
        }
        onClickAdd() {
            console.log("èŽ·å–æ´»åŠ›"), Laya.eventMgr.event(o.laya_event.showGetVitality)
        }
        dateFormat(s) {
            var o = parseInt(s / 6e4).toString(),
                d = parseInt(s % 6e4 / 1e3).toString();
            return "0" + o + ":" + (d = 1 == d.length ? "0" + d : d)
        }
    }
    class k {}
    k.GAME_ID = 259, k.CHANNEL_ID = 136, k.shFlag = 0, k.version = "1.0.9", k.maxLevel = 10;
    class N {
        static requireShareInfo() {
            /*Laya.curWx.request("https://account.api.snsfun.com/XyxApi/share", {
                gameid: k.GAME_ID,
                sh: k.shFlag
            }, s =&gt; {
                200 == s.statusCode &amp;&amp; (console.log("åˆ†äº«å›¾è¿”å›žç»“æžœ", s), s.data.length &gt; 0 &amp;&amp; (Laya.curWx.shareMessage = s.data))
            })*/
        }
        static requireShFlag(s) {
            /*Laya.curWx.request("https://account.api.snsfun.com/XyxApi/shstatus", {
                gameid: k.GAME_ID,
                v: k.version
            }, o =&gt; {
                200 == o.statusCode &amp;&amp; (console.log("requireShFlag  ..........  : ", o), Laya.curWx.shFlag = o.data, s &amp;&amp; s())
            })*/
        }
        static requireMoreConfig(s, o) { // https://account.api.snsfun.com/XyxApi/custom
            console.log("requireMoreConfig"), Laya.curWx.request("", {
                gameid: k.GAME_ID
            }, d =&gt; {
                200 == d.statusCode &amp;&amp; (console.log("requireMoreConfig   ...........:", d.data), Laya.curWx.MoreConfig = d.data, s &amp;&amp; s(o))
            }, () =&gt; {
                Laya.curWx.MoreConfig || (Laya.curWx.MoreConfig = {
                    addVatalityTime: 2,
                    shareRewardNum: 5,
                    continueWinRewardNum: 5,
                    maxVatality: 10,
                    interstitialAdNum: 2,
                    showFullMatrix: 3,
                    showMoreGame: 1,
                    shareSucceedTimes: 9999
                }, s &amp;&amp; s(o))
            })
        }
        static requestAdData() {
            Laya.curWx.request("", { // https://xcxgm.lequ.com/xcxApi/ads
                id: k.CHANNEL_ID
            }, s =&gt; {
                if (200 == s.statusCode) {
                    let o = s.data.data;
                    Laya.curWx.adDatas = o.sort((function(s, o) {
                        return parseInt(s.position) - parseInt(o.position)
                    }))
                }
            }, () =&gt; {
                Laya.curWx.adDatas || (Laya.curWx.adDatas = [])
            })
        }
    }
    class D {
        constructor() {
            if (this.bannerShowFlag = !0, "undefined" != typeof wx) {
                this.wx = wx, this.shareMessage = [{
                    url: "src/myOpenDataContext/shareImage.jpg",
                    text: "å¤©å¤©è½¬åœˆåœˆ",
                    query: ""
                }], this.showShareMenu(), this.onShareAppMessage(), void 0 !== wx.getOpenDataContext &amp;&amp; (this.openDataContext = wx.getOpenDataContext(), this.openDataContext &amp;&amp; (this.sharedCanvas = this.openDataContext.canvas)), wx.onHide(s =&gt; {}), wx.onShow(s =&gt; {
                    this.query = s.query, this.shareTicket = s.shareTicket, 1104 != s.scene &amp;&amp; 1103 != s.scene &amp;&amp; 1001 != s.scene &amp;&amp; 1089 != s.scene || (this.myGameEnterFlag = !0, console.log("ä»Žæˆ‘çš„å°ç¨‹åºè¿›å…¥")), this.fenxianCB &amp;&amp; this.fenxianCB(), Laya.audioMgr &amp;&amp; Laya.audioMgr.playBgMusic()
                });
                try {
                    this.banner.hide()
                } catch (s) {}
            }
        }
        initEvent() {
            Laya.eventMgr.on("banner_state", this, s =&gt; {
                this.banner &amp;&amp; (this.banner.destroy(), this.banner = null), this.banner = this.createBottomBannerAd()
            }), Laya.eventMgr.on("gride_state", this, s =&gt; {
                this.banner &amp;&amp; (this.banner.destroy(), this.banner = null), this.banner = this.createGridAd()
            }), Laya.eventMgr.on("hutui_state", this, s =&gt; {
                this.banner &amp;&amp; (this.banner.destroy(), this.banner = null), this.banner = this.createGameBanner()
            })
        }
        showToast(s, o) {
            void 0 !== this.wx &amp;&amp; this.wx.showToast({
                title: s || "åˆ†äº«å¾—å¤æ´»å¡",
                icon: "none",
                duration: o || 2e3
            })
        }
        getStorageSync(s) {
            return this.wx ? this.wx.getStorageSync(s) : Laya.LocalStorage.getItem(s)
        }
        setStorage(s, o) {
            void 0 !== this.wx ? this.wx.setStorage({
                key: s,
                data: o,
                fail: s =&gt; {
                    console.log("setStorage fail")
                }
            }) : "object" == typeof o ? (o = JSON.stringify(o), Laya.LocalStorage.setItem(s, o)) : Laya.LocalStorage.setItem(s, o)
        }
        request(s, o, d, h) {
            s &amp;&amp; o &amp;&amp; this.wx &amp;&amp; void 0 !== this.wx ? this.wx.request({
                url: s,
                data: o,
                method: "GET",
                header: {
                    "content-type": "application/json"
                },
                success: s =&gt; {
                    console.log("success ", s), d &amp;&amp; d(s)
                },
                fail: s =&gt; {
                    h &amp;&amp; h(s)
                }
            }) : h &amp;&amp; h()
        }
        showShareMenu() {
            this.wx.showShareMenu({
                withShareTicket: !0
            })
        }
        onShareAppMessage() {
            this.wx.onShareAppMessage(() =&gt; {
                let s = Math.floor(Math.random() * this.shareMessage.length),
                    o = 1e3 + s + 1,
                    d = this.shareMessage[s];
                var h = d.query ? d.query : "";
                return "" != h ? h += "&amp;shareImgId=" + o : h = "shareImgId=" + o, this.userUid &amp;&amp; (h = "" != h ? h + "&amp;pid=" + this.userUid : "pid=" + this.userUid), {
                    title: d.text,
                    imageUrl: d.url,
                    query: h
                }
            })
        }
        shareAppMessage(s, o, d, h) {
            console.log("åˆ†äº«");
            var p = this;
            if (void 0 === this.wx) return void(o &amp;&amp; o());
            var A = "",
                S = "æœ‹å‹ä»¬éƒ½åœ¨çŽ©å‘¢",
                E = "";
            let L;
            if (this.userUid &amp;&amp; (E = "" != E ? E + "&amp;pid=" + this.userUid : "pid=" + this.userUid), h &amp;&amp; (E += h), console.log("é•¿åº¦1", this.shareMessage), 0 != this.shareMessage.length) {
                L = Math.floor(Math.random() * this.shareMessage.length);
                let s = 1e3 + L + 1,
                    o = this.shareMessage[L];
                A = o.url, S = o.text, o.query &amp;&amp; ("" != E ? E += "&amp;" + o.query : E = o.query), "" != E ? E += "&amp;shareImgId=" + s : E = "shareImgId=" + s
            }
            console.log("hwenge    shareAppMessage .............................s "), console.log(this.shareMessage), console.log(A), console.log("hwenge    shareAppMessage .............................e "), this.wx.shareAppMessage({
                title: S,
                imageUrl: A,
                query: E
            });
            var w = +new Date;
            this.fenxiansuccess = o, this.fenxianfail = d, this.fenxianCB = function() {
                console.log("åˆ†äº«3åˆ†äº«æˆåŠŸ"); + new Date - w &gt; 3e3 ? (console.log("åˆ†äº«æˆåŠŸ"), p.fenxiansuccess &amp;&amp; p.fenxiansuccess()) : (p.fenxianfail &amp;&amp; p.fenxianfail(), p.showToast("æŽ¨èç»™å…¶ä»–å¥½å‹è¯•è¯•å§")), p.fenxianCB = null, p.fenxiansuccess = null, p.fenxianfail = null
            }
        }
        postMessageToChild(s) {
            this.openDataContext &amp;&amp; this.openDataContext.postMessage(s)
        }
        setSharedCanvasSize(s, o) {
            if (this.openDataContext) {
                var d = this.openDataContext.canvas;
                d.width = s, d.height = o
            }
        }
        updateSpriteFrame() {
            this.texture &amp;&amp; this.texture.initWithElement &amp;&amp; (this.texture.initWithElement(this.sharedCanvas), this.texture.handleLoadedTexture(), this.spriteFrame.setTexture(this.texture))
        }
        playBackgroundAudio() {
            if (this.wx) {
                let s = new this.wx._playBackgroundAudioObject;
                s.dataUrl = "config/music/Game2.mp3", this.wx.playBackgroundAudio(s)
            }
        }
        Audio(s, o = 0, d = !1, h = !1, p = !0, A = !1, S = !1, E = 1) {
            if ("undefined" != typeof wx) {
                if (S) {
                    if (!this.innerAudioContext) return !1;
                    for (var L = 0; L &lt; this.innerAudioContext.length; L++) {
                        let o = this.innerAudioContext[L];
                        if (o[1] == s) return o[0].stop(), !1
                    }
                    return !1
                }
                if (this.innerAudioContext) {
                    if (A)
                        for (L = 0; L &lt; this.innerAudioContext.length; L++) {
                            let o = this.innerAudioContext[L];
                            o[1] != s &amp;&amp; o[0].stop()
                        }
                    for (L = 0; L &lt; this.innerAudioContext.length; L++) {
                        let o = this.innerAudioContext[L];
                        if (o[1] == s) return o[0].play(), !1
                    }
                }
                if (wx.createInnerAudioContext) {
                    var w = new Array,
                        b = wx.createInnerAudioContext();
                    return b.volume = E, b.startTime = o, b.autoplay = d, b.loop = h, b.obeyMuteSwitch = p, b.src = s, b.play(), w.push(b), w.push(s), this.innerAudioContext || (this.innerAudioContext = []), b.onError(s =&gt; {}), this.innerAudioContext.push(w), w
                }
            }
        }
        navigateToMiniProgram(s, o, d, h) {
            Laya.curAld.sendEvent("ç»Ÿè®¡è·³è½¬ç‚¹å‡»"), this.wx &amp;&amp; this.wx.navigateToMiniProgram({
                appId: s || "wx908a3c4edbd2d3e8",
                path: o,
                success: function() {
                    d &amp;&amp; d(), Laya.curAld.sendEvent("ç»Ÿè®¡è·³è½¬æˆåŠŸ")
                },
                fail: function() {
                    h &amp;&amp; h(), Laya.eventMgr.event("slider_ad")
                }
            })
        }
        vibrateShort() {
            this.wx &amp;&amp; this.wx.vibrateShort()
        }
        createVideoAd(s, o) {
            if ("undefined" == typeof wx) return void(s &amp;&amp; s());
            console.log("æ‹‰å–è§†é¢‘");
            let d = this,
                h = null;
            return d.videoAd || (d.videoAd = wx.createRewardedVideoAd({
                adUnitId: "adunit-5605c975ac987052"
            })), h = d.videoAd, this.callfun &amp;&amp; (h.offClose(this.callfun), this.callfun = null), this.callfun = d =&gt; {
                console.log("è°ƒç”¨åˆ°äº†onclose"), d &amp;&amp; d.isEnded || void 0 === d ? s &amp;&amp; s() : o &amp;&amp; o(), h.offClose(this.callfun), this.callfun = null
            }, h.onClose(this.callfun), h.onError(d =&gt; {
                console.log("createVideoAd error", d.errCode), this.shareAppMessage(null, s, o)
            }), h.load().then((function() {
                d.videoAd = h, h.show()
            })).catch(o =&gt; {
                s &amp;&amp; s()
            }), h
        }
        createInterstitialAd() {
            void 0 !== this.wx &amp;&amp; this.wx.createInterstitialAd &amp;&amp; (this.interstitialAd = this.wx.createInterstitialAd({
                adUnitId: "adunit-b9c37c2c961e2e48"
            }), this.interstitialAd.onLoad(() =&gt; {
                console.log("æ’å± å¹¿å‘ŠåŠ&nbsp;è½½æˆåŠŸ")
            }), this.interstitialAd.onError(s =&gt; {
                console.error("æ’å± å¹¿å‘ŠåŠ&nbsp;è½½å¤±è´¥", s)
            }), this.interstitialAd.onClose(s =&gt; {
                console.log("æ’å± å¹¿å‘Šå…³é—­"), this.interstitialAd.destroy(), this.interstitialAd = null, this.createInterstitialAd()
            }))
        }
        showInterstitialAd() {
            this.interstitialAd &amp;&amp; this.interstitialAd.show().catch(s =&gt; {
                console.error("æ’å±å¹¿å‘Šæ˜¾ç¤ºå¤±è´¥", s)
            })
        }
        resetBanner(s) {
            void 0 !== this.wx &amp;&amp; (this.banner = this.wx.gameJump.showBanner(s))
        }
        hideBanner() {
            this.wx.gameJump.hideBanner(), console.log("hwenge ....................hideBanner")
        }
        showBanner() {
            this.banner &amp;&amp; this.banner.show()
        }
        createBottomBannerAd() {
            if (void 0 !== this.wx) {
                console.log("hwenge...............createBottomBannerAd");
                var s = this.wx.getSystemInfoSync(),
                    o = s.windowHeight / s.windowWidth / 1.775,
                    d = s.windowHeight,
                    h = s.windowWidth - s.windowWidth / 320 * 60;
                o &gt; 1 &amp;&amp; (h *= o), h = 320;
                var p = (s.windowWidth - h) / 2,
                    A = this.wx.createBannerAd({
                        adUnitId: "adunit-907e87ffd09fd41e",
                        style: {
                            top: d - 100,
                            left: p,
                            width: s.windowWidth
                        }
                    });
                return A.onResize(s =&gt; {
                    console.log("-----onresize--------"), A.style.top = d - A.style.realHeight - 15
                }), A.onError(s =&gt; {
                    Laya.eventMgr.event("gride_state", 1)
                }), A.show(), A.style.width = h, A
            }
        }
        createGridAd() {
            if (void 0 !== this.wx) {
                console.log("hwenge...............createGridAd");
                var s = this.wx.getSystemInfoSync(),
                    o = s.windowHeight / s.windowWidth / 1.775,
                    d = s.windowHeight,
                    h = s.windowWidth - s.windowWidth / 320 * 60;
                o &gt; 1 &amp;&amp; (h *= o), h &lt;= 300 &amp;&amp; (h = 300);
                var p = (s.windowWidth - h) / 2,
                    A = this.wx.createGridAd({
                        adUnitId: "adunit-899822a15cd86570",
                        style: {
                            top: d - 110,
                            left: p,
                            width: s.windowWidth
                        },
                        adTheme: "white",
                        gridCount: 5
                    });
                return A.onResize(s =&gt; {
                    console.log("-----onresize--------"), A.style.top = d - A.style.realHeight - 4
                }), A.onError(s =&gt; {
                    Laya.eventMgr.event("hutui_state", 1)
                }), A.show(), A.style.width = h, A
            }
        }
        createGameBanner() {
            if (void 0 !== this.wx) {
                console.log("hwenge...............createGameBanner");
                var s = this.wx.getSystemInfoSync(),
                    o = s.windowHeight / s.windowWidth / 1.775,
                    d = s.windowHeight,
                    h = s.windowWidth - s.windowWidth / 320 * 60;
                o &gt; 1 &amp;&amp; (h *= o), h &lt;= 300 &amp;&amp; (h = 300);
                var p = (s.windowWidth - h) / 2,
                    A = this.wx.createGameBanner({
                        adUnitId: "PBgAA6xwrYuL6LFQ",
                        style: {
                            top: d - 110,
                            left: p
                        }
                    });
                return A.onResize(s =&gt; {
                    console.log("-----onresize--------")
                }), A.onError(s =&gt; {}), A.show(), A.style.width = h, A
            }
        }
        showCbl(s) {
            Laya.curWx.wx &amp;&amp; (Laya.curWx.wx.gameJump.cblShow(s), Laya.curWx.wx.gameJump.showTopGame(s))
        }
        showImitationView(s, o) {
            Laya.curWx.wx ? Laya.curWx.wx.gameJump.showImitationView(s, o) : o &amp;&amp; o()
        }
        getCurTime() {
            var s = new Date;
            return s.getFullYear() + "-" + (s.getMonth() + 1) + "-" + s.getDate()
        }
        onHide(s) {
            this.wx &amp;&amp; (this.wx.onHide || console.log("æ²¡æœ‰onHideæ–¹æ³•"), this.wx.onHide &amp;&amp; this.wx.onHide(s))
        }
        offHide(s) {
            this.wx &amp;&amp; this.wx.onHide &amp;&amp; this.wx.offHide(s)
        }
        aldSendCustomEvent(s, o, d) {
            if (void 0 !== this.wx) {
                null == s &amp;&amp; (s = "title null"), null == o &amp;&amp; (o = "key null"), null == d &amp;&amp; (d = "value null");
                var h = {};
                h[o] = d, console.log("aldSendCustomEvent  ", s, o, d), this.wx.aldSendCustomEvent &amp;&amp; this.wx.aldSendCustomEvent(s, h)
            }
        }
    }
    class G {
        constructor() {
            console.log("è¿™æ˜¯loadData"), Laya.LocalStorage.__init__(), this.loadData()
        }
        get Coin() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_COIN");
            return this._noNULL(s) ? parseInt(s) : 0
        }
        set Coin(s) {
            var d = Laya.LocalStorage.getItem("LOCAL_USER_COIN");
            Laya.LocalStorage.setItem("LOCAL_USER_COIN", s), d != s &amp;&amp; Laya.eventMgr.event(o.laya_event.changeCoin)
        }
        get GuideNum() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_GUIDENUM");
            return this._noNULL(s) ? parseInt(s) : 0
        }
        set GuideNum(s) {
            Laya.LocalStorage.setItem("LOCAL_USER_GUIDENUM", s)
        }
        get HeroId() {
            return this._heroId
        }
        set HeroId(s) {
            this._heroId = s, Laya.LocalStorage.setItem("LOCAL_USER_HEROID", s), Laya.eventMgr.event(o.laya_event.changeSkin)
        }
        get InfiniteMaxScore() {
            return this._infiniteMaxScore
        }
        set InfiniteMaxScore(s) {
            this._infiniteMaxScore = s, Laya.LocalStorage.setItem("LOCAL_USER_INFINITEMAXSCORE", s)
        }
        get CapId() {
            return this._capId
        }
        set CapId(s) {
            this._capId = s, Laya.LocalStorage.setItem("LOCAL_USER_CAPID", s), Laya.eventMgr.event(o.laya_event.changeWear)
        }
        get Level() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_LEVEL");
            return this._noNULL(s) ? parseInt(s) : 1
        }
        set Level(s) {
            Laya.LocalStorage.setItem("LOCAL_USER_LEVEL", s), Laya.eventMgr.event("changeLevel")
        }
        get Box() {
            return this._noNULL(this.boxNum) ? parseInt(this.boxNum) : 0
        }
        set Box(s) {
            this.boxNum = s, Laya.LocalStorage.setItem("LOCAL_USER_BOX", s)
        }
        get Vitality() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_VITALITY");
            return this._noNULL(s) ? parseInt(s) : 0
        }
        set Vitality(s) {
            var o = Laya.LocalStorage.getItem("LOCAL_USER_VITALITY");
            let d = Laya.curWx.MoreConfig.maxVatality;
            s &gt; d &amp;&amp; (s = d, Laya.eventMgr.event("stopCountDown")), Laya.LocalStorage.setItem("LOCAL_USER_VITALITY", s), o != s &amp;&amp; Laya.eventMgr.event("changeVitality")
        }
        get ShareTimes() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_SHARETIMES");
            return this._noNULL(s) ? parseInt(s) : 0
        }
        set ShareTimes(s) {
            Laya.LocalStorage.setItem("LOCAL_USER_SHARETIMES", s)
        }
        get ShareDay() {
            return Laya.LocalStorage.getItem("LOCAL_USER_SHAREDAY")
        }
        set ShareDay(s) {
            Laya.LocalStorage.setItem("LOCAL_USER_SHAREDAY", s)
        }
        get AddVitalityTime() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_ADDVATILITYTIME");
            return this._noNULL(s) ? parseInt(s) : 1
        }
        set AddVitalityTime(s) {
            Laya.LocalStorage.setItem("LOCAL_USER_ADDVATILITYTIME", s)
        }
        get SignNum() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_SIGNNUM");
            return this._noNULL(s) ? parseInt(s) : 0
        }
        set SignNum(s) {
            Laya.LocalStorage.setItem("LOCAL_USER_SIGNNUM", s)
        }
        get LastSignTime() {
            let s = Laya.LocalStorage.getItem("LOCAL_USER_LASTSIGNTIME");
            return this._noNULL(s) ? parseInt(s) : 0
        }
        set LastSignTime(s) {
            Laya.LocalStorage.setItem("LOCAL_USER_LASTSIGNTIME", s)
        }
        loadData() {
            var s = Laya.LocalStorage.getItem("LOCAL_USER_COIN");
            this._noNULL(s) ? this.Coin = s : this.Coin = 0;
            var o = Laya.LocalStorage.getItem("LOCAL_USER_HEROID");
            this._noNULL(o) ? this._heroId = parseInt(o) : this._heroId = 1;
            var d = Laya.LocalStorage.getItem("LOCAL_USER_INFINITEMAXSCORE");
            this._noNULL(d) ? this._infiniteMaxScore = parseInt(d) : this._infiniteMaxScore = 0;
            var h = Laya.LocalStorage.getItem("LOCAL_USER_CAPID");
            this._noNULL(h) ? this._capId = h : this._capId = 1;
            var p = Laya.LocalStorage.getItem("LOCAL_USER_LEVEL");
            this._noNULL(p) ? this.Level = parseInt(p) : this.Level = 1;
            var A = Laya.LocalStorage.getJSON("LOCAL_USER_HEROIDLIST");
            this._noNULL(A) ? this.ArrHeroIdList = A : this.ArrHeroIdList = [1];
            var S = Laya.LocalStorage.getJSON("LOCAL_USER_CAPIDLIST");
            this._noNULL(S) ? this.ArrCapIdList = S : this.ArrCapIdList = [1];
            var E = Laya.LocalStorage.getItem("LOCAL_USER_BOX");
            this._noNULL(E) ? this.boxNum = parseInt(E) : this.boxNum = 0
        }
        addHeroId(s) {
            this.ArrHeroIdList.find(o =&gt; o == s) || (this.ArrHeroIdList.push(s), Laya.LocalStorage.setJSON("LOCAL_USER_HEROIDLIST", this.ArrHeroIdList))
        }
        addCapId(s) {
            this.ArrCapIdList.find(o =&gt; o == s) || (this.ArrCapIdList.push(s), Laya.LocalStorage.setJSON("LOCAL_USER_CAPIDLIST", this.ArrCapIdList))
        }
        getUnUserSkin() {
            let s = [];
            for (var o = 0; o &lt; k.max_hero; o++) s.push(o + 1);
            s.sort((s, o) =&gt; Math.random() &gt; .5 ? 1 : -1);
            for (o = 0; o &lt; s.length; o++) {
                let d = s[o];
                if (!this.ArrHeroIdList.find(s =&gt; s == d)) return d
            }
        }
        getRealLevel(s) {
            let o = k.maxLevel,
                d = s;
            return s &gt; o &amp;&amp; (d = Math.floor((o - 4) * Math.random() + 4)), d
        }
        _noNULL(s) {
            return null != s &amp;&amp; null != s &amp;&amp; "" != s
        }
    }
    class M extends Laya.View {
        constructor(s) {
            super(), s = s || {};
            let o = {
                uiView: null,
                uiViewUrl: "sogame/components/common/loadingProgress.json",
                showLb: !0,
                lbColor: "#000",
                bgColor: "#fff",
                bgPadding: 5,
                barColor: "#f3b63f",
                parent: Laya.stage,
                nodeY: .7 * Laya.stage.height,
                progBarWidth: 400,
                progBarHeight: 25,
                timerName: "loadingProgress",
                callback: null,
                fadeout: !1,
                autoClose: !0,
                totalSize: 3e3
            };
            return this.opt = Object.assign(o, s), this.opt.uiView ? this.init(this.opt.uiView) : this.opt.uiViewUrl &amp;&amp; Laya.loader.load(this.opt.uiViewUrl, Laya.Handler.create(this, s =&gt; {
                this.init(s)
            })), this
        }
        init(s) {
            this.createView(s), this.initViews(), this.show()
        }
        initViews() {
            let s = this.opt;
            this.lb.visible = !!s.showLb, this.lb.color = s.lbColor, this.bg.width = s.progBarWidth, this.bg.height = s.progBarHeight, this.bg.bgColor = s.bgColor, s.bgPadding &amp;&amp; (this.bg.width += 2 * s.bgPadding, this.bg.height += 2 * s.bgPadding, this.bg.top -= s.bgPadding), this.bar.width = s.progBarWidth, this.bar.height = s.progBarHeight, this.bar.bgColor = s.barColor;
            let o = new Laya.Box;
            o.bgColor = "#fff", o.width = 0, o.height = 100, this.bar.mask = o
        }
        show() {
            let s = this.opt;
            if (!(s.parent instanceof Laya.Node)) return console.error("çˆ¶èŠ‚ç‚¹å¼‚å¸¸");
            s.parent.addChild(this), this.centerX = 0, this.y = s.nodeY;
            let endCb = () =&gt; {
                s.autoClose &amp;&amp; this.close(), s.callback &amp;&amp; s.callback(this)
            };
            return Lq.onLoading(this, o =&gt; s.parent.destroyed ? Lq.loadingOver(Lq.timer[s.timerName]) : (s.showLb &amp;&amp; (this.lb.text = o + "%"), this.bar.mask.width = o / 100 * s.progBarWidth, o &lt; 100 ? void 0 : s.fadeout ? void Laya.timer.once(500, this, () =&gt; {
                Laya.Tween.to(this, {
                    alpha: .2
                }, 300, null, Laya.Handler.create(this, () =&gt; {
                    endCb()
                }))
            }) : endCb()), {
                timerName: s.timerName,
                totalSize: s.totalSize
            }), this
        }
    }
    class P extends Laya.Scene {
        constructor() {
            super(), window.LoadingScene = this
        }
        onAwake() {
            new M({
                parent: this,
                totalSize: 8e3,
                lbColor: "#fff",
                autoClose: !1,
                callback: s =&gt; {
                    Laya.timer.once(500, this, () =&gt; {
                        Laya.Tween.to(this, {
                            alpha: .2
                        }, 300, null, Laya.Handler.create(this, () =&gt; {
                            this.close()
                        }))
                    })
                }
            }), Laya.picRes = [], Laya.isBigScreen = Laya.stage.height &gt;= 1338, this.initEvent(), this.initWx(), this.initUser(), N.requireShFlag(() =&gt; {
                N.requireShareInfo()
            }), N.requireMoreConfig(this.load, this)
        }
        onEnable() {
            Lq.hideLoading()
        }
        initEvent() {
            Laya.eventMgr = new Laya.EventDispatcher
        }
        initUser() {
            var s = new G;
            Laya.userData = s
        }
        initWx() {
            var s = new D;
            Laya.curWx = s
        }
        load(s) {
            Laya.loader.load(["sk/pencaidai.sk", "res/atlas/sk.atlas"], Laya.Handler.create(this, () =&gt; {
                s.load3dRes()
            }))
        }
        wxLoadSub() {
            wx.loadSubpackage({
                name: "resScene",
                success: s =&gt; {
                    console.log("åˆ†åŒ…1åŠ&nbsp;è½½æˆåŠŸ"), this.wxLoadConfig()
                },
                fail: function(s) {
                    console.log("åˆ†åŒ…1åŠ&nbsp;è½½å¤±è´¥", s)
                }
            })
        }
        wxLoadConfig() {
            this.loadLevelComplete()
        }
        loadLevelComplete(s) {
            this.load3dRes()
        }
        load3dRes() {
            console.log("å¼€å§‹åŠ&nbsp;è½½3dç•Œé¢");
            Laya.Scene3D.load("res/subpackages/layascene/LayaScene_SampleScene/Conventional/SampleScene.ls", Laya.Handler.create(this, this.loadSceneComplete))
        }
        loadSceneComplete() {
            this.finishHander()
        }
        switchScene() {
            console.log("åŠ&nbsp;è½½å…³å¡æ–‡ä»¶å®Œæˆï¼Œå¼€å§‹åŠ&nbsp;è½½å›¾ç‰‡"), Laya.Texture2D.load("res/subpackages/dizhuan/dizhuan0.png", Laya.Handler.create(null, s =&gt; {
                Laya.picRes.dizhuan0 = s, Laya.Texture2D.load("res/subpackages/dizhuan/dizhuan1.png", Laya.Handler.create(null, s =&gt; {
                    Laya.picRes.dizhuan1 = s, Laya.Scene.load("game_scene.json", Laya.Handler.create(this, this.finishHander), Laya.Handler.create(this, this.progressHander))
                }))
            }))
        }
        finishHander(s) {
            console.log("åŠ&nbsp;è½½ç•Œé¢å®Œæˆ"), this.setint &amp;&amp; (clearInterval(this.setint), this.setint = null), Laya.Scene.open("game_scene.json", !1),
            window.adsGameCon.recordOpen();
        }
        progressHander(s) {}
    }
    class R extends Laya.Scene {
        constructor() {
            super(), this.newScene = Laya.stage.addChild(new Laya.Scene3D);
            var s = this.newScene.addChild(new Laya.Camera(0, .1, 100));
            s.transform.translate(new Laya.Vector3(0, 6, 9.5)), s.transform.rotate(new Laya.Vector3(-15, 0, 0), !0, !1);
            var o = new Laya.DirectionLight;
            this.newScene.addChild(o), o.color = new Laya.Vector3(.6, .6, .6);
            var d = o.transform.worldMatrix;
            d.setForward(new Laya.Vector3(-1, -1, -1)), o.transform.worldMatrix = d;
            var h = this.newScene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createPlane(10, 10, 10, 10))),
                p = new Laya.BlinnPhongMaterial;
            Laya.Texture2D.load("res/grass.png", Laya.Handler.create(this, (function(s) {
                p.albedoTexture = s
            })));
            var A = p.tilingOffset;
            A.setValue(5, 5, 0, 0), p.tilingOffset = A, h.meshRenderer.material = p;
            var S = h.addComponent(Laya.PhysicsCollider),
                E = new Laya.BoxColliderShape(10, 0, 10);
            S.colliderShape = E, S.friction = 2, S.restitution = .3, this.mat1 = new Laya.BlinnPhongMaterial, Laya.Texture2D.load("res/wood.jpg", Laya.Handler.create(this, (function(s) {
                this.mat1.albedoTexture = s, Laya.timer.once(100, this, (function() {
                    this.addBox()
                }))
            })))
        }
        addBox() {
            var s = this.newScene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(.75, .5, .5)));
            s.meshRenderer.material = this.mat1;
            var o = s.transform,
                d = o.position;
            d.setValue(0, 10, 0), o.position = d;
            var h = s.addComponent(Laya.Rigidbody3D),
                p = new Laya.BoxColliderShape(.75, .5, .5);
            h.colliderShape = p, h.mass = 10
        }
    }
    var B = {
        "æ¸¸æˆåç§°": {
            cn: {
                value: "æ—‹è½¬ç‹¬æœ¨æ¡¥",
                style: null
            },
            en: {
                value: "Rotating Bridge",
                style: null
            }
        },
        "å¹¿å‘ŠåŠ&nbsp;è½½ä¸­": {
            cn: {
                value: "å¹¿å‘ŠåŠ&nbsp;è½½ä¸­",
                style: null
            },
            en: {
                value: "Advertising loading",
                style: null
            },
            id: {
                value: "Memuatkan iklan",
                style: null
            },
            hi: {
                value: "à¤¸à¤¾à¤µà¤§à¤¾à¤¨à¤¿à¤• à¤²à¥‹à¤¡ à¤•à¤¿à¤¯à¤¾ à¤œà¤¾ à¤°à¤¹à¤¾ à¤¹à¥ˆ",
                style: null
            },
            vi: {
                value: "ÄÄƒng quáº£ng cÃ¡o",
                style: null
            },
            "pt-br": {
                value: "Carregamento publicitÃ¡rio",
                style: null
            },
            th: {
                value: "à¹‚à¸«à¸¥à¸”à¹‚à¸†à¸©à¸“à¸²",
                style: null
            }
        },
        "å¹¿å‘ŠåŠ&nbsp;è½½å¤±è´¥": {
            cn: {
                value: "è¯·æ‚¨ç¨åŽå†è¯•",
                style: null
            },
            en: {
                value: "Please try again later",
                style: null
            },
            id: {
                value: "Coba lagi nanti",
                style: null
            },
            hi: {
                value: "à¤•à¥ƒà¤ªà¤¯à¤¾ à¤¬à¤¾à¤¦ à¤®à¥‡à¤‚ à¤¦à¥à¤¬à¤¾à¤°à¤¾ à¤ªà¥à¤°à¤¯à¤¾à¤¸ à¤•à¤°à¥‡à¤‚",
                style: null
            },
            vi: {
                value: "HÃ£y thá»­ láº¡i sau",
                style: null
            },
            "pt-br": {
                value: "Tente de novo mais tarde",
                style: null
            },
            th: {
                value: "à¸à¸£à¸¸à¸“à¸²à¸¥à¸­à¸‡à¸­à¸µà¸à¸„à¸£à¸±à¹‰à¸‡à¸&nbsp;à¸²à¸¢à¸«à¸¥à¸±à¸‡",
                style: null
            }
        },
        "å¹¿å‘Šè·³è¿‡": {
            cn: {
                value: "å®Œæ•´è§‚çœ‹å¹¿å‘ŠåŽæ‚¨æ‰èƒ½èŽ·å¾—å¥–åŠ±",
                style: null
            },
            en: {
                value: "You can get rewards \n after watching the full ad",
                style: null
            },
            id: {
                value: "Tonton video hingga selesai untuk mendapatkan hadiah!",
                style: null
            },
            hi: {
                value: "à¤ªà¥à¤°à¤¸à¥à¤•à¤¾à¤° à¤ªà¤¾à¤¨à¥‡ à¤•à¥‡ à¤²à¤¿à¤ à¤ªà¥‚à¤°à¤¾ à¤µà¥€à¤¡à¤¿à¤¯à¥‹ à¤¦à¥‡à¤–à¥‡à¤‚!",
                style: null
            },
            vi: {
                value: "Xem háº¿t video Ä‘á»ƒ nháº­n thÆ°á»Ÿng!",
                style: null
            },
            "pt-br": {
                value: "Assista ao vÃ­deo atÃ© o fim para receber recompensas.",
                style: null
            },
            th: {
                value: "à¸”à¸¹à¸§à¸´à¸”à¸µà¹‚à¸­à¹ƒà¸«à¹‰à¸ˆà¸šà¹€à¸žà¸·à¹ˆà¸­à¸£à¸±à¸šà¸£à¸²à¸‡à¸§à¸±à¸¥!",
                style: null
            }
        },
        "è°¢è°¢": {
            cn: {
                value: "ä¸äº†ï¼Œè°¢è°¢",
                style: null
            },
            en: {
                value: "No, thanks",
                style: null
            }
        },
        "ä¸‹ä¸€å…³": {
            cn: {
                value: "ä¸‹ä¸€å…³",
                style: null
            },
            en: {
                value: "Next level",
                style: null
            },
            id: {
                value: "Tingkat berikutnya",
                style: null
            },
            "pt-br": {
                value: "Seguinte nÃ­vel",
                style: null
            },
            vi: {
                value: "Má»©c káº¿",
                style: null
            },
            hi: {
                value: "à¤…à¤—à¤²à¤¾ à¤¸à¥à¤¤à¤°",
                style: null
            },
            th: {
                value: "à¸£à¸°à¸”à¸±à¸šà¸–à¸±à¸”à¹„à¸›",
                style: null
            }
        },
        "ç¬¬å‡&nbsp;å…³": {
            cn: {
                value: "ç¬¬$level$å…³",
                style: null
            },
            en: {
                value: "Level $level$",
                style: null
            }
        },
        "åŠ&nbsp;è½½æ¿€åŠ±æˆåŠŸå›žè°ƒ": {
            cn: {
                value: "åŠ&nbsp;è½½æ¿€åŠ±è§†é¢‘æˆåŠŸ\n$num$ç§’åŽå‘èµ·æˆåŠŸå›žè°ƒ",
                style: null
            },
            en: {
                value: "Loaded rewarded success\nCallback was initiated in $num$ seconds",
                style: null
            }
        },
        "åŠ&nbsp;è½½æ’å±æˆåŠŸå›žè°ƒ": {
            cn: {
                value: "åŠ&nbsp;è½½æ’å±è§†é¢‘æˆåŠŸ\n$num$ç§’åŽå‘èµ·æˆåŠŸå›žè°ƒ",
                style: null
            },
            en: {
                value: "Loaded insert screen success\nCallback was initiated in $num$ seconds",
                style: null
            }
        },
        "å†æ¥ä¸€æ¬¡": {
            cn: {
                value: "å†æ¥ä¸€æ¬¡",
                style: null
            },
            en: {
                value: "Try again",
                style: null
            }
        },
        "ç‚¹å‡»å±å¹•æ­å»ºæ¡¥æ¢": {
            cn: {
                value: "ç‚¹å‡»å±å¹•æ­å»ºæ¡¥æ¢",
                style: null
            },
            en: {
                value: "Tap the screen to build a bridge",
                style: null
            }
        },
        "ä¸ç”¨äº†": {
            cn: {
                value: "ä¸ç”¨äº†",
                style: null
            },
            en: {
                value: "No,thanks",
                style: null
            }
        },
        "ä½“åŠ› +5": {
            cn: {
                value: "ä½“åŠ› +5",
                style: null
            },
            en: {
                value: "AP +5",
                style: null
            }
        },
        "é¢†å–ä½“åŠ›": {
            cn: {
                value: "é¢†å–ä½“åŠ›",
                style: null
            },
            en: {
                value: "Get AP",
                style: null
            }
        },
        "å…è´¹å¤æ´»": {
            cn: {
                value: "å…è´¹å¤æ´»",
                style: null
            },
            en: {
                value: "Revive",
                style: null
            }
        },
        "1000 éšæœºèŽ·å–": {
            cn: {
                value: "1000 éšæœºèŽ·å–",
                style: null
            },
            en: {
                value: "1000 Get randomly",
                style: null
            }
        },
        "xéšæœºèŽ·å–": {
            cn: {
                value: "$num$éšæœºèŽ·å–",
                style: null
            },
            en: {
                value: "$num$ Get randomly",
                style: null
            }
        },
        "é¢†å–ç¦åˆ©": {
            cn: {
                value: "é¢†å–ç¦åˆ©",
                style: null
            },
            en: {
                value: "Get benefits",
                style: null
            }
        },
        "ç¬¬ä¸€å¤©": {
            cn: {
                value: "ç¬¬ä¸€å¤©",
                style: null
            },
            en: {
                value: "Day 1",
                style: null
            }
        },
        "ç¬¬äºŒå¤©": {
            cn: {
                value: "ç¬¬äºŒå¤©",
                style: null
            },
            en: {
                value: "Day 2",
                style: null
            }
        },
        "ç¬¬ä¸‰å¤©": {
            cn: {
                value: "ç¬¬ä¸‰å¤©",
                style: null
            },
            en: {
                value: "Day 3",
                style: null
            }
        },
        "ç¬¬å››å¤©": {
            cn: {
                value: "ç¬¬å››å¤©",
                style: null
            },
            en: {
                value: "Day 4",
                style: null
            }
        },
        "ç¬¬äº”å¤©": {
            cn: {
                value: "ç¬¬äº”å¤©",
                style: null
            },
            en: {
                value: "Day 5",
                style: null
            }
        },
        "ç¬¬å…­å¤©": {
            cn: {
                value: "ç¬¬å…­å¤©",
                style: null
            },
            en: {
                value: "Day 6",
                style: null
            }
        },
        "åŒå€é¢†å–": {
            cn: {
                value: "åŒå€é¢†å–",
                style: null
            },
            en: {
                value: "Get x2",
                style: null
            }
        },
        "èŽ·å¾—": {
            cn: {
                value: "èŽ·å¾—",
                style: null
            },
            en: {
                value: "Obtain",
                style: null
            }
        },
        "ä½“åŠ›+x": {
            cn: {
                value: "ä½“åŠ› +$num$",
                style: null
            },
            en: {
                value: "AP +$num$",
                style: null
            }
        },
        "xéšæœºèŽ·å¾—": {
            cn: {
                value: "xéšæœºèŽ·å¾—",
                style: null
            },
            en: {
                value: "x Get randomly",
                style: null
            }
        },
        "é‡‘å¸ä¸è¶³": {
            cn: {
                value: "é‡‘å¸ä¸è¶³",
                style: null
            },
            en: {
                value: "Not enough coins",
                style: null
            }
        },
        "ä½“åŠ›å·²æ»¡": {
            cn: {
                value: "ä½“åŠ›å·²æ»¡",
                style: null
            },
            en: {
                value: "Full AP",
                style: null
            }
        },
        "ä½“åŠ›å‘Šæ€¥": {
            cn: {
                value: "ä½“åŠ›å‘Šæ€¥",
                style: null
            },
            en: {
                value: "Lack of AP",
                style: null
            }
        },
        "800 é‡‘å¸": {
            cn: {
                value: "800 é‡‘å¸",
                style: null
            },
            en: {
                value: "800 gold coins",
                style: null
            }
        },
        "å·²æ‹¥æœ‰": {
            cn: {
                value: "å·²æ‹¥æœ‰",
                style: null
            },
            en: {
                value: "Owned",
                style: null
            }
        },
        "å†æŽ¥å†åŽ‰": {
            cn: {
                value: "å†æŽ¥å†åŽ‰",
                style: null
            },
            en: {
                value: "Try again",
                style: null
            }
        },
        "å¾ˆå¥½ï¼": {
            cn: {
                value: "å¾ˆå¥½ï¼",
                style: null
            },
            en: {
                value: "Well Done!",
                style: null
            }
        },
        "åŽ‰å®³ï¼": {
            cn: {
                value: "åŽ‰å®³ï¼",
                style: null
            },
            en: {
                value: "Awesome!",
                style: null
            }
        },
        "å®Œç¾Žï¼": {
            cn: {
                value: "å®Œç¾Žï¼",
                style: null
            },
            en: {
                value: "Perfect!",
                style: null
            }
        },
        "æ—&nbsp;æ•Œè¿žå‡» x1": {
            cn: {
                value: "æ—&nbsp;æ•Œè¿žå‡» x1",
                style: null
            },
            en: {
                value: "Combo x1",
                style: null
            }
        },
        "æ—&nbsp;æ•Œè¿žå‡» x2": {
            cn: {
                value: "æ—&nbsp;æ•Œè¿žå‡» x2",
                style: null
            },
            en: {
                value: "Combo x2",
                style: null
            }
        },
        "æ—&nbsp;æ•Œè¿žå‡» x3": {
            cn: {
                value: "æ—&nbsp;æ•Œè¿žå‡» x3",
                style: null
            },
            en: {
                value: "Combo x3",
                style: null
            }
        },
        "å·²é¢†å–": {
            cn: {
                value: "å·²é¢†å–",
                style: null
            },
            en: {
                value: "Received",
                style: null
            }
        },
        "æ—‹è½¬ç‹¬æœ¨æ¡¥": {
            cn: {
                value: "æ—‹è½¬ç‹¬æœ¨æ¡¥",
                style: null
            },
            en: {
                value: "Rotating Bridge",
                style: null
            }
        },
        "æŽ’è¡Œæ¦œ": {
            cn: {
                value: "æŽ’è¡Œæ¦œ",
                style: null
            },
            en: {
                value: "Ranking",
                style: null
            }
        },
        "å•†åº—": {
            cn: {
                value: "å•†åº—",
                style: null
            },
            en: {
                value: "Store",
                style: null
            }
        },
        "ç™»å½•ç¬¬7å¤©": {
            cn: {
                value: "ç™»å½•ç¬¬7å¤©",
                style: null
            },
            en: {
                value: "Log in Day 7",
                style: null
            }
        },
        "æ¯æ—¥ç­¾åˆ°": {
            cn: {
                value: "æ¯æ—¥ç­¾åˆ°",
                style: null
            },
            en: {
                value: "Daily check-in",
                style: null
            }
        },
        "å¼€å§‹æ¸¸æˆ": {
            cn: {
                value: "å¼€å§‹æ¸¸æˆ",
                style: null
            },
            en: {
                value: "Start the game",
                style: null
            }
        },
        "æ­å–œè¿‡å…³": {
            cn: {
                value: "æ­å–œè¿‡å…³",
                style: null
            },
            en: {
                value: "Congratulations",
                style: null
            }
        }
    };
    const O = {
        init: () =&gt; {},
        getSumByList: s =&gt; {
            if (!Array.isArray(s) || 0 == s.length) return 0;
            let o = 0;
            return s.forEach(s =&gt; {
                o += Number(s)
            }), o
        },
        getRandByWeightList: (s, o) =&gt; {
            if (!Array.isArray(s) || 0 == s.length) return [];
            let d = s.length;
            o = o &gt; d ? d : o;
            let h = [];
            s.forEach(s =&gt; {
                h.push(Math.abs(Number(s)) + 1)
            });
            let p = O.getSumByList(h),
                A = [],
                S = {};
            for (; o;) {
                let s = Math.floor(Math.random() * p),
                    E = 0,
                    L = 0;
                for (; E &lt; d &amp;&amp; (L += h[E], !(L &gt;= s)); E++);
                S[E] || (S[E] = 1, h[E] = 0, p = O.getSumByList(h), A.push(E), o--)
            }
            return A
        },
        getObjVal(s, o, d, h = !1) {
            s = s || {};
            let p = o.split(".") || [];
            if (!Array.isArray(p) || 0 == p.length) return s;
            let A = s,
                S = null;
            return p.forEach((s, o) =&gt; {
                o + 1 == p.length ? (void 0 === A[s] &amp;&amp; (A[s] = d || ""), S = A[s] = h ? d : A[s]) : (A[s] = A[s] || {}, A = A[s])
            }), S
        }
    };
    (() =&gt; {
        let defineProperty = function(s, o, d) {
            s.prototype.hasOwnProperty(o) || Object.defineProperty(s.prototype, o, {
                value: d,
                writable: !0,
                enumerable: !1,
                configurable: !0
            })
        };
        defineProperty(Number, "integer", (function() {
            return Math[this &lt; 0 ? "ceil" : "floor"](this)
        })), defineProperty(String, "trim", (function() {
            return this.replace(/^\s+|\s+$/g, "")
        })), defineProperty(Array, "unique", (function() {
            for (var s, o = [], d = {}, h = 0; null != (s = this[h]); h++) d[s] || (o.push(s), d[s] = !0);
            return o
        })), defineProperty(Array, "shuffle", (function() {
            let s = this,
                o = s.length,
                d = 0;
            for (; o;) d = Math.floor(Math.random() * o--), [s[o], s[d]] = [s[d], s[o]];
            return s
        })), defineProperty(Array, "rand", (function(s, o = !0) {
            let d = this.length;
            if (0 == d) return [];
            let h = [];
            switch (!0) {
                case s &lt; d / 2:
                    let p = {};
                    for (; s;) {
                        let o = Math.floor(Math.random() * d);
                        p[o] || (p[o] = 1, h.push(this[o]), s--)
                    }
                    break;
                case s &lt;= d:
                    let A = Object.assign([], this);
                    A.shuffle(), h = A.slice(0, s);
                    break;
                default:
                    if (o) {
                        let o = [];
                        for (; s;) 0 == o.length &amp;&amp; (o = Object.assign([], this), o.shuffle()), h.push(o.shift()), s--;
                        h.shuffle()
                    } else
                        for (; s;) {
                            let o = Math.floor(Math.random() * d);
                            h.push(this[o]), s--
                        }
            }
            return h
        })), defineProperty(Array, "repeat", (function(s) {
            let o = Object.assign([], this);
            if (s &lt;= 1) return o;
            for (; s &gt; 1;) o = o.concat(this), s--;
            return o
        })), defineProperty(Array, "inArray", (function(s) {
            return this.indexOf(s) &gt; -1
        })), defineProperty(String, "repeat", (function(s) {
            if (null == this) throw new TypeError("can't convert " + this + " to object");
            var o = "" + this;
            if ((s = +s) != s &amp;&amp; (s = 0), s &lt; 0) throw new RangeError("repeat count must be non-negative");
            if (s == 1 / 0) throw new RangeError("repeat count must be less than infinity");
            if (s = Math.floor(s), 0 == o.length || 0 == s) return "";
            if (o.length * s &gt;= 1 &lt;&lt; 28) throw new RangeError("repeat count must not overflow maximum string size");
            for (var d = ""; 1 == (1 &amp; s) &amp;&amp; (d += o), 0 != (s &gt;&gt;&gt;= 1);) o += o;
            return d
        })), defineProperty(String, "padStart", (function(s, o) {
            return s &gt;&gt;= 0, o = String(void 0 !== o ? o : " "), this.length &gt; s || "" === o ? String(this) : ((s -= this.length) &gt; o.length &amp;&amp; (o += o.repeat(s / o.length)), o.slice(0, s) + String(this))
        })), defineProperty(String, "padEnd", (function(s, o) {
            return s &gt;&gt;= 0, o = String(void 0 !== o ? o : " "), this.length &gt; s || "" === o ? String(this) : ((s -= this.length) &gt; o.length &amp;&amp; (o += o.repeat(s / o.length)), String(this) + o.slice(0, s))
        })), defineProperty(String, "interpolate", (function(s) {
            const o = Object.keys(s),
                d = Object.values(s);
            return new Function(...o, `return \`${this}\`;`)(...d)
        }))
    })();
    let V, U = {};
    ! function(s) {
        var o, d, h = h || function(s) {
            function t() {}
            var o = {},
                d = o.lib = {},
                h = d.Base = {
                    extend: function(s) {
                        t.prototype = this;
                        var o = new t;
                        return s &amp;&amp; o.mixIn(s), o.hasOwnProperty("init") || (o.init = function() {
                            o.$super.init.apply(this, arguments)
                        }), (o.init.prototype = o).$super = this, o
                    },
                    create: function() {
                        var s = this.extend();
                        return s.init.apply(s, arguments), s
                    },
                    init: function() {},
                    mixIn: function(s) {
                        for (var o in s) s.hasOwnProperty(o) &amp;&amp; (this[o] = s[o]);
                        s.hasOwnProperty("toString") &amp;&amp; (this.toString = s.toString)
                    },
                    clone: function() {
                        return this.init.prototype.extend(this)
                    }
                },
                p = d.WordArray = h.extend({
                    init: function(s, o) {
                        s = this.words = s || [], this.sigBytes = null != o ? o : 4 * s.length
                    },
                    toString: function(s) {
                        return (s || S).stringify(this)
                    },
                    concat: function(s) {
                        var o = this.words,
                            d = s.words,
                            h = this.sigBytes;
                        if (s = s.sigBytes, this.clamp(), h % 4)
                            for (var p = 0; p &lt; s; p++) o[h + p &gt;&gt;&gt; 2] |= (d[p &gt;&gt;&gt; 2] &gt;&gt;&gt; 24 - p % 4 * 8 &amp; 255) &lt;&lt; 24 - (h + p) % 4 * 8;
                        else if (65535 &lt; d.length)
                            for (p = 0; p &lt; s; p += 4) o[h + p &gt;&gt;&gt; 2] = d[p &gt;&gt;&gt; 2];
                        else o.push.apply(o, d);
                        return this.sigBytes += s, this
                    },
                    clamp: function() {
                        var o = this.words,
                            d = this.sigBytes;
                        o[d &gt;&gt;&gt; 2] &amp;= 4294967295 &lt;&lt; 32 - d % 4 * 8, o.length = s.ceil(d / 4)
                    },
                    clone: function() {
                        var s = h.clone.call(this);
                        return s.words = this.words.slice(0), s
                    },
                    random: function(o) {
                        for (var d = [], h = 0; h &lt; o; h += 4) d.push(4294967296 * s.random() | 0);
                        return new p.init(d, o)
                    }
                }),
                A = o.enc = {},
                S = A.Hex = {
                    stringify: function(s) {
                        var o = s.words;
                        s = s.sigBytes;
                        for (var d = [], h = 0; h &lt; s; h++) {
                            var p = o[h &gt;&gt;&gt; 2] &gt;&gt;&gt; 24 - h % 4 * 8 &amp; 255;
                            d.push((p &gt;&gt;&gt; 4).toString(16)), d.push((15 &amp; p).toString(16))
                        }
                        return d.join("")
                    },
                    parse: function(s) {
                        for (var o = s.length, d = [], h = 0; h &lt; o; h += 2) d[h &gt;&gt;&gt; 3] |= parseInt(s.substr(h, 2), 16) &lt;&lt; 24 - h % 8 * 4;
                        return new p.init(d, o / 2)
                    }
                },
                E = A.Latin1 = {
                    stringify: function(s) {
                        var o = s.words;
                        s = s.sigBytes;
                        for (var d = [], h = 0; h &lt; s; h++) d.push(String.fromCharCode(o[h &gt;&gt;&gt; 2] &gt;&gt;&gt; 24 - h % 4 * 8 &amp; 255));
                        return d.join("")
                    },
                    parse: function(s) {
                        for (var o = s.length, d = [], h = 0; h &lt; o; h++) d[h &gt;&gt;&gt; 2] |= (255 &amp; s.charCodeAt(h)) &lt;&lt; 24 - h % 4 * 8;
                        return new p.init(d, o)
                    }
                },
                L = A.Utf8 = {
                    stringify: function(s) {
                        try {
                            return decodeURIComponent(escape(E.stringify(s)))
                        } catch (s) {
                            throw Error("Malformed UTF-8 data")
                        }
                    },
                    parse: function(s) {
                        return E.parse(unescape(encodeURIComponent(s)))
                    }
                },
                w = d.BufferedBlockAlgorithm = h.extend({
                    reset: function() {
                        this._data = new p.init, this._nDataBytes = 0
                    },
                    _append: function(s) {
                        "string" == typeof s &amp;&amp; (s = L.parse(s)), this._data.concat(s), this._nDataBytes += s.sigBytes
                    },
                    _process: function(o) {
                        var d = this._data,
                            h = d.words,
                            A = d.sigBytes,
                            S = this.blockSize,
                            E = A / (4 * S);
                        if (o = (E = o ? s.ceil(E) : s.max((0 | E) - this._minBufferSize, 0)) * S, A = s.min(4 * o, A), o) {
                            for (var L = 0; L &lt; o; L += S) this._doProcessBlock(h, L);
                            L = h.splice(0, o), d.sigBytes -= A
                        }
                        return new p.init(L, A)
                    },
                    clone: function() {
                        var s = h.clone.call(this);
                        return s._data = this._data.clone(), s
                    },
                    _minBufferSize: 0
                });
            d.Hasher = w.extend({
                cfg: h.extend(),
                init: function(s) {
                    this.cfg = this.cfg.extend(s), this.reset()
                },
                reset: function() {
                    w.reset.call(this), this._doReset()
                },
                update: function(s) {
                    return this._append(s), this._process(), this
                },
                finalize: function(s) {
                    return s &amp;&amp; this._append(s), this._doFinalize()
                },
                blockSize: 16,
                _createHelper: function(s) {
                    return function(o, d) {
                        return new s.init(d).finalize(o)
                    }
                },
                _createHmacHelper: function(s) {
                    return function(o, d) {
                        return new b.HMAC.init(s, d).finalize(o)
                    }
                }
            });
            var b = o.algo = {};
            return o
        }(Math);
        ! function(s) {
            function e(s) {
                return 4294967296 * (s - (0 | s)) | 0
            }
            for (var o = h, d = (A = o.lib).WordArray, p = A.Hasher, A = o.algo, S = [], E = [], L = 2, w = 0; w &lt; 64;) {
                var b;
                e: {
                    b = L;
                    for (var _ = s.sqrt(b), I = 2; I &lt;= _; I++)
                        if (!(b % I)) {
                            b = !1;
                            break e
                        }
                    b = !0
                }
                b &amp;&amp; (w &lt; 8 &amp;&amp; (S[w] = e(s.pow(L, .5))), E[w] = e(s.pow(L, 1 / 3)), w++), L++
            }
            var T = [];
            A = A.SHA256 = p.extend({
                _doReset: function() {
                    this._hash = new d.init(S.slice(0))
                },
                _doProcessBlock: function(s, o) {
                    for (var d = this._hash.words, h = d[0], p = d[1], A = d[2], S = d[3], L = d[4], w = d[5], b = d[6], _ = d[7], I = 0; I &lt; 64; I++) {
                        if (I &lt; 16) T[I] = 0 | s[o + I];
                        else {
                            var x = T[I - 15],
                                k = T[I - 2];
                            T[I] = ((x &lt;&lt; 25 | x &gt;&gt;&gt; 7) ^ (x &lt;&lt; 14 | x &gt;&gt;&gt; 18) ^ x &gt;&gt;&gt; 3) + T[I - 7] + ((k &lt;&lt; 15 | k &gt;&gt;&gt; 17) ^ (k &lt;&lt; 13 | k &gt;&gt;&gt; 19) ^ k &gt;&gt;&gt; 10) + T[I - 16]
                        }
                        x = _ + ((L &lt;&lt; 26 | L &gt;&gt;&gt; 6) ^ (L &lt;&lt; 21 | L &gt;&gt;&gt; 11) ^ (L &lt;&lt; 7 | L &gt;&gt;&gt; 25)) + (L &amp; w ^ ~L &amp; b) + E[I] + T[I], k = ((h &lt;&lt; 30 | h &gt;&gt;&gt; 2) ^ (h &lt;&lt; 19 | h &gt;&gt;&gt; 13) ^ (h &lt;&lt; 10 | h &gt;&gt;&gt; 22)) + (h &amp; p ^ h &amp; A ^ p &amp; A), _ = b, b = w, w = L, L = S + x | 0, S = A, A = p, p = h, h = x + k | 0
                    }
                    d[0] = d[0] + h | 0, d[1] = d[1] + p | 0, d[2] = d[2] + A | 0, d[3] = d[3] + S | 0, d[4] = d[4] + L | 0, d[5] = d[5] + w | 0, d[6] = d[6] + b | 0, d[7] = d[7] + _ | 0
                },
                _doFinalize: function() {
                    var o = this._data,
                        d = o.words,
                        h = 8 * this._nDataBytes,
                        p = 8 * o.sigBytes;
                    return d[p &gt;&gt;&gt; 5] |= 128 &lt;&lt; 24 - p % 32, d[14 + (64 + p &gt;&gt;&gt; 9 &lt;&lt; 4)] = s.floor(h / 4294967296), d[15 + (64 + p &gt;&gt;&gt; 9 &lt;&lt; 4)] = h, o.sigBytes = 4 * d.length, this._process(), this._hash
                },
                clone: function() {
                    var s = p.clone.call(this);
                    return s._hash = this._hash.clone(), s
                }
            }), o.SHA256 = p._createHelper(A), o.HmacSHA256 = p._createHmacHelper(A)
        }(Math), d = h.enc.Utf8, h.algo.HMAC = h.lib.Base.extend({
                init: function(s, o) {
                    s = this._hasher = new s.init, "string" == typeof o &amp;&amp; (o = d.parse(o));
                    var h = s.blockSize,
                        p = 4 * h;
                    o.sigBytes &gt; p &amp;&amp; (o = s.finalize(o)), o.clamp();
                    for (var A = this._oKey = o.clone(), S = this._iKey = o.clone(), E = A.words, L = S.words, w = 0; w &lt; h; w++) E[w] ^= 1549556828, L[w] ^= 909522486;
                    A.sigBytes = S.sigBytes = p, this.reset()
                },
                reset: function() {
                    var s = this._hasher;
                    s.reset(), s.update(this._iKey)
                },
                update: function(s) {
                    return this._hasher.update(s), this
                },
                finalize: function(s) {
                    var o = this._hasher;
                    return s = o.finalize(s), o.reset(), o.finalize(this._oKey.clone().concat(s))
                }
            }), o = h.lib.WordArray, h.enc.Base64 = {
                stringify: function(s) {
                    var o = s.words,
                        d = s.sigBytes,
                        h = this._map;
                    s.clamp(), s = [];
                    for (var p = 0; p &lt; d; p += 3)
                        for (var A = (o[p &gt;&gt;&gt; 2] &gt;&gt;&gt; 24 - p % 4 * 8 &amp; 255) &lt;&lt; 16 | (o[p + 1 &gt;&gt;&gt; 2] &gt;&gt;&gt; 24 - (p + 1) % 4 * 8 &amp; 255) &lt;&lt; 8 | o[p + 2 &gt;&gt;&gt; 2] &gt;&gt;&gt; 24 - (p + 2) % 4 * 8 &amp; 255, S = 0; S &lt; 4 &amp;&amp; p + .75 * S &lt; d; S++) s.push(h.charAt(A &gt;&gt;&gt; 6 * (3 - S) &amp; 63));
                    if (o = h.charAt(64))
                        for (; s.length % 4;) s.push(o);
                    return s.join("")
                },
                parse: function(s) {
                    var d = s.length,
                        h = this._map;
                    !(p = h.charAt(64)) || -1 != (p = s.indexOf(p)) &amp;&amp; (d = p);
                    for (var p = [], A = 0, S = 0; S &lt; d; S++)
                        if (S % 4) {
                            var E = h.indexOf(s.charAt(S - 1)) &lt;&lt; S % 4 * 2,
                                L = h.indexOf(s.charAt(S)) &gt;&gt;&gt; 6 - S % 4 * 2;
                            p[A &gt;&gt;&gt; 2] |= (E | L) &lt;&lt; 24 - A % 4 * 8, A++
                        }
                    return o.create(p, A)
                },
                _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
            },
            function(s) {
                var o, d, h, p, A, S, E, L, w, b, _, I, T;
                (o = s.EGAErrorSeverity || (s.EGAErrorSeverity = {}))[o.Undefined = 0] = "Undefined", o[o.Debug = 1] = "Debug", o[o.Info = 2] = "Info", o[o.Warning = 3] = "Warning", o[o.Error = 4] = "Error", o[o.Critical = 5] = "Critical", (d = s.EGAProgressionStatus || (s.EGAProgressionStatus = {}))[d.Undefined = 0] = "Undefined", d[d.Start = 1] = "Start", d[d.Complete = 2] = "Complete", d[d.Fail = 3] = "Fail", (h = s.EGAResourceFlowType || (s.EGAResourceFlowType = {}))[h.Undefined = 0] = "Undefined", h[h.Source = 1] = "Source", h[h.Sink = 2] = "Sink", (p = s.EGAAdAction || (s.EGAAdAction = {}))[p.Undefined = 0] = "Undefined", p[p.Clicked = 1] = "Clicked", p[p.Show = 2] = "Show", p[p.FailedShow = 3] = "FailedShow", p[p.RewardReceived = 4] = "RewardReceived", (A = s.EGAAdError || (s.EGAAdError = {}))[A.Undefined = 0] = "Undefined", A[A.Unknown = 1] = "Unknown", A[A.Offline = 2] = "Offline", A[A.NoFill = 3] = "NoFill", A[A.InternalError = 4] = "InternalError", A[A.InvalidRequest = 5] = "InvalidRequest", A[A.UnableToPrecache = 6] = "UnableToPrecache", (S = s.EGAAdType || (s.EGAAdType = {}))[S.Undefined = 0] = "Undefined", S[S.Video = 1] = "Video", S[S.RewardedVideo = 2] = "RewardedVideo", S[S.Playable = 3] = "Playable", S[S.Interstitial = 4] = "Interstitial", S[S.OfferWall = 5] = "OfferWall", S[S.Banner = 6] = "Banner", (L = (E = s.http || (s.http = {})).EGAHTTPApiResponse || (E.EGAHTTPApiResponse = {}))[L.NoResponse = 0] = "NoResponse", L[L.BadResponse = 1] = "BadResponse", L[L.RequestTimeout = 2] = "RequestTimeout", L[L.JsonEncodeFailed = 3] = "JsonEncodeFailed", L[L.JsonDecodeFailed = 4] = "JsonDecodeFailed", L[L.InternalServerError = 5] = "InternalServerError", L[L.BadRequest = 6] = "BadRequest", L[L.Unauthorized = 7] = "Unauthorized", L[L.UnknownResponseCode = 8] = "UnknownResponseCode", L[L.Ok = 9] = "Ok", L[L.Created = 10] = "Created", (b = (w = s.events || (s.events = {})).EGASdkErrorCategory || (w.EGASdkErrorCategory = {}))[b.Undefined = 0] = "Undefined", b[b.EventValidation = 1] = "EventValidation", b[b.Database = 2] = "Database", b[b.Init = 3] = "Init", b[b.Http = 4] = "Http", b[b.Json = 5] = "Json", (_ = w.EGASdkErrorArea || (w.EGASdkErrorArea = {}))[_.Undefined = 0] = "Undefined", _[_.BusinessEvent = 1] = "BusinessEvent", _[_.ResourceEvent = 2] = "ResourceEvent", _[_.ProgressionEvent = 3] = "ProgressionEvent", _[_.DesignEvent = 4] = "DesignEvent", _[_.ErrorEvent = 5] = "ErrorEvent", _[_.InitHttp = 9] = "InitHttp", _[_.EventsHttp = 10] = "EventsHttp", _[_.ProcessEvents = 11] = "ProcessEvents", _[_.AddEventsToStore = 12] = "AddEventsToStore", _[_.AdEvent = 20] = "AdEvent", (I = w.EGASdkErrorAction || (w.EGASdkErrorAction = {}))[I.Undefined = 0] = "Undefined", I[I.InvalidCurrency = 1] = "InvalidCurrency", I[I.InvalidShortString = 2] = "InvalidShortString", I[I.InvalidEventPartLength = 3] = "InvalidEventPartLength", I[I.InvalidEventPartCharacters = 4] = "InvalidEventPartCharacters", I[I.InvalidStore = 5] = "InvalidStore", I[I.InvalidFlowType = 6] = "InvalidFlowType", I[I.StringEmptyOrNull = 7] = "StringEmptyOrNull", I[I.NotFoundInAvailableCurrencies = 8] = "NotFoundInAvailableCurrencies", I[I.InvalidAmount = 9] = "InvalidAmount", I[I.NotFoundInAvailableItemTypes = 10] = "NotFoundInAvailableItemTypes", I[I.WrongProgressionOrder = 11] = "WrongProgressionOrder", I[I.InvalidEventIdLength = 12] = "InvalidEventIdLength", I[I.InvalidEventIdCharacters = 13] = "InvalidEventIdCharacters", I[I.InvalidProgressionStatus = 15] = "InvalidProgressionStatus", I[I.InvalidSeverity = 16] = "InvalidSeverity", I[I.InvalidLongString = 17] = "InvalidLongString", I[I.DatabaseTooLarge = 18] = "DatabaseTooLarge", I[I.DatabaseOpenOrCreate = 19] = "DatabaseOpenOrCreate", I[I.JsonError = 25] = "JsonError", I[I.FailHttpJsonDecode = 29] = "FailHttpJsonDecode", I[I.FailHttpJsonEncode = 30] = "FailHttpJsonEncode", I[I.InvalidAdAction = 31] = "InvalidAdAction", I[I.InvalidAdType = 32] = "InvalidAdType", I[I.InvalidString = 33] = "InvalidString", (T = w.EGASdkErrorParameter || (w.EGASdkErrorParameter = {}))[T.Undefined = 0] = "Undefined", T[T.Currency = 1] = "Currency", T[T.CartType = 2] = "CartType", T[T.ItemType = 3] = "ItemType", T[T.ItemId = 4] = "ItemId", T[T.Store = 5] = "Store", T[T.FlowType = 6] = "FlowType", T[T.Amount = 7] = "Amount", T[T.Progression01 = 8] = "Progression01", T[T.Progression02 = 9] = "Progression02", T[T.Progression03 = 10] = "Progression03", T[T.EventId = 11] = "EventId", T[T.ProgressionStatus = 12] = "ProgressionStatus", T[T.Severity = 13] = "Severity", T[T.Message = 14] = "Message", T[T.AdAction = 15] = "AdAction", T[T.AdType = 16] = "AdType", T[T.AdSdkName = 17] = "AdSdkName", T[T.AdPlacement = 18] = "AdPlacement"
            }(p = p || {});
        var p, A, S, E;
        p.EGAErrorSeverity, p.EGAProgressionStatus, p.EGAResourceFlowType;
        (function(s) {
            var o, d;
            (d = o = o || {})[d.Error = 0] = "Error", d[d.Warning = 1] = "Warning", d[d.Info = 2] = "Info", d[d.Debug = 3] = "Debug";
            var h = (r.setInfoLog = function(s) {
                r.instance.infoLogEnabled = s
            }, r.setVerboseLog = function(s) {
                r.instance.infoLogVerboseEnabled = s
            }, r.i = function(s) {
                if (r.instance.infoLogEnabled) {
                    var d = "Info/" + r.Tag + ": " + s;
                    r.instance.sendNotificationMessage(d, o.Info)
                }
            }, r.w = function(s) {
                var d = "Warning/" + r.Tag + ": " + s;
                r.instance.sendNotificationMessage(d, o.Warning)
            }, r.e = function(s) {
                var d = "Error/" + r.Tag + ": " + s;
                r.instance.sendNotificationMessage(d, o.Error)
            }, r.ii = function(s) {
                if (r.instance.infoLogVerboseEnabled) {
                    var d = "Verbose/" + r.Tag + ": " + s;
                    r.instance.sendNotificationMessage(d, o.Info)
                }
            }, r.d = function(s) {
                if (r.debugEnabled) {
                    var d = "Debug/" + r.Tag + ": " + s;
                    r.instance.sendNotificationMessage(d, o.Debug)
                }
            }, r.prototype.sendNotificationMessage = function(s, d) {
                switch (d) {
                    case o.Error:
                        console.error(s);
                        break;
                    case o.Warning:
                        console.warn(s);
                        break;
                    case o.Debug:
                        "function" == typeof console.debug ? console.debug(s) : console.log(s);
                        break;
                    case o.Info:
                        console.log(s)
                }
            }, r.instance = new r, r.Tag = "GameAnalytics", r);

            function r() {
                r.debugEnabled = !1
            }
            s.GALogger = h
        })((E = p = p || {}).logging || (E.logging = {})),
        function(s) {
            var o, d, p;

            function c() {}
            o = s.utilities || (s.utilities = {}), d = s.logging.GALogger, c.getHmac = function(s, o) {
                var d = h.HmacSHA256(o, s);
                return h.enc.Base64.stringify(d)
            }, c.stringMatch = function(s, o) {
                return !(!s || !o) &amp;&amp; o.test(s)
            }, c.joinStringArray = function(s, o) {
                for (var d = "", h = 0, p = s.length; h &lt; p; h++) 0 &lt; h &amp;&amp; (d += o), d += s[h];
                return d
            }, c.stringArrayContainsString = function(s, o) {
                if (0 === s.length) return !1;
                for (var d in s)
                    if (s[d] === o) return !0;
                return !1
            }, c.encode64 = function(s) {
                s = encodeURI(s);
                for (var o, d, h, p, A, S = "", E = 0, L = 0, w = 0; h = (o = s.charCodeAt(w++)) &gt;&gt; 2, p = (3 &amp; o) &lt;&lt; 4 | (d = s.charCodeAt(w++)) &gt;&gt; 4, A = (15 &amp; d) &lt;&lt; 2 | (E = s.charCodeAt(w++)) &gt;&gt; 6, L = 63 &amp; E, isNaN(d) ? A = L = 64 : isNaN(E) &amp;&amp; (L = 64), S = S + c.keyStr.charAt(h) + c.keyStr.charAt(p) + c.keyStr.charAt(A) + c.keyStr.charAt(L), o = d = E = 0, h = p = A = L = 0, w &lt; s.length;);
                return S
            }, c.decode64 = function(s) {
                var o, h, p, A, S = "",
                    E = 0,
                    L = 0,
                    w = 0;
                for (/[^A-Za-z0-9\+\/\=]/g.exec(s) &amp;&amp; d.w("There were invalid base64 characters in the input text. Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='. Expect errors in decoding."), s = s.replace(/[^A-Za-z0-9\+\/\=]/g, ""); o = c.keyStr.indexOf(s.charAt(w++)) &lt;&lt; 2 | (p = c.keyStr.indexOf(s.charAt(w++))) &gt;&gt; 4, h = (15 &amp; p) &lt;&lt; 4 | (A = c.keyStr.indexOf(s.charAt(w++))) &gt;&gt; 2, E = (3 &amp; A) &lt;&lt; 6 | (L = c.keyStr.indexOf(s.charAt(w++))), S += String.fromCharCode(o), 64 != A &amp;&amp; (S += String.fromCharCode(h)), 64 != L &amp;&amp; (S += String.fromCharCode(E)), o = h = E = 0, p = A = L = 0, w &lt; s.length;);
                return decodeURI(S)
            }, c.timeIntervalSince1970 = function() {
                var s = new Date;
                return Math.round(s.getTime() / 1e3)
            }, c.createGuid = function() {
                return (c.s4() + c.s4() + "-" + c.s4() + "-4" + c.s4().substr(0, 3) + "-" + c.s4() + "-" + c.s4() + c.s4() + c.s4()).toLowerCase()
            }, c.s4 = function() {
                return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
            }, c.keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", p = c, o.GAUtilities = p
        }(p = p || {}),
        function(s) {
            var o = S.logging.GALogger,
                d = S.utilities.GAUtilities,
                h = S.events.EGASdkErrorCategory,
                p = S.events.EGASdkErrorArea,
                A = S.events.EGASdkErrorAction,
                E = S.events.EGASdkErrorParameter,
                g = function(s, o, d, h, p) {
                    this.category = s, this.area = o, this.action = d, this.parameter = h, this.reason = p
                };
            s.ValidationResult = g;
            var L = (f.validateBusinessEvent = function(s, d, S, L, w) {
                return f.validateCurrency(s) ? d &lt; 0 ? (o.w("Validation fail - business event - amount. Cannot be less than 0. Failed amount: " + d), new g(h.EventValidation, p.BusinessEvent, A.InvalidAmount, E.Amount, d + "")) : f.validateShortString(S, !0) ? f.validateEventPartLength(L, !1) ? f.validateEventPartCharacters(L) ? f.validateEventPartLength(w, !1) ? f.validateEventPartCharacters(w) ? null : (o.w("Validation fail - business event - itemId: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + w), new g(h.EventValidation, p.BusinessEvent, A.InvalidEventPartCharacters, E.ItemId, w)) : (o.w("Validation fail - business event - itemId. Cannot be (null), empty or above 64 characters. String: " + w), new g(h.EventValidation, p.BusinessEvent, A.InvalidEventPartLength, E.ItemId, w)) : (o.w("Validation fail - business event - itemType: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + L), new g(h.EventValidation, p.BusinessEvent, A.InvalidEventPartCharacters, E.ItemType, L)) : (o.w("Validation fail - business event - itemType: Cannot be (null), empty or above 64 characters. String: " + L), new g(h.EventValidation, p.BusinessEvent, A.InvalidEventPartLength, E.ItemType, L)) : (o.w("Validation fail - business event - cartType. Cannot be above 32 length. String: " + S), new g(h.EventValidation, p.BusinessEvent, A.InvalidShortString, E.CartType, S)) : (o.w("Validation fail - business event - currency: Cannot be (null) and need to be A-Z, 3 characters and in the standard at openexchangerates.org. Failed currency: " + s), new g(h.EventValidation, p.BusinessEvent, A.InvalidCurrency, E.Currency, s))
            }, f.validateResourceEvent = function(s, L, w, b, _, I, T) {
                return s == S.EGAResourceFlowType.Undefined ? (o.w("Validation fail - resource event - flowType: Invalid flow type."), new g(h.EventValidation, p.ResourceEvent, A.InvalidFlowType, E.FlowType, "")) : L ? d.stringArrayContainsString(I, L) ? 0 &lt; w ? b ? f.validateEventPartLength(b, !1) ? f.validateEventPartCharacters(b) ? d.stringArrayContainsString(T, b) ? f.validateEventPartLength(_, !1) ? f.validateEventPartCharacters(_) ? null : (o.w("Validation fail - resource event - itemId: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + _), new g(h.EventValidation, p.ResourceEvent, A.InvalidEventPartCharacters, E.ItemId, _)) : (o.w("Validation fail - resource event - itemId: Cannot be (null), empty or above 64 characters. String: " + _), new g(h.EventValidation, p.ResourceEvent, A.InvalidEventPartLength, E.ItemId, _)) : (o.w("Validation fail - resource event - itemType: Not found in list of pre-defined available resource itemTypes. String: " + b), new g(h.EventValidation, p.ResourceEvent, A.NotFoundInAvailableItemTypes, E.ItemType, b)) : (o.w("Validation fail - resource event - itemType: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + b), new g(h.EventValidation, p.ResourceEvent, A.InvalidEventPartCharacters, E.ItemType, b)) : (o.w("Validation fail - resource event - itemType: Cannot be (null), empty or above 64 characters. String: " + b), new g(h.EventValidation, p.ResourceEvent, A.InvalidEventPartLength, E.ItemType, b)) : (o.w("Validation fail - resource event - itemType: Cannot be (null)"), new g(h.EventValidation, p.ResourceEvent, A.StringEmptyOrNull, E.ItemType, "")) : (o.w("Validation fail - resource event - amount: Float amount cannot be 0 or negative. Value: " + w), new g(h.EventValidation, p.ResourceEvent, A.InvalidAmount, E.Amount, w + "")) : (o.w("Validation fail - resource event - currency: Not found in list of pre-defined available resource currencies. String: " + L), new g(h.EventValidation, p.ResourceEvent, A.NotFoundInAvailableCurrencies, E.Currency, L)) : (o.w("Validation fail - resource event - currency: Cannot be (null)"), new g(h.EventValidation, p.ResourceEvent, A.StringEmptyOrNull, E.Currency, ""))
            }, f.validateProgressionEvent = function(s, d, L, w) {
                if (s == S.EGAProgressionStatus.Undefined) return o.w("Validation fail - progression event: Invalid progression status."), new g(h.EventValidation, p.ProgressionEvent, A.InvalidProgressionStatus, E.ProgressionStatus, "");
                if (w &amp;&amp; !L &amp;&amp; d) return o.w("Validation fail - progression event: 03 found but 01+02 are invalid. Progression must be set as either 01, 01+02 or 01+02+03."), new g(h.EventValidation, p.ProgressionEvent, A.WrongProgressionOrder, E.Undefined, d + ":" + L + ":" + w);
                if (L &amp;&amp; !d) return o.w("Validation fail - progression event: 02 found but not 01. Progression must be set as either 01, 01+02 or 01+02+03"), new g(h.EventValidation, p.ProgressionEvent, A.WrongProgressionOrder, E.Undefined, d + ":" + L + ":" + w);
                if (!d) return o.w("Validation fail - progression event: progression01 not valid. Progressions must be set as either 01, 01+02 or 01+02+03"), new g(h.EventValidation, p.ProgressionEvent, A.WrongProgressionOrder, E.Undefined, (d || "") + ":" + (L || "") + ":" + (w || ""));
                if (!f.validateEventPartLength(d, !1)) return o.w("Validation fail - progression event - progression01: Cannot be (null), empty or above 64 characters. String: " + d), new g(h.EventValidation, p.ProgressionEvent, A.InvalidEventPartLength, E.Progression01, d);
                if (!f.validateEventPartCharacters(d)) return o.w("Validation fail - progression event - progression01: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + d), new g(h.EventValidation, p.ProgressionEvent, A.InvalidEventPartCharacters, E.Progression01, d);
                if (L) {
                    if (!f.validateEventPartLength(L, !0)) return o.w("Validation fail - progression event - progression02: Cannot be empty or above 64 characters. String: " + L), new g(h.EventValidation, p.ProgressionEvent, A.InvalidEventPartLength, E.Progression02, L);
                    if (!f.validateEventPartCharacters(L)) return o.w("Validation fail - progression event - progression02: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + L), new g(h.EventValidation, p.ProgressionEvent, A.InvalidEventPartCharacters, E.Progression02, L)
                }
                if (w) {
                    if (!f.validateEventPartLength(w, !0)) return o.w("Validation fail - progression event - progression03: Cannot be empty or above 64 characters. String: " + w), new g(h.EventValidation, p.ProgressionEvent, A.InvalidEventPartLength, E.Progression03, w);
                    if (!f.validateEventPartCharacters(w)) return o.w("Validation fail - progression event - progression03: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + w), new g(h.EventValidation, p.ProgressionEvent, A.InvalidEventPartCharacters, E.Progression03, w)
                }
                return null
            }, f.validateDesignEvent = function(s) {
                return f.validateEventIdLength(s) ? f.validateEventIdCharacters(s) ? null : (o.w("Validation fail - design event - eventId: Non valid characters. Only allowed A-z, 0-9, -_., ()!?. String: " + s), new g(h.EventValidation, p.DesignEvent, A.InvalidEventIdCharacters, E.EventId, s)) : (o.w("Validation fail - design event - eventId: Cannot be (null) or empty. Only 5 event parts allowed seperated by :. Each part need to be 32 characters or less. String: " + s), new g(h.EventValidation, p.DesignEvent, A.InvalidEventIdLength, E.EventId, s))
            }, f.validateErrorEvent = function(s, d) {
                return s == S.EGAErrorSeverity.Undefined ? (o.w("Validation fail - error event - severity: Severity was unsupported value."), new g(h.EventValidation, p.ErrorEvent, A.InvalidSeverity, E.Severity, "")) : f.validateLongString(d, !0) ? null : (o.w("Validation fail - error event - message: Message cannot be above 8192 characters."), new g(h.EventValidation, p.ErrorEvent, A.InvalidLongString, E.Message, d))
            }, f.validateAdEvent = function(s, d, L, w) {
                return s == S.EGAAdAction.Undefined ? (o.w("Validation fail - error event - severity: Severity was unsupported value."), new g(h.EventValidation, p.AdEvent, A.InvalidAdAction, E.AdAction, "")) : d == S.EGAAdType.Undefined ? (o.w("Validation fail - ad event - adType: Ad type was unsupported value."), new g(h.EventValidation, p.AdEvent, A.InvalidAdType, E.AdType, "")) : f.validateShortString(L, !1) ? f.validateString(w, !1) ? null : (o.w("Validation fail - ad event - message: Ad placement cannot be above 64 characters."), new g(h.EventValidation, p.AdEvent, A.InvalidString, E.AdPlacement, w)) : (o.w("Validation fail - ad event - message: Ad SDK name cannot be above 32 characters."), new g(h.EventValidation, p.AdEvent, A.InvalidShortString, E.AdSdkName, L))
            }, f.validateSdkErrorEvent = function(s, d, S, E, L) {
                return !(!f.validateKeys(s, d) || (S === h.Undefined ? (o.w("Validation fail - sdk error event - type: Category was unsupported value."), 1) : E === p.Undefined ? (o.w("Validation fail - sdk error event - type: Area was unsupported value."), 1) : L === A.Undefined &amp;&amp; (o.w("Validation fail - sdk error event - type: Action was unsupported value."), 1)))
            }, f.validateKeys = function(s, o) {
                return !(!d.stringMatch(s, /^[A-z0-9]{32}$/) || !d.stringMatch(o, /^[A-z0-9]{40}$/))
            }, f.validateCurrency = function(s) {
                return !!s &amp;&amp; !!d.stringMatch(s, /^[A-Z]{3}$/)
            }, f.validateEventPartLength = function(s, o) {
                return !(!o || s) || !!s &amp;&amp; !(64 &lt; s.length)
            }, f.validateEventPartCharacters = function(s) {
                return !!d.stringMatch(s, /^[A-Za-z0-9\s\-_\.\(\)\!\?]{1,64}$/)
            }, f.validateEventIdLength = function(s) {
                return !!s &amp;&amp; !!d.stringMatch(s, /^[^:]{1,64}(?::[^:]{1,64}){0,4}$/)
            }, f.validateEventIdCharacters = function(s) {
                return !!s &amp;&amp; !!d.stringMatch(s, /^[A-Za-z0-9\s\-_\.\(\)\!\?]{1,64}(:[A-Za-z0-9\s\-_\.\(\)\!\?]{1,64}){0,4}$/)
            }, f.validateAndCleanInitRequestResponse = function(s, d) {
                if (null == s) return o.w("validateInitRequestResponse failed - no response dictionary."), null;
                var h = {};
                try {
                    var p = s.server_ts;
                    if (!(0 &lt; p)) return o.w("validateInitRequestResponse failed - invalid value in 'server_ts' field."), null;
                    h.server_ts = p
                } catch (d) {
                    return o.w("validateInitRequestResponse failed - invalid type in 'server_ts' field. type=" + typeof s.server_ts + ", value=" + s.server_ts + ", " + d), null
                }
                if (d) {
                    try {
                        var A = s.configs;
                        h.configs = A
                    } catch (d) {
                        return o.w("validateInitRequestResponse failed - invalid type in 'configs' field. type=" + typeof s.configs + ", value=" + s.configs + ", " + d), null
                    }
                    try {
                        var S = s.configs_hash;
                        h.configs_hash = S
                    } catch (d) {
                        return o.w("validateInitRequestResponse failed - invalid type in 'configs_hash' field. type=" + typeof s.configs_hash + ", value=" + s.configs_hash + ", " + d), null
                    }
                    try {
                        var E = s.ab_id;
                        h.ab_id = E
                    } catch (d) {
                        return o.w("validateInitRequestResponse failed - invalid type in 'ab_id' field. type=" + typeof s.ab_id + ", value=" + s.ab_id + ", " + d), null
                    }
                    try {
                        var L = s.ab_variant_id;
                        h.ab_variant_id = L
                    } catch (d) {
                        return o.w("validateInitRequestResponse failed - invalid type in 'ab_variant_id' field. type=" + typeof s.ab_variant_id + ", value=" + s.ab_variant_id + ", " + d), null
                    }
                }
                return h
            }, f.validateBuild = function(s) {
                return !!f.validateShortString(s, !1)
            }, f.validateSdkWrapperVersion = function(s) {
                return !!d.stringMatch(s, /^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/)
            }, f.validateEngineVersion = function(s) {
                return !(!s || !d.stringMatch(s, /^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/))
            }, f.validateUserId = function(s) {
                return !!f.validateString(s, !1) || (o.w("Validation fail - user id: id cannot be (null), empty or above 64 characters."), !1)
            }, f.validateShortString = function(s, o) {
                return !(!o || s) || !(!s || 32 &lt; s.length)
            }, f.validateString = function(s, o) {
                return !(!o || s) || !(!s || 64 &lt; s.length)
            }, f.validateLongString = function(s, o) {
                return !(!o || s) || !(!s || 8192 &lt; s.length)
            }, f.validateConnectionType = function(s) {
                return d.stringMatch(s, /^(wwan|wifi|lan|offline)$/)
            }, f.validateCustomDimensions = function(s) {
                return f.validateArrayOfStrings(20, 32, !1, "custom dimensions", s)
            }, f.validateResourceCurrencies = function(s) {
                if (!f.validateArrayOfStrings(20, 64, !1, "resource currencies", s)) return !1;
                for (var h = 0; h &lt; s.length; ++h)
                    if (!d.stringMatch(s[h], /^[A-Za-z]+$/)) return o.w("resource currencies validation failed: a resource currency can only be A-Z, a-z. String was: " + s[h]), !1;
                return !0
            }, f.validateResourceItemTypes = function(s) {
                if (!f.validateArrayOfStrings(20, 32, !1, "resource item types", s)) return !1;
                for (var d = 0; d &lt; s.length; ++d)
                    if (!f.validateEventPartCharacters(s[d])) return o.w("resource item types validation failed: a resource item type cannot contain other characters than A-z, 0-9, -_., ()!?. String was: " + s[d]), !1;
                return !0
            }, f.validateDimension01 = function(s, o) {
                return !s || !!d.stringArrayContainsString(o, s)
            }, f.validateDimension02 = function(s, o) {
                return !s || !!d.stringArrayContainsString(o, s)
            }, f.validateDimension03 = function(s, o) {
                return !s || !!d.stringArrayContainsString(o, s)
            }, f.validateArrayOfStrings = function(s, d, h, p, A) {
                var S = p;
                if (S = S || "Array", !A) return o.w(S + " validation failed: array cannot be null. "), !1;
                if (0 == h &amp;&amp; 0 == A.length) return o.w(S + " validation failed: array cannot be empty. "), !1;
                if (0 &lt; s &amp;&amp; A.length &gt; s) return o.w(S + " validation failed: array cannot exceed " + s + " values. It has " + A.length + " values."), !1;
                for (var E = 0; E &lt; A.length; ++E) {
                    var L = A[E] ? A[E].length : 0;
                    if (0 === L) return o.w(S + " validation failed: contained an empty string. Array=" + JSON.stringify(A)), !1;
                    if (0 &lt; d &amp;&amp; d &lt; L) return o.w(S + " validation failed: a string exceeded max allowed length (which is: " + d + "). String was: " + A[E]), !1
                }
                return !0
            }, f.validateClientTs = function(s) {
                return !(s &lt; -4294967294 || 4294967294 &lt; s)
            }, f);

            function f() {}
            s.GAValidator = L
        }((S = p = p || {}).validators || (S.validators = {})),
        function(s) {
            ! function(s) {
                var n = function(s, o, d) {
                    this.name = s, this.value = o, this.version = d
                };
                s.NameValueVersion = n;
                var c = function(s, o) {
                    this.name = s, this.version = o
                };
                s.NameVersion = c;
                var o = (r.touch = function() {}, r.getRelevantSdkVersion = function() {
                    return r.sdkGameEngineVersion ? r.sdkGameEngineVersion : r.sdkWrapperVersion
                }, r.getConnectionType = function() {
                    return r.connectionType
                }, r.updateConnectionType = function() {
                    navigator.onLine ? r.connectionType = "ios" === r.buildPlatform || "android" === r.buildPlatform ? "wwan" : "lan" : r.connectionType = "offline"
                }, r.getOSVersionString = function() {
                    return r.buildPlatform + " " + r.osVersionPair.version
                }, r.runtimePlatformToString = function() {
                    return r.osVersionPair.name
                }, r.getBrowserVersionString = function() {
                    var s, o = navigator.userAgent,
                        d = o.match(/(opera|chrome|safari|firefox|ubrowser|msie|trident|fbav(?=\/))\/?\s*(\d+)/i) || [];
                    if (0 == d.length &amp;&amp; "ios" === r.buildPlatform) return "webkit_" + r.osVersion;
                    if (/trident/i.test(d[1])) return "IE " + ((s = /\brv[ :]+(\d+)/g.exec(o) || [])[1] || "");
                    if ("Chrome" === d[1] &amp;&amp; null != (s = o.match(/\b(OPR|Edge|UBrowser)\/(\d+)/))) return s.slice(1).join(" ").replace("OPR", "Opera").replace("UBrowser", "UC").toLowerCase();
                    if (d[1] &amp;&amp; "fbav" === d[1].toLowerCase() &amp;&amp; (d[1] = "facebook", d[2])) return "facebook " + d[2];
                    var h = d[2] ? [d[1], d[2]] : [navigator.appName, navigator.appVersion, "-?"];
                    return null != (s = o.match(/version\/(\d+)/i)) &amp;&amp; h.splice(1, 1, s[1]), h.join(" ").toLowerCase()
                }, r.getDeviceModel = function() {
                    return "unknown"
                }, r.getDeviceManufacturer = function() {
                    return "unknown"
                }, r.matchItem = function(s, o) {
                    var d, h, p, A, S = new c("unknown", "0.0.0"),
                        E = 0,
                        L = 0;
                    for (E = 0; E &lt; o.length; E += 1)
                        if (new RegExp(o[E].value, "i").test(s)) {
                            if (d = new RegExp(o[E].version + "[- /:;]([\\d._]+)", "i"), A = "", (h = s.match(d)) &amp;&amp; h[1] &amp;&amp; (p = h[1]), p) {
                                var w = p.split(/[._]+/);
                                for (L = 0; L &lt; Math.min(w.length, 3); L += 1) A += w[L] + (L &lt; Math.min(w.length, 3) - 1 ? "." : "")
                            } else A = "0.0.0";
                            return S.name = o[E].name, S.version = A, S
                        }
                    return S
                }, r.sdkWrapperVersion = "javascript 4.1.2", r.osVersionPair = r.matchItem([navigator.platform, navigator.userAgent, navigator.appVersion, navigator.vendor].join(" "), [new n("windows_phone", "Windows Phone", "OS"), new n("windows", "Win", "NT"), new n("ios", "iPhone", "OS"), new n("ios", "iPad", "OS"), new n("ios", "iPod", "OS"), new n("android", "Android", "Android"), new n("blackBerry", "BlackBerry", "/"), new n("mac_osx", "Mac", "OS X"), new n("tizen", "Tizen", "Tizen"), new n("linux", "Linux", "rv"), new n("kai_os", "KAIOS", "KAIOS")]), r.buildPlatform = r.runtimePlatformToString(), r.deviceModel = r.getDeviceModel(), r.deviceManufacturer = r.getDeviceManufacturer(), r.osVersion = r.getOSVersionString(), r.browserVersion = r.getBrowserVersionString(), r);

                function r() {}
                s.GADevice = o
            }(s.device || (s.device = {}))
        }(p = p || {}),
        function(s) {
            var o, d;

            function i(s) {
                this.deadline = s, this.ignore = !1, this.async = !1, this.running = !1, this.id = ++i.idCounter
            }
            o = s.threading || (s.threading = {}), i.idCounter = 0, d = i, o.TimedBlock = d
        }(p = p || {}),
        function(s) {
            var o, d;

            function i(s) {
                this.comparer = s, this._subQueues = {}, this._sortedKeys = []
            }
            o = s.threading || (s.threading = {}), i.prototype.enqueue = function(s, o) {
                -1 === this._sortedKeys.indexOf(s) &amp;&amp; this.addQueueOfPriority(s), this._subQueues[s].push(o)
            }, i.prototype.addQueueOfPriority = function(s) {
                var o = this;
                this._sortedKeys.push(s), this._sortedKeys.sort((function(s, d) {
                    return o.comparer.compare(s, d)
                })), this._subQueues[s] = []
            }, i.prototype.peek = function() {
                if (this.hasItems()) return this._subQueues[this._sortedKeys[0]][0];
                throw new Error("The queue is empty")
            }, i.prototype.hasItems = function() {
                return 0 &lt; this._sortedKeys.length
            }, i.prototype.dequeue = function() {
                if (this.hasItems()) return this.dequeueFromHighPriorityQueue();
                throw new Error("The queue is empty")
            }, i.prototype.dequeueFromHighPriorityQueue = function() {
                var s = this._sortedKeys[0],
                    o = this._subQueues[s].shift();
                return 0 === this._subQueues[s].length &amp;&amp; (this._sortedKeys.shift(), delete this._subQueues[s]), o
            }, d = i, o.PriorityQueue = d
        }(p = p || {}),
        function(s) {
            var o, d, h, p, S = A.logging.GALogger;
            (d = o = s.EGAStoreArgsOperator || (s.EGAStoreArgsOperator = {}))[d.Equal = 0] = "Equal", d[d.LessOrEqual = 1] = "LessOrEqual", d[d.NotEqual = 2] = "NotEqual", (p = h = s.EGAStore || (s.EGAStore = {}))[p.Events = 0] = "Events", p[p.Sessions = 1] = "Sessions", p[p.Progression = 2] = "Progression";
            var E = (v.isStorageAvailable = function() {
                return v.storageAvailable
            }, v.isStoreTooLargeForEvents = function() {
                return v.instance.eventsStore.length + v.instance.sessionsStore.length &gt; v.MaxNumberOfEntries
            }, v.select = function(s, d, h, p) {
                void 0 === d &amp;&amp; (d = []), void 0 === h &amp;&amp; (h = !1), void 0 === p &amp;&amp; (p = 0);
                var A = v.getStore(s);
                if (!A) return null;
                for (var S = [], E = 0; E &lt; A.length; ++E) {
                    for (var L = A[E], w = !0, b = 0; b &lt; d.length; ++b) {
                        var _ = d[b];
                        if (L[_[0]]) switch (_[1]) {
                            case o.Equal:
                                w = L[_[0]] == _[2];
                                break;
                            case o.LessOrEqual:
                                w = L[_[0]] &lt;= _[2];
                                break;
                            case o.NotEqual:
                                w = L[_[0]] != _[2];
                                break;
                            default:
                                w = !1
                        } else w = !1;
                        if (!w) break
                    }
                    w &amp;&amp; S.push(L)
                }
                return h &amp;&amp; S.sort((function(s, o) {
                    return s.client_ts - o.client_ts
                })), 0 &lt; p &amp;&amp; S.length &gt; p &amp;&amp; (S = S.slice(0, p + 1)), S
            }, v.update = function(s, d, h) {
                void 0 === h &amp;&amp; (h = []);
                var p = v.getStore(s);
                if (!p) return !1;
                for (var A = 0; A &lt; p.length; ++A) {
                    for (var S = p[A], E = !0, L = 0; L &lt; h.length; ++L) {
                        var w = h[L];
                        if (S[w[0]]) switch (w[1]) {
                            case o.Equal:
                                E = S[w[0]] == w[2];
                                break;
                            case o.LessOrEqual:
                                E = S[w[0]] &lt;= w[2];
                                break;
                            case o.NotEqual:
                                E = S[w[0]] != w[2];
                                break;
                            default:
                                E = !1
                        } else E = !1;
                        if (!E) break
                    }
                    if (E)
                        for (L = 0; L &lt; d.length; ++L) {
                            var b = d[L];
                            S[b[0]] = b[1]
                        }
                }
                return !0
            }, v.delete = function(s, d) {
                var h = v.getStore(s);
                if (h)
                    for (var p = 0; p &lt; h.length; ++p) {
                        for (var A = h[p], S = !0, E = 0; E &lt; d.length; ++E) {
                            var L = d[E];
                            if (A[L[0]]) switch (L[1]) {
                                case o.Equal:
                                    S = A[L[0]] == L[2];
                                    break;
                                case o.LessOrEqual:
                                    S = A[L[0]] &lt;= L[2];
                                    break;
                                case o.NotEqual:
                                    S = A[L[0]] != L[2];
                                    break;
                                default:
                                    S = !1
                            } else S = !1;
                            if (!S) break
                        }
                        S &amp;&amp; (h.splice(p, 1), --p)
                    }
            }, v.insert = function(s, o, d, h) {
                void 0 === d &amp;&amp; (d = !1), void 0 === h &amp;&amp; (h = null);
                var p = v.getStore(s);
                if (p)
                    if (d) {
                        if (!h) return;
                        for (var A = !1, S = 0; S &lt; p.length; ++S) {
                            var E = p[S];
                            if (E[h] == o[h]) {
                                for (var L in o) E[L] = o[L];
                                A = !0;
                                break
                            }
                        }
                        A || p.push(o)
                    } else p.push(o)
            }, v.save = function(s) {
                v.isStorageAvailable() ? (localStorage.setItem(v.StringFormat(v.KeyFormat, s, v.EventsStoreKey), JSON.stringify(v.instance.eventsStore)), localStorage.setItem(v.StringFormat(v.KeyFormat, s, v.SessionsStoreKey), JSON.stringify(v.instance.sessionsStore)), localStorage.setItem(v.StringFormat(v.KeyFormat, s, v.ProgressionStoreKey), JSON.stringify(v.instance.progressionStore)), localStorage.setItem(v.StringFormat(v.KeyFormat, s, v.ItemsStoreKey), JSON.stringify(v.instance.storeItems))) : S.w("Storage is not available, cannot save.")
            }, v.load = function(s) {
                if (v.isStorageAvailable()) {
                    try {
                        v.instance.eventsStore = JSON.parse(localStorage.getItem(v.StringFormat(v.KeyFormat, s, v.EventsStoreKey))), v.instance.eventsStore || (v.instance.eventsStore = [])
                    } catch (s) {
                        S.w("Load failed for 'events' store. Using empty store."), v.instance.eventsStore = []
                    }
                    try {
                        v.instance.sessionsStore = JSON.parse(localStorage.getItem(v.StringFormat(v.KeyFormat, s, v.SessionsStoreKey))), v.instance.sessionsStore || (v.instance.sessionsStore = [])
                    } catch (s) {
                        S.w("Load failed for 'sessions' store. Using empty store."), v.instance.sessionsStore = []
                    }
                    try {
                        v.instance.progressionStore = JSON.parse(localStorage.getItem(v.StringFormat(v.KeyFormat, s, v.ProgressionStoreKey))), v.instance.progressionStore || (v.instance.progressionStore = [])
                    } catch (s) {
                        S.w("Load failed for 'progression' store. Using empty store."), v.instance.progressionStore = []
                    }
                    try {
                        v.instance.storeItems = JSON.parse(localStorage.getItem(v.StringFormat(v.KeyFormat, s, v.ItemsStoreKey))), v.instance.storeItems || (v.instance.storeItems = {})
                    } catch (s) {
                        S.w("Load failed for 'items' store. Using empty store."), v.instance.progressionStore = []
                    }
                } else S.w("Storage is not available, cannot load.")
            }, v.setItem = function(s, o, d) {
                var h = v.StringFormat(v.KeyFormat, s, o);
                d ? v.instance.storeItems[h] = d : h in v.instance.storeItems &amp;&amp; delete v.instance.storeItems[h]
            }, v.getItem = function(s, o) {
                var d = v.StringFormat(v.KeyFormat, s, o);
                return d in v.instance.storeItems ? v.instance.storeItems[d] : null
            }, v.getStore = function(s) {
                switch (s) {
                    case h.Events:
                        return v.instance.eventsStore;
                    case h.Sessions:
                        return v.instance.sessionsStore;
                    case h.Progression:
                        return v.instance.progressionStore;
                    default:
                        return S.w("GAStore.getStore(): Cannot find store: " + s), null
                }
            }, v.instance = new v, v.MaxNumberOfEntries = 2e3, v.StringFormat = function(s) {
                for (var o = [], d = 1; d &lt; arguments.length; d++) o[d - 1] = arguments[d];
                return s.replace(/{(\d+)}/g, (function(s, d) {
                    return o[d] || ""
                }))
            }, v.KeyFormat = "GA::{0}::{1}", v.EventsStoreKey = "ga_event", v.SessionsStoreKey = "ga_session", v.ProgressionStoreKey = "ga_progression", v.ItemsStoreKey = "ga_items", v);

            function v() {
                this.eventsStore = [], this.sessionsStore = [], this.progressionStore = [], this.storeItems = {};
                try {
                    "object" == typeof localStorage ? (localStorage.setItem("testingLocalStorage", "yes"), localStorage.removeItem("testingLocalStorage"), v.storageAvailable = !0) : v.storageAvailable = !1
                } catch (s) {}
            }
            s.GAStore = E
        }((A = p = p || {}).store || (A.store = {})),
        function(s) {
            var o, d, h, p, A, S, E, L, w;

            function l() {
                this.availableCustomDimensions01 = [], this.availableCustomDimensions02 = [], this.availableCustomDimensions03 = [], this.availableResourceCurrencies = [], this.availableResourceItemTypes = [], this.configurations = {}, this.remoteConfigsListeners = [], this.sdkConfigDefault = {}, this.sdkConfig = {}, this.progressionTries = {}, this._isEventSubmissionEnabled = !0
            }
            o = s.state || (s.state = {}), d = s.validators.GAValidator, h = s.utilities.GAUtilities, p = s.logging.GALogger, A = s.store.GAStore, S = s.device.GADevice, E = s.store.EGAStore, L = s.store.EGAStoreArgsOperator, l.setUserId = function(s) {
                l.instance.userId = s, l.cacheIdentifier()
            }, l.getIdentifier = function() {
                return l.instance.identifier
            }, l.isInitialized = function() {
                return l.instance.initialized
            }, l.setInitialized = function(s) {
                l.instance.initialized = s
            }, l.getSessionStart = function() {
                return l.instance.sessionStart
            }, l.getSessionNum = function() {
                return l.instance.sessionNum
            }, l.getTransactionNum = function() {
                return l.instance.transactionNum
            }, l.getSessionId = function() {
                return l.instance.sessionId
            }, l.getCurrentCustomDimension01 = function() {
                return l.instance.currentCustomDimension01
            }, l.getCurrentCustomDimension02 = function() {
                return l.instance.currentCustomDimension02
            }, l.getCurrentCustomDimension03 = function() {
                return l.instance.currentCustomDimension03
            }, l.getGameKey = function() {
                return l.instance.gameKey
            }, l.getGameSecret = function() {
                return l.instance.gameSecret
            }, l.getAvailableCustomDimensions01 = function() {
                return l.instance.availableCustomDimensions01
            }, l.setAvailableCustomDimensions01 = function(s) {
                d.validateCustomDimensions(s) &amp;&amp; (l.instance.availableCustomDimensions01 = s, l.validateAndFixCurrentDimensions(), p.i("Set available custom01 dimension values: (" + h.joinStringArray(s, ", ") + ")"))
            }, l.getAvailableCustomDimensions02 = function() {
                return l.instance.availableCustomDimensions02
            }, l.setAvailableCustomDimensions02 = function(s) {
                d.validateCustomDimensions(s) &amp;&amp; (l.instance.availableCustomDimensions02 = s, l.validateAndFixCurrentDimensions(), p.i("Set available custom02 dimension values: (" + h.joinStringArray(s, ", ") + ")"))
            }, l.getAvailableCustomDimensions03 = function() {
                return l.instance.availableCustomDimensions03
            }, l.setAvailableCustomDimensions03 = function(s) {
                d.validateCustomDimensions(s) &amp;&amp; (l.instance.availableCustomDimensions03 = s, l.validateAndFixCurrentDimensions(), p.i("Set available custom03 dimension values: (" + h.joinStringArray(s, ", ") + ")"))
            }, l.getAvailableResourceCurrencies = function() {
                return l.instance.availableResourceCurrencies
            }, l.setAvailableResourceCurrencies = function(s) {
                d.validateResourceCurrencies(s) &amp;&amp; (l.instance.availableResourceCurrencies = s, p.i("Set available resource currencies: (" + h.joinStringArray(s, ", ") + ")"))
            }, l.getAvailableResourceItemTypes = function() {
                return l.instance.availableResourceItemTypes
            }, l.setAvailableResourceItemTypes = function(s) {
                d.validateResourceItemTypes(s) &amp;&amp; (l.instance.availableResourceItemTypes = s, p.i("Set available resource item types: (" + h.joinStringArray(s, ", ") + ")"))
            }, l.getBuild = function() {
                return l.instance.build
            }, l.setBuild = function(s) {
                l.instance.build = s, p.i("Set build version: " + s)
            }, l.getUseManualSessionHandling = function() {
                return l.instance.useManualSessionHandling
            }, l.isEventSubmissionEnabled = function() {
                return l.instance._isEventSubmissionEnabled
            }, l.getABTestingId = function() {
                return l.instance.abId
            }, l.getABTestingVariantId = function() {
                return l.instance.abVariantId
            }, l.prototype.setDefaultId = function(s) {
                this.defaultUserId = s || "", l.cacheIdentifier()
            }, l.getDefaultId = function() {
                return l.instance.defaultUserId
            }, l.getSdkConfig = function() {
                var s, o = 0;
                for (var d in l.instance.sdkConfig) 0 === o &amp;&amp; (s = d), ++o;
                if (s &amp;&amp; 0 &lt; o) return l.instance.sdkConfig;
                for (var d in o = 0, l.instance.sdkConfigCached) 0 === o &amp;&amp; (s = d), ++o;
                return s &amp;&amp; 0 &lt; o ? l.instance.sdkConfigCached : l.instance.sdkConfigDefault
            }, l.isEnabled = function() {
                return !!l.instance.initAuthorized
            }, l.setCustomDimension01 = function(s) {
                l.instance.currentCustomDimension01 = s, A.setItem(l.getGameKey(), l.Dimension01Key, s), p.i("Set custom01 dimension value: " + s)
            }, l.setCustomDimension02 = function(s) {
                l.instance.currentCustomDimension02 = s, A.setItem(l.getGameKey(), l.Dimension02Key, s), p.i("Set custom02 dimension value: " + s)
            }, l.setCustomDimension03 = function(s) {
                l.instance.currentCustomDimension03 = s, A.setItem(l.getGameKey(), l.Dimension03Key, s), p.i("Set custom03 dimension value: " + s)
            }, l.incrementSessionNum = function() {
                var s = l.getSessionNum() + 1;
                l.instance.sessionNum = s
            }, l.incrementTransactionNum = function() {
                var s = l.getTransactionNum() + 1;
                l.instance.transactionNum = s
            }, l.incrementProgressionTries = function(s) {
                var o = l.getProgressionTries(s) + 1;
                l.instance.progressionTries[s] = o;
                var d = {};
                d.progression = s, d.tries = o, A.insert(E.Progression, d, !0, "progression")
            }, l.getProgressionTries = function(s) {
                return s in l.instance.progressionTries ? l.instance.progressionTries[s] : 0
            }, l.clearProgressionTries = function(s) {
                s in l.instance.progressionTries &amp;&amp; delete l.instance.progressionTries[s];
                var o = [];
                o.push(["progression", L.Equal, s]), A.delete(E.Progression, o)
            }, l.setKeys = function(s, o) {
                l.instance.gameKey = s, l.instance.gameSecret = o
            }, l.setManualSessionHandling = function(s) {
                l.instance.useManualSessionHandling = s, p.i("Use manual session handling: " + s)
            }, l.setEnabledEventSubmission = function(s) {
                l.instance._isEventSubmissionEnabled = s
            }, l.getEventAnnotations = function() {
                var s = {
                    v: 2
                };
                s.user_id = l.instance.identifier, s.client_ts = l.getClientTsAdjusted(), s.sdk_version = S.getRelevantSdkVersion(), s.os_version = S.osVersion, s.manufacturer = S.deviceManufacturer, s.device = S.deviceModel, s.browser_version = S.browserVersion, s.platform = S.buildPlatform, s.session_id = l.instance.sessionId, s[l.SessionNumKey] = l.instance.sessionNum;
                var o = S.getConnectionType();
                if (d.validateConnectionType(o) &amp;&amp; (s.connection_type = o), S.gameEngineVersion &amp;&amp; (s.engine_version = S.gameEngineVersion), l.instance.configurations) {
                    var h = 0;
                    for (var p in l.instance.configurations) {
                        h++;
                        break
                    }
                    0 &lt; h &amp;&amp; (s.configurations = l.instance.configurations)
                }
                return l.instance.abId &amp;&amp; (s.ab_id = l.instance.abId), l.instance.abVariantId &amp;&amp; (s.ab_variant_id = l.instance.abVariantId), l.instance.build &amp;&amp; (s.build = l.instance.build), s
            }, l.getSdkErrorEventAnnotations = function() {
                var s = {
                    v: 2
                };
                s.category = l.CategorySdkError, s.sdk_version = S.getRelevantSdkVersion(), s.os_version = S.osVersion, s.manufacturer = S.deviceManufacturer, s.device = S.deviceModel, s.platform = S.buildPlatform;
                var o = S.getConnectionType();
                return d.validateConnectionType(o) &amp;&amp; (s.connection_type = o), S.gameEngineVersion &amp;&amp; (s.engine_version = S.gameEngineVersion), s
            }, l.getInitAnnotations = function() {
                var s = {};
                return l.getIdentifier() || l.cacheIdentifier(), s.user_id = l.getIdentifier(), s.sdk_version = S.getRelevantSdkVersion(), s.os_version = S.osVersion, s.platform = S.buildPlatform, l.getBuild() ? s.build = l.getBuild() : s.build = null, s.session_num = l.getSessionNum(), s.random_salt = l.getSessionNum(), s
            }, l.getClientTsAdjusted = function() {
                var s = h.timeIntervalSince1970(),
                    o = s + l.instance.clientServerTimeOffset;
                return d.validateClientTs(o) ? o : s
            }, l.sessionIsStarted = function() {
                return 0 != l.instance.sessionStart
            }, l.cacheIdentifier = function() {
                l.instance.userId ? l.instance.identifier = l.instance.userId : l.instance.defaultUserId &amp;&amp; (l.instance.identifier = l.instance.defaultUserId)
            }, l.ensurePersistedStates = function() {
                A.isStorageAvailable() &amp;&amp; A.load(l.getGameKey());
                var s = l.instance;
                s.setDefaultId(null != A.getItem(l.getGameKey(), l.DefaultUserIdKey) ? A.getItem(l.getGameKey(), l.DefaultUserIdKey) : h.createGuid()), s.sessionNum = null != A.getItem(l.getGameKey(), l.SessionNumKey) ? Number(A.getItem(l.getGameKey(), l.SessionNumKey)) : 0, s.transactionNum = null != A.getItem(l.getGameKey(), l.TransactionNumKey) ? Number(A.getItem(l.getGameKey(), l.TransactionNumKey)) : 0, s.currentCustomDimension01 ? A.setItem(l.getGameKey(), l.Dimension01Key, s.currentCustomDimension01) : (s.currentCustomDimension01 = null != A.getItem(l.getGameKey(), l.Dimension01Key) ? A.getItem(l.getGameKey(), l.Dimension01Key) : "", s.currentCustomDimension01), s.currentCustomDimension02 ? A.setItem(l.getGameKey(), l.Dimension02Key, s.currentCustomDimension02) : (s.currentCustomDimension02 = null != A.getItem(l.getGameKey(), l.Dimension02Key) ? A.getItem(l.getGameKey(), l.Dimension02Key) : "", s.currentCustomDimension02), s.currentCustomDimension03 ? A.setItem(l.getGameKey(), l.Dimension03Key, s.currentCustomDimension03) : (s.currentCustomDimension03 = null != A.getItem(l.getGameKey(), l.Dimension03Key) ? A.getItem(l.getGameKey(), l.Dimension03Key) : "", s.currentCustomDimension03);
                var o = null != A.getItem(l.getGameKey(), l.SdkConfigCachedKey) ? A.getItem(l.getGameKey(), l.SdkConfigCachedKey) : "";
                if (o) {
                    var d = JSON.parse(h.decode64(o));
                    d &amp;&amp; (s.sdkConfigCached = d)
                }
                var p = l.getSdkConfig();
                s.configsHash = p.configs_hash ? p.configs_hash : "", s.abId = p.ab_id ? p.ab_id : "", s.abVariantId = p.ab_variant_id ? p.ab_variant_id : "";
                var S = A.select(E.Progression);
                if (S)
                    for (var L = 0; L &lt; S.length; ++L) {
                        var w = S[L];
                        w &amp;&amp; (s.progressionTries[w.progression] = w.tries)
                    }
            }, l.calculateServerTimeOffset = function(s) {
                return s - h.timeIntervalSince1970()
            }, l.validateAndCleanCustomFields = function(s) {
                var o = {};
                if (s) {
                    var d = 0;
                    for (var A in s) {
                        var S = s[A];
                        if (A &amp;&amp; S)
                            if (d &lt; l.MAX_CUSTOM_FIELDS_COUNT) {
                                var E = new RegExp("^[a-zA-Z0-9_]{1," + l.MAX_CUSTOM_FIELDS_KEY_LENGTH + "}$");
                                if (h.stringMatch(A, E)) {
                                    var L = typeof S;
                                    if ("string" == L || S instanceof String) S.length &lt;= l.MAX_CUSTOM_FIELDS_VALUE_STRING_LENGTH &amp;&amp; 0 &lt; S.length ? (o[A] = S, ++d) : p.w("validateAndCleanCustomFields: entry with key=" + A + ", value=" + S + " has been omitted because its value is an empty string or exceeds the max number of characters (" + l.MAX_CUSTOM_FIELDS_VALUE_STRING_LENGTH + ")");
                                    else if ("number" == L || S instanceof Number) {
                                        var w = S;
                                        o[A] = w, ++d
                                    } else p.w("validateAndCleanCustomFields: entry with key=" + A + ", value=" + S + " has been omitted because its value is not a string or number")
                                } else p.w("validateAndCleanCustomFields: entry with key=" + A + ", value=" + S + " has been omitted because its key contains illegal character, is empty or exceeds the max number of characters (" + l.MAX_CUSTOM_FIELDS_KEY_LENGTH + ")")
                            } else p.w("validateAndCleanCustomFields: entry with key=" + A + ", value=" + S + " has been omitted because it exceeds the max number of custom fields (" + l.MAX_CUSTOM_FIELDS_COUNT + ")");
                        else p.w("validateAndCleanCustomFields: entry with key=" + A + ", value=" + S + " has been omitted because its key or value is null")
                    }
                }
                return o
            }, l.validateAndFixCurrentDimensions = function() {
                d.validateDimension01(l.getCurrentCustomDimension01(), l.getAvailableCustomDimensions01()) || l.setCustomDimension01(""), d.validateDimension02(l.getCurrentCustomDimension02(), l.getAvailableCustomDimensions02()) || l.setCustomDimension02(""), d.validateDimension03(l.getCurrentCustomDimension03(), l.getAvailableCustomDimensions03()) || l.setCustomDimension03("")
            }, l.getConfigurationStringValue = function(s, o) {
                return l.instance.configurations[s] ? l.instance.configurations[s].toString() : o
            }, l.isRemoteConfigsReady = function() {
                return l.instance.remoteConfigsIsReady
            }, l.addRemoteConfigsListener = function(s) {
                l.instance.remoteConfigsListeners.indexOf(s) &lt; 0 &amp;&amp; l.instance.remoteConfigsListeners.push(s)
            }, l.removeRemoteConfigsListener = function(s) {
                var o = l.instance.remoteConfigsListeners.indexOf(s); - 1 &lt; o &amp;&amp; l.instance.remoteConfigsListeners.splice(o, 1)
            }, l.getRemoteConfigsContentAsString = function() {
                return JSON.stringify(l.instance.configurations)
            }, l.populateConfigurations = function(s) {
                var o = s.configs;
                if (o) {
                    l.instance.configurations = {};
                    for (var d = 0; d &lt; o.length; ++d) {
                        var h = o[d];
                        if (h) {
                            var p = h.key,
                                A = h.value,
                                S = h.start_ts ? h.start_ts : Number.MIN_VALUE,
                                E = h.end_ts ? h.end_ts : Number.MAX_VALUE,
                                L = l.getClientTsAdjusted();
                            p &amp;&amp; A &amp;&amp; S &lt; L &amp;&amp; L &lt; E &amp;&amp; (l.instance.configurations[p] = A)
                        }
                    }
                }
                l.instance.remoteConfigsIsReady = !0;
                var w = l.instance.remoteConfigsListeners;
                for (d = 0; d &lt; w.length; ++d) w[d] &amp;&amp; w[d].onRemoteConfigsUpdated()
            }, l.CategorySdkError = "sdk_error", l.MAX_CUSTOM_FIELDS_COUNT = 50, l.MAX_CUSTOM_FIELDS_KEY_LENGTH = 64, l.MAX_CUSTOM_FIELDS_VALUE_STRING_LENGTH = 256, l.instance = new l, l.DefaultUserIdKey = "default_user_id", l.SessionNumKey = "session_num", l.TransactionNumKey = "transaction_num", l.Dimension01Key = "dimension01", l.Dimension02Key = "dimension02", l.Dimension03Key = "dimension03", l.SdkConfigCachedKey = "sdk_config_cached", w = l, o.GAState = w
        }(p = p || {}),
        function(s) {
            var o, d, h, p;

            function u() {}
            o = s.tasks || (s.tasks = {}), d = s.utilities.GAUtilities, h = s.logging.GALogger, u.execute = function(s, o, p, A) {
                var S = new Date;
                if (u.timestampMap[o] || (u.timestampMap[o] = S), u.countMap[o] || (u.countMap[o] = 0), 3600 &lt;= (S.getTime() - u.timestampMap[o].getTime()) / 1e3 &amp;&amp; (u.timestampMap[o] = S, u.countMap[o] = 0), !(u.countMap[o] &gt;= u.MaxCount)) {
                    var E = d.getHmac(A, p),
                        L = new XMLHttpRequest;
                    L.onreadystatechange = function() {
                        if (4 === L.readyState) {
                            if (!L.responseText) return;
                            if (200 != L.status) return void h.w("sdk error failed. response code not 200. status code: " + L.status + ", description: " + L.statusText + ", body: " + L.responseText);
                            u.countMap[o] = u.countMap[o] + 1
                        }
                    }, L.open("POST", s, !0), L.setRequestHeader("Content-Type", "application/json"), L.setRequestHeader("Authorization", E);
                    try {
                        L.send(p)
                    } catch (s) {
                        console.error(s)
                    }
                }
            }, u.MaxCount = 10, u.countMap = {}, u.timestampMap = {}, p = u, o.SdkErrorTask = p
        }(p = p || {}),
        function(s) {
            var o, d, h, p, A, S, E, L, w, b, _;

            function y() {
                this.protocol = "https", this.hostName = "api.gameanalytics.com", this.version = "v2", this.remoteConfigsVersion = "v1", this.baseUrl = this.protocol + "://" + this.hostName + "/" + this.version, this.remoteConfigsBaseUrl = this.protocol + "://" + this.hostName + "/remote_configs/" + this.remoteConfigsVersion, this.initializeUrlPath = "init", this.eventsUrlPath = "events", this.useGzip = !1
            }
            o = s.http || (s.http = {}), d = s.state.GAState, h = s.logging.GALogger, p = s.utilities.GAUtilities, A = s.validators.GAValidator, S = s.tasks.SdkErrorTask, E = s.events.EGASdkErrorCategory, L = s.events.EGASdkErrorArea, w = s.events.EGASdkErrorAction, b = s.events.EGASdkErrorParameter, y.prototype.requestInit = function(s, h) {
                var p = d.getGameKey(),
                    A = this.remoteConfigsBaseUrl + "/" + this.initializeUrlPath + "?game_key=" + p + "&amp;interval_seconds=0&amp;configs_hash=" + s,
                    S = d.getInitAnnotations(),
                    E = JSON.stringify(S);
                if (E) {
                    var L = this.createPayloadData(E, this.useGzip),
                        w = [];
                    w.push(E), y.sendRequest(A, L, w, this.useGzip, y.initRequestCallback, h)
                } else h(o.EGAHTTPApiResponse.JsonEncodeFailed, null)
            }, y.prototype.sendEventsInArray = function(s, h, p) {
                if (0 != s.length) {
                    var A = d.getGameKey(),
                        S = this.baseUrl + "/" + A + "/" + this.eventsUrlPath,
                        E = JSON.stringify(s);
                    if (E) {
                        var L = this.createPayloadData(E, this.useGzip),
                            w = [];
                        w.push(E), w.push(h), w.push(s.length.toString()), y.sendRequest(S, L, w, this.useGzip, y.sendEventInArrayRequestCallback, p)
                    } else p(o.EGAHTTPApiResponse.JsonEncodeFailed, null, h, s.length)
                }
            }, y.prototype.sendSdkErrorEvent = function(s, o, p, E, L, w, b) {
                if (d.isEventSubmissionEnabled() &amp;&amp; A.validateSdkErrorEvent(w, b, s, o, p)) {
                    var _, I = this.baseUrl + "/" + w + "/" + this.eventsUrlPath,
                        T = "",
                        x = d.getSdkErrorEventAnnotations(),
                        k = y.sdkErrorCategoryString(s);
                    T += x.error_category = k;
                    var N = y.sdkErrorAreaString(o);
                    T += ":" + (x.error_area = N);
                    var D = y.sdkErrorActionString(p);
                    x.error_action = D;
                    var G = y.sdkErrorParameterString(E);
                    if (0 &lt; G.length &amp;&amp; (x.error_parameter = G), 0 &lt; L.length) {
                        var M = L;
                        L.length &gt; y.MAX_ERROR_MESSAGE_LENGTH &amp;&amp; (M = L.substring(0, y.MAX_ERROR_MESSAGE_LENGTH)), x.reason = M
                    }
                    var P = [];
                    P.push(x), (_ = JSON.stringify(P)) ? S.execute(I, T, _, b) : h.w("sendSdkErrorEvent: JSON encoding failed.")
                }
            }, y.sendEventInArrayRequestCallback = function(s, h, p, A) {
                void 0 === A &amp;&amp; (A = null), A[0], A[1];
                var S, _, I = A[2],
                    T = parseInt(A[3]);
                S = s.responseText, _ = s.status;
                var x = y.instance.processRequestResponse(_, s.statusText, S, "Events");
                if (x == o.EGAHTTPApiResponse.Ok || x == o.EGAHTTPApiResponse.Created || x == o.EGAHTTPApiResponse.BadRequest) {
                    var k = S ? JSON.parse(S) : {};
                    if (null == k) return p(o.EGAHTTPApiResponse.JsonDecodeFailed, null, I, T), void y.instance.sendSdkErrorEvent(E.Http, L.EventsHttp, w.FailHttpJsonDecode, b.Undefined, S, d.getGameKey(), d.getGameSecret());
                    o.EGAHTTPApiResponse.BadRequest, p(x, k, I, T)
                } else p(x, null, I, T)
            }, y.sendRequest = function(s, o, h, A, S, E) {
                var L = new XMLHttpRequest,
                    w = d.getGameSecret(),
                    b = p.getHmac(w, o),
                    _ = [];
                for (var I in _.push(b), h) _.push(h[I]);
                if (L.onreadystatechange = function() {
                        4 === L.readyState &amp;&amp; S(L, s, E, _)
                    }, L.open("POST", s, !0), L.setRequestHeader("Content-Type", "application/json"), L.setRequestHeader("Authorization", b), A) throw new Error("gzip not supported");
                try {
                    L.send(o)
                } catch (s) {
                    console.error(s.stack)
                }
            }, y.initRequestCallback = function(s, h, p, S) {
                var _, I;
                void 0 === S &amp;&amp; (S = null), S[0], S[1], _ = s.responseText, I = s.status;
                var T = _ ? JSON.parse(_) : {},
                    x = y.instance.processRequestResponse(I, s.statusText, _, "Init");
                if (x == o.EGAHTTPApiResponse.Ok || x == o.EGAHTTPApiResponse.Created || x == o.EGAHTTPApiResponse.BadRequest) {
                    if (null == T) return p(o.EGAHTTPApiResponse.JsonDecodeFailed, null, "", 0), void y.instance.sendSdkErrorEvent(E.Http, L.InitHttp, w.FailHttpJsonDecode, b.Undefined, _, d.getGameKey(), d.getGameSecret());
                    if (x !== o.EGAHTTPApiResponse.BadRequest) {
                        var k = A.validateAndCleanInitRequestResponse(T, x === o.EGAHTTPApiResponse.Created);
                        k ? p(x, k, "", 0) : p(o.EGAHTTPApiResponse.BadResponse, null, "", 0)
                    } else p(x, null, "", 0)
                } else p(x, null, "", 0)
            }, y.prototype.createPayloadData = function(s, o) {
                if (o) throw new Error("gzip not supported");
                return s
            }, y.prototype.processRequestResponse = function(s, d, h, p) {
                return h ? 200 === s ? o.EGAHTTPApiResponse.Ok : 201 === s ? o.EGAHTTPApiResponse.Created : 0 === s || 401 === s ? o.EGAHTTPApiResponse.Unauthorized : 400 === s ? o.EGAHTTPApiResponse.BadRequest : 500 === s ? o.EGAHTTPApiResponse.InternalServerError : o.EGAHTTPApiResponse.UnknownResponseCode : o.EGAHTTPApiResponse.NoResponse
            }, y.sdkErrorCategoryString = function(s) {
                switch (s) {
                    case E.EventValidation:
                        return "event_validation";
                    case E.Database:
                        return "db";
                    case E.Init:
                        return "init";
                    case E.Http:
                        return "http";
                    case E.Json:
                        return "json"
                }
                return ""
            }, y.sdkErrorAreaString = function(s) {
                switch (s) {
                    case L.BusinessEvent:
                        return "business";
                    case L.ResourceEvent:
                        return "resource";
                    case L.ProgressionEvent:
                        return "progression";
                    case L.DesignEvent:
                        return "design";
                    case L.ErrorEvent:
                        return "error";
                    case L.InitHttp:
                        return "init_http";
                    case L.EventsHttp:
                        return "events_http";
                    case L.ProcessEvents:
                        return "process_events";
                    case L.AddEventsToStore:
                        return "add_events_to_store"
                }
                return ""
            }, y.sdkErrorActionString = function(s) {
                switch (s) {
                    case w.InvalidCurrency:
                        return "invalid_currency";
                    case w.InvalidShortString:
                        return "invalid_short_string";
                    case w.InvalidEventPartLength:
                        return "invalid_event_part_length";
                    case w.InvalidEventPartCharacters:
                        return "invalid_event_part_characters";
                    case w.InvalidStore:
                        return "invalid_store";
                    case w.InvalidFlowType:
                        return "invalid_flow_type";
                    case w.StringEmptyOrNull:
                        return "string_empty_or_null";
                    case w.NotFoundInAvailableCurrencies:
                        return "not_found_in_available_currencies";
                    case w.InvalidAmount:
                        return "invalid_amount";
                    case w.NotFoundInAvailableItemTypes:
                        return "not_found_in_available_item_types";
                    case w.WrongProgressionOrder:
                        return "wrong_progression_order";
                    case w.InvalidEventIdLength:
                        return "invalid_event_id_length";
                    case w.InvalidEventIdCharacters:
                        return "invalid_event_id_characters";
                    case w.InvalidProgressionStatus:
                        return "invalid_progression_status";
                    case w.InvalidSeverity:
                        return "invalid_severity";
                    case w.InvalidLongString:
                        return "invalid_long_string";
                    case w.DatabaseTooLarge:
                        return "db_too_large";
                    case w.DatabaseOpenOrCreate:
                        return "db_open_or_create";
                    case w.JsonError:
                        return "json_error";
                    case w.FailHttpJsonDecode:
                        return "fail_http_json_decode";
                    case w.FailHttpJsonEncode:
                        return "fail_http_json_encode"
                }
                return ""
            }, y.sdkErrorParameterString = function(s) {
                switch (s) {
                    case b.Currency:
                        return "currency";
                    case b.CartType:
                        return "cart_type";
                    case b.ItemType:
                        return "item_type";
                    case b.ItemId:
                        return "item_id";
                    case b.Store:
                        return "store";
                    case b.FlowType:
                        return "flow_type";
                    case b.Amount:
                        return "amount";
                    case b.Progression01:
                        return "progression01";
                    case b.Progression02:
                        return "progression02";
                    case b.Progression03:
                        return "progression03";
                    case b.EventId:
                        return "event_id";
                    case b.ProgressionStatus:
                        return "progression_status";
                    case b.Severity:
                        return "severity";
                    case b.Message:
                        return "message"
                }
                return ""
            }, y.instance = new y, y.MAX_ERROR_MESSAGE_LENGTH = 256, _ = y, o.GAHTTPApi = _
        }(p = p || {}),
        function(s) {
            var o, d, h, p, A, S, E, L, w, b, _;

            function C() {}
            o = s.events || (s.events = {}), d = s.store.GAStore, h = s.store.EGAStore, p = s.store.EGAStoreArgsOperator, A = s.state.GAState, S = s.logging.GALogger, E = s.utilities.GAUtilities, L = s.http.EGAHTTPApiResponse, w = s.http.GAHTTPApi, b = s.validators.GAValidator, C.addSessionStartEvent = function() {
                if (A.isEventSubmissionEnabled()) {
                    var s = {};
                    s.category = C.CategorySessionStart, A.incrementSessionNum(), d.setItem(A.getGameKey(), A.SessionNumKey, A.getSessionNum().toString()), C.addDimensionsToEvent(s), C.addEventToStore(s), S.i("Add SESSION START event"), C.processEvents(C.CategorySessionStart, !1)
                }
            }, C.addSessionEndEvent = function() {
                if (A.isEventSubmissionEnabled()) {
                    var s = A.getSessionStart(),
                        o = A.getClientTsAdjusted() - s;
                    o &lt; 0 &amp;&amp; (S.w("Session length was calculated to be less then 0. Should not be possible. Resetting to 0."), o = 0);
                    var d = {};
                    d.category = C.CategorySessionEnd, d.length = o, C.addDimensionsToEvent(d), C.addEventToStore(d), S.i("Add SESSION END event."), C.processEvents("", !1)
                }
            }, C.addBusinessEvent = function(s, o, h, p, E, L) {
                if (void 0 === E &amp;&amp; (E = null), A.isEventSubmissionEnabled()) {
                    var _ = b.validateBusinessEvent(s, o, E, h, p);
                    if (null == _) {
                        var I = {};
                        A.incrementTransactionNum(), d.setItem(A.getGameKey(), A.TransactionNumKey, A.getTransactionNum().toString()), I.event_id = h + ":" + p, I.category = C.CategoryBusiness, I.currency = s, I.amount = o, I[A.TransactionNumKey] = A.getTransactionNum(), E &amp;&amp; (I.cart_type = E), C.addDimensionsToEvent(I), C.addFieldsToEvent(I, A.validateAndCleanCustomFields(L)), S.i("Add BUSINESS event: {currency:" + s + ", amount:" + o + ", itemType:" + h + ", itemId:" + p + ", cartType:" + E + "}"), C.addEventToStore(I)
                    } else w.instance.sendSdkErrorEvent(_.category, _.area, _.action, _.parameter, _.reason, A.getGameKey(), A.getGameSecret())
                }
            }, C.addResourceEvent = function(o, d, h, p, E, L) {
                if (A.isEventSubmissionEnabled()) {
                    var _ = b.validateResourceEvent(o, d, h, p, E, A.getAvailableResourceCurrencies(), A.getAvailableResourceItemTypes());
                    if (null == _) {
                        o === s.EGAResourceFlowType.Sink &amp;&amp; (h *= -1);
                        var I = {},
                            T = C.resourceFlowTypeToString(o);
                        I.event_id = T + ":" + d + ":" + p + ":" + E, I.category = C.CategoryResource, I.amount = h, C.addDimensionsToEvent(I), C.addFieldsToEvent(I, A.validateAndCleanCustomFields(L)), S.i("Add RESOURCE event: {currency:" + d + ", amount:" + h + ", itemType:" + p + ", itemId:" + E + "}"), C.addEventToStore(I)
                    } else w.instance.sendSdkErrorEvent(_.category, _.area, _.action, _.parameter, _.reason, A.getGameKey(), A.getGameSecret())
                }
            }, C.addProgressionEvent = function(o, d, h, p, E, L, _) {
                if (A.isEventSubmissionEnabled()) {
                    var I = C.progressionStatusToString(o),
                        T = b.validateProgressionEvent(o, d, h, p);
                    if (null == T) {
                        var x, k = {};
                        x = h ? p ? d + ":" + h + ":" + p : d + ":" + h : d, k.category = C.CategoryProgression, k.event_id = I + ":" + x;
                        var N = 0;
                        L &amp;&amp; o != s.EGAProgressionStatus.Start &amp;&amp; (k.score = E), o === s.EGAProgressionStatus.Fail &amp;&amp; A.incrementProgressionTries(x), o === s.EGAProgressionStatus.Complete &amp;&amp; (A.incrementProgressionTries(x), N = A.getProgressionTries(x), k.attempt_num = N, A.clearProgressionTries(x)), C.addDimensionsToEvent(k), C.addFieldsToEvent(k, A.validateAndCleanCustomFields(_)), S.i("Add PROGRESSION event: {status:" + I + ", progression01:" + d + ", progression02:" + h + ", progression03:" + p + ", score:" + E + ", attempt:" + N + "}"), C.addEventToStore(k)
                    } else w.instance.sendSdkErrorEvent(T.category, T.area, T.action, T.parameter, T.reason, A.getGameKey(), A.getGameSecret())
                }
            }, C.addDesignEvent = function(s, o, d, h) {
                if (A.isEventSubmissionEnabled()) {
                    var p = b.validateDesignEvent(s);
                    if (null == p) {
                        var E = {};
                        E.category = C.CategoryDesign, E.event_id = s, d &amp;&amp; (E.value = o), C.addDimensionsToEvent(E), C.addFieldsToEvent(E, A.validateAndCleanCustomFields(h)), S.i("Add DESIGN event: {eventId:" + s + ", value:" + o + "}"), C.addEventToStore(E)
                    } else w.instance.sendSdkErrorEvent(p.category, p.area, p.action, p.parameter, p.reason, A.getGameKey(), A.getGameSecret())
                }
            }, C.addErrorEvent = function(s, o, d) {
                if (A.isEventSubmissionEnabled()) {
                    var h = C.errorSeverityToString(s),
                        p = b.validateErrorEvent(s, o);
                    if (null == p) {
                        var E = {};
                        E.category = C.CategoryError, E.severity = h, E.message = o, C.addDimensionsToEvent(E), C.addFieldsToEvent(E, A.validateAndCleanCustomFields(d)), S.i("Add ERROR event: {severity:" + h + ", message:" + o + "}"), C.addEventToStore(E)
                    } else w.instance.sendSdkErrorEvent(p.category, p.area, p.action, p.parameter, p.reason, A.getGameKey(), A.getGameSecret())
                }
            }, C.addAdEvent = function(o, d, h, p, E, L, _, I) {
                if (A.isEventSubmissionEnabled()) {
                    var T = C.adActionToString(o),
                        x = C.adTypeToString(d),
                        k = C.adErrorToString(E),
                        N = b.validateAdEvent(o, d, h, p);
                    if (null == N) {
                        var D = {};
                        D.category = C.CategoryAds, D.ad_sdk_name = h, D.ad_placement = p, D.ad_type = x, D.ad_action = T, o == s.EGAAdAction.FailedShow &amp;&amp; 0 &lt; k.length &amp;&amp; (D.ad_fail_show_reason = k), !_ || d != s.EGAAdType.RewardedVideo &amp;&amp; d != s.EGAAdType.Video || (D.ad_duration = L), C.addDimensionsToEvent(D), C.addFieldsToEvent(D, A.validateAndCleanCustomFields(I)), S.i("Add AD event: {ad_sdk_name:" + h + ", ad_placement:" + p + ", ad_type:" + x + ", ad_action:" + T + (o == s.EGAAdAction.FailedShow &amp;&amp; 0 &lt; k.length ? ", ad_fail_show_reason:" + k : "") + (!_ || d != s.EGAAdType.RewardedVideo &amp;&amp; d != s.EGAAdType.Video ? "" : ", ad_duration:" + L) + "}"), C.addEventToStore(D)
                    } else w.instance.sendSdkErrorEvent(N.category, N.area, N.action, N.parameter, N.reason, A.getGameKey(), A.getGameSecret())
                }
            }, C.processEvents = function(s, L) {
                if (A.isEventSubmissionEnabled()) try {
                    var b = E.createGuid();
                    L &amp;&amp; (C.cleanupEvents(), C.fixMissingSessionEndEvents());
                    var _ = [];
                    _.push(["status", p.Equal, "new"]);
                    var I = [];
                    I.push(["status", p.Equal, "new"]), s &amp;&amp; (_.push(["category", p.Equal, s]), I.push(["category", p.Equal, s]));
                    var T = [];
                    T.push(["status", b]);
                    var x = d.select(h.Events, _);
                    if (!x || 0 == x.length) return S.i("Event queue: No events to send"), void C.updateSessionStore();
                    if (x.length &gt; C.MaxEventCount) {
                        if (!(x = d.select(h.Events, _, !0, C.MaxEventCount))) return;
                        var k = x[x.length - 1].client_ts;
                        if (_.push(["client_ts", p.LessOrEqual, k]), !(x = d.select(h.Events, _))) return;
                        I.push(["client_ts", p.LessOrEqual, k])
                    }
                    if (S.i("Event queue: Sending " + x.length + " events."), !d.update(h.Events, T, I)) return;
                    for (var N = [], D = 0; D &lt; x.length; ++D) {
                        var G = x[D],
                            M = JSON.parse(E.decode64(G.event));
                        0 != M.length &amp;&amp; N.push(M)
                    }
                    w.instance.sendEventsInArray(N, b, C.processEventsCallback)
                } catch (s) {
                    S.e("Error during ProcessEvents(): " + s.stack), w.instance.sendSdkErrorEvent(o.EGASdkErrorCategory.Json, o.EGASdkErrorArea.ProcessEvents, o.EGASdkErrorAction.JsonError, o.EGASdkErrorParameter.Undefined, s.stack, A.getGameKey(), A.getGameSecret())
                }
            }, C.processEventsCallback = function(s, o, A, E) {
                var w = [];
                if (w.push(["status", p.Equal, A]), s === L.Ok) d.delete(h.Events, w), S.i("Event queue: " + E + " events sent.");
                else if (s === L.NoResponse) {
                    var b = [];
                    b.push(["status", "new"]), S.w("Event queue: Failed to send events to collector - Retrying next time"), d.update(h.Events, b, w)
                } else {
                    if (o) {
                        var _, I = 0;
                        for (var T in o) 0 == I &amp;&amp; (_ = o[T]), ++I;
                        s === L.BadRequest &amp;&amp; _.constructor === Array ? S.w("Event queue: " + E + " events sent. " + I + " events failed GA server validation.") : S.w("Event queue: Failed to send events.")
                    } else S.w("Event queue: Failed to send events.");
                    d.delete(h.Events, w)
                }
            }, C.cleanupEvents = function() {
                d.update(h.Events, [
                    ["status", "new"]
                ])
            }, C.fixMissingSessionEndEvents = function() {
                if (A.isEventSubmissionEnabled()) {
                    var s = [];
                    s.push(["session_id", p.NotEqual, A.getSessionId()]);
                    var o = d.select(h.Sessions, s);
                    if (o &amp;&amp; 0 != o.length) {
                        S.i(o.length + " session(s) located with missing session_end event.");
                        for (var L = 0; L &lt; o.length; ++L) {
                            var w = JSON.parse(E.decode64(o[L].event)),
                                b = w.client_ts - o[L].timestamp;
                            b = Math.max(0, b), w.category = C.CategorySessionEnd, w.length = b, C.addEventToStore(w)
                        }
                    }
                }
            }, C.addEventToStore = function(s) {
                if (A.isEventSubmissionEnabled())
                    if (A.isInitialized()) try {
                        if (d.isStoreTooLargeForEvents() &amp;&amp; !E.stringMatch(s.category, /^(user|session_end|business)$/)) return S.w("Database too large. Event has been blocked."), void w.instance.sendSdkErrorEvent(o.EGASdkErrorCategory.Database, o.EGASdkErrorArea.AddEventsToStore, o.EGASdkErrorAction.DatabaseTooLarge, o.EGASdkErrorParameter.Undefined, "", A.getGameKey(), A.getGameSecret());
                        var L = A.getEventAnnotations(),
                            b = E.encode64(JSON.stringify(L));
                        for (var _ in s) L[_] = s[_];
                        var I = JSON.stringify(L);
                        S.ii("Event added to queue: " + I);
                        var T = {
                            status: "new"
                        };
                        T.category = L.category, T.session_id = L.session_id, T.client_ts = L.client_ts, T.event = E.encode64(JSON.stringify(L)), d.insert(h.Events, T), s.category == C.CategorySessionEnd ? d.delete(h.Sessions, [
                            ["session_id", p.Equal, L.session_id]
                        ]) : ((T = {}).session_id = L.session_id, T.timestamp = A.getSessionStart(), T.event = b, d.insert(h.Sessions, T, !0, "session_id")), d.isStorageAvailable() &amp;&amp; d.save(A.getGameKey())
                    } catch (_) {
                        S.e("addEventToStore: error"), S.e(_.stack), w.instance.sendSdkErrorEvent(o.EGASdkErrorCategory.Database, o.EGASdkErrorArea.AddEventsToStore, o.EGASdkErrorAction.DatabaseTooLarge, o.EGASdkErrorParameter.Undefined, _.stack, A.getGameKey(), A.getGameSecret())
                    } else S.w("Could not add event: SDK is not initialized")
            }, C.updateSessionStore = function() {
                if (A.sessionIsStarted()) {
                    var s = {};
                    s.session_id = A.instance.sessionId, s.timestamp = A.getSessionStart(), s.event = E.encode64(JSON.stringify(A.getEventAnnotations())), d.insert(h.Sessions, s, !0, "session_id"), d.isStorageAvailable() &amp;&amp; d.save(A.getGameKey())
                }
            }, C.addDimensionsToEvent = function(s) {
                s &amp;&amp; (A.getCurrentCustomDimension01() &amp;&amp; (s.custom_01 = A.getCurrentCustomDimension01()), A.getCurrentCustomDimension02() &amp;&amp; (s.custom_02 = A.getCurrentCustomDimension02()), A.getCurrentCustomDimension03() &amp;&amp; (s.custom_03 = A.getCurrentCustomDimension03()))
            }, C.addFieldsToEvent = function(s, o) {
                s &amp;&amp; o &amp;&amp; 0 &lt; Object.keys(o).length &amp;&amp; (s.custom_fields = o)
            }, C.resourceFlowTypeToString = function(o) {
                return o == s.EGAResourceFlowType.Source || o == s.EGAResourceFlowType[s.EGAResourceFlowType.Source] ? "Source" : o == s.EGAResourceFlowType.Sink || o == s.EGAResourceFlowType[s.EGAResourceFlowType.Sink] ? "Sink" : ""
            }, C.progressionStatusToString = function(o) {
                return o == s.EGAProgressionStatus.Start || o == s.EGAProgressionStatus[s.EGAProgressionStatus.Start] ? "Start" : o == s.EGAProgressionStatus.Complete || o == s.EGAProgressionStatus[s.EGAProgressionStatus.Complete] ? "Complete" : o == s.EGAProgressionStatus.Fail || o == s.EGAProgressionStatus[s.EGAProgressionStatus.Fail] ? "Fail" : ""
            }, C.errorSeverityToString = function(o) {
                return o == s.EGAErrorSeverity.Debug || o == s.EGAErrorSeverity[s.EGAErrorSeverity.Debug] ? "debug" : o == s.EGAErrorSeverity.Info || o == s.EGAErrorSeverity[s.EGAErrorSeverity.Info] ? "info" : o == s.EGAErrorSeverity.Warning || o == s.EGAErrorSeverity[s.EGAErrorSeverity.Warning] ? "warning" : o == s.EGAErrorSeverity.Error || o == s.EGAErrorSeverity[s.EGAErrorSeverity.Error] ? "error" : o == s.EGAErrorSeverity.Critical || o == s.EGAErrorSeverity[s.EGAErrorSeverity.Critical] ? "critical" : ""
            }, C.adActionToString = function(o) {
                return o == s.EGAAdAction.Clicked || o == s.EGAAdAction[s.EGAAdAction.Clicked] ? "clicked" : o == s.EGAAdAction.Show || o == s.EGAAdAction[s.EGAAdAction.Show] ? "show" : o == s.EGAAdAction.FailedShow || o == s.EGAAdAction[s.EGAAdAction.FailedShow] ? "failed_show" : o == s.EGAAdAction.RewardReceived || o == s.EGAAdAction[s.EGAAdAction.RewardReceived] ? "reward_recevied" : ""
            }, C.adErrorToString = function(o) {
                return o == s.EGAAdError.Unknown || o == s.EGAAdError[s.EGAAdError.Unknown] ? "unknown" : o == s.EGAAdError.Offline || o == s.EGAAdError[s.EGAAdError.Offline] ? "offline" : o == s.EGAAdError.NoFill || o == s.EGAAdError[s.EGAAdError.NoFill] ? "no_fill" : o == s.EGAAdError.InternalError || o == s.EGAAdError[s.EGAAdError.InternalError] ? "internal_error" : o == s.EGAAdError.InvalidRequest || o == s.EGAAdError[s.EGAAdError.InvalidRequest] ? "invalid_request" : o == s.EGAAdError.UnableToPrecache || o == s.EGAAdError[s.EGAAdError.UnableToPrecache] ? "unable_to_precache" : ""
            }, C.adTypeToString = function(o) {
                return o == s.EGAAdType.Video || o == s.EGAAdType[s.EGAAdType.Video] ? "video" : o == s.EGAAdType.RewardedVideo || o == s.EGAAdError[s.EGAAdType.RewardedVideo] ? "rewarded_video" : o == s.EGAAdType.Playable || o == s.EGAAdError[s.EGAAdType.Playable] ? "playable" : o == s.EGAAdType.Interstitial || o == s.EGAAdError[s.EGAAdType.Interstitial] ? "interstitial" : o == s.EGAAdType.OfferWall || o == s.EGAAdError[s.EGAAdType.OfferWall] ? "offer_wall" : o == s.EGAAdType.Banner || o == s.EGAAdError[s.EGAAdType.Banner] ? "banner" : ""
            }, C.CategorySessionStart = "user", C.CategorySessionEnd = "session_end", C.CategoryDesign = "design", C.CategoryBusiness = "business", C.CategoryProgression = "progression", C.CategoryResource = "resource", C.CategoryError = "error", C.CategoryAds = "ohayoo", C.MaxEventCount = 500, _ = C, o.GAEvents = _
        }(p = p || {}),
        function(s) {
            var o, d, h, p, A;

            function a() {
                this.blocks = new o.PriorityQueue({
                    compare: function(s, o) {
                        return s - o
                    }
                }), this.id2TimedBlockMap = {}, a.startThread()
            }
            o = s.threading || (s.threading = {}), d = s.logging.GALogger, h = s.state.GAState, p = s.events.GAEvents, a.createTimedBlock = function(s) {
                void 0 === s &amp;&amp; (s = 0);
                var d = new Date;
                return d.setSeconds(d.getSeconds() + s), new o.TimedBlock(d)
            }, a.performTaskOnGAThread = function(s, d) {
                void 0 === d &amp;&amp; (d = 0);
                var h = new Date;
                h.setSeconds(h.getSeconds() + d);
                var p = new o.TimedBlock(h);
                p.block = s, a.instance.id2TimedBlockMap[p.id] = p, a.instance.addTimedBlock(p)
            }, a.performTimedBlockOnGAThread = function(s) {
                a.instance.id2TimedBlockMap[s.id] = s, a.instance.addTimedBlock(s)
            }, a.scheduleTimer = function(s, d) {
                var h = new Date;
                h.setSeconds(h.getSeconds() + s);
                var p = new o.TimedBlock(h);
                return p.block = d, a.instance.id2TimedBlockMap[p.id] = p, a.instance.addTimedBlock(p), p.id
            }, a.getTimedBlockById = function(s) {
                return s in a.instance.id2TimedBlockMap ? a.instance.id2TimedBlockMap[s] : null
            }, a.ensureEventQueueIsRunning = function() {
                a.instance.keepRunning = !0, a.instance.isRunning || (a.instance.isRunning = !0, a.scheduleTimer(a.ProcessEventsIntervalInSeconds, a.processEventQueue))
            }, a.endSessionAndStopQueue = function() {
                h.isInitialized() &amp;&amp; (d.i("Ending session."), a.stopEventQueue(), h.isEnabled() &amp;&amp; h.sessionIsStarted() &amp;&amp; (p.addSessionEndEvent(), h.instance.sessionStart = 0))
            }, a.stopEventQueue = function() {
                a.instance.keepRunning = !1
            }, a.ignoreTimer = function(s) {
                s in a.instance.id2TimedBlockMap &amp;&amp; (a.instance.id2TimedBlockMap[s].ignore = !0)
            }, a.setEventProcessInterval = function(s) {
                0 &lt; s &amp;&amp; (a.ProcessEventsIntervalInSeconds = s)
            }, a.prototype.addTimedBlock = function(s) {
                this.blocks.enqueue(s.deadline.getTime(), s)
            }, a.run = function() {
                clearTimeout(a.runTimeoutId);
                try {
                    for (var s; s = a.getNextBlock();)
                        if (!s.ignore)
                            if (s.async) {
                                if (!s.running) {
                                    s.running = !0, s.block();
                                    break
                                }
                            } else s.block();
                    return void(a.runTimeoutId = setTimeout(a.run, a.ThreadWaitTimeInMs))
                } catch (s) {
                    d.e("Error on GA thread"), d.e(s.stack)
                }
            }, a.startThread = function() {
                a.runTimeoutId = setTimeout(a.run, 0)
            }, a.getNextBlock = function() {
                var s = new Date;
                return a.instance.blocks.hasItems() &amp;&amp; a.instance.blocks.peek().deadline.getTime() &lt;= s.getTime() ? a.instance.blocks.peek().async &amp;&amp; a.instance.blocks.peek().running ? a.instance.blocks.peek() : a.instance.blocks.dequeue() : null
            }, a.processEventQueue = function() {
                p.processEvents("", !0), a.instance.keepRunning ? a.scheduleTimer(a.ProcessEventsIntervalInSeconds, a.processEventQueue) : a.instance.isRunning = !1
            }, a.instance = new a, a.ThreadWaitTimeInMs = 1e3, a.ProcessEventsIntervalInSeconds = 8, A = a, o.GAThreading = A
        }(p = p || {}),
        function(s) {
            var o = s.threading.GAThreading,
                d = s.logging.GALogger,
                h = s.store.GAStore,
                p = s.state.GAState,
                A = s.http.GAHTTPApi,
                S = s.device.GADevice,
                E = s.validators.GAValidator,
                L = s.http.EGAHTTPApiResponse,
                w = s.utilities.GAUtilities,
                b = s.events.GAEvents,
                _ = (m.init = function() {
                    if (S.touch(), m.methodMap.configureAvailableCustomDimensions01 = m.configureAvailableCustomDimensions01, m.methodMap.configureAvailableCustomDimensions02 = m.configureAvailableCustomDimensions02, m.methodMap.configureAvailableCustomDimensions03 = m.configureAvailableCustomDimensions03, m.methodMap.configureAvailableResourceCurrencies = m.configureAvailableResourceCurrencies, m.methodMap.configureAvailableResourceItemTypes = m.configureAvailableResourceItemTypes, m.methodMap.configureBuild = m.configureBuild, m.methodMap.configureSdkGameEngineVersion = m.configureSdkGameEngineVersion, m.methodMap.configureGameEngineVersion = m.configureGameEngineVersion, m.methodMap.configureUserId = m.configureUserId, m.methodMap.initialize = m.initialize, m.methodMap.addBusinessEvent = m.addBusinessEvent, m.methodMap.addResourceEvent = m.addResourceEvent, m.methodMap.addProgressionEvent = m.addProgressionEvent, m.methodMap.addDesignEvent = m.addDesignEvent, m.methodMap.addErrorEvent = m.addErrorEvent, m.methodMap.addErrorEvent = m.addErrorEvent, m.methodMap.setEnabledInfoLog = m.setEnabledInfoLog, m.methodMap.setEnabledVerboseLog = m.setEnabledVerboseLog, m.methodMap.setEnabledManualSessionHandling = m.setEnabledManualSessionHandling, m.methodMap.setEnabledEventSubmission = m.setEnabledEventSubmission, m.methodMap.setCustomDimension01 = m.setCustomDimension01, m.methodMap.setCustomDimension02 = m.setCustomDimension02, m.methodMap.setCustomDimension03 = m.setCustomDimension03, m.methodMap.setEventProcessInterval = m.setEventProcessInterval, m.methodMap.startSession = m.startSession, m.methodMap.endSession = m.endSession, m.methodMap.onStop = m.onStop, m.methodMap.onResume = m.onResume, m.methodMap.addRemoteConfigsListener = m.addRemoteConfigsListener, m.methodMap.removeRemoteConfigsListener = m.removeRemoteConfigsListener, m.methodMap.getRemoteConfigsValueAsString = m.getRemoteConfigsValueAsString, m.methodMap.isRemoteConfigsReady = m.isRemoteConfigsReady, m.methodMap.getRemoteConfigsContentAsString = m.getRemoteConfigsContentAsString, "undefined" != typeof window &amp;&amp; void 0 !== window.GameAnalytics &amp;&amp; void 0 !== window.GameAnalytics.q) {
                        var s = window.GameAnalytics.q;
                        for (var d in s) m.gaCommand.apply(null, s[d])
                    }
                    window.addEventListener("beforeunload", (function() {
                        console.log("addEventListener unload"), o.endSessionAndStopQueue()
                    }))
                }, m.gaCommand = function() {
                    for (var o = [], d = 0; d &lt; arguments.length; d++) o[d] = arguments[d];
                    0 &lt; o.length &amp;&amp; o[0] in s.GameAnalytics.methodMap &amp;&amp; (1 &lt; o.length ? s.GameAnalytics.methodMap[o[0]].apply(null, Array.prototype.slice.call(o, 1)) : s.GameAnalytics.methodMap[o[0]]())
                }, m.configureAvailableCustomDimensions01 = function(s) {
                    void 0 === s &amp;&amp; (s = []), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) ? d.w("Available custom dimensions must be set before SDK is initialized") : p.setAvailableCustomDimensions01(s)
                    }))
                }, m.configureAvailableCustomDimensions02 = function(s) {
                    void 0 === s &amp;&amp; (s = []), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) ? d.w("Available custom dimensions must be set before SDK is initialized") : p.setAvailableCustomDimensions02(s)
                    }))
                }, m.configureAvailableCustomDimensions03 = function(s) {
                    void 0 === s &amp;&amp; (s = []), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) ? d.w("Available custom dimensions must be set before SDK is initialized") : p.setAvailableCustomDimensions03(s)
                    }))
                }, m.configureAvailableResourceCurrencies = function(s) {
                    void 0 === s &amp;&amp; (s = []), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) ? d.w("Available resource currencies must be set before SDK is initialized") : p.setAvailableResourceCurrencies(s)
                    }))
                }, m.configureAvailableResourceItemTypes = function(s) {
                    void 0 === s &amp;&amp; (s = []), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) ? d.w("Available resource item types must be set before SDK is initialized") : p.setAvailableResourceItemTypes(s)
                    }))
                }, m.configureBuild = function(s) {
                    void 0 === s &amp;&amp; (s = ""), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) ? d.w("Build version must be set before SDK is initialized.") : E.validateBuild(s) ? p.setBuild(s) : d.i("Validation fail - configure build: Cannot be null, empty or above 32 length. String: " + s)
                    }))
                }, m.configureSdkGameEngineVersion = function(s) {
                    void 0 === s &amp;&amp; (s = ""), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) || (E.validateSdkWrapperVersion(s) ? S.sdkGameEngineVersion = s : d.i("Validation fail - configure sdk version: Sdk version not supported. String: " + s))
                    }))
                }, m.configureGameEngineVersion = function(s) {
                    void 0 === s &amp;&amp; (s = ""), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) || (E.validateEngineVersion(s) ? S.gameEngineVersion = s : d.i("Validation fail - configure game engine version: Game engine version not supported. String: " + s))
                    }))
                }, m.configureUserId = function(s) {
                    void 0 === s &amp;&amp; (s = ""), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !1) ? d.w("A custom user id must be set before SDK is initialized.") : E.validateUserId(s) ? p.setUserId(s) : d.i("Validation fail - configure user_id: Cannot be null, empty or above 64 length. Will use default user_id method. Used string: " + s)
                    }))
                }, m.initialize = function(s, h) {
                    void 0 === s &amp;&amp; (s = ""), void 0 === h &amp;&amp; (h = ""), S.updateConnectionType();
                    var A = o.createTimedBlock();
                    A.async = !0, m.initTimedBlockId = A.id, A.block = function() {
                        m.isSdkReady(!0, !1) ? d.w("SDK already initialized. Can only be called once.") : E.validateKeys(s, h) ? (p.setKeys(s, h), m.internalInitialize()) : d.w("SDK failed initialize. Game key or secret key is invalid. Can only contain characters A-z 0-9, gameKey is 32 length, gameSecret is 40 length. Failed keys - gameKey: " + s + ", secretKey: " + h)
                    }, o.performTimedBlockOnGAThread(A)
                }, m.addBusinessEvent = function(s, d, h, p, A) {
                    void 0 === s &amp;&amp; (s = ""), void 0 === d &amp;&amp; (d = 0), void 0 === h &amp;&amp; (h = ""), void 0 === p &amp;&amp; (p = ""), void 0 === A &amp;&amp; (A = ""), S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !0, "Could not add business event") &amp;&amp; b.addBusinessEvent(s, d, h, p, A, {})
                    }))
                }, m.addResourceEvent = function(d, h, p, A, E) {
                    void 0 === d &amp;&amp; (d = s.EGAResourceFlowType.Undefined), void 0 === h &amp;&amp; (h = ""), void 0 === p &amp;&amp; (p = 0), void 0 === A &amp;&amp; (A = ""), void 0 === E &amp;&amp; (E = ""), S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !0, "Could not add resource event") &amp;&amp; b.addResourceEvent(d, h, p, A, E, {})
                    }))
                }, m.addProgressionEvent = function(d, h, p, A, E) {
                    void 0 === d &amp;&amp; (d = s.EGAProgressionStatus.Undefined), void 0 === h &amp;&amp; (h = ""), void 0 === p &amp;&amp; (p = ""), void 0 === A &amp;&amp; (A = ""), S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        if (m.isSdkReady(!0, !0, "Could not add progression event")) {
                            var s = "number" == typeof E;
                            b.addProgressionEvent(d, h, p, A, s ? E : 0, s, {})
                        }
                    }))
                }, m.addDesignEvent = function(s, d) {
                    S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        if (m.isSdkReady(!0, !0, "Could not add design event")) {
                            var o = "number" == typeof d;
                            b.addDesignEvent(s, o ? d : 0, o, {})
                        }
                    }))
                }, m.addErrorEvent = function(d, h) {
                    void 0 === d &amp;&amp; (d = s.EGAErrorSeverity.Undefined), void 0 === h &amp;&amp; (h = ""), S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !0, "Could not add error event") &amp;&amp; b.addErrorEvent(d, h, {})
                    }))
                }, m.addAdEventWithNoAdReason = function(d, h, p, A, E) {
                    void 0 === d &amp;&amp; (d = s.EGAAdAction.Undefined), void 0 === h &amp;&amp; (h = s.EGAAdType.Undefined), void 0 === p &amp;&amp; (p = ""), void 0 === A &amp;&amp; (A = ""), void 0 === E &amp;&amp; (E = s.EGAAdError.Undefined), S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !0, "Could not add ad event") &amp;&amp; b.addAdEvent(d, h, p, A, E, 0, !1, {})
                    }))
                }, m.addAdEventWithDuration = function(d, h, p, A, E) {
                    void 0 === d &amp;&amp; (d = s.EGAAdAction.Undefined), void 0 === h &amp;&amp; (h = s.EGAAdType.Undefined), void 0 === p &amp;&amp; (p = ""), void 0 === A &amp;&amp; (A = ""), void 0 === E &amp;&amp; (E = 0), S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !0, "Could not add ad event") &amp;&amp; b.addAdEvent(d, h, p, A, s.EGAAdError.Undefined, E, !0, {})
                    }))
                }, m.addAdEvent = function(d, h, p, A) {
                    void 0 === d &amp;&amp; (d = s.EGAAdAction.Undefined), void 0 === h &amp;&amp; (h = s.EGAAdType.Undefined), void 0 === p &amp;&amp; (p = ""), void 0 === A &amp;&amp; (A = ""), S.updateConnectionType(), o.performTaskOnGAThread((function() {
                        m.isSdkReady(!0, !0, "Could not add ad event") &amp;&amp; b.addAdEvent(d, h, p, A, s.EGAAdError.Undefined, 0, !1, {})
                    }))
                }, m.setEnabledInfoLog = function(s) {
                    void 0 === s &amp;&amp; (s = !1), o.performTaskOnGAThread((function() {
                        s ? (d.setInfoLog(s), d.i("Info logging enabled")) : (d.i("Info logging disabled"), d.setInfoLog(s))
                    }))
                }, m.setEnabledVerboseLog = function(s) {
                    void 0 === s &amp;&amp; (s = !1), o.performTaskOnGAThread((function() {
                        s ? (d.setVerboseLog(s), d.i("Verbose logging enabled")) : (d.i("Verbose logging disabled"), d.setVerboseLog(s))
                    }))
                }, m.setEnabledManualSessionHandling = function(s) {
                    void 0 === s &amp;&amp; (s = !1), o.performTaskOnGAThread((function() {
                        p.setManualSessionHandling(s)
                    }))
                }, m.setEnabledEventSubmission = function(s) {
                    void 0 === s &amp;&amp; (s = !1), o.performTaskOnGAThread((function() {
                        s ? (p.setEnabledEventSubmission(s), d.i("Event submission enabled")) : (d.i("Event submission disabled"), p.setEnabledEventSubmission(s))
                    }))
                }, m.setCustomDimension01 = function(s) {
                    void 0 === s &amp;&amp; (s = ""), o.performTaskOnGAThread((function() {
                        E.validateDimension01(s, p.getAvailableCustomDimensions01()) ? p.setCustomDimension01(s) : d.w("Could not set custom01 dimension value to '" + s + "'. Value not found in available custom01 dimension values")
                    }))
                }, m.setCustomDimension02 = function(s) {
                    void 0 === s &amp;&amp; (s = ""), o.performTaskOnGAThread((function() {
                        E.validateDimension02(s, p.getAvailableCustomDimensions02()) ? p.setCustomDimension02(s) : d.w("Could not set custom02 dimension value to '" + s + "'. Value not found in available custom02 dimension values")
                    }))
                }, m.setCustomDimension03 = function(s) {
                    void 0 === s &amp;&amp; (s = ""), o.performTaskOnGAThread((function() {
                        E.validateDimension03(s, p.getAvailableCustomDimensions03()) ? p.setCustomDimension03(s) : d.w("Could not set custom03 dimension value to '" + s + "'. Value not found in available custom03 dimension values")
                    }))
                }, m.setEventProcessInterval = function(s) {
                    o.performTaskOnGAThread((function() {
                        o.setEventProcessInterval(s)
                    }))
                }, m.startSession = function() {
                    if (p.isInitialized()) {
                        var s = o.createTimedBlock();
                        s.async = !0, m.initTimedBlockId = s.id, s.block = function() {
                            p.isEnabled() &amp;&amp; p.sessionIsStarted() &amp;&amp; o.endSessionAndStopQueue(), m.resumeSessionAndStartQueue()
                        }, o.performTimedBlockOnGAThread(s)
                    }
                }, m.endSession = function() {
                    m.onStop()
                }, m.onStop = function() {
                    o.performTaskOnGAThread((function() {
                        try {
                            o.endSessionAndStopQueue()
                        } catch (s) {}
                    }))
                }, m.onResume = function() {
                    var s = o.createTimedBlock();
                    s.async = !0, m.initTimedBlockId = s.id, s.block = function() {
                        m.resumeSessionAndStartQueue()
                    }, o.performTimedBlockOnGAThread(s)
                }, m.getRemoteConfigsValueAsString = function(s, o) {
                    return void 0 === o &amp;&amp; (o = null), p.getConfigurationStringValue(s, o)
                }, m.isRemoteConfigsReady = function() {
                    return p.isRemoteConfigsReady()
                }, m.addRemoteConfigsListener = function(s) {
                    p.addRemoteConfigsListener(s)
                }, m.removeRemoteConfigsListener = function(s) {
                    p.removeRemoteConfigsListener(s)
                }, m.getRemoteConfigsContentAsString = function() {
                    return p.getRemoteConfigsContentAsString()
                }, m.getABTestingId = function() {
                    return p.getABTestingId()
                }, m.getABTestingVariantId = function() {
                    return p.getABTestingVariantId()
                }, m.internalInitialize = function() {
                    p.ensurePersistedStates(), h.setItem(p.getGameKey(), p.DefaultUserIdKey, p.getDefaultId()), p.setInitialized(!0), m.newSession(), p.isEnabled() &amp;&amp; o.ensureEventQueueIsRunning()
                }, m.newSession = function() {
                    d.i("Starting a new session."), p.validateAndFixCurrentDimensions(), A.instance.requestInit(p.instance.configsHash, m.startNewSessionCallback)
                }, m.startNewSessionCallback = function(s, A) {
                    if (s !== L.Ok &amp;&amp; s !== L.Created || !A) s == L.Unauthorized ? (d.w("Initialize SDK failed - Unauthorized"), p.instance.initAuthorized = !1) : (s === L.NoResponse || s === L.RequestTimeout ? d.i("Init call (session start) failed - no response. Could be offline or timeout.") : s === L.BadResponse || s === L.JsonEncodeFailed || s === L.JsonDecodeFailed ? d.i("Init call (session start) failed - bad response. Could be bad response from proxy or GA servers.") : s !== L.BadRequest &amp;&amp; s !== L.UnknownResponseCode || d.i("Init call (session start) failed - bad request or unknown response."), null == p.instance.sdkConfig ? null != p.instance.sdkConfigCached ? (d.i("Init call (session start) failed - using cached init values."), p.instance.sdkConfig = p.instance.sdkConfigCached) : (d.i("Init call (session start) failed - using default init values."), p.instance.sdkConfig = p.instance.sdkConfigDefault) : d.i("Init call (session start) failed - using cached init values."), p.instance.initAuthorized = !0);
                    else {
                        var S = 0;
                        if (A.server_ts) {
                            var E = A.server_ts;
                            S = p.calculateServerTimeOffset(E)
                        }
                        if (A.time_offset = S, s != L.Created) {
                            var _ = p.getSdkConfig();
                            _.configs &amp;&amp; (A.configs = _.configs), _.configs_hash &amp;&amp; (A.configs_hash = _.configs_hash), _.ab_id &amp;&amp; (A.ab_id = _.ab_id), _.ab_variant_id &amp;&amp; (A.ab_variant_id = _.ab_variant_id)
                        }
                        p.instance.configsHash = A.configs_hash ? A.configs_hash : "", p.instance.abId = A.ab_id ? A.ab_id : "", p.instance.abVariantId = A.ab_variant_id ? A.ab_variant_id : "", h.setItem(p.getGameKey(), p.SdkConfigCachedKey, w.encode64(JSON.stringify(A))), p.instance.sdkConfigCached = A, p.instance.sdkConfig = A, p.instance.initAuthorized = !0
                    }
                    if (p.instance.clientServerTimeOffset = p.getSdkConfig().time_offset ? p.getSdkConfig().time_offset : 0, p.populateConfigurations(p.getSdkConfig()), !p.isEnabled()) return d.w("Could not start session: SDK is disabled."), void o.stopEventQueue();
                    o.ensureEventQueueIsRunning();
                    var I = w.createGuid();
                    p.instance.sessionId = I, p.instance.sessionStart = p.getClientTsAdjusted(), b.addSessionStartEvent();
                    var T = o.getTimedBlockById(m.initTimedBlockId);
                    null != T &amp;&amp; (T.running = !1), m.initTimedBlockId = -1
                }, m.resumeSessionAndStartQueue = function() {
                    p.isInitialized() &amp;&amp; (d.i("Resuming session."), p.sessionIsStarted() || m.newSession())
                }, m.isSdkReady = function(s, o, h) {
                    return void 0 === o &amp;&amp; (o = !0), void 0 === h &amp;&amp; (h = ""), h &amp;&amp; (h += ": "), s &amp;&amp; !p.isInitialized() ? (o &amp;&amp; d.w(h + "SDK is not initialized"), !1) : s &amp;&amp; !p.isEnabled() ? (o &amp;&amp; d.w(h + "SDK is disabled"), !1) : !(s &amp;&amp; !p.sessionIsStarted() &amp;&amp; (o &amp;&amp; d.w(h + "Session has not started yet"), 1))
                }, m.initTimedBlockId = -1, m.methodMap = {}, m);

            function m() {}
            s.GameAnalytics = _
        }(p = p || {}), p.GameAnalytics.init();
        var L = p.GameAnalytics.gaCommand;
        s.gameanalytics = p, s.GameAnalytics = L
    }(U);
    var H = {
        common: {
            adItem: {
                x: 0,
                type: "View",
                selectedBox: 2,
                selecteID: 20,
                searchKey: "View,adItem",
                props: {
                    width: 200,
                    sceneColor: "#000000",
                    name: "adItem",
                    height: 226
                },
                nodeParent: -1,
                maxID: 21,
                label: "adItem",
                isOpen: !0,
                isDirectory: !0,
                isAniNode: !0,
                hasChild: !0,
                compId: 2,
                child: [{
                    x: 15,
                    type: "Image",
                    searchKey: "Image,bg",
                    props: {
                        width: 200,
                        skin: "sogame/ad_item_bg.png",
                        sizeGrid: "20,20,20,20",
                        name: "bg",
                        height: 226,
                        centerY: 0,
                        centerX: 0
                    },
                    nodeParent: 2,
                    label: "bg",
                    isDirectory: !1,
                    isAniNode: !0,
                    hasChild: !1,
                    compId: 3,
                    child: []
                }, {
                    x: 15,
                    type: "Image",
                    searchKey: "Image,game_icon,icon",
                    props: {
                        y: 7,
                        width: 186,
                        var: "icon",
                        skin: "",
                        name: "game_icon",
                        height: 186,
                        centerX: 0
                    },
                    nodeParent: 2,
                    label: "game_icon",
                    isDirectory: !1,
                    isAniNode: !0,
                    hasChild: !1,
                    compId: 16,
                    child: []
                }, {
                    x: 15,
                    type: "Label",
                    searchKey: "Label,game_title,title",
                    props: {
                        y: 196,
                        width: 120,
                        var: "title",
                        valign: "middle",
                        text: "æ¸¸æˆæ¸¸æˆæ¸¸æˆæ¸¸æˆæ¸¸æˆæ¸¸æˆ",
                        overflow: "hidden",
                        name: "game_title",
                        left: 7,
                        height: 26,
                        fontSize: 20,
                        font: "SimSun",
                        bold: !0,
                        align: "left"
                    },
                    nodeParent: 2,
                    label: "game_title",
                    isOpen: !0,
                    isDirectory: !1,
                    isAniNode: !0,
                    hasChild: !1,
                    compId: 17,
                    child: []
                }, {
                    x: 15,
                    type: "Box",
                    searchKey: "Box,btn_play,btnPlay",
                    props: {
                        y: 196,
                        width: 56,
                        var: "btnPlay",
                        right: 7,
                        name: "btn_play",
                        height: 20,
                        bottom: 6,
                        bgColor: "#ffad0c"
                    },
                    nodeParent: 2,
                    label: "btn_play",
                    isOpen: !1,
                    isDirectory: !0,
                    isAniNode: !0,
                    hasChild: !0,
                    compId: 18,
                    child: [{
                        type: "Label",
                        searchKey: "Label,btn_play_label",
                        props: {
                            width: 56,
                            valign: "middle",
                            text: "PLAY",
                            name: "btn_play_label",
                            height: 20,
                            fontSize: 16,
                            color: "#ffffff",
                            centerY: 1,
                            centerX: 0,
                            align: "center"
                        },
                        nodeParent: 18,
                        label: "btn_play_label",
                        isDirectory: !1,
                        isAniNode: !0,
                        hasChild: !1,
                        compId: 19,
                        child: []
                    }]
                }, {
                    x: 15,
                    type: "Image",
                    searchKey: "Image,btn_close,btnClose",
                    props: {
                        y: -13,
                        x: 176,
                        width: 40,
                        var: "btnClose",
                        skin: "sogame/btn_close.png",
                        name: "btn_close",
                        height: 40
                    },
                    nodeParent: 2,
                    label: "btn_close",
                    isDirectory: !1,
                    isAniNode: !0,
                    hasChild: !1,
                    compId: 20,
                    child: []
                }],
                animations: [{
                    nodes: [],
                    name: "ani1",
                    id: 1,
                    frameRate: 24,
                    action: 0
                }]
            },
            btnSound: {
                x: 0,
                type: "View",
                selectedBox: 2,
                selecteID: 6,
                searchKey: "View",
                props: {
                    width: 50,
                    sceneColor: "#000000",
                    height: 54
                },
                nodeParent: -1,
                maxID: 7,
                label: "View",
                isOpen: !0,
                isDirectory: !0,
                isAniNode: !0,
                hasChild: !0,
                compId: 2,
                child: [{
                    x: 15,
                    type: "Image",
                    searchKey: "Image,bg",
                    props: {
                        skin: "sogame/btn_sound_bg.png",
                        name: "bg",
                        label: "label"
                    },
                    nodeParent: 2,
                    label: "bg",
                    isDirectory: !1,
                    isAniNode: !0,
                    hasChild: !1,
                    compId: 4,
                    child: []
                }, {
                    x: 15,
                    type: "Image",
                    searchKey: "Image,soundOn",
                    props: {
                        width: 37,
                        var: "soundOn",
                        skin: "sogame/icon_sound_on_2.png",
                        height: 34,
                        centerY: 0,
                        centerX: 0
                    },
                    nodeParent: 2,
                    label: "soundOn",
                    isDirectory: !1,
                    isAniNode: !0,
                    hasChild: !1,
                    compId: 6,
                    child: [],
                    $HIDDEN: !1
                }, {
                    x: 15,
                    type: "Image",
                    searchKey: "Image,soundOff",
                    props: {
                        width: 37,
                        visible: !1,
                        var: "soundOff",
                        skin: "sogame/icon_sound_off_2.png",
                        height: 34,
                        centerY: 0,
                        centerX: 0
                    },
                    nodeParent: 2,
                    label: "soundOff",
                    isDirectory: !1,
                    isAniNode: !0,
                    hasChild: !1,
                    compId: 5,
                    child: [],
                    $HIDDEN: !0
                }],
                animations: [{
                    nodes: [],
                    name: "ani1",
                    id: 1,
                    frameRate: 24,
                    action: 0
                }]
            }
        }
    };
    let F;
    let K = window.Lq = new class extends class extends class {
        constructor() {
            this.appType = "h5", this._pfName = "sogame", this.gameName = "xzdmq", this.gameid = 999, this.preNetSpeed = 0, this.langType = "en", this.langTypeDefault = "en", this._assetI18nPrefix = null, this.naviAppList = [], this.view = {}, this.isDebug = !0, this.logLevel = 3, this.userInfo = {
                uid: ""
            }, this.time = {
                startLoading: 0
            }, this.timer = {
                lastTimerid: 0,
                cache: {},
                tpl: {
                    name: "",
                    id: 0,
                    isOver: !1,
                    overCallback: null
                },
                loading: null
            }, this.language = {}, this.gaConfig = {
                k: "",
                s: ""
            }, this.isAloneGa = !1, this.addTimer = (s, o) =&gt; {
                if (["cache", "tpl", "lastTimerid"].indexOf(s) &gt; -1) return console.error(s + "ä¸ºä¿ç•™å…³é”®å­—ï¼Œä¸èƒ½ä½¿ç”¨");
                this.timer.cache = this.timer.cache || {};
                let d = Object.assign({}, this.timer.tpl);
                d.id = o, d.name = s, this.timer.cache[o] = d, this.timer[s] = o
            }, this.emitMessage = (s, o, d) =&gt; {
                s &amp;&amp; (this.postmsg[s] = d || null, window.parent !== window.self &amp;&amp; parent.window.postMessage({
                    methon: s,
                    data: o
                }, "*"))
            }, this.addListenMessage = () =&gt; {
                window.addEventListener("message", s =&gt; {
                    let o = s.data.methon || "";
                    if (!o || !this.postmsg[o]) return;
                    let d = s.data.data || null;
                    this.postmsg[o](d)
                }, !1)
            }, V = this, this.util = O, this.ga = U, this.language = B, this.postmsg = {}, this.initDebug();
            let s = this.gaConfig.k;
            setTimeout(() =&gt; {
                s != this.gaConfig.k &amp;&amp; (this.isAloneGa = !0), this.initStorage(), this.initAnalytics()
            }, 0)
        }
        get pfName() {
            return this._pfName
        }
        get prefix() {
            if (this._prefix) return this._prefix;
            let s = [this.pfName, this.gameName];
            return this._prefix = s.join("_") + "_", this._prefix
        }
        init() {}
        onLaunch() {
            document &amp;&amp; (document.title = this.lang("æ¸¸æˆåç§°"))
        }
        hideLoading() {
            let s = document.getElementById("loading-box");
            s &amp;&amp; (s.style.display = "none")
        }
        parseParams(s, o, d = !0) {
            if (null == s) return "";
            let h = "",
                p = typeof s;
            if ("string" == p || "number" == p || "boolean" == p) h += "&amp;" + o + "=" + (null == d || d ? encodeURIComponent(s) : s);
            else
                for (let p in s) {
                    let A = null == o ? p : o + (s instanceof Array ? "[" + p + "]" : "." + p);
                    h += this.parseParams(s[p], A, d)
                }
            return h
        }
        createUid() {
            return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (function(s) {
                var o = 16 * Math.random() | 0;
                return ("x" == s ? o : 3 &amp; o | 8).toString(16)
            }))
        }
        initDebug() {
            var s = {
                log: 1,
                debug: 2,
                info: 3,
                warn: 4,
                error: 5
            };
            if (!this.isDebug)
                for (let o in s) {
                    if (s[o] &gt; this.logLevel) break;
                    console[o] = () =&gt; {}
                }
        }
        replaceStr(s, o) {
            return s.replace(/\$\w+\$/gi, (function(s) {
                var d = o[s.replace(/\$/g, "")];
                return d + "" == "undefined" ? "" : d
            }))
        }
        getAssetsI18nPrefix() {
            return null !== this._assetI18nPrefix || (this._assetI18nPrefix = this.langType !== this.langTypeDefault ? "i18n/" + this.langType + "/" : ""), this._assetI18nPrefix
        }
        loadingOver(s, o) {
            ShowInter();
            if (s = s || this.timer.loading, !this.timer.cache[s]) return console.warn("æœªæ‰¾åˆ°å¯¹åº”çš„å®šæ—¶å™¨");
            this.timer.cache[s].isOver || (this.timer.cache[s].isOver = !0, this.timer.cache[s].overCallback = o)
        }
        navitoApp(s, o) {
            console.log(s, o)
        }
        initNaviAppList(s) {
            this.request({
                url: "", //https://x.sogame.com/api/get-jump-to-game
                data: {
                    game_id: this.gameid
                },
                success: o =&gt; {
                    try {
                        o = JSON.parse(o)
                    } catch (s) {}
                    0 == o.code &amp;&amp; (this.naviAppList = o.msg, s &amp;&amp; s(this.naviAppList))
                }
            })
        }
        initAnalytics() {
            if (window.sogame = window.sogame || {}, window.sogame.initAnalytics) return;
            window.sogame.initAnalytics = !0;
            let s = this.pfName.toLowerCase(),
                o = this.gameName.toLowerCase();
            this.isAloneGa || (o = `${s}_${o}`), this.ga.GameAnalytics("configureAvailableCustomDimensions01", [s]), this.ga.GameAnalytics("configureAvailableCustomDimensions02", [o]), this.ga.GameAnalytics("setCustomDimension01", s), this.ga.GameAnalytics("setCustomDimension02", o),
                this.ga.GameAnalytics("initialize", "", "")
        }
    } {
        constructor() {
            super(), this.cdnUrl = "", this.Scene = {
                load: (s, o, d) =&gt; {
                    Laya.Scene.load(s, o, d)
                },
                open: (s, o, d, h, p) =&gt; {
                    Laya.Scene.open(s, o, d, h, p)
                }
            }, this.Scene3D = {
                load: (s, o) =&gt; {
                    s = F.cdnUrl + s, Laya.Scene3D.load(s, o)
                }
            }, this.MeshSprite3D = {
                load: (s, o) =&gt; {
                    s = F.cdnUrl + s, Laya.MeshSprite3D.load(s, o)
                }
            }, this.loader = {
                load: (s, o, d, h, p, A, S, E, L) =&gt; {
                    "string" == typeof s ? s = F.cdnUrl + s : Array.isArray(s) &amp;&amp; s.forEach(s =&gt; {
                        s.url = F.cdnUrl + s.url
                    }), Laya.loader.load(s, o, d, h, p, A, S, E, L)
                },
                getRes: s =&gt; (s = F.cdnUrl + s, Laya.loader.getRes(s))
            }, this.LocalStorage = {
                setItem: (s, o) =&gt; {
                    s &amp;&amp; (s = this.prefix + s, Laya.LocalStorage.setItem(s, o))
                },
                getItem: s =&gt; {
                    if (s) return s = this.prefix + s, Laya.LocalStorage.getItem(s)
                },
                setJSON: (s, o) =&gt; {
                    s &amp;&amp; (s = this.prefix + s, Laya.LocalStorage.setJSON(s, o))
                },
                getJSON: s =&gt; {
                    if (s) return s = this.prefix + s, Laya.LocalStorage.getJSON(s)
                },
                removeItem: s =&gt; {
                    if (s) return s = this.prefix + s, Laya.LocalStorage.removeItem(s)
                },
                clear: () =&gt; Laya.LocalStorage.clear()
            }, F = this
        }
        request(s) {
            let o = (s = Object.assign({
                url: "",
                data: null,
                success: null,
                fail: null,
                method: "post",
                header: ["Content-Type", "application/x-www-form-urlencoded"],
                responseType: "json",
                async: !0
            }, s)).data || {};
            o.gameid = o.gameid || this.gameid, o.pfName = this.pfName, o = this.parseParams(o);
            let d = new Laya.HttpRequest;
            d.send(s.url, o, s.method, s.responseType, s.header), d.once(Laya.Event.COMPLETE, this, s.success), d.once(Laya.Event.ERROR, this, s.fail)
        }
        lang(s, o, d) {
            if (o &amp;&amp; !d &amp;&amp; "data" in o &amp;&amp; (d = o, o = null), d = d || {}, !this.language[s]) return s;
            let h = this.language[s][this.langType] || this.language[s][this.langTypeDefault];
            if (!h) return s;
            if (h = Object.assign({}, h), d.data &amp;&amp; (h.value = this.replaceStr(h.value, d.data)), !o) return h.value;
            switch (!0) {
                case o instanceof Laya.Label:
                case o instanceof Laya.Text:
                    o.text = h.value;
                    break;
                case o instanceof Laya.Button:
                    o.label = h.value
            }
        }
        getAssetsI18nPrefix() {
            return null !== this._assetI18nPrefix || (this._assetI18nPrefix = this.langType != this.langTypeDefault ? "i18n/" + this.langType + "/" : ""), this._assetI18nPrefix
        }
        initStorage() {
            let s = this,
                o = Laya.LocalStorage,
                d = o.setItem;
            o.setItem = (o, h) =&gt; {
                if (!o) return;
                if (void 0 === h) return console.error("val is need!");
                let p = s.prefix;
                return o = -1 == o.indexOf(p) ? p + o : o, d(o, h)
            };
            let h = o.getItem;
            o.getItem = o =&gt; {
                if (!o) return;
                let d = s.prefix;
                return o = -1 == o.indexOf(d) ? d + o : o, h(o)
            };
            let p = o.setJSON;
            o.setJSON = (o, d) =&gt; {
                if (!o) return;
                let h = s.prefix;
                return o = -1 == o.indexOf(h) ? h + o : o, p(o, d)
            };
            let A = o.getJSON;
            o.getJSON = o =&gt; {
                if (!o) return;
                let d = s.prefix;
                return o = -1 == o.indexOf(d) ? d + o : o, A(o)
            };
            let S = o.removeItem;
            o.removeItem = o =&gt; {
                if (!o) return;
                let d = s.prefix;
                return o = -1 == o.indexOf(d) ? d + o : o, S(o)
            };
            let E = o.clear;
            o.clear = () =&gt; E()
        }
        loadingStart() {
            this.time.startLoading = (new Date).getTime()
        }
        getPreLoadTime(s = 200, o = 3e3, d = 1e3) {
            if (!this.time.startLoading) return console.error("æœªè°ƒç”¨Lq.loadingStart(),é»˜è®¤é¢„ä¼°åŠ&nbsp;è½½æ—¶é—´ä¸º" + d + "ms"), d;
            let h = (new Date).getTime() - this.time.startLoading,
                p = o / (this.preNetSpeed = Math.floor(s / h * 1e3)) * 1e3;
            return p = p &lt; d ? d : p, p
        }
        onLoading(s, o, d) {
            d = d || {};
            let h = (d = Object.assign({
                    loadSize: 200,
                    totalSize: 3e3,
                    interVal: 16,
                    float: 2,
                    preLoadTime: 0,
                    timerName: "loading"
                }, d)).interVal,
                p = d.preLoadTime || this.getPreLoadTime(d.loadSize, d.totalSize),
                A = !d.preLoadTime,
                S = 99 / (p / h),
                E = 0,
                L = 0,
                w = ++this.timer.lastTimerid,
                update = () =&gt; {
                    let s = this.timer.cache[w] || {},
                        h = 99;
                    if (A) {
                        let o = !1;
                        !0 === s.isOver &amp;&amp; (o = !0, h = 100), E += !0 === o ? 5 : S
                    } else E += S, h = 100;
                    E = E &gt; h ? h : E;
                    let p = Math.floor(E);
                    d.float &amp;&amp; (p = E.toFixed(d.float)), p != L &amp;&amp; (L = p, o &amp;&amp; o.call(this, L), 100 == p &amp;&amp; (Laya.timer.clear(this, update), s.overCallback &amp;&amp; s.overCallback(), this.timer[s.name] = null, delete this.timer.cache[w]))
                };
            return Laya.timer.loop(h, this, update), d.timerName &amp;&amp; this.addTimer(d.timerName, w), w
        }
        showNaviAds(s, o, d) {
            if (!(s instanceof Laya.Node)) return void console.error("parent node is not a Node");
            let h = s.getChildByName("sogameNaviAdBox");
            if (h &amp;&amp; h.numChildren)
                for (let s = 0; s &lt; h.numChildren; s++) h.getChildAt(s).visible = !1, h.getChildAt(s).active = !1;
            if (!Array.isArray(o) || 0 == o.length) return;
            let p = 1;
            d.attrList &amp;&amp; Array.isArray(d.attrList) &amp;&amp; (p = d.attrList.length), d = d || {};
            let A = {
                maxNum: p,
                attrList: [],
                prefab: H.common.adItem
            };
            A = Object.assign(A, d), A.maxNum = Math.min(o.length, A.maxNum);
            let S = {
                game_id: 0,
                game_icon: null,
                game_name: null,
                game_url: "",
                fail_url: ""
            };
            o.shuffle(), h || (h = new Laya.Box, h.name = "sogameNaviAdBox", h.x = 0, h.y = 0, s.addChild(h)), this.util.getObjVal(this.view, "ads.naviBox", h, !0);
            let E = 0,
                L = 0;
            for (; E &lt; A.maxNum &amp;&amp; !(L &gt;= o.length);) {
                let s = o[L] || S;
                if (!s.game_id || !s.game_name || !s.game_icon) {
                    L++;
                    continue
                }
                let d = !0,
                    p = h.getChildAt(E);
                p || (d = !1, p = new Laya.View, p.createView(A.prefab), p.name = "sogameAdItem" + E);
                let w = A.attrList[E];
                if (w)
                    for (let s in w) p[s] = w[s];
                p.icon.skin = s.game_icon, p.title.text = s.game_name, p.offAll(Laya.Event.CLICK), p.on(Laya.Event.CLICK, this, o =&gt; {
                    o.stopPropagation();
                    let d = {
                        url: s.game_url || "",
                        url_fail: s.fail_url || ""
                    };
                    this.navitoApp(d.url, d.url_fail)
                }), p.btnClose.offAll(Laya.Event.CLICK), p.btnClose.on(Laya.Event.CLICK, this, s =&gt; {
                    s.stopPropagation(), s.target.parent.visible = !1
                }), d ? (p.active = !0, p.visible = !0) : h.addChild(p), L++, E++
            }
        }
        initBtnSound(s, o, d) {
            if (!(s instanceof Laya.Node)) return void console.error("parent node is not a Node");
            o = Object.assign({
                x: 0,
                y: 0,
                scaleX: 1,
                scaleY: 1
            }, o), d = d || {};
            let h = {
                prefab: H.common.btnSound
            };
            h = Object.assign(h, d);
            let p = new Laya.View;
            p.createView(h.prefab), p.name = "sogameBtnSound";
            for (let s in o) p[s] = o[s];
            p.offAll(Laya.Event.CLICK), p.on(Laya.Event.CLICK, this, s =&gt; {
                s.stopPropagation(), b.audioStatus = !b.audioStatus, p.soundOn.visible = b.audioStatus, p.soundOff.visible = !b.audioStatus
            }), s.addChild(p), this.util.getObjVal(this.view, "btn.sound", p)
        }
        showView(s, o = !0) {
            console.log("status", o);
            let d = this.util.getObjVal(this.view, s);
            console.log(d), d &amp;&amp; !d.destroyed &amp;&amp; (d.visible = d.active = o)
        }
        on(s, o, d) {
            d = d || this, Laya.stage.on(s, d, o)
        }
        emit(s, o) {
            Laya.stage.event(s, o)
        }
    } {
        constructor() {
            super(), this._pfName = "ohayoo", this.appid = "rotatingbridge", this.langType = "en", this.langTypeDefault = "en", this.gaConfig = {
                k: "",
                s: ""
            }, this.userInfo = {
                image: "",
                name: "",
                openid: "",
                token: "",
                uid: ""
            }, this.initohayoo(), this.addListenMessage()
        }
        hideLoading() {
            this.emitMessage("hideLoading")
        }
        initohayoo() {
            this.ohayoo = this.ohayoo || {}, this.ohayoo.ShowExcitationVideoAdv = s =&gt; {
                this.emitMessage("ShowExcitationVideoAdv", null, s)
            }, this.ohayoo.ShowScreenVideo = (s, o) =&gt; {
                this.emitMessage("ShowScreenVideo", {
                    node: s
                }, o)
            }
        }
    };
    console.log("pfName:", K.pfName);
    class q extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("å†æ¥ä¸€æ¬¡", this.label_1), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    var z = {
        gameLevelStart(s) {
            if (s) switch (Lq.pfName) {
                case "stapp":
                    Lq.stapp.callJsbMethod("gameLevelStart", {
                        level: s
                    })
            }
        },
        gameLevelEnd(s) {
            if (s) switch (Lq.pfName) {
                case "stapp":
                    Lq.stapp.callJsbMethod("gameLevelEnd", {
                        level: s
                    })
            }
        },
        showPross(s, o, d) {
            let h, p, A, S = {
                bgColor: "#000000",
                subColor: "#f3b63f",
                width: .7 * Laya.stage.width,
                height: 34,
                zOrder: 999,
                showNum: !1,
                numColor: "#ffffff",
                bottom: Laya.stage.height / 3
            };
            o = Object.assign(S, o), h = new Laya.Box, h.name = "customPross", h = new Laya.Box, h.setStyle, h.bgColor = o.bgColor, h.zOrder = o.zOrder, h.width = o.width, h.height = o.height, h.centerX = 0, h.bottom = o.bottom, d || (d = Laya.stage), d.addChild(h), p = new Laya.Box, p.name = "subPross", p.width = .01, p.x = 0, p.y = 0, p.height = h.height, p.bgColor = o.subColor, h.addChild(p), o.showNum &amp;&amp; (A = new Laya.Label, A.centerX = 0, A.y = -56, A.fontSize = 36, A.color = "#ffffff", A.bold = !0, h.addChild(A)), Lq.onLoading(this, d =&gt; {
                p.width = h.width * d / 100, o.showNum &amp;&amp; (A.text = d + " %"), d &lt; 100 || Laya.Tween.to(this, {
                    alpha: .2
                }, 300, null, Laya.Handler.create(this, () =&gt; {
                    h.visible = !1, s &amp;&amp; s(), h.destroy()
                }))
            }, {
                float: 2,
                timerName: "prossTime"
            })
        },
        showTips(s, o = 2e3) {
            if (!s) return;
            let d, h, p = Lq.view.tipsNode;
            p ? (p.visible = !0, p.y = Laya.stage.height / 2, p.alpha = 1, d = p.getChildByName("tipsLabel"), d.text = s, h = p.getChildByName("tipsBg"), p.width = h.width = Math.max(d.width + 100, 600), p.height = h.height = d.height + 20) : (p = new Laya.Box, p.zOrder = 99999, h = new Laya.Box, h.bgColor = "#404040", h.alpha = .8, h.centerY = 0, h.name = "tipsBg", p.addChild(h), d = new Laya.Label(s), d.name = "tipsLabel", d.fontSize = 40, d.color = "#ffffff", d.stroke = 5, d.strokeColor = "#000000", d.centerX = 0, d.centerY = 0, d.wordWrap = !0, d.align = Laya.Stage.ALIGN_CENTER, d.valign = Laya.Stage.ALIGN_MIDDLE, d.width = Laya.stage.width, p.addChild(d), p.width = h.width = Laya.stage.width, p.height = h.height = d.height + 20, p.centerX = h.centerX = 0, p.y = Laya.stage.height / 2, Lq.view.tipsNode = p, Laya.stage.addChild(p)), Laya.Tween.to(p, {
                y: p.y - 100,
                alpha: .2
            }, 1e3, null, Laya.Handler.create(this, () =&gt; {
                p.visible = !1
            }), o, !0)
        },
        getChildByPath(s, o = "") {
            if (!s || 0 == s.numChildren) return null;
            if (!o) return s;
            let d = o.split("/"),
                h = s;
            do {
                let s = d.shift();
                if (h = h.getChildByName(s), !h) return null
            } while (0 != d.length);
            return h
        }
    };
    const j = K.ga.gameanalytics,
        W = "1",
        J = "2",
        Y = "3",
        X = "5",
        $ = "11";
    K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName, K.pfName, K.gameName;
    let Q = {
        request: {
            lastTime: 0,
            nextTime: 0,
            interval: 0
        },
        screenAd: {
            lastTime: 0,
            nextTime: 0,
            interval: 30,
            timeout: 30,
            isSupport: !0,
            isExecute: !1
        },
        rewardAd: {
            lastTime: 0,
            nextTime: 0,
            interval: 0,
            timeout: 30,
            skipReward: !1,
            isSupport: !0,
            isExecute: !1
        },
        uploadEvent: {}
    };
    switch (K.pfName) {
        case "shareit":
            Q.rewardAd.interval = 30;
            break;
        case "ohayoo":
            Q.screenAd.interval = 0;
            break;
        case "cy":
            Q.request.interval = 0, Q.rewardAd.interval = 10, Q.screenAd.interval = 90;
            break;
        case "admobapp":
            Q.screenAd.interval = 60;
            break;
        case "oppo":
            Q.request.interval = 5, Q.rewardAd.interval = 10, Q.screenAd.interval = 60, Q.rewardAd.skipReward = !1, Q.screenAd.isSupport = !1, Q.screenAd.nextTime = (new Date).getTime() + 864e5;
            break;
        case "hago":
            Q.rewardAd.interval = 5, Q.screenAd.isSupport = !1;
            break;
        case "jr":
        case "jrst":
        case "cyh5":
        case "jruc":
            Q.request.interval = 5, Q.rewardAd.interval = 5, Q.screenAd.interval = 60, Q.rewardAd.skipReward = !0;
            break;
        case "oprpk":
            Q.rewardAd.interval = 5, Q.screenAd.isSupport = !1
    }
    let Z = [],
        ee = [],
        checkIsCanLoad = s =&gt; {
            let o = (new Date).getTime();
            Q[s] = Q[s] || {};
            let d = Q[s];
            return !(o &lt; d.nextTime) &amp;&amp; (!(o &lt; Q.request.nextTime) &amp;&amp; (Q.request.lastTime = o, Q.request.nextTime = o + 1e3 * Q.request.interval, d.lastTime = o, d.nextTime = o + 1e3 * d.interval, !0))
        },
        checkIsTimeout = s =&gt; {
            let o = (new Date).getTime();
            Q[s] = Q[s] || {};
            let d = Q[s];
            return o &gt; d.lastTime + 1e3 * d.timeout
        },
        resetNextTime = (s, o = 0, d = 10) =&gt; {
            Q[s] = Q[s] || {};
            let h = Q[s];
            h.interval &amp;&amp; (o = o || h.lastTime, h.nextTime = o + 1e3 * d)
        },
        addGAAdEvent = (s, o, d = "undefined", h) =&gt; {
            h = h || {};
            h = Object.assign({
                errorType: ""
            }, h);
            let p = K.isAloneGa ? "" + K.gameName : `${K.pfName.toLowerCase()}_${K.gameName}`,
                A = {
                    action: s,
                    adType: o,
                    adSdkName: K.pfName.toLowerCase(),
                    adFlag: `${p}_${d}`,
                    errorType: h.errorType || ""
                };
            if (Q.uploadEvent[K.pfName] || 1)
                if (j.state.GAState.isEnabled()) {
                    for (; Z.length &gt; 0;) {
                        let s = ee.shift();
                        j.GameAnalytics.addAdEvent(s.action, s.adType, s.adSdkName, s.adFlag, s.errorType)
                    }
                    j.GameAnalytics.addAdEvent(A.action, A.adType, A.adSdkName, A.adFlag, A.errorType)
                } else ee.push(A)
        };
    const te = {
        showRewardedAd(s, o, d, h) {
            ShowRewarded(s, o);
            return;
          
        },
        showScreenAd(s, o, d, h) {
            ShowInter(o);
            return;
        },
        showBannerAd(s) {
            s = s || {}, console.log("=====showBannerAd=====", s);
            switch (K.pfName) {
                case "admobapp":
                case "tapapp":
                    var o = s.position || "";
                    K[K.pfName].callJsbMethod("showBanner", {
                        position: o
                    });
                    break;
                case "stapp":
                    if (!(o = s.position || "")) return;
                    K.stapp.callJsbMethod("showBanner", {
                        position: o
                    });
                    break;
                case "miapp":
                    o = s.position || "";
                    K.miapp.callJsbMethod("showBanner", {
                        position: o
                    });
                    break;
                case "oppo":
                case "jr":
                    break;
                case "oprpk":
                    K.oprpk.showBannerAd()
            }
        },
        hiddenBannerAd() {
            switch (console.log("=====hiddenBannerAd=====", s), K.pfName) {
                case "admobapp":
                case "stapp":
                case "miapp":
                case "tapapp":
                    var s = {
                        scene: ""
                    };
                    K[K.pfName].callJsbMethod("hiddenBanner", s);
                    break;
                case "oppo":
                case "jr":
                    break;
                case "oprpk":
                    K.oprpk.hiddenBannerAd()
            }
        },
        uploadRewardScene(s, ...o) {
            if (s &amp;&amp; 0 != o.length) switch (K.pfName) {
                case "stapp":
                    K.stapp.callJsbMethod("showRewardedBadgeView", {
                        scene: s,
                        subPortal: o
                    })
            }
        }
    };
    setTimeout(() =&gt; {
        K.on("showAds", s =&gt; {
            let o = {
                reward: "showRewardedAd",
                screen: "showScreenAd"
            }[s.type];
            o &amp;&amp; te[o]()
        }, void 0)
    }, 0);
    class ae extends p {
        constructor() {
            super()
        }
        onAwake() {
            this.againBtn.on(Laya.Event.CLICK, this, s =&gt; {
                Laya.eventMgr.event(o.laya_event.startGame), this.closeSelf()
            }), this.backBtn.on(Laya.Event.CLICK, this, s =&gt; {
                switch (Lq.pfName) {
                    case "ohayoo":
                        te.showScreenAd({
                            node: "å¤±è´¥"
                        })
                }
                Laya.eventMgr.event(o.laya_event.showMain), this.closeSelf()
            })
        }
        onEnable() {
            switch (Lq.pfName) {
                case "ohayoo":
                    break;
                default:
                    te.showScreenAd()
            }
        }
        closeSelf() {
            Laya.eventMgr.event(o.laya_event.hideFailDialog)
        }
    }
    class ne extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("ç‚¹å‡»å±å¹•æ­å»ºæ¡¥æ¢", this.label_1), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    class ie extends p {
        constructor() {
            super()
        }
        onAwake() {
            Laya.eventMgr.on(o.laya_event.playFlash, this, s =&gt; {
                Laya.Tween.to(this.bg_white, {
                    alpha: 1
                }, 150), Laya.timer.once(150, this, () =&gt; {
                    Laya.Tween.to(this.bg_white, {
                        alpha: 0
                    }, 50)
                }), this.showWord(s)
            }), Laya.eventMgr.on(o.laya_event.showWord, this, s =&gt; {
                let o = this.wordGrp.getChildByName("word" + s);
                o.alpha = 1, o.y = 725;
                let d = Math.floor(101 * Math.random());
                o.x = 280 + d, Laya.Tween.to(o, {
                    y: 324
                }, 800), Laya.timer.once(600, this, () =&gt; {
                    Laya.Tween.to(o, {
                        alpha: 0
                    }, 200)
                })
            }), this.alphaNum = 1, this.spMaskAdd = 2, this.spImgAdd = 3, this.maskRadius = 30, this.delayTime = 0
        }
        onEnable() {
            this.guideGrp.visible = 1 == Laya.userData.Level, 1 == Laya.userData.Level &amp;&amp; (this.guideBtn = this.maskGrp.getChildByName("guideBtn"), this.interactionArea = new Laya.Sprite, this.interactionArea.blendMode = "destination-out", this.maskGrp.addChild(this.interactionArea), this.interactionArea.graphics.drawCircle(320, 947, this.maskRadius, "#000000"), Laya.timer.loop(20, this, this.playGuide))
        }
        onDisable() {
            Laya.timer.clear(this, this.playGuide)
        }
        showWord(s) {
            let o = this.wordGrp.getChildByName("word" + s);
            o.alpha = 1, o.y = 725;
            let d = Math.floor(101 * Math.random());
            o.x = 280 + d, Laya.Tween.to(o, {
                y: 324
            }, 800), Laya.timer.once(600, this, () =&gt; {
                Laya.Tween.to(o, {
                    alpha: 0
                }, 200)
            })
        }
        playGuide() {
            this.delayTime++, this.interactionArea.graphics.clear(), this.maskRadius += this.spMaskAdd, this.interactionArea.graphics.drawCircle(320, 945, this.maskRadius, "#000000"), this.guideBtn.width += this.spImgAdd, this.guideBtn.height += this.spImgAdd, this.delayTime &lt;= 30 ? (this.hand.scaleX += .005, this.hand.scaleY += .005) : this.delayTime &lt; 50 ? (this.spMaskAdd = 2.5, this.hand.scaleX += .005, this.hand.scaleY += .005) : this.delayTime &lt;= 75 ? (this.spMaskAdd = 0, this.spImgAdd = 0, this.hand.scaleX -= .01, this.hand.scaleY -= .01) : (this.delayTime = 0, this.spMaskAdd = 2, this.spImgAdd = 3, this.maskRadius = 30, this.guideBtn.width = 100, this.guideBtn.height = 100, this.hand.scaleX = 1, this.hand.scaleY = 1)
        }
    }
    class se extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("ä¸ç”¨äº†", this.label_1), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    class re extends p {
        constructor() {
            super()
        }
        onAwake() {
            this.getBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                te.showRewardedAd(() =&gt; {
                    Laya.timer.once(500, this, () =&gt; {
                        Laya.inFight = !0
                    }), Laya.haveBallNum = Laya.maxHaveBallNum, this.closeSelf()
                })
            }), this.closeBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                Laya.eventMgr.event(o.laya_event.showFailDialpg), this.closeSelf()
            }), Laya.timer.loop(20, this, this.doUpdata), this.starState = [1, 1, 1, 1]
        }
        onEnable() {}
        closeSelf() {
            Laya.eventMgr.event(o.laya_event.hideGetBallDialog)
        }
        doUpdata() {
            this.flashImg.rotation += 1, this.flashImg.rotation &gt;= 360 &amp;&amp; (this.flashImg.rotation = 0);
            for (let o = 0; o &lt; this.starBox._children.length; o++) {
                var s = this.starBox._children[o];
                s.scaleX &gt;= 1 ? this.starState[o] = 0 : s.scaleX &lt;= .7 &amp;&amp; (this.starState[o] = 1), this.starState[o] ? (s.scaleX += .02, s.scaleY += .02) : (s.scaleX -= .02, s.scaleY -= .02)
            }
        }
    }
    class oe extends p {
        constructor() {
            super()
        }
        onAwake() {
            this.closeBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                Laya.eventMgr.event(o.laya_event.hideGetSkin)
            })
        }
        onEnable() {}
        onShow() {
            var s = this.paraData;
            this.skinIcon.skin = "skin/" + s + ".png"
        }
    }
    class le extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("ä½“åŠ› +5", this.label_1), K.lang("é¢†å–ä½“åŠ›", this.label_2), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    class de extends p {
        constructor() {
            super()
        }
        onAwake() {
            this.getBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                te.showRewardedAd(() =&gt; {
                    Laya.userData.Vitality += parseInt(Laya.curWx.MoreConfig.shareRewardNum), Laya.haveBallNum = Laya.maxHaveBallNum, this.closeSelf(), Laya.eventMgr.event(o.laya_event.showMain)
                })
            }), this.closeBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                this.closeSelf()
            }), Laya.timer.loop(20, this, this.doUpdata)
        }
        onEnable() {
            this.vitalityNum.text = Lq.lang("ä½“åŠ›+x", {
                data: {
                    num: Laya.curWx.MoreConfig.shareRewardNum
                }
            })
        }
        closeSelf() {
            Laya.eventMgr.event(o.laya_event.hideGetVitality)
        }
        doUpdata() {
            this.flashImg.rotation += 1, this.flashImg.rotation &gt;= 360 &amp;&amp; (this.flashImg.rotation = 0)
        }
    }
    class ce extends p {
        constructor() {
            super()
        }
        onAwake() {
            this.guideGrp.on(Laya.Event.MOUSE_UP, this, () =&gt; {}), this.clickImg.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                console.log("123123132132"), this.cb &amp;&amp; (Laya.eventMgr.event(o.laya_event.hideGuide), this.cb(this.target))
            }), this.interactionArea = new Laya.Sprite, this.interactionArea.blendMode = "destination-out", this.guideGrp.addChild(this.interactionArea), this.interactionArea.graphics.drawCircle(300, 800, 75, "#000000"), this.clickImg.x = 300, this.clickImg.y = 800, this.owner.ani1.play(0, !0)
        }
        onEnable() {}
        closeSelf() {}
        onShow() {
            this.interactionArea.graphics.clear(), this.cb = this.paraData.cb, this.target = this.paraData.target;
            var s = this.paraData.pos,
                o = s.x,
                d = s.y;
            this.clickImg.x = o, this.clickImg.y = d, this.hand.x = s.x, this.hand.y = s.y, this.interactionArea.graphics.drawCircle(s.x, s.y, 75, "#000000")
        }
    }
    class he extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("ä¸ç”¨äº†", this.label_1), K.lang("å…è´¹å¤æ´»", this.label_2), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    class ue extends p {
        constructor() {
            super()
        }
        onAwake() {
            this.cMask = new Laya.Sprite, this.cMask.graphics.drawPie(0, 0, 200, 0, 270, "#ff0000"), this.cMask.pos(167, 167), this.owner.getChildByName("progressBg").getChildByName("progress").mask = this.cMask, this.owner.getChildByName("closeBtn").on(Laya.Event.CLICK, this, this.close), this.owner.getChildByName("shareBtn").on(Laya.Event.CLICK, this, this.share)
        }
        onEnable() {
            this.shareFlag = !1, this.lastTime = (new Date).getTime()
        }
        onUpdate() {
            if (!this.shareFlag) {
                var s = (new Date).getTime();
                if (this.lastTime &amp;&amp; s &gt;= this.lastTime) {
                    var o = (s - this.lastTime) / 5e3;
                    o &gt;= 1 &amp;&amp; (o = 1, this.close()), this.cMask.graphics.clear(), this.cMask.graphics.drawPie(0, 0, 200, 360 * o - 90, 270, "#ff0000")
                }
            }
        }
        onShow() {}
        onHidden() {}
        close() {
            console.log("ä¸ç”¨äº†"), Laya.eventMgr.event(o.laya_event.showFailDialog), A.getInstance().hide(this.owner)
        }
        share() {
            this.shareFlag = !0;
            let fail = () =&gt; {
                this.shareFlag = !1
            };
            te.showRewardedAd(() =&gt; {
                Laya.inFight = !0, A.getInstance().hide(this.owner)
            }, fail, fail)
        }
    }
    class ge extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("æŸ¥çœ‹ç¾¤æŽ’è¡Œ", this.label_1), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    class ve extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {}
        onEnable() {
            this.backBtn.on(Laya.Event.MOUSE_UP, this, s =&gt; {
                Laya.eventMgr.event(o.laya_event.hideRank)
            }), this.groupRankBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                Laya.curWx.shareAppMessage()
            }), this.owner.on(Laya.Event.MOUSE_DOWN, this, s =&gt; {
                Laya.curWx.postMessageToChild({
                    action: "TouchStart"
                }), this.startPosition = {
                    x: s.stageX,
                    y: s.stageY
                }
            }), this.owner.on(Laya.Event.MOUSE_MOVE, this, s =&gt; {
                if (this.startPosition) {
                    var o = this.startPosition.x - s.stageX,
                        d = this.startPosition.y - s.stageY;
                    Laya.curWx.postMessageToChild({
                        action: "TouchMove",
                        x: o,
                        y: d
                    }), this.startPosition.x = s.stageX, this.startPosition.y = s.stageY
                }
            }), this.owner.on(Laya.Event.MOUSE_UP, this, s =&gt; {
                this.startPosition = null, Laya.curWx.postMessageToChild({
                    action: "TouchEnd"
                })
            }), Laya.curWx.setSharedCanvasSize(494, 500), 1 == Laya.curWx.shFlag &amp;&amp; (this.groupRankBtn.visible = !1)
        }
    }
    class me extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("ä»»åŠ¡èŽ·å¾—", this.label_1), K.lang("1000 éšæœºèŽ·å–", this.label_2), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    var ye = {
            0: 1e3,
            1: 1e3,
            2: 1e3
        },
        fe = {
            1: {
                type: "video",
                num: 800
            },
            2: {
                type: "video",
                num: 600
            },
            3: {
                type: "share",
                num: 500
            },
            4: {
                type: "share",
                num: 300
            },
            5: {
                type: "share",
                num: 300
            }
        };
    class pe extends p {
        constructor() {
            super()
        }
        onAwake() {
            Laya.isBigScreen ? this.bg.height = 1050 : this.bg.height = 952, p.prototype.onAwake.call(this), this.arrDot = [];
            var s = Math.ceil(1);
            this.currentPage = 0, this.pageView.on(Laya.Event.MOUSE_DOWN, this, s =&gt; {
                this.startPosition = {
                    x: s.stageX,
                    y: s.stageY
                }, this.startX = s.stageX
            }), this.pageView.on(Laya.Event.MOUSE_MOVE, this, s =&gt; {
                if (this.startPosition) {
                    var o = s.stageX - this.startPosition.x;
                    this.pageView.x += o, this.startPosition.x = s.stageX, this.startPosition.y = s.stageY
                }
            }), this.pageView.on(Laya.Event.MOUSE_UP, this, o =&gt; {
                o.stageX - this.startX &gt; 20 &amp;&amp; 0 != this.currentPage ? (console.log("å‘å³"), this.currentPage--, this.pageView.x = 640 * -this.currentPage) : o.stageX - this.startX &lt; -20 &amp;&amp; this.currentPage &lt; s - 1 ? (console.log("å‘å·¦"), this.currentPage++, this.pageView.x = 640 * -this.currentPage) : this.pageView.x = 640 * -this.currentPage, "ä»»åŠ¡èŽ·å¾—" == ye[this.currentPage] ? (this.buyBtn.visible = !1, this.lbTip.visible = !0) : (this.lbTip.visible = !1, this.buyBtn.visible = !0, this.lbBuyText.text = Lq.lang("xéšæœºèŽ·å–", {
                    data: {
                        num: ye[this.currentPage]
                    }
                })), this.startPosition = null, this.startX = null, this.detDot()
            }), this.lbBuyText.text = Lq.lang("xéšæœºèŽ·å–", {
                data: {
                    num: ye[this.currentPage]
                }
            }), this.resetHeroList(), this.shareBtn.on(Laya.Event.CLICK, this, this.share), this.videoBtn.on(Laya.Event.CLICK, this, this.video), this.buyBtn.on(Laya.Event.CLICK, this, this.buy), this.closeBtn.on(Laya.Event.CLICK, this, () =&gt; {
                Laya.eventMgr.event(o.laya_event.refreshTitle, 2), Laya.eventMgr.event(o.laya_event.hideSkin)
            }), this.detDot(), this.chagePlayer()
        }
        detDot() {
            for (let s = 0; s &lt; this.arrDot.length; s++) s == this.currentPage ? this.arrDot[s].alpha = 1 : this.arrDot[s].alpha = .5
        }
        updateShareVideoBtnState() {
            var s = Laya.curWx.getCurTime();
            if (Laya.userData.ShareTimes &gt;= 5 &amp;&amp; Laya.userData.ShareDay == s || 1 == Laya.curWx.shFlag) this.shareBtn.visible = !1, this.videoBtn.visible = !1;
            else {
                var o = fe[Laya.userData.ShareTimes + 1];
                o &amp;&amp; (this.shareBtn.getChildByName("coin").text = "+" + o.num, this.videoBtn.getChildByName("coin").text = "+" + o.num)
            }
            this.lbShareTimes.text = "(" + Laya.userData.ShareTimes + "/5)", this.lbVideoTimes.text = "(" + Laya.userData.ShareTimes + "/5)"
        }
        onEnable() {
            if (2 == Laya.userData.GuideNum) {
                var s = {};
                s.pos = new Laya.Point(320, 730), s.cb = function(s) {
                    s.buy(), Laya.userData.GuideNum++
                }, s.target = this, Laya.eventMgr.event(o.laya_event.showGuide, s)
            }
            Laya.eventMgr.event(o.laya_event.refreshTitle, 1), this.resetHeroList(), this.updateShareVideoBtnState()
        }
        resetHeroList() {
            if (console.log("è®¾ç½®åˆ—è¡¨"), this.pageView = this.owner.getChildByName("box").getChildByName("pageView"), 0 == this.pageView.numChildren) {
                var s = Math.ceil(1);
                this.pageView.width = 640 * s;
                for (let o = 0; o &lt; s; o++) {
                    let s = new Laya.Box;
                    s.width = 640, s.height = 380, s.x = 640 * o, s.y = 0, s.name = "page" + o, this.pageView.addChild(s);
                    for (let d = 0; d &lt; 8 &amp;&amp; !(8 * o + d + 1 &gt; 8); d++) Laya.loader.create("prefabs/ballBox.json", Laya.Handler.create(this, h =&gt; {
                        var p = new Laya.Prefab;
                        p.json = h;
                        var A = p.create();
                        s.addChild(A), A.x = 30 + d % 4 * 150, A.y = 160 * Math.floor(d / 4) + 20, A.getChildByName("hero").skin = "skin/" + (8 * o + d + 1) + ".png", A.name = 8 * o + d + 1 + "", A.on(Laya.Event.CLICK, this, () =&gt; {
                            -1 != Laya.userData.ArrHeroIdList.indexOf(8 * o + d + 1) &amp;&amp; (this.selectBox &amp;&amp; (this.selectBox.getChildByName("select").visible = !1, Laya.userData.HeroId = 8 * o + d + 1, this.chagePlayer()), this.selectBox = A, this.selectBox.getChildByName("select").visible = !0)
                        }), -1 != Laya.userData.ArrHeroIdList.indexOf(8 * o + d + 1) ? (A.getChildByName("noHave").visible = !1, Laya.userData.HeroId == 8 * o + d + 1 ? (A.getChildByName("select").visible = !0, this.selectBox = A) : A.getChildByName("select").visible = !1) : (A.getChildByName("select").visible = !1, A.getChildByName("noHave").visible = !0)
                    }))
                }
                for (let d = 0; d &lt; s; d++) {
                    var o = new Laya.Image("UI/dot.png");
                    o.x = 20 * d, o.y = 0, this.owner.getChildByName("box").getChildByName("dotList").addChild(o), this.arrDot.push(o)
                }
                this.owner.getChildByName("box").getChildByName("dotList").width = 20 * s - 10, this.chagePlayer()
            } else {
                s = Math.ceil(1);
                for (let o = 0; o &lt; s; o++)
                    for (let s = 0; s &lt; 8 &amp;&amp; !(8 * o + s + 1 &gt; 8); s++) {
                        var d = "page" + o,
                            h = 8 * o + s + 1 + "",
                            p = this.pageView.getChildByName(d).getChildByName(h);
                        p &amp;&amp; (-1 != Laya.userData.ArrHeroIdList.indexOf(8 * o + s + 1) ? (p.getChildByName("noHave").visible = !1, Laya.userData.HeroId == 8 * o + s + 1 ? (p.getChildByName("select").visible = !0, this.selectBox = p) : p.getChildByName("select").visible = !1) : (p.getChildByName("select").visible = !1, p.getChildByName("noHave").visible = !0))
                    }
                this.chagePlayer()
            }
        }
        share() {}
        video() {
            te.showRewardedAd(() =&gt; {
                Laya.userData.ShareDay = Laya.curWx.getCurTime();
                var s = fe[Laya.userData.ShareTimes + 1];
                s &amp;&amp; (Laya.userData.Coin += s.num), Laya.userData.ShareTimes++, this.updateShareVideoBtnState()
            })
        }
        buy() {
            if (ye[this.currentPage] &gt; Laya.userData.Coin) z.showTips(Lq.lang("é‡‘å¸ä¸è¶³"), 1500);
            else {
                console.log("è´­ä¹°çš®è‚¤");
                var s = this.pageView.getChildByName("page" + this.currentPage),
                    d = [];
                for (let o = 0; o &lt; s.numChildren; o++) {
                    -1 == Laya.userData.ArrHeroIdList.indexOf(8 * this.currentPage + o + 1) &amp;&amp; 8 * this.currentPage + o + 1 != 7 &amp;&amp; 8 * this.currentPage + o + 1 != 8 &amp;&amp; d.push(8 * this.currentPage + o + 1)
                }
                if (0 != d.length) {
                    var h = d[Math.floor(Math.random() * d.length)];
                    console.log("åº”è¯¥é€‰æ‹©çš„id", h);
                    var p = 0,
                        A = 0,
                        S = this.currentPage;
                    this.interval &amp;&amp; (clearInterval(this.interval), this.interval = null), this.interval = setInterval(() =&gt; {
                        var d = s.getChildByName(8 * S + A + 1 + "");
                        this.selectBox &amp;&amp; (this.selectBox.getChildByName("select").visible = !1), this.selectBox = d, this.selectBox.getChildByName("select").visible = !0, 8 * S + A + 1 == h &amp;&amp; 2 == p &amp;&amp; (this.interval &amp;&amp; (clearInterval(this.interval), this.interval = null), Laya.userData.Coin -= ye[S], Laya.userData.addHeroId(h), Laya.userData.HeroId = h, Laya.eventMgr.event(o.laya_event.showGetSkin, h), this.chagePlayer(), d.getChildByName("noHave").visible = !1, d.getChildByName("select").visible = !0), ++A == s.numChildren &amp;&amp; (A = 0, p++)
                    }, 50)
                }
            }
        }
        chagePlayer() {
            console.log("å½“å‰hero", Laya.userData.HeroId), this.heroIcon.skin = "skin/" + Laya.userData.HeroId + ".png"
        }
    }
    class Ae extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("é¢†å–ç¦åˆ©", this.label_1), K.lang("ç¬¬ä¸€å¤©", this.label_2), K.lang("ç¬¬äºŒå¤©", this.label_3), K.lang("ç¬¬ä¸‰å¤©", this.label_4), K.lang("ç¬¬å››å¤©", this.label_5), K.lang("ç¬¬äº”å¤©", this.label_6), K.lang("ç¬¬å…­å¤©", this.label_7), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    class Se {
        constructor() {
            this.coinObject = {}, this.bezierPointObject = {}, this.bezierCounts = 0, this.coinFlyNum = 10, this.pointNum = 20
        }
        coinFlyAction(s, o, d, h, p) {
            this.coinObject = {}, this.bezierPointObject = {}, this.bezierCounts = 0;
            for (let A = 1; A &lt;= this.coinFlyNum; A++) {
                this.coinObject[A] = new Laya.Image(h), s.addChild(this.coinObject[A]), this.coinObject[A].x = o.x, this.coinObject[A].y = o.y;
                let S = A % 2 == 0 ? -100 : 400,
                    E = [],
                    L = new Laya.Point(this.coinObject[A].x, this.coinObject[A].y),
                    w = new Laya.Point(S, 640),
                    b = new Laya.Point(d.x, d.y);
                E.push(L), E.push(w), E.push(b), this.bezierPointObject[A] = this.CreateBezierPoints(E, this.pointNum), Laya.timer.frameLoop(1, this, this.bezierMove, [p])
            }
        }
        bezierMove(s) {
            for (let o = 1; o &lt;= this.coinFlyNum; o++)
                if (this.coinObject[o]) {
                    let d = this.bezierCounts - 3 * (o - 1),
                        h = this.bezierPointObject[o][d];
                    h ? this.coinObject[o].pos(h.x, h.y) : d &gt;= 1 &amp;&amp; d &lt;= this.pointNum &amp;&amp; (this.coinObject[o].destroy(), this.coinObject[o] = null, o == this.coinFlyNum &amp;&amp; (s &amp;&amp; s(), Laya.timer.clear(this, this.bezierMove)))
                }
            this.bezierCounts++
        }
        CreateBezierPoints(s, o) {
            for (var d = [], h = 0; h &lt; o; h++) {
                var p = this.MultiPointBezier(s, h / o);
                d.push(p)
            }
            return d
        }
        MultiPointBezier(s, o) {
            let d = s.length,
                h = 0,
                p = 0;
            for (let A = 0; A &lt; d; A++) {
                let S = s[A];
                h += S.x * Math.pow(1 - o, d - 1 - A) * Math.pow(o, A) * this.erxiangshi(d - 1, A), p += S.y * Math.pow(1 - o, d - 1 - A) * Math.pow(o, A) * this.erxiangshi(d - 1, A)
            }
            return {
                x: h,
                y: p
            }
        }
        erxiangshi(s, o) {
            let d = 1,
                h = 1;
            for (; o &gt; 0;) d *= s, h *= o, s--, o--;
            return d / h
        }
    }
    class Ee extends p {
        constructor() {
            super()
        }
        onAwake() {
            Laya.isBigScreen ? (this.owner.getChildByName("moveBox").y = 80, this.endPos = new Laya.Point(45, 87), this.offY = 80) : (this.owner.getChildByName("moveBox").y = 0, this.endPos = new Laya.Point(45, 47), this.offY = 0), this.closeBtn.on(Laya.Event.MOUSE_UP, this, this.closeSelf), this.getBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                this.getBtn.disabled = !0, Laya.userData.SignNum++, Laya.userData.LastSignTime = (new Date).getTime();
                var s = parseInt(Laya.userData.SignNum);
                if (2 == s) Laya.eventMgr.event(o.laya_event.showGetSkin, 7), Laya.userData.addHeroId(7);
                else if (7 == s) {
                    Laya.eventMgr.event(o.laya_event.showGetSkin, 8), Laya.userData.addHeroId(8), this.inAni = !0, Laya.userData.Coin += 100;
                    var d = this.coinStartPos.getChildByName("pos" + (s - 1)),
                        h = new Laya.Point(d.x, d.y + this.offY);
                    (new Se).coinFlyAction(this.owner, h, this.endPos, "UI/gold_icon.png", () =&gt; {
                        this.inAni = !1
                    })
                } else {
                    this.inAni = !0, Laya.userData.Coin += 100;
                    d = this.coinStartPos.getChildByName("pos" + (s - 1)), h = new Laya.Point(d.x, d.y + this.offY);
                    (new Se).coinFlyAction(this.owner, h, this.endPos, "UI/gold_icon.png", () =&gt; {
                        this.inAni = !1
                    })
                }
                this.onEnable()
            })
        }
        onEnable() {
            var s = Laya.userData.SignNum;
            for (let o = 0; o &lt; 7; o++) {
                let d = this.giftGrp.getChildByName("sign_" + o);
                d.getChildByName("haveGet").visible = s &gt;= o + 1, 6 == o &amp;&amp; (d.getChildByName("showBox").gray = s &gt;= o + 1)
            }
            var o = (new Date).getTime(),
                h = d.isSameDay(o, Laya.userData.LastSignTime);
            this.getBtn.disabled = h
        }
        closeSelf() {
            this.inAni || Laya.eventMgr.event(o.laya_event.hideSign)
        }
    }
    class Le extends Laya.Script {
        constructor() {
            super()
        }
        onAwake() {
            K.lang("ä¸‹ä¸€å…³", this.label_1), K.lang("åŒå€é¢†å–", this.label_2), K.lang("èŽ·å¾—", this.label_3), this.initI18n()
        }
        initI18n() {
            let s = K.getAssetsI18nPrefix();
            s &amp;&amp; Object.getOwnPropertyNames(this).forEach(o =&gt; {
                switch (!0) {
                    case this[o] instanceof Laya.Image:
                    case this[o] instanceof Laya.Button:
                        if (!this[o].skin) return;
                        this[o].skin = s + this[o].skin;
                        break;
                    case this[o] instanceof Laya.Sprite:
                        if (!this[o].texture) return;
                        this[o].texture = s + this[o].texture
                }
            })
        }
    }
    class we extends p {
        constructor() {
            super();
            Laya.timer.loop(20, this, this.doUpdata), this.starState = [1, 1, 1, 1], this.rewardNum = 0
        }
        onAwake() {
            this.doubleBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                te.showRewardedAd(() =&gt; {
                    this.addGold(2), Laya.eventMgr.event(o.laya_event.showMain), this.closeSelf()
                })
            }), this.nextBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                switch (this.addGold(1), Lq.pfName) {
                    case "ohayoo":
                        te.showScreenAd({
                            node: "æˆåŠŸ"
                        })
                }
                Laya.eventMgr.event(o.laya_event.startGame), this.closeSelf()
            }), this.backBtn.on(Laya.Event.MOUSE_UP, this, () =&gt; {
                this.addGold(1), Laya.eventMgr.event(o.laya_event.showMain), this.closeSelf()
            }), 1 == Laya.curWx.shFlag &amp;&amp; (this.doubleBtn.visible = !1), this.caidai = this.owner.getChildByName("caidai"), this.caidai &amp;&amp; this.caidai.stop()
        }
        onEnable() {
            switch (Lq.pfName) {
                case "ohayoo":
                    break;
                default:
                    te.showScreenAd()
            }
            if (!this.progBar.mask) {
                let s = new Laya.Box;
                s.bgColor = "#fff", s.height = this.progBar.height, this.progBar.mask = s
            }
            if (this.progBar.mask.width = this.progBar.width * (Laya.roleGrp.length / Laya.allRoleNum), 2 == Laya.userData.Level) {
                Laya.userData.Coin += 1e3, Laya.userData.GuideNum++;
                var s = {};
                s.pos = new Laya.Point(518, 337), s.target = this, s.cb = function(s) {
                    Laya.eventMgr.event(o.laya_event.showMain), s.closeSelf()
                }, Laya.eventMgr.event(o.laya_event.showGuide, s)
            }
            var d = Laya.roleGrp.length;
            this.rewardNum = 5 * d, this.gradeNumTxt.text = d + "/" + Laya.allRoleNum, this.getGoldNum.text = this.rewardNum.toString(), Laya.timer.once(200, this, () =&gt; {
                this.caidai &amp;&amp; this.caidai.play(0, !1)
            })
        }
        addGold(s = 1) {
            this.rewardNum &amp;&amp; (Laya.userData.Coin += this.rewardNum * s, this.rewardNum = 0)
        }
        closeSelf() {
            Laya.eventMgr.event(o.laya_event.hideSucDialog)
        }
        doUpdata() {
            for (let o = 0; o &lt; this.starBox._children.length; o++) {
                var s = this.starBox._children[o];
                s.scaleX &gt;= 1 ? this.starState[o] = 0 : s.scaleX &lt;= .7 &amp;&amp; (this.starState[o] = 1), this.starState[o] ? (s.scaleX += .02, s.scaleY += .02) : (s.scaleX -= .02, s.scaleY -= .02)
            }
        }
    }
    class be {
        static init() {
            let s = Laya.ClassUtils.regClass;
            s("scripts/game_scene.js", _), s("scripts/common/ButtonEX.js", I), s("scripts/prefabs/main_pb.js", T), s("scripts/prefabs/titleBar_pb.js", x), s("scripts/load_scene.js", P), s("script/GameUI.js", R), s("i18n/prefabs/i18n_failDialog_pb.ts", q), s("scripts/prefabs/failDialog_pb.js", ae), s("i18n/prefabs/i18n_fight_pb.ts", ne), s("scripts/prefabs/fight_pb.js", ie), s("i18n/prefabs/i18n_getBallDialog_pb.ts", se), s("scripts/prefabs/getBallDialog_pb.js", re), s("scripts/prefabs/getSkin_pb.js", oe), s("i18n/prefabs/i18n_getVitalityDialog_pb.ts", le), s("scripts/prefabs/getVitalityDialog_pb.js", de), s("scripts/prefabs/guide_pb.js", ce), s("i18n/prefabs/i18n_layer_relife_pb.ts", he), s("scripts/prefabs/layer_relife_pb.js", ue), s("i18n/prefabs/i18n_rank_pb.ts", ge), s("scripts/prefabs/rank_pb.js", ve), s("i18n/prefabs/i18n_shop.ts", me), s("scripts/prefabs/shop.js", pe), s("i18n/prefabs/i18n_sign_pb.ts", Ae), s("scripts/prefabs/sign_pb.js", Ee), s("i18n/prefabs/i18n_sucDialog_pb.ts", Le), s("scripts/prefabs/sucDialog_pb.js", we)
        }
    }
    be.width = 640, be.height = 1136, be.scaleMode = "showall", be.screenMode = "none", be.alignV = "top", be.alignH = "middle", be.startScene = "load_scene.scene", be.sceneRoot = "", be.debug = !1, be.stat = !1, be.physicsDebug = !1, be.exportSceneToJson = !0, be.init();
    new class {
        constructor() {
            K.init(), window.Laya3D ? Laya3D.init(be.width, be.height) : Laya.init(be.width, be.height, Laya.WebGL), Laya.Physics &amp;&amp; Laya.Physics.enable(), Laya.DebugPanel &amp;&amp; Laya.DebugPanel.enable(), Laya.stage.scaleMode = be.scaleMode, Laya.stage.screenMode = be.screenMode, Laya.stage.alignV = be.alignV, Laya.stage.alignH = be.alignH, Laya.URL.exportSceneToJson = be.exportSceneToJson, (be.debug || "true" == Laya.Utils.getQueryString("debug")) &amp;&amp; Laya.enableDebugPanel(), be.physicsDebug &amp;&amp; Laya.PhysicsDebugDraw &amp;&amp; Laya.PhysicsDebugDraw.enable(), be.stat &amp;&amp; Laya.Stat.show(), K.onLaunch(), Laya.AtlasInfoManager.enable("fileconfig.json", Laya.Handler.create(this, this.startLoadingScene))
        }
        startLoadingScene() {
            let s = [{
                url: "res/atlas/loading.atlas",
                type: Laya.Loader.ATLAS
            }, {
                url: "loading/bg.png",
                type: Laya.Loader.IMAGE
            }];
            K.getAssetsI18nPrefix();
            K.loadingStart(), Laya.loader.load(s, Laya.Handler.create(this, () =&gt; {
                be.startScene &amp;&amp; Laya.Scene.open(be.startScene)
            }))
        }
    }
}();
initAdsGame("layaCanvas","w46hfukyhxmuwb1uuel3gyzqrmrxkqvu");</pre></body></html>