define("pBWOFExoticFarEastGameController", ["pbWofExoticFarEastLogoComponentApi", "viewBuilderApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "pBWOFExoticFarEastPopupsApi", "reelsApi", "soundManagerApi", "pBWOFExoticFarEastTutorialApi", "PIXI", "clientkernelEventbusApi", "infoBarApi", "clientkernelModulesApi", "moneyApi", "pBWOFExoticFarEastComponentsGameControllerApi", "componentmodelComponentApi", "winMeterApi", "winControllerApi", "displayEngineApi", "jackpotMeterApi", "displayEngineUtils", "gameLayoutApi", "pBWOFExoticFarEastViewManagerApi", "BABYLON", "pBWOFExoticFarEastTensionApi", "stateMachineEngine", "pbWofExoticFarEastChestGlowComponentApi", "backgroundApi", "pbWofExoticFarEastGrandMajorJackpotApi", "pbWofExoticFarEastPickerApi", "paytableApi", "betPanelApi", "clientkernelLoggerApi"],
    function(pbWofExoticFarEastLogoComponentApi, viewBuilderApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, pBWOFExoticFarEastPopupsApi, reelsApi, soundManagerApi, pBWOFExoticFarEastTutorialApi, PIXI, clientkernelEventbusApi, infoBarApi, clientkernelModulesApi, moneyApi, pBWOFExoticFarEastComponentsGameControllerApi, componentmodelComponentApi, winMeterApi, winControllerApi, displayEngineApi, jackpotMeterApi, displayEngineUtils, gameLayoutApi, pBWOFExoticFarEastViewManagerApi, BABYLON, pBWOFExoticFarEastTensionApi, stateMachineEngine, pbWofExoticFarEastChestGlowComponentApi, backgroundApi, pbWofExoticFarEastGrandMajorJackpotApi, pbWofExoticFarEastPickerApi, paytableApi, betPanelApi, clientkernelLoggerApi) {
        "use strict";

        function $iterator(o) {
            if (o instanceof Array) return function() {
                return {
                    cur: 0,
                    arr: o,
                    hasNext: function() {
                        return this.cur < this.arr.length;
                    },
                    next: function() {
                        return this.arr[this.cur++];
                    }
                };
            };
            return typeof(o.iterator) == 'function' ? $bind(o, o.iterator) : o.iterator;
        };;
        var $fid = 0;

        function $bind(o, m) {
            if (m == null) return null;
            if (m.__id__ == null) m.__id__ = $fid++;
            var f;
            if (o.hx__closures__ == null) o.hx__closures__ = {};
            else f = o.hx__closures__[m.__id__];
            if (f == null) {
                f = function() {
                    return f.method.apply(f.scope, arguments);
                };
                f.scope = o;
                f.method = m;
                o.hx__closures__[m.__id__] = f;
            }
            return f;
        };
        var $_;
        var $estr = function() {
            return _hcmn_.js_Boot.__string_rec(this, '');
        };
        if (typeof pBWOFExoticFarEastGameController == 'undefined') {
            var pBWOFExoticFarEastGameController = {};
        };
        pBWOFExoticFarEastGameController.Activator = function() {};
        pBWOFExoticFarEastGameController.Activator = ck_implements(pBWOFExoticFarEastGameController.Activator, clientkernelModulesApi.IModuleActivator);
        pBWOFExoticFarEastGameController.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        pBWOFExoticFarEastGameController.Activator.__name__ = ["pBWOFExoticFarEastGameController", "Activator"];
        pBWOFExoticFarEastGameController.Activator.prototype.start = function(context) {
            context.getServiceTracker([translationmanagerApi.ITranslationManager, moneyApi.IMoneyFormatter, winControllerApi.IWinControllerPluginService]).then(function(context1) {
                pBWOFExoticFarEastGameController.ExternalService.initialize(context1);
                var pService = context1.getAnyService(winControllerApi.IWinControllerPluginService);
                var chestBonusP = new pBWOFExoticFarEastGameController.ChestBonusWinsPlugin(pService);
                pService.registerPlugin("CHEST_WINS", chestBonusP);
                context1.registerService(new pBWOFExoticFarEastGameController.Factory(chestBonusP), pBWOFExoticFarEastComponentsGameControllerApi.GameControllerDeclaration, null);
            });
        };
        pBWOFExoticFarEastGameController.Activator.prototype.stop = function(context) {};
        pBWOFExoticFarEastGameController.Activator.main = function() {};
        pBWOFExoticFarEastGameController.Activator.prototype.__class__ = pBWOFExoticFarEastGameController.Activator;
        pBWOFExoticFarEastGameController.ExternalService = function() {};
        pBWOFExoticFarEastGameController.ExternalService.__name__ = ["pBWOFExoticFarEastGameController", "ExternalService"];
        pBWOFExoticFarEastGameController.ExternalService.bus = null;
        pBWOFExoticFarEastGameController.ExternalService.assetRegistry = null;
        pBWOFExoticFarEastGameController.ExternalService.moneyFormatter = null;
        pBWOFExoticFarEastGameController.ExternalService.translationManager = null;
        pBWOFExoticFarEastGameController.ExternalService.variableRegistry = null;
        pBWOFExoticFarEastGameController.ExternalService.logger = null;
        pBWOFExoticFarEastGameController.ExternalService.viewBuilderFactory = null;
        pBWOFExoticFarEastGameController.ExternalService.displayProvider = null;
        pBWOFExoticFarEastGameController.ExternalService.reelsRegistryService = null;
        pBWOFExoticFarEastGameController.ExternalService._moduleContext = null;
        pBWOFExoticFarEastGameController.ExternalService.initialize = function(context) {
            pBWOFExoticFarEastGameController.ExternalService._moduleContext = context;
            pBWOFExoticFarEastGameController.ExternalService.bus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            pBWOFExoticFarEastGameController.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            pBWOFExoticFarEastGameController.ExternalService.moneyFormatter = context.getAnyService(moneyApi.IMoneyFormatter, null);
            pBWOFExoticFarEastGameController.ExternalService.variableRegistry = context.getAnyService(clientkernelLoaderApi.IVariableRegistry, null);
            pBWOFExoticFarEastGameController.ExternalService.translationManager = context.getAnyService(translationmanagerApi.ITranslationManager, null);
            var loggerFactory = context.getAnyService(clientkernelLoggerApi.ILoggerFactory, null);
            pBWOFExoticFarEastGameController.ExternalService.viewBuilderFactory = context.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
            pBWOFExoticFarEastGameController.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            pBWOFExoticFarEastGameController.ExternalService.reelsRegistryService = context.getAnyService(reelsApi.IReelsRegistryService, null);
            pBWOFExoticFarEastGameController.ExternalService.logger = loggerFactory.getDefaultLogger();
        };
        pBWOFExoticFarEastGameController.ExternalService.isMobile = function() {
            return pBWOFExoticFarEastGameController.ExternalService.variableRegistry.get("skin") == "mobile" || pBWOFExoticFarEastGameController.ExternalService.variableRegistry.get("assetPack") == "mobile";
        };
        pBWOFExoticFarEastGameController.ExternalService.isDesktop = function() {
            return pBWOFExoticFarEastGameController.ExternalService.variableRegistry.get("skin") == "dektop" || pBWOFExoticFarEastGameController.ExternalService.variableRegistry.get("assetPack") == "desktop";
        };
        pBWOFExoticFarEastGameController.ExternalService.prototype.__class__ = pBWOFExoticFarEastGameController.ExternalService;
        pBWOFExoticFarEastGameController.Factory = function(chestBonusPlugin) {
            this.chestBonusPlugin = chestBonusPlugin;
        };
        pBWOFExoticFarEastGameController.Factory = ck_implements(pBWOFExoticFarEastGameController.Factory, clientkernelModulesApi.IService);
        pBWOFExoticFarEastGameController.Factory = ck_implements(pBWOFExoticFarEastGameController.Factory, componentmodelComponentApi.IComponentFactory);
        pBWOFExoticFarEastGameController.Factory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        pBWOFExoticFarEastGameController.Factory.__name__ = ["pBWOFExoticFarEastGameController", "Factory"];
        pBWOFExoticFarEastGameController.Factory.prototype.chestBonusPlugin = null;
        pBWOFExoticFarEastGameController.Factory.prototype.createComponent = function(context) {
            this.chestBonusPlugin.setReelPort(_hcmn_.js_Boot.__cast(context.getUsedPort(reelsApi.IReelsPort), reelsApi.IReelsPort));
            new pBWOFExoticFarEastGameController.GameController(context, this.chestBonusPlugin);
        };
        pBWOFExoticFarEastGameController.Factory.prototype.getComponentDeclaration = function() {
            return pBWOFExoticFarEastComponentsGameControllerApi.GameControllerDeclaration;
        };
        pBWOFExoticFarEastGameController.Factory.prototype.__class__ = pBWOFExoticFarEastGameController.Factory;
        pBWOFExoticFarEastGameController.GameController = function(context, chestBonusPlugin) {
            this.betChangedByConsole = false;
            this.wheelSpinCounter = 0;
            this.alreadyDisposed = false;
            this.opened = false;
            this.confirmBetButtonClicked = false;
            this.afterWheel = false;
            this.autospinInfo = null;
            this.betChangePopupOpen = false;
            this.tutorialActive = false;
            this.tutorialConfirmed = false;
            this.betsArray = [];
            this.showSpinButtonDuringFreeSpin = false;
            this.showSpinButtonInsideAutoplay = false;
            this.autoPlayActive = false;
            this.isResume = false;
            this.cashLinkShown = false;
            this.BG_WHEEL = "wheelBkgImage";
            this.BG_FREESPIN = "videoNight";
            this.BG_MAINGAME = "videoDay";
            this.paytableOpened = false;
            this.promotionalSpinsActive = false;
            var _g = this;
            this.chestBonusPlugin = chestBonusPlugin;
            haxe.Log.trace("[GAME_CONTROLLER] STARTED", {
                fileName: "GameController.hx",
                lineNumber: 167,
                className: "components.gamecontroller.imp.GameController",
                methodName: "new"
            });
            this.model = new pBWOFExoticFarEastGameController.GameModel();
            this.betPanelPort = context.getUsedPort(betPanelApi.IBetPanelPort);
            this.reelsPort = context.getUsedPort(reelsApi.IReelsPort);
            this.slotModelPort = context.getUsedPort(slotModelApi.ISlotModelPort);
            this.gameLayoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.winMeterPort = context.getUsedPort(winMeterApi.IWinMeterPort);
            this.winControllerPort = context.getUsedPort(winControllerApi.IWinControllerPort);
            this.infoBarPort = context.getUsedPort(infoBarApi.IInfoBarPort);
            this.popupsPort = context.getUsedPort(pBWOFExoticFarEastPopupsApi.IPopupsPort);
            this.paytablePort = context.getUsedPort(paytableApi.IPaytablePort);
            this.logoPort = context.getUsedPort(pbWofExoticFarEastLogoComponentApi.ILogoPort);
            this.pickerPort = context.getUsedPort(pbWofExoticFarEastPickerApi.IPickerPort);
            this.backgroundPort = context.getUsedPort(backgroundApi.IBackgroundPort);
            this.jackpotPort = context.getUsedPort(slotModelApi.IJackpotPort);
            this.jackpotMeterPort = context.getUsedPort(jackpotMeterApi.IJackpotMeterPort);
            this.grandMajorJackpotPort = context.getUsedPort(pbWofExoticFarEastGrandMajorJackpotApi.IGrandMajorJackpotPort);
            this.tensionPort = context.getUsedPort(pBWOFExoticFarEastTensionApi.ITensionPort);
            this.viewManagerPort = context.getUsedPort(pBWOFExoticFarEastViewManagerApi.IViewManagerPort);
            this.soundPort = context.getUsedPort(soundManagerApi.ISoundManagerPort);
            this.tutorialPort = context.getUsedPort(pBWOFExoticFarEastTutorialApi.ITutorialPort);
            chestBonusPlugin.setLogoPort(this.logoPort);
            chestBonusPlugin.setJackpotMeterPort(this.jackpotMeterPort);
            this.chestGlowPort = context.getUsedPort(pbWofExoticFarEastChestGlowComponentApi.IChestGlowPort);
            this.setupStateMachine();
            this.baseGameElementsVisibility = new _hcmn_.haxe_ds_StringMap();
            this.initStorage();
            context.getStarted().then(function(a) {
                _g.assemblyStarted = true;
                pBWOFExoticFarEastGameController.GameController.soundController = new pBWOFExoticFarEastGameController.SoundController(_g.soundPort);
                _g.checkGameLoaded();
            });
            pBWOFExoticFarEastGameController.ExternalService.assetRegistry.getAsset("game-config_json").getContent().then(function(data) {
                if (data.gameControllerConfig != null) _g.config = data.gameControllerConfig;
                _g.checkGameLoaded();
            });
            this.skipController = new pBWOFExoticFarEastGameController.SkipController(this.betPanelPort);
            this.winMeterController = new pBWOFExoticFarEastGameController.WinMeterController(this.winMeterPort);
        };
        pBWOFExoticFarEastGameController.GameController.__name__ = ["pBWOFExoticFarEastGameController", "GameController"];
        pBWOFExoticFarEastGameController.GameController.prototype.stateMachine = null;
        pBWOFExoticFarEastGameController.GameController.prototype.smDispatcher = null;
        pBWOFExoticFarEastGameController.GameController.prototype.smContext = null;
        pBWOFExoticFarEastGameController.GameController.prototype.model = null;
        pBWOFExoticFarEastGameController.GameController.prototype.config = null;
        pBWOFExoticFarEastGameController.GameController.prototype.assemblyStarted = null;
        pBWOFExoticFarEastGameController.GameController.prototype.layoutUpdated = null;
        pBWOFExoticFarEastGameController.GameController.prototype.stopSpinRecieved = null;
        pBWOFExoticFarEastGameController.GameController.prototype.promotionalSpinsActive = null;
        pBWOFExoticFarEastGameController.GameController.prototype.paytableOpened = null;
        pBWOFExoticFarEastGameController.GameController.prototype.betPanelPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.reelsPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.slotModelPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.gameLayoutPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.resultPayload = null;
        pBWOFExoticFarEastGameController.GameController.prototype.winMeterPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.skipController = null;
        pBWOFExoticFarEastGameController.GameController.prototype.winMeterController = null;
        pBWOFExoticFarEastGameController.GameController.prototype.winControllerPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.infoBarPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.popupsPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.paytablePort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.grandMajorJackpotPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.tensionPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.soundPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.tutorialPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.promotionalSpinsCount = null;
        pBWOFExoticFarEastGameController.GameController.prototype.chestBonusPlugin = null;
        pBWOFExoticFarEastGameController.GameController.prototype.logoPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.pickerPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.backgroundPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.jackpotPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.jackpotMeterPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.chestGlowPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.BG_MAINGAME = null;
        pBWOFExoticFarEastGameController.GameController.prototype.BG_FREESPIN = null;
        pBWOFExoticFarEastGameController.GameController.prototype.BG_WHEEL = null;
        pBWOFExoticFarEastGameController.GameController.prototype.cashLinkShown = null;
        pBWOFExoticFarEastGameController.GameController.prototype.isResume = null;
        pBWOFExoticFarEastGameController.GameController.prototype.viewManagerPort = null;
        pBWOFExoticFarEastGameController.GameController.prototype.autoPlayActive = null;
        pBWOFExoticFarEastGameController.GameController.prototype.showSpinButtonInsideAutoplay = null;
        pBWOFExoticFarEastGameController.GameController.prototype.showSpinButtonDuringFreeSpin = null;
        pBWOFExoticFarEastGameController.GameController.prototype.resolveFnOnClickSpinInsideAutoplay = null;
        pBWOFExoticFarEastGameController.GameController.prototype.resolveFnOnStopInsideAutoplay = null;
        pBWOFExoticFarEastGameController.GameController.prototype.resolveFnOnClickSpinDuringFreeSpin = null;
        pBWOFExoticFarEastGameController.GameController.prototype.betsArray = null;
        pBWOFExoticFarEastGameController.GameController.prototype.previousBPL = null;
        pBWOFExoticFarEastGameController.GameController.prototype.storage = null;
        pBWOFExoticFarEastGameController.GameController.prototype.tutorialConfirmed = null;
        pBWOFExoticFarEastGameController.GameController.prototype.tutorialActive = null;
        pBWOFExoticFarEastGameController.GameController.prototype.baseGameElementsVisibility = null;
        pBWOFExoticFarEastGameController.GameController.prototype.savedCashLinkValue = null;
        pBWOFExoticFarEastGameController.GameController.prototype.betChangePopupOpen = null;
        pBWOFExoticFarEastGameController.GameController.prototype.betChangeInfoPopupTime = null;
        pBWOFExoticFarEastGameController.GameController.prototype.autospinInfo = null;
        pBWOFExoticFarEastGameController.GameController.prototype.afterWheel = null;
        pBWOFExoticFarEastGameController.GameController.prototype.confirmBetButtonClicked = null;
        pBWOFExoticFarEastGameController.GameController.prototype.opened = null;
        pBWOFExoticFarEastGameController.GameController.prototype.alreadyDisposed = null;
        pBWOFExoticFarEastGameController.GameController.prototype.wheelSpinCounter = null;
        pBWOFExoticFarEastGameController.GameController.prototype.betChangedByConsole = null;
        pBWOFExoticFarEastGameController.GameController.prototype.setupStateMachine = function() {
            this.smDispatcher = new stateMachineEngine.EventDispatcher();
            this.smContext = new pBWOFExoticFarEastGameController.StateMachineContext(this.smDispatcher);
            this.smContext.setupContextData(this);
            this.stateMachine = new stateMachineEngine.StateMachine(this.smDispatcher, pBWOFExoticFarEastGameController.StateMachineDef.ID);
            this.stateMachine.setContext(this.smContext);
            this.stateMachine.logLevel = 3;
            this.stateMachine.logPrefix = "[GAME_CONTROLLER]";
            this.stateMachine.dispatchGlobalStateChange = false;
            stateMachineEngine.StateMachine.logger = pBWOFExoticFarEastGameController.ExternalService.logger;
            stateMachineEngine.FSMInjector.registerSM(this.stateMachine, pBWOFExoticFarEastGameController.StateMachineDef.FSM);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.checkGameLoaded = function() {
            if (!this.assemblyStarted) return;
            if (!this.layoutUpdated) return;
            if (this.config == null) return;
            haxe.Log.trace("[GAME_CONTROLLER] GAME LOADED", {
                fileName: "GameController.hx",
                lineNumber: 235,
                className: "components.gamecontroller.imp.GameController",
                methodName: "checkGameLoaded"
            });
            this.slotModelPort.getStages().getInitStage().getGameLoaded().publish(null);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.dispatchEvent = function(action) {
            this.smDispatcher.dispatchEvent(new stateMachineEngine.StateEvent(pBWOFExoticFarEastGameController.StateMachineDef.ID + stateMachineEngine.StateEvent.ACTION, action));
        };
        pBWOFExoticFarEastGameController.GameController.prototype.attachComponents = function() {
            haxe.Log.trace(this.stateMachine.logPrefix + " attachComponents", {
                fileName: "GameController.hx",
                lineNumber: 251,
                className: "components.gamecontroller.imp.GameController",
                methodName: "attachComponents"
            });
            this.slotModelPort.getGameContext().getBalance().subscribe($bind(this, this.handleBalanceUpdate));
            this.slotModelPort.getGameContext().getGameOptionChangedFromPf().subscribe($bind(this, this.handleGameOptionChanged));
            this.slotModelPort.getStages().getInitStage().getInitializeGamePhase().getInitializeGame().subscribe($bind(this, this.handleSlotModelInitGame));
            this.slotModelPort.getStages().getResumeStage().getPrepareResume().subscribe($bind(this, this.handlePrepareResume));
            this.slotModelPort.getStages().getIdleStage().getConfirmSelectedStake().subscribe($bind(this, this.handleConfirmSelectedStake));
            this.slotModelPort.getStages().getIdleStage().getOpenPaytable().subscribe($bind(this, this.handleOpenPaytable));
            this.slotModelPort.getStages().getSpinStage().getStartReelSpin().subscribe($bind(this, this.handleModelSpinStart));
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcome().subscribe($bind(this, this.handleSpinOutcome));
            this.slotModelPort.getStages().getSpinStage().getStopReelSpin().subscribe($bind(this, this.handleModelSpinStop));
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getPresentSpinOutcome().subscribe($bind(this, this.handleSpinOutcomePresent));
            this.slotModelPort.getStages().getResultStage().getPresentResult().subscribe($bind(this, this.handlePresentResult));
            this.slotModelPort.getStages().getAbortStage().getAbortSpin().subscribe($bind(this, this.handleAbortSpin));
            this.slotModelPort.getStages().getIdleStage().getAutoSpinStarted().subscribe($bind(this, this.onAutospinStarted));
            this.slotModelPort.getStages().getIdleStage().getAutoSpinsStopped().subscribe($bind(this, this.onAutospinStopped));
            this.slotModelPort.getGameCommands().getStartAutoSpinsCommandAvailable().subscribe($bind(this, this.onSpinAvailable));
            this.slotModelPort.getGameCommands().getStopAutoSpinsCommandAvailable().subscribe($bind(this, this.onStopAvailable));
            this.slotModelPort.getGameCommands().getSpinCommandAvailable().subscribe($bind(this, this.handleSpinCommandAvailable));
            this.slotModelPort.getGameCommands().getContinueCommandAvailable().subscribe($bind(this, this.handleContinueCommandAvailable));
            this.slotModelPort.getGameCommands().getPaytableCommandAvailable().subscribe($bind(this, this.handlePaytableCommandAvailable));
            this.slotModelPort.getGameCommands().getStakeCommandAvailable().subscribe($bind(this, this.handleStakeCommandAvailable));
            this.slotModelPort.getStages().getIdleStage().getOpenHelp().subscribe($bind(this, this.onHelpOpen));
            this.slotModelPort.getStages().getPickerBonusStage().getSetPickerIdle().subscribe($bind(this, this.handleSetWheelIdle));
            this.slotModelPort.getStages().getPickerBonusStage().getSelectPickerBonus().subscribe($bind(this, this.handleSelectWheelBonus));
            this.betPanelPort.onButtonPressed().subscribe($bind(this, this.onBetPanelButtonPressed));
            this.betPanelPort.onStakeChanged().subscribe($bind(this, this.onBetPanelStakeChanged));
            this.reelsPort.onReelStopped().subscribe($bind(this, this.onReelStopped));
            this.reelsPort.onSpinStopped().subscribe($bind(this, this.onSpinStopped));
            this.reelsPort.onStoppingStarted().subscribe($bind(this, this.onReelStoppingStarted));
            this.reelsPort.onStartSpinReelPictureExit().subscribe($bind(this, this.onReelOutcomeExit));
            this.gameLayoutPort.getGameLayoutUpdated().subscribe($bind(this, this.onGameLayoutUpdated));
            this.winControllerPort.onCurrentWinLine().subscribe($bind(this, this.onWinLineAnimated));
            this.paytablePort.onCloseButtonPressed().subscribe($bind(this, this.onPaytableClose));
            this.paytablePort.onPageChanged().subscribe($bind(this, this.onPaytablePageChanged));
            this.tutorialPort.getConfirmed().subscribe($bind(this, this.handleTutorialConfirmed));
            this.tutorialPort.getClosed().subscribe($bind(this, this.handleTutorialClose));
            this.tutorialPort.getCurrentPage().subscribe($bind(this, this.handleTutorialPage));
            this.pickerPort.getWheelStopped().subscribe($bind(this, this.onWheelStopped));
            this.pickerPort.getWheelCoinsFlewAway().subscribe($bind(this, this.onCoinsFlewAway));
            this.pickerPort.getWheelStarted().subscribe($bind(this, this.onWheelStarted));
            this.pickerPort.onSpinPressed(($_ = this.pickerPort, $bind($_, $_.start)));
            this.pickerPort.wheelPosition().subscribe($bind(this, this.onWheelSound));
            this.jackpotPort.getMeterUpdate().subscribe($bind(this, this.onJackpotMeterUpdate));
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onWheelSound = function(e) {
            this.wheelSpinCounter++;
            if (this.wheelSpinCounter % 3 == 0) pBWOFExoticFarEastGameController.GameController.soundController.playSound("WheelSpinSingleShot");
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleSetWheelIdle = function(e) {
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.SET_WHEEL_IDLE);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleSelectWheelBonus = function(e) {
            if (this.model.spinOutcome.nextStage.indexOf("WheelBonus") >= 0) {
                this.winMeterPort.showMessage().publish("");
                this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.SET_WHEEL_IDLE);
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.initGame = function() {
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.slotModelPort.getStages().getInitStage().getGameInitialized().publish(null);
            this.winMeterPort.showMessage().publish("");
            this.changeBackground(this.BG_MAINGAME);
            pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false);
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WHEEL_STATIC, ["0"], 0), 0);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.prepareResume = function() {
            var _g = this;
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.PAYTABLE);
            if (this.model.spinOutcome.nextStage == "FreeSpin") this.updateBetPanelFS();
            _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getStages().getResumeStage().getResumePrepared().publish(null);
            }, this.config.fs_NoWinSpinDelay);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onBaseGameIdle = function() {
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.showSpinInfoLabel();
            pBWOFExoticFarEastGameController.GameController.soundController.checkBackgroundMusic();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.updateBetPanel = function() {
            if (!this.isResume || this.isResume && this.model.spinOutcome.stage.indexOf("WheelBonus") >= 0) this.winMeterPort.showMessage().publish(pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("GoodLuck"));
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.updateBetPanelFS = function() {
            var current = this.model.spinOutcome.freeSpin.current + 1;
            var total = this.model.spinOutcome.freeSpin.total;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("FreeSpinsOfTotal", [current, total])));
            this.winMeterPort.showMessage().publish("");
            if (!pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(this.model.spinOutcome.acumulatedPayout)) {
                this.winMeterController.showIntro(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.freeSpin.outcome.bigWin);
                this.model.lastAccumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.updateBetPanelWheel = function() {};
        pBWOFExoticFarEastGameController.GameController.prototype.clearAllWins = function() {
            this.model.setAbortSpinPayload(null);
            this.stopSpinRecieved = false;
            this.infoBarPort.hideWinLineSummary().publish(null);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.startSpin = function() {
            this.afterWheel = false;
            this.alreadyDisposed = false;
            if (this.betChangePopupOpen) {
                this.betChangePopupOpen = false;
                if (this.model.currencyCode != "FPY") this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT));
                window.clearTimeout(this.betChangeInfoPopupTime);
            }
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP));
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_AWARD_CAP));
            this.isResume = false;
            this.reelsPort.startSpin().publish(new reelsApi.StartSpinPayload(this.model.startSpinPayload));
            this.chestBonusPlugin.reset();
            this.chestBonusPlugin.returnLogo();
            pBWOFExoticFarEastGameController.GameController.soundController.checkBackgroundMusic();
            if ((function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("Stage");
                    return $r;
                }(this)) == "BaseGame" && (function($this) {
                    var $r;
                    var this2 = $this.smContext.get_contextValues();
                    $r = this2.get("NextStage");
                    return $r;
                }(this)) != "FreeSpin" && this.autoPlayActive) {
                this.winMeterPort.showMessage().publish("");
                this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
                this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
                this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            }
            if (this.model.currentBPL > 3 && this.model.currencyCode == "CAD") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
            this.model.isBonusSummary = false;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.checkForStopOrAbort = function() {
            if (this.model.abortSpinPayload != null) this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.ABORT_SPIN);
            else if (this.stopSpinRecieved) this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.STOP_REEL_SPIN);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.applyAbortData = function() {
            var _g = this;
            this.applyStakeItemsWithTotalBet(this.model.abortSpinPayload.stake, true);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            this.betChangePopupOpen = false;
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT));
            window.clearTimeout(this.betChangeInfoPopupTime);
            this.reelsPort.setReelPicture().publish(this.model.abortSpinPayload.stake.outcome.reelStop.reels);
            this.winMeterPort.showMessage().publish("");
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            this.infoBarPort.hideWinLineSummary().publish(null);
            if (this.model.spinOutcome != null && this.model.spinOutcome.nextStage.indexOf("FreeSpin") >= 0) {
                this.updateBetPanelFS();
                _hcmn_.haxe_Timer.delay(function() {
                    _g.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
                }, 1000);
            } else this.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.stopReels = function() {
            this.reelsPort.stopSpin().publish(new reelsApi.StopSpinPayload(this.model.outcome.reelStop.reels, this.model.tensionReels));
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showBaseGameOutcome = function() {
            var _g = this;
            var payout = this.model.spinOutcome.baseGame.outcome.customField.gameTotalPayout * this.model.denomination;
            var totalPayout = (Number(_hcmn_.Math.round(payout + "e2") + "e-2").toFixed(2));
            var isHighWin = true;
            if (this.model.rgPresentation) {
                if (!this.model.isHighWin()) isHighWin = false;
            }
            if (pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(totalPayout)) {
                if (this.model.rgPresentation) this.chestGlowPort.stopAnimation().publish(false);
                this.publishSpinOutcomePresented();
            } else {
                if (this.model.spinOutcome.baseGame.outcome.bigWin.winGroup > 4) {
                    this.viewManagerPort.getShake().publish(new pBWOFExoticFarEastViewManagerApi.ShakeProperties(pBWOFExoticFarEastGameController.TransitionConstants.REELS_SHAKE, 15, 2, 10, 1800));
                    pBWOFExoticFarEastGameController.GameController.soundController.reelShake();
                }
                if (this.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout > 0) {
                    if (!this.cashLinkShown && !this.isResume) this.chestBonusPlugin.showCacheLikn(this.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, this.model.spinOutcome.baseGame.outcome.reelStop.reels, this.model.denomination, this.model.bonusCoinOnFirstReel, pBWOFExoticFarEastGameController.GameController.soundController).then(function(data) {
                        var skipPromise = _g.skipController.show();
                        var outcome = _g.model.spinOutcome.baseGame.outcome;
                        var winMeterPromise = _g.winMeterController.show(totalPayout, outcome.bigWin, isHighWin);
                        pBWOFExoticFarEastGameController.GameController.soundController.playWinSound(_g.model.spinOutcome.baseGame.outcome.bigWin.winGroup, false, false, isHighWin);
                        Promise.race([skipPromise, winMeterPromise]).then(function(data1) {
                            _g.skipController.hide();
                            _g.winMeterController.stop();
                            if (_g.model.spinOutcome.baseGame.outcome.bigWin.winGroup > 4) _g.viewManagerPort.getReset().publish(pBWOFExoticFarEastGameController.TransitionConstants.REELS_SHAKE);
                            pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                            _g.chestBonusPlugin.returnLogo();
                            var payload = new winControllerApi.ShowWinPayload(_g.model.repackOutcomeForWinController(_g.model.spinOutcome.baseGame.outcome, false), true, null, isHighWin, "loop");
                            var winPromise = _g.winControllerPort.showWin().request(payload, 0);
                            if (!isHighWin) {
                                _g.chestBonusPlugin.stopChestAnimation();
                                _g.chestGlowPort.stopAnimation().publish(false);
                            }
                            if (_g.autoPlayActive) {
                                _g.showSpinButtonInsideAutoplay = true;
                                var spinInsideAutoplayPromise = _g.showSpinInsideAutoplay();
                                var forceStopAutoPlayPromise = _g.forceStopAutoPlay();
                                if (_g.model.spinOutcome.baseGame.outcome.lineWins == null) winPromise = _g.resolveCashLink();
                                var promiseWait = Promise.race([winPromise, spinInsideAutoplayPromise, forceStopAutoPlayPromise]);
                                promiseWait.then(function(value) {
                                    _g.showSpinButtonInsideAutoplay = false;
                                    if (value == "AUTOSPIN-STOP") {
                                        _g.publishSpinOutcomePresented();
                                        return;
                                    }
                                    if (_g.model.spinOutcome.baseGame.outcome.lineWins == null) {
                                        if (value == "CASHLINK-END" || value == "CLICK-SPIN-INSIDE-AUTOPLAY") {
                                            _g.hideSpinInsideAutoplay();
                                            _g.publishSpinOutcomePresented();
                                            return;
                                        }
                                    }
                                    _g.hideSpinInsideAutoplay();
                                    _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                                    _g.winControllerPort.dispose().publish(null);
                                    _g.infoBarPort.hideWinLineSummary().publish(null);
                                    _g.publishSpinOutcomePresented();
                                });
                            } else _g.publishSpinOutcomePresented();
                        });
                    });
                    else {
                        var skipPromise1 = this.skipController.show();
                        var outcome1 = this.model.spinOutcome.baseGame.outcome;
                        var winMeterPromise1;
                        if (this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.isJackpotWon) {
                            winMeterPromise1 = this.winMeterController.showIntro(totalPayout, outcome1.bigWin);
                            pBWOFExoticFarEastGameController.GameController.soundController.playWinSound(this.model.spinOutcome.baseGame.outcome.bigWin.winGroup, false, false, isHighWin);
                            this.skipController.hide();
                            this.winMeterController.stop();
                            pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                            if (this.isResume) {
                                this.chestBonusPlugin.applyCoins(this.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, this.model.spinOutcome.baseGame.outcome.reelStop.reels, this.model.denomination, null);
                                this.chestBonusPlugin.createAnimationsIdle(this.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, this.model.spinOutcome.baseGame.outcome.reelStop.reels, this.model.denomination);
                            }
                            this.wheelOutcomePresented();
                        } else {
                            winMeterPromise1 = this.winMeterController.show(totalPayout, outcome1.bigWin, isHighWin);
                            pBWOFExoticFarEastGameController.GameController.soundController.playWinSound(this.model.spinOutcome.baseGame.outcome.bigWin.winGroup, false, false, isHighWin);
                            Promise.race([skipPromise1, winMeterPromise1]).then(function(data2) {
                                _g.skipController.hide();
                                _g.winMeterController.stop();
                                if (_g.model.spinOutcome.baseGame.outcome.bigWin.winGroup > 4) _g.viewManagerPort.getReset().publish(pBWOFExoticFarEastGameController.TransitionConstants.REELS_SHAKE);
                                pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                                var payload1 = new winControllerApi.ShowWinPayload(_g.model.repackOutcomeForWinController(_g.model.spinOutcome.baseGame.outcome, false), true, null, isHighWin, "loop");
                                _g.winControllerPort.showWin().request(payload1, 0);
                                if (!isHighWin) _g.chestBonusPlugin.stopChestAnimation();
                                if (_g.isResume) {
                                    _g.chestBonusPlugin.applyCoins(_g.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, _g.model.spinOutcome.baseGame.outcome.reelStop.reels, _g.model.denomination, null);
                                    _g.chestBonusPlugin.createAnimationsIdle(_g.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, _g.model.spinOutcome.baseGame.outcome.reelStop.reels, _g.model.denomination);
                                }
                                _g.wheelOutcomePresented();
                            });
                        }
                    }
                } else {
                    var skipPromise2 = this.skipController.show();
                    var outcome2 = this.model.spinOutcome.baseGame.outcome;
                    var winMeterPromise2 = this.winMeterController.show(totalPayout, outcome2.bigWin, isHighWin);
                    pBWOFExoticFarEastGameController.GameController.soundController.playWinSound(this.model.spinOutcome.baseGame.outcome.bigWin.winGroup, false, false, isHighWin);
                    Promise.race([skipPromise2, winMeterPromise2]).then(function(data3) {
                        _g.skipController.hide();
                        pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                        _g.winMeterController.stop();
                        if (_g.model.spinOutcome.baseGame.outcome.bigWin.winGroup > 4) _g.viewManagerPort.getReset().publish(pBWOFExoticFarEastGameController.TransitionConstants.REELS_SHAKE);
                        var payload2 = new winControllerApi.ShowWinPayload(_g.model.spinOutcome.baseGame.outcome, true, null, isHighWin, "loop");
                        var winPromise1 = _g.winControllerPort.showWin().request(payload2, 0);
                        if (!isHighWin) _g.chestGlowPort.stopAnimation().publish(false);
                        if (_g.autoPlayActive) {
                            _g.showSpinButtonInsideAutoplay = true;
                            var spinInsideAutoplayPromise1 = _g.showSpinInsideAutoplay();
                            var forceStopAutoPlayPromise1 = _g.forceStopAutoPlay();
                            var promiseWait1 = Promise.race([winPromise1, spinInsideAutoplayPromise1, forceStopAutoPlayPromise1]);
                            promiseWait1.then(function(value1) {
                                _g.showSpinButtonInsideAutoplay = false;
                                if (value1 == "AUTOSPIN-STOP") {
                                    _g.publishSpinOutcomePresented();
                                    return;
                                }
                                _g.hideSpinInsideAutoplay();
                                _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                                _g.winControllerPort.dispose().publish(null);
                                _g.infoBarPort.hideWinLineSummary().publish(null);
                                _g.publishSpinOutcomePresented();
                            });
                        } else _g.publishSpinOutcomePresented();
                    });
                }
            }
            this.cashLinkShown = false;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.wheelOutcomePresented = function() {
            this.publishSpinOutcomePresented();
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_SUMMARY_END);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showFreeSpinSummary = function() {
            var _g = this;
            var cashLinkPayout;
            var linesPayout;
            var totalPayout;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            this.infoBarPort.hideWinLineSummary().publish(null);
            if (_hcmn_.Std.parseInt(this.model.spinOutcome.freeSpin.outcome.customField.freeSpinsSummaryCashLinkTotalPayout) > 0) {
                var freeSpinsSummaryCashLinkTotalPayout = _hcmn_.Std.parseFloat(this.model.spinOutcome.freeSpin.outcome.customField.freeSpinsSummaryCashLinkTotalPayout) * this.model.denomination;
                var total;
                if (freeSpinsSummaryCashLinkTotalPayout == null) total = "null";
                else total = "" + freeSpinsSummaryCashLinkTotalPayout;
                var totalPayout1 = (Number(_hcmn_.Math.round(total + "e2") + "e-2").toFixed(2));
                cashLinkPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout1);
            } else cashLinkPayout = " ";
            if (_hcmn_.Std.parseInt(this.model.spinOutcome.freeSpin.outcome.customField.freeSpinsSummaryLinesTotalPayout) > 0) {
                var freeSpinsSummaryLinesTotalPayout = _hcmn_.Std.parseFloat(this.model.spinOutcome.freeSpin.outcome.customField.freeSpinsSummaryLinesTotalPayout) * this.model.denomination;
                var total1;
                if (freeSpinsSummaryLinesTotalPayout == null) total1 = "null";
                else total1 = "" + freeSpinsSummaryLinesTotalPayout;
                var totalPayout2 = (Number(_hcmn_.Math.round(total1 + "e2") + "e-2").toFixed(2));
                linesPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout2);
            } else linesPayout = " ";
            if (!pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(this.model.spinOutcome.acumulatedFreeSpinPayout)) totalPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(this.model.spinOutcome.acumulatedFreeSpinPayout);
            else totalPayout = " ";
            this.chestBonusPlugin.reset();
            this.chestBonusPlugin.returnLogo();
            this.winControllerPort.dispose().publish(null);
            if (totalPayout == " ") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP, [" ", this.getString("FS_OUTRO_NO_WIN_0"), this.getString("FS_OUTRO_NO_WIN_1"), " ", " "], 4000), 0).then(function(data) {
                _g.freeSpinsEnding(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP);
            });
            else this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_OUTRO, [this.getString("FS_OUTRO_0"), totalPayout, cashLinkPayout, linesPayout], 4000), 0).then(function(data1) {
                _g.freeSpinsEnding(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_OUTRO);
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.freeSpinsEnding = function(enumType) {
            var _g = this;
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(enumType));
            this.showGrandAndMajor();
            var payload = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_ANIM, [], 0);
            this.reelsPort.hide().publish(null);
            this.popupsPort.getShow().request(payload, 0).then(function(data) {
                _g.reelsPort.show().publish(null);
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_ANIM));
                _g.changeBackground(_g.BG_MAINGAME);
                pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, false, false, false, true);
                if (!pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(_g.resultPayload.totalWin)) {
                    var isHighWin = true;
                    if (_g.model.rgPresentation) {
                        if (!_g.model.isHighWin()) isHighWin = false;
                    }
                    _g.winControllerPort.showWin().request(new winControllerApi.ShowWinPayload(_g.model.repackOutcomeForWinController(_g.model.outcome, true, true), true, null, isHighWin, "loop"), 0);
                    if (!isHighWin) _g.chestGlowPort.stopAnimation().publish(false);
                    var skipPromise = _g.skipController.show();
                    var winMeterPromise = _g.winMeterController.show(_g.resultPayload.totalWin, _g.resultPayload.bigWin, isHighWin);
                    pBWOFExoticFarEastGameController.GameController.soundController.playWinSound(_g.resultPayload.bigWin.winGroup, false, false, isHighWin);
                    Promise.race([skipPromise, winMeterPromise]).then(function(data1) {
                        _g.skipController.hide();
                        _g.winMeterController.stop();
                        pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                        _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE);
                        _g.model.lastAccumulatedPayout = null;
                    });
                } else {
                    if (_g.model.spinOutcome.nextStage.indexOf("BaseGame") >= 0) {
                        var runAnim = true;
                        if (_g.model.rgPresentation) runAnim = false;
                        _g.winControllerPort.showWin().request(new winControllerApi.ShowWinPayload(_g.model.repackOutcomeForWinController(_g.model.outcome, true, true), true, null, runAnim, "loop"), 0);
                    }
                    _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE);
                    _g.model.lastAccumulatedPayout = null;
                }
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showWheelSummary = function() {
            this.afterWheel = true;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.publishSpinOutcomePresented = function() {
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcomePresented().publish(null);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.publishResultPresented = function() {
            this.slotModelPort.getStages().getResultStage().getResultPresented().publish(null);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showAwardCapScreen = function() {
            var _g = this;
            this.cashLinkShown = false;
            if (this.model.spinOutcome.stage.indexOf("FreeSpin") > -1) {
                var accumulated = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(this.model.spinOutcome.acumulatedPayout);
                var payload = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_AWARD_CAP, [this.getString("FS_AWARD_CAP_0"), this.getString("FS_AWARD_CAP_1"), this.getString("FS_AWARD_CAP_2"), this.getString("FS_AWARD_CAP_3"), accumulated], 0);
                this.showGrandAndMajor();
                this.popupsPort.getShow().request(payload, 0).then(function(data) {
                    _g.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
                    _g.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_BG, [], 0), 0);
                    _g.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_BG, [], 0), 0);
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_FS));
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_FS));
                    _g.changeBackground(_g.BG_MAINGAME);
                    pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, false, false, false, true);
                    _g.chestBonusPlugin.reset();
                    _g.chestBonusPlugin.returnLogo();
                    _g.winControllerPort.dispose().publish(null);
                    _g.winMeterController.showIntro(_g.model.spinOutcome.acumulatedPayout, _g.model.spinOutcome.baseGame.outcome.bigWin);
                    var skipPromise = _g.skipController.show();
                    skipPromise.then(function(data1) {
                        _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE);
                        _hcmn_.haxe_Timer.delay(function() {
                            _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_AWARD_CAP));
                        }, 300);
                    });
                });
            } else if (this.model.spinOutcome.stage.indexOf("WheelBonus") > -1) {
                this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
                this.pickerPort.hide();
                this.showGameElementsAfterWheel();
                pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, true);
                if (!this.isResume) {
                    this.chestBonusPlugin.reset();
                    this.chestBonusPlugin.returnLogo();
                    this.winControllerPort.dispose().publish(null);
                }
                this.reelsPort.setReelPicture().publish(this.model.spinOutcome.baseGame.outcome.reelStop.reels);
                this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.CASH_LINK));
                this.chestBonusPlugin.reset();
                this.chestBonusPlugin.returnLogo();
                this.winMeterController.showIntro(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.baseGame.outcome.bigWin);
                var jackpotMessage = this.getString("pb_popup_title");
                if (this.model.currentBPL > 3) jackpotMessage = this.getString("pb_popup_title_progressive");
                if (this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.isJackpotWon) {
                    var ackPayload = new jackpotMeterApi.PlayerAckonowledgementPayload(jackpotMessage, this.getString("pb_popup_content"), this.getString("pb_popup_message_confirm"), this.getString("pb_popup_message_continue"));
                    this.jackpotMeterPort.getPlayerAckonowledgement().request(ackPayload, 0).then(function(o) {
                        var acumulatedPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_g.model.spinOutcome.acumulatedPayout);
                        var payload1 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP, [_g.getString("BG_AWARD_CAP_0"), _g.getString("BG_AWARD_CAP_1"), _g.getString("BG_AWARD_CAP_2"), acumulatedPayout], 0);
                        _g.popupsPort.getShow().request(payload1, 0).then(function(data2) {
                            var skipPromise1 = _g.skipController.show();
                            skipPromise1.then(function(data3) {
                                _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE);
                                _hcmn_.haxe_Timer.delay(function() {
                                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP));
                                }, 300);
                            });
                        });
                    });
                } else {
                    var acumulatedPayout1 = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(this.model.spinOutcome.acumulatedPayout);
                    var payload2 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP, [this.getString("BG_AWARD_CAP_0"), this.getString("BG_AWARD_CAP_1"), this.getString("BG_AWARD_CAP_2"), acumulatedPayout1], 0);
                    this.popupsPort.getShow().request(payload2, 0).then(function(data4) {
                        var skipPromise2 = _g.skipController.show();
                        skipPromise2.then(function(data5) {
                            _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE);
                            _hcmn_.haxe_Timer.delay(function() {
                                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP));
                            }, 300);
                        });
                    });
                }
            } else {
                if (this.autoPlayActive) {
                    this.slotModelPort.getGameCommands().getStopAutoSpinsCommandExecuted().publish(null);
                    this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                    this.autoPlayActive = false;
                }
                var acumulatedPayout2 = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(this.model.spinOutcome.acumulatedPayout);
                this.chestBonusPlugin.reset();
                this.chestBonusPlugin.returnLogo();
                this.winControllerPort.dispose().publish(null);
                this.winMeterController.showIntro(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.baseGame.outcome.bigWin);
                var payload3 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP, [this.getString("BG_AWARD_CAP_0"), this.getString("BG_AWARD_CAP_1"), this.getString("BG_AWARD_CAP_2"), acumulatedPayout2], 0);
                this.popupsPort.getShow().request(payload3, 0).then(function(data6) {
                    var skipPromise3 = _g.skipController.show();
                    skipPromise3.then(function(data7) {
                        _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE);
                        _hcmn_.haxe_Timer.delay(function() {
                            _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP));
                        }, 300);
                    });
                });
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showScatterWins = function() {
            var _g = this;
            this.model.isScatterShown = true;
            var isHighWin = true;
            if (this.model.rgPresentation) {
                if (!this.model.isHighWin()) isHighWin = false;
            }
            var outcome = new slotModelApi.Outcome(this.model.outcome.reelStop, this.model.outcome.reelStopAdditional, null, this.model.outcome.scatterWins, null, null, null, null, null);
            this.stopAutoplay();
            this.winControllerPort.showWin().request(new winControllerApi.ShowWinPayload(outcome, true, null, isHighWin), 0).then(function(data) {
                _g.winControllerPort.dispose().publish(null);
                _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.FS_ENTRY_SHOWN);
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showCashLinkWins = function() {
            var _g = this;
            this.stopAutoplay();
            if (this.model.hasChastAndHasCoin(this.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, this.model.spinOutcome.baseGame.outcome.reelStop.reels)) this.chestBonusPlugin.showCacheLikn(this.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, this.model.spinOutcome.baseGame.outcome.reelStop.reels, this.model.denomination, this.model.bonusCoinOnFirstReel, pBWOFExoticFarEastGameController.GameController.soundController).then(function(data) {
                _g.cashLinkShown = true;
                _g.chestBonusPlugin.returnLogo();
                _hcmn_.haxe_Timer.delay(function() {
                    _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_ENTRY_SHOWN);
                }, 1000);
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.startFSIntroAnim = function() {
            var _g = this;
            this.chestBonusPlugin.reset();
            this.model.lastAccumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            this.reelsPort.hide().publish(null);
            this.changeBackground(this.BG_FREESPIN);
            this.hideGrandAndMajor();
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("FreeSpinsTriggered")));
            var payload = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_ANIM, [this.getString("Congratulations"), this.getString("FreeSpinsTriggered")], 0);
            this.popupsPort.getShow().request(payload, 0).then(function(data) {
                _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.FS_INTRO_ENDED);
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_ANIM));
                _g.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_FS, [], 0), 0);
                _g.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_FS, [], 0), 0);
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_BG));
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_BG));
            });
            pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(true, false, false, false);
            this.model.isScatterShown = false;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.startWheelIntroAnim = function() {
            var _g = this;
            pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, false, false, true);
            _hcmn_.haxe_Timer.delay(function() {
                _g.publishSpinOutcomePresented();
                _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_INTRO_ENDED);
                _g.reelsPort.hide().publish(null);
            }, 1000);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.prepareFreeSpin = function() {
            this.reelsPort.show().publish(null);
            this.model.setOutcome(this.model.spinOutcome.freeSpin.outcome);
            this.reelsPort.setReelPicture().publish(this.model.spinOutcome.freeSpin.outcome.reelStop.reels);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.prepareWheel = function() {};
        pBWOFExoticFarEastGameController.GameController.prototype.showFreeSpinOutcome = function() {
            var _g = this;
            var accumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            var payout = _hcmn_.Std.string(this.model.spinOutcome.freeSpin.outcome.customField.gameTotalPayout * this.model.denomination);
            var isHighWin = true;
            if (this.model.rgPresentation) {
                if (!this.model.isHighWin()) isHighWin = false;
            }
            if (pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(this.model.spinOutcome.freeSpin.outcome.totalPayout)) {
                if (this.model.rgPresentation) this.chestGlowPort.stopAnimation().publish(false);
            }
            if (!pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(payout)) {
                if (this.model.spinOutcome.freeSpin.outcome.customField.freeSpinsCashLinkTotalPayout > 0) this.chestBonusPlugin.showCacheLikn(this.model.spinOutcome.freeSpin.outcome.reelStopAdditional.reels, this.model.spinOutcome.freeSpin.outcome.reelStop.reels, this.model.denomination, this.model.bonusCoinOnFirstReel, pBWOFExoticFarEastGameController.GameController.soundController).then(function(data) {
                    var totalPayout = (Number(_hcmn_.Math.round(_g.model.spinOutcome.acumulatedPayout + "e2") + "e-2").toFixed(2));
                    var winMeterPromise = _g.winMeterController.showInFS(totalPayout, _g.model.spinOutcome.freeSpin.outcome.bigWin, _g.model.lastAccumulatedPayout, true, isHighWin);
                    pBWOFExoticFarEastGameController.GameController.soundController.playWinSound(_g.model.spinOutcome.freeSpin.outcome.bigWin.winGroup, true, false, isHighWin);
                    _g.model.lastAccumulatedPayout = accumulatedPayout;
                    var skipPromise = _g.skipController.show();
                    Promise.race([skipPromise, winMeterPromise]).then(function(data1) {
                        _g.skipController.hide();
                        _g.winMeterController.stop();
                        pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                        _g.showSpinButtonDuringFreeSpin = true;
                        var spinInsideFreeSpinPromise = _g.showSpinInsideFreeSpin();
                        var showWinPayload = new winControllerApi.ShowWinPayload(_g.model.repackOutcomeForWinController(_g.model.spinOutcome.freeSpin.outcome, true), true, null, isHighWin, "loop");
                        var winAnimPromise = _g.winControllerPort.showWin().request(showWinPayload, 0);
                        if (!isHighWin) {
                            _g.chestBonusPlugin.stopChestAnimation();
                            _g.chestGlowPort.stopAnimation().publish(false);
                        }
                        if (_g.model.spinOutcome.freeSpin.outcome.lineWins == null) winAnimPromise = _g.resolveCashLink();
                        Promise.race([winAnimPromise, spinInsideFreeSpinPromise]).then(function(data2) {
                            _g.showSpinButtonDuringFreeSpin = false;
                            _g.hideSpinDuringFreeSpin();
                            pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                            _g.winMeterController.stop();
                            _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                            _g.winControllerPort.dispose().publish(null);
                            _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTCOME_DONE);
                        });
                    });
                });
                else if (this.model.spinOutcome.freeSpin.outcome.lineWins != null) {
                    var totalPayout1 = (Number(_hcmn_.Math.round(this.model.spinOutcome.acumulatedPayout + "e2") + "e-2").toFixed(2));
                    var winMeterPromise1 = this.winMeterController.showInFS(totalPayout1, this.model.spinOutcome.freeSpin.outcome.bigWin, this.model.lastAccumulatedPayout, true, isHighWin);
                    pBWOFExoticFarEastGameController.GameController.soundController.playWinSound(this.model.spinOutcome.freeSpin.outcome.bigWin.winGroup, true, false, isHighWin);
                    this.model.lastAccumulatedPayout = accumulatedPayout;
                    var skipPromise1 = this.skipController.show();
                    Promise.race([skipPromise1, winMeterPromise1]).then(function(data3) {
                        _g.skipController.hide();
                        _g.winMeterController.stop();
                        pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                        _g.showSpinButtonDuringFreeSpin = true;
                        var spinInsideFreeSpinPromise1 = _g.showSpinInsideFreeSpin();
                        var showWinPayload1 = new winControllerApi.ShowWinPayload(_g.model.repackOutcomeForWinController(_g.model.spinOutcome.freeSpin.outcome, true), true, null, isHighWin, "loop");
                        var winAnimPromise1 = _g.winControllerPort.showWin().request(showWinPayload1, 0);
                        if (!isHighWin) _g.chestGlowPort.stopAnimation().publish(false);
                        Promise.race([winAnimPromise1, spinInsideFreeSpinPromise1]).then(function(data4) {
                            _g.showSpinButtonDuringFreeSpin = false;
                            _g.hideSpinDuringFreeSpin();
                            pBWOFExoticFarEastGameController.GameController.soundController.winFinish();
                            _g.winMeterController.stop();
                            _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                            _g.winControllerPort.dispose().publish(null);
                            _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTCOME_DONE);
                        });
                    });
                } else this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTCOME_DONE);
            } else this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTCOME_DONE);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showRetriggerScreen = function() {
            var _g = this;
            var maxRetriggerReached = this.model.spinOutcome.freeSpin.isMaxAwarded;
            var numberOfRetriggerSpins = _hcmn_.Std.string(this.model.spinOutcome.freeSpin.awarded);
            if (!maxRetriggerReached) this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_RETRIGGER, [this.getString("FS_RETRIGGER_0"), numberOfRetriggerSpins, this.getString("FS_RETRIGGER_2")], this.config.fs_RetriggerScreenDuration), 0).then(function(data) {
                _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.RETRIGGER_SHOWN);
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_RETRIGGER));
            });
            else this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_MAX_RETRIGGER, [this.getString("FS_MAX_RETRIGGER_0"), this.getString("FS_MAX_RETRIGGER_1"), this.getString("FS_MAX_RETRIGGER_2")], this.config.fs_MaxRetriggerScreenDuration), 0).then(function(data1) {
                _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.RETRIGGER_SHOWN);
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_MAX_RETRIGGER));
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.startFSOutroAnim = function() {
            pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, false, false, false, true);
            haxe.Log.trace("[GameController] [popupsPort]", {
                fileName: "GameController.hx",
                lineNumber: 1449,
                className: "components.gamecontroller.imp.GameController",
                methodName: "startFSOutroAnim"
            });
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_BG, [], 0), 0);
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_BG, [], 0), 0);
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_FS));
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_FS));
            this.model.isBonusSummary = true;
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTRO_END);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.startWheelOutroAnim = function() {
            var _g = this;
            var wheelCreditsPayout;
            var wheelCashLinkPayout;
            var wheelTotalPayout;
            var wheelJackpotPayout;
            var wheelJackpotGrandPayout;
            var wheelJackpotMajorPayout;
            pBWOFExoticFarEastGameController.GameController.soundController.wheelOutroAnim(this.model.spinOutcome.baseGame.outcome.bigWin.winGroup);
            var jackpot = this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.isJackpotWon;
            var grand = this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.isJackpotGrandWon;
            var major = this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.isJackpotMajorWon;
            if (jackpot) {
                var payout = this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotPrize * this.model.denomination;
                var total;
                if (payout == null) total = "null";
                else total = "" + payout;
                var totalPayout = (Number(_hcmn_.Math.round(total + "e2") + "e-2").toFixed(2));
                wheelJackpotPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout);
            } else wheelJackpotPayout = "";
            if (grand) {
                var payout1 = this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotGrandPrize * this.model.denomination;
                var total1;
                if (payout1 == null) total1 = "null";
                else total1 = "" + payout1;
                var totalPayout1 = (Number(_hcmn_.Math.round(total1 + "e2") + "e-2").toFixed(2));
                wheelJackpotGrandPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout1);
            } else wheelJackpotGrandPayout = "";
            if (major) {
                var payout2 = this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotMajorPrize * this.model.denomination;
                var total2;
                if (payout2 == null) total2 = "null";
                else total2 = "" + payout2;
                var totalPayout2 = (Number(_hcmn_.Math.round(total2 + "e2") + "e-2").toFixed(2));
                wheelJackpotMajorPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout2);
            } else wheelJackpotMajorPayout = "";
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelBonusCreditsPayout > 0) {
                var payout3 = this.model.spinOutcome.baseGame.outcome.customField.wheelBonusCreditsPayout * this.model.denomination;
                var total3;
                if (payout3 == null) total3 = "null";
                else total3 = "" + payout3;
                var totalPayout3 = (Number(_hcmn_.Math.round(total3 + "e2") + "e-2").toFixed(2));
                wheelCreditsPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout3);
            } else wheelCreditsPayout = "";
            if (this.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout > 0) {
                var payout4 = this.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout * this.model.denomination;
                var total4;
                if (payout4 == null) total4 = "null";
                else total4 = "" + payout4;
                var totalPayout4 = (Number(_hcmn_.Math.round(total4 + "e2") + "e-2").toFixed(2));
                wheelCashLinkPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout4);
                var multiplier = this.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout * this.model.denomination / this.savedCashLinkValue;
                var multiplierInt = multiplier;
                if (multiplierInt > 1) wheelCashLinkPayout = multiplierInt + " x " + pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(this.savedCashLinkValue)) + " = " + wheelCashLinkPayout;
            } else wheelCashLinkPayout = null;
            if (_hcmn_.Std.parseInt(this.model.spinOutcome.baseGame.outcome.customField.wheelBonusTotalPayout) > 0) {
                var payout5 = this.model.spinOutcome.baseGame.outcome.customField.wheelBonusTotalPayout * this.model.denomination;
                var total5;
                if (payout5 == null) total5 = "null";
                else total5 = "" + payout5;
                var totalPayout5 = (Number(_hcmn_.Math.round(total5 + "e2") + "e-2").toFixed(2));
                wheelTotalPayout = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(totalPayout5);
            } else wheelTotalPayout = null;
            this.pickerPort.hide();
            if (jackpot && grand && major) {
                var payload = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM, [wheelJackpotPayout], 0);
                this.popupsPort.getShow().request(payload, 0).then(function(data) {
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM));
                    var payload1 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM, [wheelJackpotGrandPayout], 0);
                    _g.popupsPort.getShow().request(payload1, 0).then(function(data1) {
                        _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM));
                        var payload2 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM, [wheelJackpotMajorPayout], 0);
                        _g.popupsPort.getShow().request(payload2, 0).then(function(data2) {
                            _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM));
                            _g.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
                        });
                    });
                });
            } else if (jackpot && grand) {
                var payload3 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM, [wheelJackpotPayout], 0);
                this.popupsPort.getShow().request(payload3, 0).then(function(data3) {
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM));
                    var payload4 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM, [wheelJackpotGrandPayout], 0);
                    _g.popupsPort.getShow().request(payload4, 0).then(function(data4) {
                        _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM));
                        _g.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
                    });
                });
            } else if (jackpot && major) {
                var payload5 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM, [wheelJackpotPayout], 0);
                this.popupsPort.getShow().request(payload5, 0).then(function(data5) {
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM));
                    var payload6 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM, [wheelJackpotMajorPayout], 0);
                    _g.popupsPort.getShow().request(payload6, 0).then(function(data6) {
                        _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM));
                        _g.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
                    });
                });
            } else if (grand && major) {
                var payload7 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM, [wheelJackpotGrandPayout], 0);
                this.popupsPort.getShow().request(payload7, 0).then(function(data7) {
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM));
                    var payload8 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM, [wheelJackpotMajorPayout], 0);
                    _g.popupsPort.getShow().request(payload8, 0).then(function(data8) {
                        _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM));
                        _g.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
                    });
                });
            } else if (jackpot) {
                var payload9 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM, [wheelJackpotPayout], 0);
                this.popupsPort.getShow().request(payload9, 0).then(function(data9) {
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.POWER_BUCKS_ANIM));
                    _g.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
                });
            } else if (grand) {
                var payload10 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM, [wheelJackpotGrandPayout], 0);
                this.popupsPort.getShow().request(payload10, 0).then(function(data10) {
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.GRAND_ANIM));
                    _g.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
                });
            } else if (major) {
                var payload11 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM, [wheelJackpotMajorPayout], 0);
                this.popupsPort.getShow().request(payload11, 0).then(function(data11) {
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.MAJOR_ANIM));
                    _g.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
                });
            } else this.finishWheelOutroAnim(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.finishWheelOutroAnim = function(wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, wheelTotalPayout) {
            var _g = this;
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.CASH_LINK));
            var powerbucksString = this.getString("WB_OUTRO_0");
            var wheelCreditsString = this.getString("WB_OUTRO_1");
            var grandString = this.getString("WB_OUTRO_2");
            var majorString = this.getString("WB_OUTRO_3");
            var showVanna;
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotPrize > 0 || this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotMajorPrize > 0 || this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotGrandPrize > 0) showVanna = true;
            else showVanna = false;
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotPrize <= 0) powerbucksString = "";
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelBonusCreditsPayout <= 0) wheelCreditsString = "";
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotMajorPrize <= 0) majorString = "";
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.jackpotGrandPrize <= 0) grandString = "";
            var payload = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.VANNA_ANIM, [], 0);
            pBWOFExoticFarEastGameController.GameController.soundController.vana();
            if (showVanna) this.popupsPort.getShow().request(payload, 0);
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WB_OUTRO, [powerbucksString, wheelCreditsString, grandString, majorString, wheelJackpotPayout, wheelCashLinkPayout, wheelCreditsPayout, wheelJackpotGrandPayout, wheelJackpotMajorPayout, this.getString("WB_OUTRO_9"), wheelTotalPayout], 5000), 0).then(function(data) {
                if (showVanna) _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.VANNA_ANIM));
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WB_OUTRO));
                _g.showGameElementsAfterWheel();
                var payload1 = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_ANIM, [_g.getString("GameOver"), _g.getString("GameOver")], 0);
                _g.popupsPort.getShow().request(payload1, 0).then(function(data1) {
                    _g.reelsPort.show().publish(null);
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_ANIM));
                    var jackpotMessage = _g.getString("pb_popup_title");
                    if (_g.model.currentBPL > 3) jackpotMessage = _g.getString("pb_popup_title_progressive");
                    if (_g.model.spinOutcome.baseGame.outcome.customField.wheelJackpotData.isJackpotWon) {
                        if (pBWOFExoticFarEastGameController.ExternalService.isDesktop()) _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM));
                        _g.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("WheelBonusWin", [pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(_g.model.spinOutcome.baseGame.outcome.customField.wheelBonusTotalPayout * _g.model.denomination))])));
                        var ackPayload = new jackpotMeterApi.PlayerAckonowledgementPayload(jackpotMessage, _g.getString("pb_popup_content"), _g.getString("pb_popup_message_confirm"), _g.getString("pb_popup_message_continue"));
                        _g.jackpotMeterPort.getPlayerAckonowledgement().request(ackPayload, 0).then(function(o) {
                            _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_OUTRO_END);
                            pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, true);
                        });
                    } else {
                        _g.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_OUTRO_END);
                        pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, true);
                    }
                });
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.setBaseGameOutcome = function() {
            this.model.setOutcome(this.model.spinOutcome.baseGame.outcome);
            if (!this.cashLinkShown) this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.executeContinueCommand = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] executeContinueCommand:stage:" + this.model.spinOutcome.stage, {
                fileName: "GameController.hx",
                lineNumber: 1771,
                className: "components.gamecontroller.imp.GameController",
                methodName: "executeContinueCommand"
            });
            if (this.model.spinOutcome.stage == "FreeSpin") {
                var payout = this.model.spinOutcome.freeSpin.outcome.totalPayout;
                if (pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(payout)) _hcmn_.haxe_Timer.delay(function() {
                    _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
                }, this.config.fs_NoWinSpinDelay);
                else this.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
            } else _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
            }, this.config.fs_FirstSpinDelay);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleBalanceUpdate = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleBalanceUpdate", {
                fileName: "GameController.hx",
                lineNumber: 1798,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleBalanceUpdate"
            });
            var payload = e.getPayload();
            if (payload.freespin != null) {
                haxe.Log.trace("GAME_CONTORLLER -> PROMOFREESPINS AWARDED:" + payload.freespin, {
                    fileName: "GameController.hx",
                    lineNumber: 1801,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "handleBalanceUpdate"
                });
                this.promotionalSpinsActive = true;
                this.promotionalSpinsCount = payload.freespin;
                this.betPanelPort.setBalance().publish(pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("BalanceValueNotAvailable"));
                this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            } else this.betPanelPort.setBalance().publish(payload.balance);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleGameOptionChanged = function(e) {
            var type = e.getPayload().key;
            haxe.Log.trace("SALE handleGameOptionChanged", {
                fileName: "GameController.hx",
                lineNumber: 1814,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleGameOptionChanged"
            });
            var value = _hcmn_.Std.parseInt(e.getPayload().value);
            if (type == "sound") {
                if (value == 0) {
                    this.betPanelPort.enableButton().publish(betPanelApi.EButton.SOUND_ON);
                    pBWOFExoticFarEastGameController.GameController.soundController.turnSoundOn();
                } else {
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.SOUND_OFF);
                    pBWOFExoticFarEastGameController.GameController.soundController.turnSoundOff();
                }
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleSlotModelInitGame = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleSlotModelInitGame", {
                fileName: "GameController.hx",
                lineNumber: 1829,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSlotModelInitGame"
            });
            this.model.rgPresentation = e.getPayload().riskControlSettings.rgPresentation;
            this.applyStakeItemsWithTotalBet(e.getPayload().defaultStake, false);
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            if (this.model.rgPresentation) this.chestGlowPort.stopAnimation().publish(true);
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_BG, [], 0), 0);
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_BG, [], 0), 0);
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_FS));
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_FS));
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.INIT_ACTION);
            this.model.denomination = _hcmn_.Std.parseFloat(e.getPayload().riskControlSettings.denomination);
            this.model.currencyCode = e.getPayload().riskControlSettings.currencyFormat.currencyCode;
            this.model.currentBPL = _hcmn_.Std.parseInt("" + _hcmn_.Std.parseFloat(e.getPayload().defaultStake.stakeItems.betPerLine) / this.model.denomination);
            this.model.currentBPLMoney = _hcmn_.Std.parseFloat(e.getPayload().defaultStake.stakeItems.betPerLine);
            if (e.getPayload().defaultStake.outcome != null && e.getPayload().defaultStake.outcome.customField != null) {
                this.model.progressiveMinTotalBet = e.getPayload().defaultStake.outcome.customField.progressiveMinTotalBet;
                this.updateGrandMajorLabels(e.getPayload().defaultStake.outcome.customField);
            }
            if (!this.tutorialConfirmed) this.initTutorial();
            else {
                this.tutorialPort.getHide().publish(null);
                if (this.model.currentBPL > 3 && this.model.currencyCode == "CAD") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
            }
            haxe.Log.trace("asdfadfasdfasdf", {
                fileName: "GameController.hx",
                lineNumber: 1867,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSlotModelInitGame",
                customParams: [pBWOFExoticFarEastGameController.ExternalService.variableRegistry]
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.updateGrandMajorLabels = function(customField) {
            var grandValue = customField.jackpotGrandValue * this.model.currentBPL * this.model.denomination;
            var majorValue = customField.jackpotMajorValue * this.model.currentBPL * this.model.denomination;
            this.grandMajorJackpotPort.getUpdateLabels().publish([pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(grandValue == null ? "null" : "" + grandValue), pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(majorValue == null ? "null" : "" + majorValue)]);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handlePrepareResume = function(e) {
            this.isResume = true;
            var resumePayload = e.getPayload();
            this.model.rgPresentation = e.getPayload().initializationProperties.riskControlSettings.rgPresentation;
            this.model.setSpinOutcome(resumePayload.spinOutcome);
            this.applyStakeItemsWithTotalBet(resumePayload.stake, false);
            if (this.model.spinOutcome.nextStage.indexOf("FreeSpin") >= 0) {
                this.changeBackground(this.BG_FREESPIN);
                this.hideGrandAndMajor();
                pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(true, false, true, false);
                this.reelsPort.setReelPicture().publish(resumePayload.spinOutcome.freeSpin.outcome.reelStop.reels);
            } else {
                this.changeBackground(this.BG_MAINGAME);
                pBWOFExoticFarEastGameController.GameController.soundController.setGameMode(false, false, true, true);
            }
            if (this.model.spinOutcome.nextStage.indexOf("FreeSpin") >= 0) {
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_FS, [], 0), 0);
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_FS, [], 0), 0);
                this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_BACKGROUND_BG));
                this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.REEL_FOREGROUND_BG));
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WHEEL_STATIC, ["0"], 0), 0);
            }
            this.model.denomination = parseFloat(resumePayload.initializationProperties.riskControlSettings.denomination);
            this.model.currencyCode = resumePayload.initializationProperties.riskControlSettings.currencyFormat.currencyCode;
            this.model.currentBPL = _hcmn_.Std.parseInt("" + parseFloat(resumePayload.stake.stakeItems.betPerLine) / this.model.denomination);
            this.model.currentBPLMoney = parseFloat(resumePayload.stake.stakeItems.betPerLine);
            if (resumePayload.spinOutcome.baseGame.outcome != null && resumePayload.spinOutcome.baseGame.outcome.customField != null) this.updateGrandMajorLabels(resumePayload.spinOutcome.baseGame.outcome.customField);
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.PREPARE_RESUME);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleConfirmSelectedStake = function(e) {
            if (!pBWOFExoticFarEastGameController.ExternalService.isDesktop()) {
                if (this.confirmBetButtonClicked || this.betChangedByConsole) this.applyStakeItemsWithTotalBet(e.getPayload(), true);
                else {
                    this.betPanelPort.setStake().publish(e.getPayload());
                    if (this.model.outcome != null && this.model.outcome.customField != null) this.updateGrandMajorLabels(this.model.outcome.customField);
                }
            } else this.applyStakeItemsWithTotalBet(e.getPayload(), true);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.applyStakeItemsWithTotalBet = function(stake, initialized) {
            haxe.Log.trace("[GAME_CONTROLLER] applyStakeItemsWithTotalBet", {
                fileName: "GameController.hx",
                lineNumber: 1940,
                className: "components.gamecontroller.imp.GameController",
                methodName: "applyStakeItemsWithTotalBet"
            });
            this.model.setOutcome(stake.outcome);
            this.model.currentBPL = _hcmn_.Std.parseInt("" + parseFloat(stake.stakeItems.betPerLine) / this.model.denomination);
            this.model.setCurrentStake(stake);
            this.betPanelPort.setStake().publish(stake);
            this.resultPayload = null;
            if (pBWOFExoticFarEastGameController.ExternalService.isDesktop()) this.betPanelPort.getCoinValue().publish(pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(stake.stakeItems.betPerLine));
            this.betsArray = stake.totalBetsForSelectedLines;
            this.previousBPL = parseFloat(stake.stakeItems.betPerLine);
            if (initialized) {
                this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.BG_AWARD_CAP));
                this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.FS_AWARD_CAP));
                if (this.model.outcome != null && this.model.outcome.customField != null) this.updateGrandMajorLabels(this.model.outcome.customField);
                if (!this.alreadyDisposed) {
                    this.disposeAnimations();
                    this.alreadyDisposed = true;
                }
                if (!this.tutorialActive) this.showJackpotEligiblePopup();
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showJackpotEligiblePopup = function() {
            var _g = this;
            if (this.betChangePopupOpen && this.model.currencyCode == "CAD") {
                this.betChangePopupOpen = false;
                this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT));
                window.clearTimeout(this.betChangeInfoPopupTime);
            }
            var showDefaultPopupAllowed = false;
            if (pBWOFExoticFarEastGameController.ExternalService.isDesktop()) showDefaultPopupAllowed = true;
            if (!pBWOFExoticFarEastGameController.ExternalService.isDesktop()) {
                if (this.confirmBetButtonClicked || this.betChangedByConsole) showDefaultPopupAllowed = true;
            }
            if (this.model.currentBPL >= 7 && this.model.currencyCode == "CAD" && showDefaultPopupAllowed) {
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
                this.betChangePopupOpen = true;
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT, [this.getString("DEFAULT_0_MAX"), this.getString("DEFAULT_1_MAX"), this.getString("DEFAULT_2_MAX"), "", ""], 0), 0);
                this.betChangeInfoPopupTime = window.setTimeout(function() {
                    _g.betChangePopupOpen = false;
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT));
                }, 3000);
            } else if (this.model.currentBPL > 3 && this.model.currencyCode == "CAD" && showDefaultPopupAllowed) {
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
                this.betChangePopupOpen = true;
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT, [this.getString("DEFAULT_0"), this.getString("DEFAULT_1"), this.getString("DEFAULT_2"), this.getString("DEFAULT_3"), this.getString("DEFAULT_4")], 0), 0);
                this.betChangeInfoPopupTime = window.setTimeout(function() {
                    _g.betChangePopupOpen = false;
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT));
                }, 3000);
            } else if (this.model.currencyCode == "CAD" && showDefaultPopupAllowed) {
                this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM));
                this.betChangePopupOpen = true;
                this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT, [this.getString("DEFAULT_0_LESS"), this.getString("DEFAULT_1_LESS"), this.getString("DEFAULT_2_LESS"), this.getString("DEFAULT_3_LESS"), ""], 0), 0);
                this.betChangeInfoPopupTime = window.setTimeout(function() {
                    _g.betChangePopupOpen = false;
                    _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.DEFAULT));
                }, 3000);
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleSpinCommandAvailable = function(e) {
            var spinAvailable = e.getPayload();
            if (spinAvailable) {
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
                this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.SPIN_ENABLED);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleStakeCommandAvailable = function(e) {
            if (e.getPayload()) {
                if (!this.promotionalSpinsActive) this.betPanelPort.enableButton().publish(betPanelApi.EButton.TOTAL_BET);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleModelSpinStart = function(e) {
            this.model.setStartSpinPayload(e.getPayload());
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.START_REEL_SPIN);
            if (this.model.currentBPL > 3 && this.model.currencyCode == "CAD") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleSpinOutcome = function(e) {
            this.model.setSpinOutcome(e.getPayload());
            this.smContext.setContextValue("Stage", e.getPayload().stage);
            this.smContext.setContextValue("NextStage", e.getPayload().nextStage);
            this.smContext.setContextValue("awardCapExceeded", e.getPayload().awardCapExceeded);
            if (e.getPayload().stage == "FreeSpin") this.smContext.setContextValue("retrigger", this.model.spinOutcome.freeSpin.isIncrementTriggered);
            if (e.getPayload().stage == "WheelBonus") this.sendDataForWheelCoinsAnim();
            if (this.cashLinkShown || this.isResume) this.pickerPort.stop(this.model.spinOutcome.baseGame.outcome.customField.wheelPointer);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.sendDataForWheelCoinsAnim = function() {
            var play5x = false;
            var play10x = false;
            var play20x = false;
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelCashLinkWins.indexOf("5x") >= 0) play5x = true;
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelCashLinkWins.indexOf("10x") >= 0) play10x = true;
            if (this.model.spinOutcome.baseGame.outcome.customField.wheelCashLinkWins.indexOf("20x") >= 0) play20x = true;
            this.pickerPort.playCashLinkAnimation([play5x, play10x, play20x]);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleModelSpinStop = function(e) {
            if (this.stateMachine.isInState(pBWOFExoticFarEastGameController.StateMachineDef.SPINNING_STATE)) this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.STOP_REEL_SPIN);
            else this.stopSpinRecieved = true;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleAbortSpin = function(e) {
            this.model.setAbortSpinPayload(e.getPayload());
            if (this.stateMachine.isInState(pBWOFExoticFarEastGameController.StateMachineDef.SPINNING_STATE) || this.stateMachine.isInState(pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_IDLE)) this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.ABORT_SPIN);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleSpinOutcomePresent = function(e) {
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.PRESENT_SPIN_OUTCOME);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handlePresentResult = function(e) {
            this.resultPayload = e.getPayload();
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.PRESENT_RESULT);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleContinueCommandAvailable = function(e) {
            if (e.getPayload()) this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE_ENABLED);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handlePaytableCommandAvailable = function(e) {
            if (!e.getPayload()) this.betPanelPort.disableButton().publish(betPanelApi.EButton.PAYTABLE);
            else this.betPanelPort.enableButton().publish(betPanelApi.EButton.PAYTABLE);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleOpenPaytable = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleOpenPaytable", {
                fileName: "GameController.hx",
                lineNumber: 2211,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleOpenPaytable"
            });
            if (this.paytableOpened) {
                this.onPaytableClose();
                return;
            }
            this.paytableOpened = true;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            this.paytablePort.show().publish(null);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            pBWOFExoticFarEastGameController.GameController.soundController.click();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onStopAvailable = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onStopAvailable ", {
                fileName: "GameController.hx",
                lineNumber: 2233,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onStopAvailable",
                customParams: [e.getPayload()]
            });
            if (e.getPayload()) {
                this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.STOP_BUTTON_STATE);
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onSpinAvailable = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onSpinAvailable ", {
                fileName: "GameController.hx",
                lineNumber: 2248,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onSpinAvailable",
                customParams: [e.getPayload()]
            });
            if (e.getPayload()) {
                this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onAutospinStopped = function(e) {
            this.autoPlayActive = false;
            this.autospinInfo = null;
            haxe.Log.trace("[GAME_CONTROLLER] onAutospinStopped ", {
                fileName: "GameController.hx",
                lineNumber: 2266,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onAutospinStopped",
                customParams: [e.getPayload()]
            });
            pBWOFExoticFarEastGameController.GameController.soundController.autoSpin();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onAutospinStarted = function(e) {
            this.autoPlayActive = true;
            this.autospinInfo = e.getPayload();
            haxe.Log.trace("[GAME_CONTROLLER] onAutospinStarted ", {
                fileName: "GameController.hx",
                lineNumber: 2283,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onAutospinStarted",
                customParams: [e.getPayload()]
            });
            this.betPanelPort.setNumberOffAutoSpinsLeft().publish(e.getPayload().current + " / " + e.getPayload().total);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onGameLayoutUpdated = function(event) {
            if (this.layoutUpdated) return;
            this.layoutUpdated = true;
            this.checkGameLoaded();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onBetPanelButtonPressed = function(e) {
            this.confirmBetButtonClicked = false;
            this.betChangedByConsole = false;
            var button = e.getPayload();
            switch (button[1]) {
                case 11:
                    this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM));
                    if (this.opened && !pBWOFExoticFarEastGameController.ExternalService.isDesktop()) {
                        this.confirmBetButtonClicked = true;
                        this.showJackpotEligiblePopup();
                    } else if (!pBWOFExoticFarEastGameController.ExternalService.isDesktop()) this.disposeAnimations();
                    if (this.opened && this.model.currentBPL > 3 && this.model.currencyCode == "CAD") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
                    this.opened = !this.opened;
                    break;
                case 1:
                    if (this.showSpinButtonInsideAutoplay) {
                        if (this.resolveFnOnClickSpinInsideAutoplay != null) {
                            this.resolveFnOnClickSpinInsideAutoplay("CLICK-SPIN-INSIDE-AUTOPLAY");
                            this.resolveFnOnClickSpinInsideAutoplay = null;
                        }
                        return;
                    }
                    if (this.showSpinButtonDuringFreeSpin) {
                        if (this.resolveFnOnClickSpinDuringFreeSpin != null) {
                            this.resolveFnOnClickSpinDuringFreeSpin("CLICK-SPIN-INSIDE-FREE SPIN");
                            this.resolveFnOnClickSpinDuringFreeSpin = null;
                        }
                        return;
                    }
                    this.slotModelPort.getGameCommands().getSpinCommandExecuted().publish(null);
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                    pBWOFExoticFarEastGameController.GameController.soundController.playSoundButtonPush();
                    break;
                case 5:
                    this.slotModelPort.getGameCommands().getPaytableCommandExecuted().publish(null);
                    break;
                case 9:
                    this.slotModelPort.getGameContext().getGameOptionChangedFromGf().publish(new slotModelApi.Pair("sound", "1"));
                    break;
                case 10:
                    this.slotModelPort.getGameContext().getGameOptionChangedFromGf().publish(new slotModelApi.Pair("sound", "0"));
                    break;
                case 13:
                    this.slotModelPort.getGameCommands().getStartAutoSpinsCommandExecuted().publish(new slotModelApi.AutospinCommandPayload());
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
                    pBWOFExoticFarEastGameController.GameController.soundController.autoSpin(true);
                    this.opened = false;
                    if (this.model.currentBPL > 3) this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
                    break;
                case 14:
                    this.slotModelPort.getGameCommands().getStopAutoSpinsCommandExecuted().publish(null);
                    this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                    this.autoPlayActive = false;
                    if (this.resolveFnOnStopInsideAutoplay != null) {
                        this.resolveFnOnStopInsideAutoplay("AUTOSPIN-STOP");
                        this.resolveFnOnStopInsideAutoplay = null;
                    }
                    break;
                default:
                    haxe.Log.trace("[GAME_CONTROLLER] onBetPanelButtonPressed not handled for: " + _hcmn_.Type.getEnumName(betPanelApi.EButton), {
                        fileName: "GameController.hx",
                        lineNumber: 2374,
                        className: "components.gamecontroller.imp.GameController",
                        methodName: "onBetPanelButtonPressed"
                    });
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onBetPanelStakeChanged = function(e) {
            var payload = new slotModelApi.StakeItems(30, e.getPayload().betPerLine, 45);
            this.slotModelPort.getGameCommands().getStakeCommandExecuted().publish(payload);
            this.model.currentBPL = _hcmn_.Std.parseInt("" + _hcmn_.Std.parseFloat(e.getPayload().betPerLine) / this.model.denomination);
            var maxValue = _hcmn_.Std.parseFloat(this.betsArray[this.betsArray.length - 1].value);
            var currentBPL = _hcmn_.Std.parseFloat(e.getPayload().betPerLine);
            pBWOFExoticFarEastGameController.GameController.soundController.betPanleStakeChanged(currentBPL, maxValue, this.previousBPL);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.disposeAnimations = function() {
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.chestBonusPlugin.reset();
            this.chestBonusPlugin.returnLogo();
            this.winControllerPort.dispose().publish(null);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.winMeterPort.showMessage().publish("");
            if (this.model.spinOutcome != null && this.model.spinOutcome.baseGame.outcome.reelStop.reels != null) this.reelsPort.setReelPicture().publish(this.model.spinOutcome.baseGame.outcome.reelStop.reels);
            else this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            var visibilityArray;
            var _g = [];
            var _g1 = 0;
            while (_g1 < 5) {
                var i = _g1++;
                _g.push((function($this) {
                    var $r;
                    var _g2 = []; {
                        var _g3 = 0;
                        while (_g3 < 5) {
                            var j = _g3++;
                            _g2.push(0);
                        }
                    }
                    $r = _g2;
                    return $r;
                }(this)));
            }
            visibilityArray = _g;
            this.reelsPort.setReelCellsVisibility().publish(visibilityArray);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onPaytableClose = function(e) {
            if (this.stateMachine.isInState(pBWOFExoticFarEastGameController.StateMachineDef.IDLE_STATE)) {
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.TOTAL_BET);
            }
            this.paytableOpened = false;
            this.paytablePort.hide().publish(null);
            if (!this.tutorialActive) this.reelsPort.show().publish(null);
            pBWOFExoticFarEastGameController.GameController.soundController.click();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onReelOutcomeExit = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onReelOutcomeExit", {
                fileName: "GameController.hx",
                lineNumber: 2440,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onReelOutcomeExit"
            });
            if (e.getPayload() == 0) this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.SPIN_STARTING_ENDED);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onReelStoppingStarted = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onReelStoppingStarted", {
                fileName: "GameController.hx",
                lineNumber: 2448,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onReelStoppingStarted"
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onReelStopped = function(e) {
            var reelId = e.getPayload();
            haxe.Log.trace("[GAME_CONTROLLER] onReelStopped", {
                fileName: "GameController.hx",
                lineNumber: 2454,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onReelStopped",
                customParams: [reelId]
            });
            if (this.model.spinOutcome != null && this.model.spinOutcome.stage == "BaseGame") this.winMeterPort.showMessage().publish("");
            if (this.model.spinOutcome.stage != "FreeSpin") this.chestBonusPlugin.applyCoins(this.model.spinOutcome.baseGame.outcome.reelStopAdditional.reels, this.model.spinOutcome.baseGame.outcome.reelStop.reels, this.model.denomination, reelId);
            else this.chestBonusPlugin.applyCoins(this.model.spinOutcome.freeSpin.outcome.reelStopAdditional.reels, this.model.spinOutcome.freeSpin.outcome.reelStop.reels, this.model.denomination, reelId);
            var cheestBG = this.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout;
            var cheestFS = this.model.spinOutcome.freeSpin.outcome.customField.freeSpinsCashLinkTotalPayout;
            pBWOFExoticFarEastGameController.GameController.soundController.onReelStopped();
            if (this.model.coinOnReel[reelId]) pBWOFExoticFarEastGameController.GameController.soundController.coinsOnReel(reelId);
            if (this.model.bonusSymbolOnReel[reelId]) pBWOFExoticFarEastGameController.GameController.soundController.bonusOnReel(reelId, this.model.bonusSymbolOnReel);
            if (this.model.chestOnReel[reelId]) pBWOFExoticFarEastGameController.GameController.soundController.chestOnReel(reelId, cheestBG, cheestFS);
            if (this.model.bonusCoinOnFirstReel && reelId == 0) pBWOFExoticFarEastGameController.GameController.soundController.bonusCoin();
            if (reelId == 0 && this.model.bonusCoinOnFirstReel && this.model.hasTension) {
                this.tensionPort.getShowTension().publish(new pBWOFExoticFarEastTensionApi.ShowTensionPayload(this.model.tensionReels, 4));
                pBWOFExoticFarEastGameController.GameController.soundController.playTensionSound();
            } else if (reelId == 2 && this.model.bonusSymbolOnReel[0] && this.model.hasTension) {
                this.tensionPort.getShowTension().publish(new pBWOFExoticFarEastTensionApi.ShowTensionPayload(this.model.tensionReels, 4));
                pBWOFExoticFarEastGameController.GameController.soundController.playTensionSound();
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onSpinStopped = function(e) {
            haxe.Log.trace("GAME CONTROLLER onSpinStopped", {
                fileName: "GameController.hx",
                lineNumber: 2527,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onSpinStopped"
            });
            pBWOFExoticFarEastGameController.GameController.soundController.startBackgroundMusicStopTimeOut();
            if (this.stateMachine.isInState(pBWOFExoticFarEastGameController.StateMachineDef.STOPPING_STATE)) this.slotModelPort.getStages().getSpinStage().getReelSpinFinished().publish(null);
            else this.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
            if (this.model.hasTension) {
                this.tensionPort.getHideTension().publish(null);
                pBWOFExoticFarEastGameController.GameController.soundController.stopTensionSound();
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showSpinInfoLabel = function() {
            if (this.promotionalSpinsActive) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("PromotionalSpinsLeft") + " " + this.promotionalSpinsCount));
            else this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("SpinInfoLabel")));
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onWinLineAnimated = function(e) {
            if (pBWOFExoticFarEastGameController.ExternalService.isDesktop()) this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM));
            var win = e.getPayload().win;
            if (win.type == "BonusWinLine" && this.model.spinOutcome.nextStage.indexOf("BaseGame") >= 0 && this.afterWheel) {
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("WheelBonusWin", [pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(this.model.spinOutcome.baseGame.outcome.customField.wheelBonusTotalPayout * this.model.denomination))])));
                return;
            }
            if (win.type == "BonusWinLine" && this.model.spinOutcome.nextStage.indexOf("BaseGame") >= 0) {
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("CashLinkWin", [pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(this.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout * this.model.denomination))])));
                return;
            }
            if (win.type == "BonusWinLine" && this.model.spinOutcome.nextStage.indexOf("FreeSpin") >= 0) {
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("CashLinkWin", [pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(this.model.spinOutcome.freeSpin.outcome.customField.baseGameCashLinkTotalPayout * this.model.denomination))])));
                return;
            }
            if (win.type == "Scatter" && this.paytableOpened == false) {
                this.infoBarPort.hideWinLineSummary().publish(null);
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, ""));
                var accumulatedPayout = this.model.spinOutcome.acumulatedPayout;
                if ((function($this) {
                        var $r;
                        var this1 = $this.smContext.get_contextValues();
                        $r = this1.get("retrigger");
                        return $r;
                    }(this)) == false) {
                    if (!pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.isZero(this.model.spinOutcome.acumulatedFreeSpinPayout) && this.model.spinOutcome.nextStage.indexOf("BaseGame") >= 0) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("FreeSpinsWin", [pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(this.model.spinOutcome.acumulatedFreeSpinPayout)])));
                    else if (this.model.spinOutcome.nextStage.indexOf("BaseGame") >= 0) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup("FreeSpinsComplete")));
                }
                return;
            }
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            var linePicture;
            var _g = [];
            var _g1 = 0;
            while (_g1 < 5) {
                var i = _g1++;
                _g.push("-");
            }
            linePicture = _g;
            var _g2 = 0;
            var _g11 = win.symbolCount;
            while (_g2 < _g11) {
                var k = _g2++;
                linePicture[win.position + k] = win.winningSymbol;
            }
            if (win.type == "LineRight") linePicture.reverse();
            if (this.paytableOpened) this.infoBarPort.hideWinLineSummary().publish(null);
            else this.infoBarPort.showWinLineSummary().publish(new infoBarApi.WinLineSummaryPayload(linePicture, win.lineId == null ? "null" : "" + win.lineId, pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(win.payout)));
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onWheelStopped = function(e) {
            this.dispatchEvent(pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_STOPPED);
            pBWOFExoticFarEastGameController.GameController.soundController.stopWheelSpining();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onCoinsFlewAway = function(e) {
            var _g = this;
            var payload = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.CASH_LINK, [pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(this.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout * this.model.denomination))], 0);
            this.popupsPort.getShow().request(payload, 0).then(function(data) {});
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.CASH_LINK_EXPLOSION, ["0"], 0), 0);
            pBWOFExoticFarEastGameController.GameController.soundController.coinExplosion();
            _hcmn_.haxe_Timer.delay(function() {
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.CASH_LINK_EXPLOSION));
            }, 1000);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onWheelStarted = function(e) {
            this.publishPickerRequest();
            pBWOFExoticFarEastGameController.GameController.soundController.wheelSpining();
            this.wheelSpinCounter = 0;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.changeBackground = function(id) {
            this.backgroundPort.showBackground().publish(id);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showWheel = function() {
            var _g = this;
            this.pickerPort.updatePointers(this.model.currentBPL);
            this.pickerPort.initWheelStrips(this.model.spinOutcome.baseGame.outcome.customField.wheelSectors);
            this.hideGameElementsForWheel();
            var pointerMessage;
            if (this.model.currentBPL > 1) pointerMessage = this.getString("WB_INTRO_1");
            else pointerMessage = this.getString("WB_INTRO_1_SINGLE_POINTER");
            pBWOFExoticFarEastGameController.GameController.soundController.bplPopup(_hcmn_.Std.string(this.model.currentBPL));
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WB_INTRO, [_hcmn_.Std.string(this.model.currentBPL), pointerMessage], 3000), 0).then(function(data) {
                _g.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WB_INTRO));
                _g.pickerPort.show();
                var payload = new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.CASH_LINK, [pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(_g.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout * _g.model.denomination))], 0);
                _g.savedCashLinkValue = _g.model.spinOutcome.baseGame.outcome.customField.baseGameCashLinkTotalPayout * _g.model.denomination;
                _g.popupsPort.getShow().request(payload, 0).then(function(data1) {});
                pBWOFExoticFarEastGameController.GameController.soundController.wheelLands();
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.hideGameElementsForWheel = function() {
            if (!this.isResume) this.winControllerPort.dispose().publish(null);
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM));
            this.popupsPort.getHide().publish(new pBWOFExoticFarEastPopupsApi.HidePopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WHEEL_STATIC));
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SKIP);
            this.changeBackground(this.BG_WHEEL);
            if (!pBWOFExoticFarEastGameController.ExternalService.isDesktop()) this.viewManagerPort.getHide().publish("WHEEL_BONUS_MOB");
            else this.viewManagerPort.getHide().publish("WHEEL_BONUS_DESKTOP");
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showGameElementsAfterWheel = function() {
            this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.WHEEL_STATIC, ["0"], 0), 0);
            if (!pBWOFExoticFarEastGameController.ExternalService.isDesktop()) this.viewManagerPort.getShow().publish("WHEEL_BONUS_MOB");
            else this.viewManagerPort.getShow().publish("WHEEL_BONUS_DESKTOP");
            this.changeBackground(this.BG_MAINGAME);
            if (this.model.currentBPL > 3 && this.model.currencyCode == "CAD") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.publishPickerRequest = function() {
            this.slotModelPort.getStages().getPickerBonusStage().getPickerBonusSelectedArray().publish([]);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onJackpotMeterUpdate = function(e) {};
        pBWOFExoticFarEastGameController.GameController.prototype.getString = function(id) {
            return pBWOFExoticFarEastGameController.ExternalService.translationManager.stringLookup(id);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.abortWheel = function() {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
                _g.pickerPort.setIdle();
            }, 0);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onPaytablePageChanged = function(e) {
            pBWOFExoticFarEastGameController.GameController.soundController.playSoundButtonPush();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.onHelpOpen = function(e) {
            pBWOFExoticFarEastGameController.GameController.soundController.playSoundButtonPush();
        };
        pBWOFExoticFarEastGameController.GameController.prototype.stopAutoplay = function() {
            if (this.autoPlayActive) {
                this.slotModelPort.getGameCommands().getStopAutoSpinsCommandExecuted().publish(null);
                this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                this.autoPlayActive = false;
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showSpinInsideAutoplay = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFnOnClickSpinInsideAutoplay = resolve;
                _g.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            });
            return p;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showSpinInsideFreeSpin = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFnOnClickSpinDuringFreeSpin = resolve;
                _g.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            });
            return p;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.hideSpinDuringFreeSpin = function() {
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.hideSpinInsideAutoplay = function() {
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        pBWOFExoticFarEastGameController.GameController.prototype.forceStopAutoPlay = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFnOnStopInsideAutoplay = resolve;
            });
            return p;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.resolveCashLink = function() {
            haxe.Log.trace("[mm cahlink:Entering: ", {
                fileName: "GameController.hx",
                lineNumber: 2843,
                className: "components.gamecontroller.imp.GameController",
                methodName: "resolveCashLink"
            });
            var p = new Promise(function(resolve, reject) {
                _hcmn_.haxe_Timer.delay(function() {
                    haxe.Log.trace("[mm cahlinkr:Exiting: ", {
                        fileName: "GameController.hx",
                        lineNumber: 2848,
                        className: "components.gamecontroller.imp.GameController",
                        methodName: "resolveCashLink"
                    });
                    resolve("CASHLINK-END");
                }, 2000);
            });
            return p;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.initStorage = function() {
            this.storage = new pBWOFExoticFarEastGameController.Storage();
            if (!this.storage.hasOption("tutorialConfirmed")) this.storage.writeOption("tutorialConfirmed", "false");
            var confStorage = this.storage.readOption("tutorialConfirmed");
            if (confStorage == "true") this.tutorialConfirmed = true;
            else this.tutorialConfirmed = false;
            var bus = pBWOFExoticFarEastGameController.ExternalService.bus;
            bus.getChannel("ConsoleService").subscribe("Game.Control", $bind(this, this.consoleBetChange));
            bus.getChannel("GFBus").publish("testable:testcomponent:tutorialConfirmed", this.tutorialConfirmed);
            haxe.Log.trace("[TUTORIAL] initStorage " + _hcmn_.Std.string(this.tutorialConfirmed), {
                fileName: "GameController.hx",
                lineNumber: 2875,
                className: "components.gamecontroller.imp.GameController",
                methodName: "initStorage"
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleTutorialConfirmed = function(e) {
            if (this.tutorialConfirmed) this.tutorialConfirmed = false;
            else this.tutorialConfirmed = true;
            if (this.storage.hasOption("tutorialConfirmed")) this.storage.writeOption("tutorialConfirmed", _hcmn_.Std.string(this.tutorialConfirmed));
            haxe.Log.trace("[GAME_CONTROLLER] handleTutorialConfirmed " + _hcmn_.Std.string(this.tutorialConfirmed), {
                fileName: "GameController.hx",
                lineNumber: 2886,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTutorialConfirmed"
            });
        };
        pBWOFExoticFarEastGameController.GameController.prototype.consoleBetChange = function(e) {
            var option = e.getPayload().option;
            if (option == "betPerPattern") this.betChangedByConsole = true;
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleTutorialPage = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleTutorialPage " + e.getPayload(), {
                fileName: "GameController.hx",
                lineNumber: 2907,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTutorialPage"
            });
            if (this.isResume) return;
            if (e.getPayload() == 2) {
                this.showGameElements();
                this.tutorialActive = false;
                this.tutorialPort.getHide().publish(null);
                if (this.model.currentBPL > 3 && this.model.currencyCode == "CAD") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
            }
            var bus = pBWOFExoticFarEastGameController.ExternalService.bus;
            bus.getChannel("GFBus").publish("testable:testcomponent:currentPage", e.getPayload());
        };
        pBWOFExoticFarEastGameController.GameController.prototype.handleTutorialClose = function(e) {
            this.tutorialActive = false;
            this.showGameElements();
            this.tutorialPort.getHide().publish(null);
            if (this.model.currentBPL > 3 && this.model.currencyCode == "CAD") this.popupsPort.getShow().request(new pBWOFExoticFarEastPopupsApi.ShowPopupPayload(pBWOFExoticFarEastPopupsApi.PopupTypeEnum.ELIGIBLE_ANIM, ["0"], 0), 0);
            haxe.Log.trace("[GAME_CONTROLLER] handleTutorialConfirmed " + _hcmn_.Std.string(this.tutorialConfirmed), {
                fileName: "GameController.hx",
                lineNumber: 2941,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTutorialClose"
            });
            pBWOFExoticFarEastGameController.GameController.soundController.playSound("Click");
        };
        pBWOFExoticFarEastGameController.GameController.prototype.initTutorial = function() {
            this.tutorialActive = true;
            haxe.Log.trace("[GAME_CONTROLLER] initTutorial ", {
                fileName: "GameController.hx",
                lineNumber: 2948,
                className: "components.gamecontroller.imp.GameController",
                methodName: "initTutorial"
            });
            _hcmn_.haxe_Timer.delay($bind(this, this.hideGameElements), 0);
            var progressiveMinTotalBetValue = pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(_hcmn_.Std.string(_hcmn_.Std.parseInt(this.model.progressiveMinTotalBet) * this.model.denomination));
            this.tutorialPort.getShow().publish(new pBWOFExoticFarEastTutorialApi.ShowTutorialPayload(progressiveMinTotalBetValue, pBWOFExoticFarEastTutorialApi.TutorialLayerEnum.TUTORIAL_VIEW));
        };
        pBWOFExoticFarEastGameController.GameController.prototype.hideGameElements = function() {
            var st = pBWOFExoticFarEastGameController.ExternalService.displayProvider.getDefaultStage();
            var _g1 = 0;
            var _g = st.getNumChildren();
            while (_g1 < _g) {
                var i = _g1++;
                var id = st.getChildAt(i).id;
                haxe.Log.trace("[GAME_CONTROLLER] hideGameElements " + id, {
                    fileName: "GameController.hx",
                    lineNumber: 2962,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "hideGameElements"
                });
                var visible = st.getChildAt(i).getVisible();
                this.baseGameElementsVisibility.set(id, visible);
                st.getChildAt(i).setVisible(false);
                if (id == "TUTORIAL_VIEW") st.getChildAt(i).setVisible(true);
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showGameElements = function() {
            var st = pBWOFExoticFarEastGameController.ExternalService.displayProvider.getDefaultStage();
            var $it0 = this.baseGameElementsVisibility.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                var visible = this.baseGameElementsVisibility.get(key);
                st.getChildByID(key).setVisible(visible);
                if (key == "TUTORIAL_VIEW") st.getChildByID(key).setVisible(false);
                haxe.Log.trace("[GAME_CONTROLLER] showBaseGameElements " + key, {
                    fileName: "GameController.hx",
                    lineNumber: 2989,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "showGameElements"
                });
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.hideGrandAndMajor = function() {
            var st = pBWOFExoticFarEastGameController.ExternalService.displayProvider.getDefaultStage();
            var _g1 = 0;
            var _g = st.getNumChildren();
            while (_g1 < _g) {
                var i = _g1++;
                var id = st.getChildAt(i).id;
                if (id == "grand") st.getChildAt(i).setVisible(false);
                if (id == "major") st.getChildAt(i).setVisible(false);
            }
        };
        pBWOFExoticFarEastGameController.GameController.prototype.showGrandAndMajor = function() {
            var st = pBWOFExoticFarEastGameController.ExternalService.displayProvider.getDefaultStage();
            var _g1 = 0;
            var _g = st.getNumChildren();
            while (_g1 < _g) {
                var i = _g1++;
                var id = st.getChildAt(i).id;
                if (id == "grand") st.getChildAt(i).setVisible(true);
                if (id == "major") st.getChildAt(i).setVisible(true);
            }
        };
        pBWOFExoticFarEastGameController.GameController.soundController = null;
        pBWOFExoticFarEastGameController.GameController.prototype.__class__ = pBWOFExoticFarEastGameController.GameController;
        pBWOFExoticFarEastGameController.GameControllerConfig = function() {};
        pBWOFExoticFarEastGameController.GameControllerConfig.__name__ = ["pBWOFExoticFarEastGameController", "GameControllerConfig"];
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.winlineInterval = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.playingLinesAtBetMessageDelay = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_winlineInterval = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_IntroScreenDuration = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_FirstSpinDelay = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_WinSpinDelay = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_NoWinSpinDelay = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_RetriggerScreenDuration = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_MaxRetriggerScreenDuration = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.fs_SummaryDuration = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.maxAwardSpinEnabledDelay = null;
        pBWOFExoticFarEastGameController.GameControllerConfig.prototype.__class__ = pBWOFExoticFarEastGameController.GameControllerConfig;
        pBWOFExoticFarEastGameController.GameModel = function() {
            this.isScatterShown = false;
            this.rgPresentation = false;
            this.reelsNum = 5;
            this.cellsNum = 4;
        };
        pBWOFExoticFarEastGameController.GameModel.__name__ = ["pBWOFExoticFarEastGameController", "GameModel"];
        pBWOFExoticFarEastGameController.GameModel.prototype.spinOutcome = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.outcome = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.abortSpinPayload = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.startSpinPayload = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.tensionReels = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.cellsNum = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.reelsNum = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.currentBPL = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.currentBPLMoney = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.denomination = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.stakeState = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.lastAccumulatedPayout = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.hasTension = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.fsSymbolOnFirstReel = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.bonusCoinOnFirstReel = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.coinOnReel = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.chestOnReel = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.bonusSymbolOnReel = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.currencyCode = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.progressiveMinTotalBet = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.isBonusSummary = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.totalBet = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.rgPresentation = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.isScatterShown = null;
        pBWOFExoticFarEastGameController.GameModel.prototype.setSpinOutcome = function(spinOutcome) {
            this.spinOutcome = spinOutcome;
            if (this.spinOutcome.stage == "BaseGame") this.setOutcome(this.spinOutcome.baseGame.outcome);
            else if (this.spinOutcome.stage == "FreeSpin") this.setOutcome(this.spinOutcome.freeSpin.outcome);
            else this.setOutcome(this.spinOutcome.baseGame.outcome);
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.setOutcome = function(outcome) {
            haxe.Log.trace("[GAME_CONTROLLER] setOutcome -> ", {
                fileName: "GameModel.hx",
                lineNumber: 70,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "setOutcome"
            });
            this.outcome = outcome;
            this.hasTension = false;
            this.fsSymbolOnFirstReel = false;
            this.bonusCoinOnFirstReel = false;
            this.coinOnReel = [false, false, false, false, false];
            this.bonusSymbolOnReel = [false, false, false, false, false];
            this.chestOnReel = [false, false, false, false, false];
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelsNum;
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push(0);
            }
            this.tensionReels = _g;
            if (outcome.reelStop != null) {
                var _g21 = 0;
                var _g11 = outcome.reelStop.reels.length;
                while (_g21 < _g11) {
                    var i1 = _g21++;
                    var _g4 = 0;
                    var _g3 = outcome.reelStop.reels[i1].length;
                    while (_g4 < _g3) {
                        var j = _g4++;
                        if (i1 == 0 && outcome.reelStop.reels[i1][j] == "r01" && j > 0 && j < 4) {
                            this.hasTension = true;
                            this.bonusCoinOnFirstReel = true;
                            this.tensionReels[this.reelsNum - 1] = 1;
                        }
                        if (outcome.reelStop.reels[i1][j] == "r02" && j > 0 && j < 4) this.coinOnReel[i1] = true;
                        if (outcome.reelStop.reels[i1][j] == "b01" && j > 0 && j < 4) this.chestOnReel[i1] = true;
                        if (i1 == 0 && outcome.reelStop.reels[i1][j] == "b02" && j > 0 && j < 4) {
                            this.fsSymbolOnFirstReel = true;
                            this.bonusSymbolOnReel[i1] = true;
                        }
                        if (i1 == 2 && outcome.reelStop.reels[i1][j] == "b02" && this.fsSymbolOnFirstReel && j > 0 && j < 4) {
                            this.hasTension = true;
                            this.tensionReels[this.reelsNum - 1] = 1;
                        }
                        if (i1 == 2 && outcome.reelStop.reels[i1][j] == "b02" && j > 0 && j < 4) this.bonusSymbolOnReel[i1] = true;
                        if (i1 == 4 && outcome.reelStop.reels[i1][j] == "b02" && j > 0 && j < 4) this.bonusSymbolOnReel[i1] = true;
                    }
                }
            }
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.setCurrentStake = function(stakeState) {
            this.stakeState = stakeState;
            this.totalBet = stakeState.totalBet;
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.setAbortSpinPayload = function(asp) {
            this.abortSpinPayload = asp;
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.setStartSpinPayload = function(ssp) {
            this.startSpinPayload = ssp;
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.repackOutcomeForWinController = function(outcome, freeSpin, freeSpinEnded) {
            if (freeSpinEnded == null) freeSpinEnded = false;
            var bonusWins = [];
            var payout;
            var scatterWin = outcome.scatterWins;
            if (freeSpin) payout = outcome.customField.freeSpinsCashLinkTotalPayout;
            else payout = outcome.customField.baseGameCashLinkTotalPayout;
            if (outcome.reelStopAdditional != null && payout > 0) {
                var _g1 = 0;
                var _g = this.spinOutcome.baseGame.outcome.reelStopAdditional.reels.length;
                while (_g1 < _g) {
                    var co = _g1++;
                    var _g3 = 1;
                    var _g2 = this.spinOutcome.baseGame.outcome.reelStopAdditional.reels[co].length - 1;
                    while (_g3 < _g2) {
                        var ro = _g3++;
                        if (this.spinOutcome.baseGame.outcome.reelStopAdditional.reels[co][ro] == "b01" || this.spinOutcome.baseGame.outcome.reelStopAdditional.reels[co][ro] == "b03") bonusWins.push(this.createBonusWinForWinController(outcome, co, ro, this.spinOutcome.baseGame.outcome.reelStopAdditional.reels[co][ro]));
                    }
                }
            }
            return new slotModelApi.Outcome(outcome.reelStop, outcome.reelStopAdditional, outcome.lineWins, scatterWin, bonusWins, outcome.pickerWins, outcome.totalPayout, outcome.bigWin, outcome.customField);
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.createBonusWinForWinController = function(outcome, co, ro, symbolId) {
            var winPath = this.createReelPictureInfo(co, ro);
            var position;
            return new slotModelApi.BonusWin("BonusWinLine", "", "", 0, "", 0, "", winPath, symbolId, null, 1);
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.createReelPictureInfo = function(co, ro) {
            var matrix = [];
            var _g = 0;
            while (_g < 5) {
                var i = _g++;
                matrix[i] = [];
                var _g1 = 0;
                while (_g1 < 5) {
                    var j = _g1++;
                    if (i == co && j == ro) matrix[i][j] = 1;
                    else matrix[i][j] = 0;
                }
            }
            return new slotModelApi.ReelPictureInfo(matrix);
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.hasChastAndHasCoin = function(reelPictureAditional, reelPicture) {
            var hasChest = false;
            var hasCoin = false;
            if (reelPictureAditional != null) {
                var _g1 = 0;
                var _g = reelPictureAditional.length;
                while (_g1 < _g) {
                    var co = _g1++;
                    var _g3 = 1;
                    var _g2 = reelPictureAditional[co].length - 1;
                    while (_g3 < _g2) {
                        var ro = _g3++;
                        if (reelPicture[co][ro] == "b01") hasChest = true;
                        if (reelPicture[co][ro] != reelPictureAditional[co][ro]) hasCoin = true;
                    }
                }
                if (hasChest && hasCoin) return true;
            }
            return false;
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.isHighWin = function() {
            if (this.spinOutcome != null) {
                var totalPayout = parseFloat(this.spinOutcome.baseGame.outcome.totalPayout);
                if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "BaseGame" && this.isBonusSummary) totalPayout = parseFloat(this.spinOutcome.acumulatedPayout);
                else if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "BaseGame" && !this.isBonusSummary) totalPayout = parseFloat(this.spinOutcome.freeSpin.outcome.totalPayout);
                else if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "FreeSpin") totalPayout = parseFloat(this.spinOutcome.freeSpin.outcome.totalPayout);
                else if (this.spinOutcome.stage == "WheelBonus" && this.spinOutcome.nextStage == "BaseGame") totalPayout = _hcmn_.Std.parseFloat(this.spinOutcome.baseGame.outcome.customField.gameTotalPayout);
                else if (this.spinOutcome.stage == "WheelBonus" && this.spinOutcome.nextStage == "FreeSpin") totalPayout = _hcmn_.Std.parseFloat(this.spinOutcome.freeSpin.outcome.customField.gameTotalPayout);
                var totalBetValue = parseFloat(this.totalBet);
                if (totalPayout > totalBetValue || totalPayout == 0 || this.isScatterShown) return true;
            }
            return false;
        };
        pBWOFExoticFarEastGameController.GameModel.prototype.__class__ = pBWOFExoticFarEastGameController.GameModel;
        pBWOFExoticFarEastGameController.StateMachineContext = function(dispatcher) {
            stateMachineEngine.SMContext.call(this, dispatcher);
        };
        pBWOFExoticFarEastGameController.StateMachineContext.__name__ = ["pBWOFExoticFarEastGameController", "StateMachineContext"];
        pBWOFExoticFarEastGameController.StateMachineContext.__super__ = stateMachineEngine.SMContext;
        for (var k in stateMachineEngine.SMContext.prototype) pBWOFExoticFarEastGameController.StateMachineContext.prototype[k] = stateMachineEngine.SMContext.prototype[k];
        pBWOFExoticFarEastGameController.StateMachineContext.prototype.setupContextData = function(game) {
            this.set_contextValues(new _hcmn_.haxe_ds_StringMap());
            var this1 = this.get_contextValues();
            this1.set("Stage", "");
            var this2 = this.get_contextValues();
            this2.set("retrigger", false);
            var this3 = this.get_contextValues();
            this3.set("NextStage", "");
            var this4 = this.get_contextValues();
            this4.set("awardCapExceeded", false);
            this.set_contextMethods(new _hcmn_.haxe_ds_StringMap());
            var this5 = this.get_contextMethods();
            this5.set("attachComponents", $bind(game, game.attachComponents));
            var this6 = this.get_contextMethods();
            this6.set("initGame", $bind(game, game.initGame));
            var this7 = this.get_contextMethods();
            this7.set("prepareResume", $bind(game, game.prepareResume));
            var this8 = this.get_contextMethods();
            this8.set("onBaseGameIdle", $bind(game, game.onBaseGameIdle));
            var this9 = this.get_contextMethods();
            this9.set("updateBetPanel", $bind(game, game.updateBetPanel));
            var this10 = this.get_contextMethods();
            this10.set("startSpin", $bind(game, game.startSpin));
            var this11 = this.get_contextMethods();
            this11.set("clearAllWins", $bind(game, game.clearAllWins));
            var this12 = this.get_contextMethods();
            this12.set("checkForStopOrAbort", $bind(game, game.checkForStopOrAbort));
            var this13 = this.get_contextMethods();
            this13.set("applyAbortData", $bind(game, game.applyAbortData));
            var this14 = this.get_contextMethods();
            this14.set("stopReels", $bind(game, game.stopReels));
            var this15 = this.get_contextMethods();
            this15.set("showBaseGameOutcome", $bind(game, game.showBaseGameOutcome));
            var this16 = this.get_contextMethods();
            this16.set("showAwardCapScreen", $bind(game, game.showAwardCapScreen));
            var this17 = this.get_contextMethods();
            this17.set("publishResultPresented", $bind(game, game.publishResultPresented));
            var this18 = this.get_contextMethods();
            this18.set("showScatterWins", $bind(game, game.showScatterWins));
            var this19 = this.get_contextMethods();
            this19.set("startFSIntroAnim", $bind(game, game.startFSIntroAnim));
            var this20 = this.get_contextMethods();
            this20.set("prepareFreeSpin", $bind(game, game.prepareFreeSpin));
            var this21 = this.get_contextMethods();
            this21.set("publishSpinOutcomePresented", $bind(game, game.publishSpinOutcomePresented));
            var this22 = this.get_contextMethods();
            this22.set("executeContinueCommand", $bind(game, game.executeContinueCommand));
            var this23 = this.get_contextMethods();
            this23.set("updateBetPanelFS", $bind(game, game.updateBetPanelFS));
            var this24 = this.get_contextMethods();
            this24.set("showFreeSpinOutcome", $bind(game, game.showFreeSpinOutcome));
            var this25 = this.get_contextMethods();
            this25.set("showRetriggerScreen", $bind(game, game.showRetriggerScreen));
            var this26 = this.get_contextMethods();
            this26.set("startFSOutroAnim", $bind(game, game.startFSOutroAnim));
            var this27 = this.get_contextMethods();
            this27.set("setBaseGameOutcome", $bind(game, game.setBaseGameOutcome));
            var this28 = this.get_contextMethods();
            this28.set("showFreeSpinSummary", $bind(game, game.showFreeSpinSummary));
            var this29 = this.get_contextMethods();
            this29.set("showWheel", $bind(game, game.showWheel));
            var this30 = this.get_contextMethods();
            this30.set("showCashLinkWins", $bind(game, game.showCashLinkWins));
            var this31 = this.get_contextMethods();
            this31.set("startWheelIntroAnim", $bind(game, game.startWheelIntroAnim));
            var this32 = this.get_contextMethods();
            this32.set("prepareWheel", $bind(game, game.prepareWheel));
            var this33 = this.get_contextMethods();
            this33.set("startWheelOutroAnim", $bind(game, game.startWheelOutroAnim));
            var this34 = this.get_contextMethods();
            this34.set("showWheelSummary", $bind(game, game.showWheelSummary));
            var this35 = this.get_contextMethods();
            this35.set("updateBetPanelWheel", $bind(game, game.updateBetPanelWheel));
            var this36 = this.get_contextMethods();
            this36.set("abortWheel", $bind(game, game.abortWheel));
        };
        pBWOFExoticFarEastGameController.StateMachineContext.prototype.__class__ = pBWOFExoticFarEastGameController.StateMachineContext;
        pBWOFExoticFarEastGameController.StateMachineDef = function() {};
        pBWOFExoticFarEastGameController.StateMachineDef.__name__ = ["pBWOFExoticFarEastGameController", "StateMachineDef"];
        pBWOFExoticFarEastGameController.StateMachineDef.prototype.__class__ = pBWOFExoticFarEastGameController.StateMachineDef;
        pBWOFExoticFarEastGameController.TransitionConstants = function() {};
        pBWOFExoticFarEastGameController.TransitionConstants.__name__ = ["pBWOFExoticFarEastGameController", "TransitionConstants"];
        pBWOFExoticFarEastGameController.TransitionConstants.prototype.__class__ = pBWOFExoticFarEastGameController.TransitionConstants;
        pBWOFExoticFarEastGameController.AditionalExplosionHelper = function(bonusAnim, chestAnim, animExplosion) {
            this.bonusAnim = bonusAnim;
            this.chestAnim = chestAnim;
            this.animExplosion = animExplosion;
        };
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.__name__ = ["pBWOFExoticFarEastGameController", "AditionalExplosionHelper"];
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.bonusAnim = null;
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.chestAnim = null;
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.animExplosion = null;
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.get_animExplosion = function() {
            return this.animExplosion;
        };
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.set_animExplosion = function(value) {
            return this.animExplosion = value;
        };
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.get_chestAnim = function() {
            return this.chestAnim;
        };
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.set_chestAnim = function(value) {
            return this.chestAnim = value;
        };
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.get_bonusAnim = function() {
            return this.bonusAnim;
        };
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.set_bonusAnim = function(value) {
            return this.bonusAnim = value;
        };
        pBWOFExoticFarEastGameController.AditionalExplosionHelper.prototype.__class__ = pBWOFExoticFarEastGameController.AditionalExplosionHelper;
        pBWOFExoticFarEastGameController.ChestBonusHelper = function(animFly, animExplosion) {
            this.animFly = animFly;
            this.animExplosion = animExplosion;
        };
        pBWOFExoticFarEastGameController.ChestBonusHelper.__name__ = ["pBWOFExoticFarEastGameController", "ChestBonusHelper"];
        pBWOFExoticFarEastGameController.ChestBonusHelper.prototype.animFly = null;
        pBWOFExoticFarEastGameController.ChestBonusHelper.prototype.animExplosion = null;
        pBWOFExoticFarEastGameController.ChestBonusHelper.prototype.get_animFly = function() {
            return this.animFly;
        };
        pBWOFExoticFarEastGameController.ChestBonusHelper.prototype.set_animFly = function(value) {
            return this.animFly = value;
        };
        pBWOFExoticFarEastGameController.ChestBonusHelper.prototype.get_animExplosion = function() {
            return this.animExplosion;
        };
        pBWOFExoticFarEastGameController.ChestBonusHelper.prototype.set_animExplosion = function(value) {
            return this.animExplosion = value;
        };
        pBWOFExoticFarEastGameController.ChestBonusHelper.prototype.__class__ = pBWOFExoticFarEastGameController.ChestBonusHelper;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin = function(service) {
            this.counter = 0;
            this.hasBonusAnimation = false;
            this.winAmount = 0;
            this.currentLogoState = "logo";
            this.logoState = "logo";
            this.cacheState = "cache";
            this.animated = 0;
            this.initialTweenData2 = new haxe.ds.ObjectMap();
            this.initialTweenData = new haxe.ds.ObjectMap();
            this.initedChestAnimations = [];
            this.initedStaticAnimations = [];
            this.initedFlyingAnimations2 = [];
            this.initedFlyingAnimations = [];
            this.initedExplosionAnimations = [];
            winControllerApi.WinControllerAbstractPlugin.call(this);
            this.service = service;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.__name__ = ["pBWOFExoticFarEastGameController", "ChestBonusWinsPlugin"];
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.__super__ = winControllerApi.WinControllerAbstractPlugin;
        for (var k in winControllerApi.WinControllerAbstractPlugin.prototype) pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype[k] = winControllerApi.WinControllerAbstractPlugin.prototype[k];
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.container = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.level1 = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.level2 = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.level3 = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.reelPicture = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.reelPictureAditional = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.loadedAssets = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.reelLayoutModel = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.service = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.initedExplosionAnimations = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.initedFlyingAnimations = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.initedFlyingAnimations2 = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.initedStaticAnimations = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.initedChestAnimations = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.initialTweenData = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.initialTweenData2 = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.animated = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.cellHeigh = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.reelsPort = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.visibilityArray = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.tweens = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.logoPort = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.soundController = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.cacheState = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.logoState = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.currentLogoState = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.winAmount = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.denomination = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.jackpotMeterPort = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.vba = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.view = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.hasBonusAnimation = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.labelsList = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.counter = null;
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.setReelPort = function(reelsPort) {
            this.reelsPort = reelsPort;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.setContainer = function(container) {
            this.container = container;
            this.level1 = pBWOFExoticFarEastGameController.ExternalService.displayProvider.getFactory().createDisplayObjectContainer();
            this.level2 = pBWOFExoticFarEastGameController.ExternalService.displayProvider.getFactory().createDisplayObjectContainer();
            this.level3 = pBWOFExoticFarEastGameController.ExternalService.displayProvider.getFactory().createDisplayObjectContainer();
            this.container.addChild(this.level1);
            this.container.addChild(this.level3);
            this.container.addChild(this.level2);
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.applyCoins = function(reelPictureAditional, reelPicture, denomination, reelId) {
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelLayoutModel.getNumberOfColumns();
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push((function($this) {
                    var $r;
                    var _g3 = []; {
                        var _g5 = 0;
                        var _g4 = $this.reelLayoutModel.getNumberOfRows() - 2;
                        while (_g5 < _g4) {
                            var j = _g5++;
                            _g3.push(0);
                        }
                    }
                    $r = _g3;
                    return $r;
                }(this)));
            }
            this.visibilityArray = _g;
            this.initedStaticAnimations = [];
            if (reelId == 0 || reelId == null) {
                this.level1.removeChildren();
                this.counter = 0;
            }
            var _g21 = 0;
            var _g11 = reelPictureAditional.length;
            while (_g21 < _g11) {
                var co = _g21++;
                var _g41 = 1;
                var _g31 = reelPictureAditional[co].length - 1;
                while (_g41 < _g31) {
                    var ro = _g41++;
                    if (reelPicture[co][ro] != reelPictureAditional[co][ro] && (co == reelId || reelId == null)) {
                        this.visibilityArray[co][ro - 1] = 1;
                        var v2d = this.reelLayoutModel.getCellPosition(ro, co);
                        var label;
                        if (this.labelsList.length > this.counter) label = this.labelsList[this.counter];
                        else {
                            var view = pBWOFExoticFarEastGameController.ExternalService.viewBuilderFactory.createView(this.vba);
                            label = view.getLabelById("cache_link_label");
                            this.labelsList.push(label);
                        }
                        this.counter++;
                        var value = parseFloat(reelPictureAditional[co][ro]) * denomination;
                        if (value >= 10) label.updateTo("cache_link_label_greater_win");
                        else label.updateTo("cache_link_label");
                        var labelBonus = this.view.getLabelById("cache_link_label_big");
                        var labelX = 24;
                        var labelY = 75;
                        if (reelPicture[co][ro] == "r01") {
                            label = labelBonus;
                            labelX = -5;
                            labelY = 17;
                        }
                        label.setText(pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(value == null ? "null" : "" + value));
                        this.level1.addChild(label.getDisplayObject());
                        label.getDisplayObject().setX(v2d.get_x() + labelX);
                        label.getDisplayObject().setY(v2d.get_y() + labelY);
                    }
                }
            }
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.createAnimations = function(reelPictureAditional, reelPicture, bonusCoinOnFirstReel) {
            this.initialTweenData = new haxe.ds.ObjectMap();
            this.initialTweenData2 = new haxe.ds.ObjectMap();
            this.initedFlyingAnimations = [];
            this.initedFlyingAnimations2 = [];
            this.initedStaticAnimations = [];
            this.initedChestAnimations = [];
            this.initedExplosionAnimations = [];
            this.winAmount = 0;
            this.tweens = [];
            this.animated = 0;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelLayoutModel.getNumberOfColumns();
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push((function($this) {
                    var $r;
                    var _g3 = []; {
                        var _g5 = 0;
                        var _g4 = $this.reelLayoutModel.getNumberOfRows() - 2;
                        while (_g5 < _g4) {
                            var j = _g5++;
                            _g3.push(0);
                        }
                    }
                    $r = _g3;
                    return $r;
                }(this)));
            }
            this.visibilityArray = _g;
            var bonusAnimationAditional = null;
            var chestAnimationAditional = null;
            var animExplosionBonus = null;
            var hlp2 = new pBWOFExoticFarEastGameController.AditionalExplosionHelper(bonusAnimationAditional, chestAnimationAditional, animExplosionBonus);
            var _g21 = 0;
            var _g11 = reelPictureAditional.length;
            while (_g21 < _g11) {
                var co = _g21++;
                var _g41 = 1;
                var _g31 = reelPictureAditional[co].length - 1;
                while (_g41 < _g31) {
                    var ro = _g41++;
                    if (reelPicture[co][ro] == "b01") {
                        var v2d = this.reelLayoutModel.getCellPosition(ro, co);
                        var chestAnimationHolder;
                        if (bonusCoinOnFirstReel) {
                            this.hasBonusAnimation = true;
                            var chestAnimationHolderAditional;
                            chestAnimationHolder = this.view.createContainerFromStoredConfig("b01");
                            chestAnimationHolderAditional = this.view.createContainerFromStoredConfig("b01");
                            chestAnimationAditional = chestAnimationHolderAditional.getVBAnimationById("ANIMATION_CONTENT");
                            chestAnimationAditional.play(false);
                            var xOffset1 = chestAnimationAditional.getDisplayObject().getX();
                            var yOffset1 = chestAnimationAditional.getDisplayObject().getY();
                            chestAnimationAditional.getDisplayObject().setX(v2d.get_x() + xOffset1);
                            chestAnimationAditional.getDisplayObject().setY(v2d.get_y() + yOffset1);
                            this.level3.addChild(chestAnimationAditional.getDisplayObject());
                            this.initedFlyingAnimations2.push(chestAnimationAditional);
                            hlp2.set_chestAnim(chestAnimationAditional);
                        } else chestAnimationHolder = this.view.createContainerFromStoredConfig("b03");
                        var vbAnimationComponent = chestAnimationHolder.getVBAnimationById("ANIMATION_CONTENT");
                        this.visibilityArray[co][ro - 1] = 1;
                        var xOffset = vbAnimationComponent.getDisplayObject().getX();
                        var yOffset = vbAnimationComponent.getDisplayObject().getY();
                        vbAnimationComponent.getDisplayObject().setX(v2d.get_x() + xOffset);
                        vbAnimationComponent.getDisplayObject().setY(v2d.get_y() + yOffset);
                        this.level1.addChild(vbAnimationComponent.getDisplayObject());
                        vbAnimationComponent.play(false);
                        this.initedChestAnimations.push(vbAnimationComponent);
                    }
                    if (reelPicture[co][ro] != reelPictureAditional[co][ro]) {
                        this.winAmount += parseFloat(reelPictureAditional[co][ro]);
                        this.visibilityArray[co][ro - 1] = 1;
                        var v2d1 = this.reelLayoutModel.getCellPosition(ro, co);
                        var animationHolderStatic;
                        var vbAnimationHolder;
                        var vbAnimationHolderAditional;
                        if (reelPicture[co][ro] == "r01") {
                            animationHolderStatic = this.view.createContainerFromStoredConfig("r01");
                            vbAnimationHolder = this.view.createContainerFromStoredConfig("r01");
                            vbAnimationHolderAditional = this.view.createContainerFromStoredConfig("r01");
                            bonusAnimationAditional = vbAnimationHolderAditional.getVBAnimationById("ANIMATION_CONTENT");
                            bonusAnimationAditional.play(false);
                            bonusAnimationAditional.getDisplayObject().setX(v2d1.get_x() + bonusAnimationAditional.getDisplayObject().getX());
                            bonusAnimationAditional.getDisplayObject().setY(v2d1.get_y() + bonusAnimationAditional.getDisplayObject().getY());
                            this.level3.addChild(bonusAnimationAditional.getDisplayObject());
                            this.initedFlyingAnimations2.push(bonusAnimationAditional);
                            hlp2.set_bonusAnim(bonusAnimationAditional);
                        } else {
                            animationHolderStatic = this.view.createContainerFromStoredConfig("r02");
                            vbAnimationHolder = this.view.createContainerFromStoredConfig("r02");
                        }
                        var vbAnimationComponent1 = vbAnimationHolder.getVBAnimationById("ANIMATION_CONTENT");
                        vbAnimationComponent1.play(false);
                        vbAnimationComponent1.getDisplayObject().setX(v2d1.get_x() + vbAnimationComponent1.getDisplayObject().getX());
                        vbAnimationComponent1.getDisplayObject().setY(v2d1.get_y() + vbAnimationComponent1.getDisplayObject().getY());
                        this.level2.addChild(vbAnimationComponent1.getDisplayObject());
                        this.initedFlyingAnimations.push(vbAnimationComponent1);
                        var vba22 = this.loadedAssets.get("coin_explosion");
                        var view22 = pBWOFExoticFarEastGameController.ExternalService.viewBuilderFactory.createView(vba22);
                        var vbAnimationHolder22 = view22.createContainerFromStoredConfig("coinExplosionBonus");
                        animExplosionBonus = vbAnimationHolder22.getVBAnimationById("ANIMATION_CONTENT_BONUS");
                        animExplosionBonus.gotoAndStop(false, "loop");
                        var animExplosionBonusContainer = animExplosionBonus.getDisplayObject();
                        this.level3.addChild(animExplosionBonusContainer);
                        hlp2.set_animExplosion(animExplosionBonus);
                        var vba2 = this.loadedAssets.get("coin_explosion");
                        var view2 = pBWOFExoticFarEastGameController.ExternalService.viewBuilderFactory.createView(vba2);
                        var vbAnimationHolder2 = view2.createContainerFromStoredConfig("coinExplosion");
                        var animExplosion = vbAnimationHolder2.getVBAnimationById("ANIMATION_CONTENT");
                        animExplosion.gotoAndStop(false, "loop");
                        animExplosion.getDisplayObject().setX(v2d1.get_x() + animExplosion.getDisplayObject().getX());
                        animExplosion.getDisplayObject().setY(v2d1.get_y() + animExplosion.getDisplayObject().getY());
                        var coinExplosionContainer = animExplosion.getDisplayObject();
                        this.level2.addChild(coinExplosionContainer);
                        this.initedExplosionAnimations.push(animExplosion);
                        var xAnim;
                        var yAnim;
                        if (co > 2) {
                            xAnim = v2d1.get_x() - 150;
                            yAnim = v2d1.get_y() + 150;
                        } else if (co == 2) {
                            xAnim = v2d1.get_x();
                            yAnim = v2d1.get_y() + 150;
                        } else {
                            xAnim = v2d1.get_x() + 150;
                            yAnim = v2d1.get_y() + 150;
                        }
                        var hlp = new pBWOFExoticFarEastGameController.ChestBonusHelper(vbAnimationComponent1, animExplosion);
                        this.initialTweenData.set(hlp, {
                            x: xAnim,
                            y: yAnim
                        });
                        var vbAnimationComponent2 = animationHolderStatic.getVBAnimationById("ANIMATION_CONTENT");
                        vbAnimationComponent2.play(false);
                        vbAnimationComponent2.getDisplayObject().setX(v2d1.get_x() + vbAnimationComponent2.getDisplayObject().getX());
                        vbAnimationComponent2.getDisplayObject().setY(v2d1.get_y() + vbAnimationComponent2.getDisplayObject().getY());
                        this.level1.addChild(vbAnimationComponent2.getDisplayObject());
                        var value = parseFloat(reelPictureAditional[co][ro]) * this.denomination;
                        var label;
                        var labelFly;
                        var labelFly2 = null;
                        if (reelPicture[co][ro] == "r01") {
                            label = vbAnimationComponent2.getLabelById("cache_link_label_anim_bonus");
                            labelFly = vbAnimationComponent1.getLabelById("cache_link_label_anim_bonus");
                            labelFly2 = bonusAnimationAditional.getLabelById("cache_link_label_anim_bonus");
                        } else {
                            label = vbAnimationComponent2.getLabelById("cache_link_label_anim");
                            labelFly = vbAnimationComponent1.getLabelById("cache_link_label_anim");
                            if (value >= 10) {
                                label.updateTo("cache_link_label_anim_greater_win");
                                labelFly.updateTo("cache_link_label_anim_greater_win");
                            }
                        }
                        label.setText(pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(value == null ? "null" : "" + value));
                        labelFly.setText(pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(value == null ? "null" : "" + value));
                        if (labelFly2 != null) labelFly2.setText(pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(value == null ? "null" : "" + value));
                        this.initedStaticAnimations.push(vbAnimationComponent2);
                    }
                }
            }
            var value1 = {
                x: this.reelLayoutModel.getCellPosition(2, 2).get_x(),
                y: this.reelLayoutModel.getCellPosition(2, 2).get_y()
            };
            this.initialTweenData2.set(hlp2, value1);
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.createAnimationsIdle = function(reelPictureAditional, reelPicture, denomination) {
            this.winAmount = 0;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelLayoutModel.getNumberOfColumns();
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push((function($this) {
                    var $r;
                    var _g3 = []; {
                        var _g5 = 0;
                        var _g4 = $this.reelLayoutModel.getNumberOfRows() - 2;
                        while (_g5 < _g4) {
                            var j = _g5++;
                            _g3.push(0);
                        }
                    }
                    $r = _g3;
                    return $r;
                }(this)));
            }
            this.visibilityArray = _g;
            var _g21 = 0;
            var _g11 = reelPictureAditional.length;
            while (_g21 < _g11) {
                var co = _g21++;
                var _g41 = 1;
                var _g31 = reelPictureAditional[co].length - 1;
                while (_g41 < _g31) {
                    var ro = _g41++;
                    if (reelPicture[co][ro] == "b01") {
                        var v2d = this.reelLayoutModel.getCellPosition(ro, co);
                        var chestAnimationHolder = this.view.createContainerFromStoredConfig("b03");
                        var vbAnimationComponent = chestAnimationHolder.getVBAnimationById("ANIMATION_CONTENT");
                        this.visibilityArray[co][ro - 1] = 1;
                        var xOffset = vbAnimationComponent.getDisplayObject().getX();
                        var yOffset = vbAnimationComponent.getDisplayObject().getY();
                        vbAnimationComponent.getDisplayObject().setX(v2d.get_x() + xOffset);
                        vbAnimationComponent.getDisplayObject().setY(v2d.get_y() + yOffset);
                        this.level1.addChild(vbAnimationComponent.getDisplayObject());
                        vbAnimationComponent.play(false);
                    }
                    if (reelPicture[co][ro] != reelPictureAditional[co][ro]) {
                        this.winAmount += parseFloat(reelPictureAditional[co][ro]);
                        this.visibilityArray[co][ro - 1] = 1;
                        var v2d1 = this.reelLayoutModel.getCellPosition(ro, co);
                        var animationHolderStatic;
                        if (reelPicture[co][ro] == "r01") animationHolderStatic = this.view.createContainerFromStoredConfig("r01");
                        else animationHolderStatic = this.view.createContainerFromStoredConfig("r02");
                        var vbAnimationComponent2 = animationHolderStatic.getVBAnimationById("ANIMATION_CONTENT");
                        vbAnimationComponent2.play(false);
                        vbAnimationComponent2.getDisplayObject().setX(v2d1.get_x() + vbAnimationComponent2.getDisplayObject().getX());
                        vbAnimationComponent2.getDisplayObject().setY(v2d1.get_y() + vbAnimationComponent2.getDisplayObject().getY());
                        this.level1.addChild(vbAnimationComponent2.getDisplayObject());
                        var value = parseFloat(reelPictureAditional[co][ro]) * denomination;
                        var label;
                        if (reelPicture[co][ro] == "r01") label = vbAnimationComponent2.getLabelById("cache_link_label_anim_bonus");
                        else label = vbAnimationComponent2.getLabelById("cache_link_label_anim");
                        if (value >= 10) {}
                        label.setText(pBWOFExoticFarEastGameController.ExternalService.moneyFormatter.format(value == null ? "null" : "" + value));
                    }
                }
            }
            this.reelsPort.setReelCellsVisibility().publish(this.visibilityArray);
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.showCacheLikn = function(reelPictureAditional, reelPicture, denomination, bonusCoinOnFirstReel, soundController) {
            var _g = this;
            this.denomination = denomination;
            this.soundController = soundController;
            this.createAnimations(reelPictureAditional, reelPicture, bonusCoinOnFirstReel);
            this.currentLogoState = this.cacheState;
            _hcmn_.haxe_Timer.delay(function() {
                soundController.logoFLip();
            }, 2100);
            this.jackpotMeterPort.hideMessages().publish(null);
            this.reelsPort.setReelCellsVisibility().publish(this.visibilityArray);
            return this.logoPort.gotoCacheLinkPosition().request(null, 0).then(function(data) {
                return Promise.race(_g.startTweens(_g.initialTweenData)).then(function(data1) {
                    return _g.logoPort.startCountup().request(new pbWofExoticFarEastLogoComponentApi.CacheLinkCountupPayload(_hcmn_.Std.string(_g.winAmount * denomination)), 0).then(function(data2) {
                        if (_g.hasBonusAnimation) {
                            _g.hasBonusAnimation = false;
                            return _g.showAditionalTweenColision(_g.initialTweenData2).then(function(anim) {
                                return _g.showExplosionBeforeWheel(anim).then(function(data3) {
                                    _g.clearTweens();
                                    _g.removeLayer3();
                                });
                            });
                        } else return Promise.resolve(null);
                    });
                });
            });
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.startSecondPartTweensFly = function(flyAnimation, index, hasBonusAnimation, resolve) {
            var _g = this;
            var xPosition = this.reelLayoutModel.getCellPosition(0, 2).get_x() + 50;
            var yPosition = this.reelLayoutModel.getCellPosition(0, 2).get_y() + 50;
            var time = 600 - index * 50;
            var tweener = displayEngineUtils.TweenX.to(flyAnimation.getDisplayObject(), {
                x: xPosition,
                y: yPosition,
                scaleX: 0.5,
                scaleY: 0.5
            }, time, displayEngineUtils.EaseX.linear, null, null, null, null, null, null, {
                fileName: "ChestBonusWinsPlugin.hx",
                lineNumber: 477,
                className: "components.gamecontroller.imp.controllers.ChestBonusWinsPlugin",
                methodName: "startSecondPartTweensFly"
            });
            tweener.onFinish(function() {
                _g.onFinishTweenFly(flyAnimation, hasBonusAnimation, resolve, index);
            });
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.onFinishTweenFly = function(flyAnimation, hasBonusAnimation, resolve, index) {
            var _g = this;
            if (flyAnimation != null) flyAnimation.getDisplayObject().setAlpha(0);
            if (index == 0) {
                this.soundController.flCreditMeterUp();
                _hcmn_.haxe_Timer.delay(function() {
                    _g.soundController.flCreditTerm();
                }, 2300);
            }
            if (index == this.initedFlyingAnimations.length - 1) {}
            resolve(null);
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.clearTweens = function() {
            var _g = 0;
            var _g1 = this.tweens;
            while (_g < _g1.length) {
                var tween = _g1[_g];
                ++_g;
                tween.stop();
                var totalTime = tween.get_totalTime();
                tween["goto"](totalTime, false);
                tween.onHead($bind(tween, tween.stop));
                tween = null;
            }
            this.tweens = null;
            this.tweens = [];
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.removeLayer3 = function() {
            this.level3.removeChildren();
            var _g = 0;
            var _g1 = this.initedFlyingAnimations2;
            while (_g < _g1.length) {
                var ani = _g1[_g];
                ++_g;
                ani.dispose();
            }
            this.initedFlyingAnimations2 = [];
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.removeLayer2 = function() {
            this.level2.removeChildren();
            var _g = 0;
            var _g1 = this.initedFlyingAnimations;
            while (_g < _g1.length) {
                var ani = _g1[_g];
                ++_g;
                ani.dispose();
            }
            this.initedFlyingAnimations = [];
            var _g2 = 0;
            var _g11 = this.initedExplosionAnimations;
            while (_g2 < _g11.length) {
                var anis = _g11[_g2];
                ++_g2;
                anis.dispose();
            }
            this.initedExplosionAnimations = [];
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.setReelLayoutModel = function(reelLayoutModel) {
            this.reelLayoutModel = reelLayoutModel;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.setLoadedAssets = function(loadedAssets) {
            this.loadedAssets = loadedAssets;
            this.vba = this.loadedAssets.get("WIN_SYMBOLS_MERGED_VB_01");
            this.view = pBWOFExoticFarEastGameController.ExternalService.viewBuilderFactory.createView(this.vba);
            this.labelsList = [];
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.reset = function() {
            if (this.level1 == null) return;
            this.level1.removeChildren();
            this.level2.removeChildren();
            this.level3.removeChildren();
            var _g = 0;
            var _g1 = this.initedChestAnimations;
            while (_g < _g1.length) {
                var chest = _g1[_g];
                ++_g;
                chest.dispose();
            }
            var _g2 = 0;
            var _g11 = this.initedFlyingAnimations;
            while (_g2 < _g11.length) {
                var ani = _g11[_g2];
                ++_g2;
                ani.dispose();
            }
            var _g3 = 0;
            var _g12 = this.initedFlyingAnimations2;
            while (_g3 < _g12.length) {
                var ani1 = _g12[_g3];
                ++_g3;
                ani1.dispose();
            }
            var _g4 = 0;
            var _g13 = this.initedStaticAnimations;
            while (_g4 < _g13.length) {
                var anis = _g13[_g4];
                ++_g4;
                anis.dispose();
            }
            var _g5 = 0;
            var _g14 = this.initedExplosionAnimations;
            while (_g5 < _g14.length) {
                var anis1 = _g14[_g5];
                ++_g5;
                anis1.dispose();
            }
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.setLogoPort = function(logoPort) {
            this.logoPort = logoPort;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.setJackpotMeterPort = function(jackpotMeterPort) {
            this.jackpotMeterPort = jackpotMeterPort;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.returnLogo = function() {
            if (this.currentLogoState == this.logoState) return;
            this.logoPort.gotoLogoPosition().request(null, 0);
            this.currentLogoState = this.logoState;
            this.soundController.logoFLip();
            this.jackpotMeterPort.showMessages().publish(null);
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.showExplosionBeforeWheel = function(explosionAnim) {
            var _g = this;
            var p = new Promise(function(resolve1, reject) {
                explosionAnim.play(false);
                explosionAnim.addEventListener("animationBonusComplete", _g.endExplosionBeforeWheel(explosionAnim, resolve1));
            });
            return p;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.endExplosionBeforeWheel = function(explosionAnim, resolve1) {
            return function() {
                resolve1(null);
                explosionAnim.stop();
                explosionAnim.removeEventListener("animationBonusComplete");
            };
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.stopChestAnimation = function() {
            var _g = 0;
            var _g1 = this.initedStaticAnimations;
            while (_g < _g1.length) {
                var anis = _g1[_g];
                ++_g;
                anis.gotoAndStop(false, "loop");
            }
            var _g2 = 0;
            var _g11 = this.initedChestAnimations;
            while (_g2 < _g11.length) {
                var chest = _g11[_g2];
                ++_g2;
                chest.gotoAndStop(false, "loop");
            }
            var _g3 = 0;
            var _g12 = this.initedFlyingAnimations2;
            while (_g3 < _g12.length) {
                var chestspin = _g12[_g3];
                ++_g3;
                chestspin.gotoAndStop(false, "loop");
            }
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.showAditionalTweenColision = function(initialTweenData2) {
            var _g = this;
            var p = new Promise(function(resolve2, reject) {
                var $it0 = initialTweenData2.keys();
                while ($it0.hasNext()) {
                    var element = $it0.next();
                    var time = 500;
                    var pos = initialTweenData2.h[element.__id__];
                    var explosionAnim = [element.get_animExplosion()];
                    var bonusAnimation = [element.get_bonusAnim()];
                    var chestAnimation = [element.get_chestAnim()];
                    var tweener = displayEngineUtils.TweenX.parallel([displayEngineUtils.TweenX.to(bonusAnimation[0].getDisplayObject(), {
                        x: pos.x,
                        y: pos.y,
                        scaleX: 1,
                        scaleY: 1
                    }, time, displayEngineUtils.EaseX.cubicIn, null, null, null, null, null, null, {
                        fileName: "ChestBonusWinsPlugin.hx",
                        lineNumber: 666,
                        className: "components.gamecontroller.imp.controllers.ChestBonusWinsPlugin",
                        methodName: "showAditionalTweenColision"
                    }), displayEngineUtils.TweenX.to(chestAnimation[0].getDisplayObject(), {
                        x: pos.x,
                        y: pos.y,
                        scaleX: 1,
                        scaleY: 1
                    }, time, displayEngineUtils.EaseX.cubicIn, null, null, null, null, null, null, {
                        fileName: "ChestBonusWinsPlugin.hx",
                        lineNumber: 667,
                        className: "components.gamecontroller.imp.controllers.ChestBonusWinsPlugin",
                        methodName: "showAditionalTweenColision"
                    })], null, {
                        fileName: "ChestBonusWinsPlugin.hx",
                        lineNumber: 665,
                        className: "components.gamecontroller.imp.controllers.ChestBonusWinsPlugin",
                        methodName: "showAditionalTweenColision"
                    });
                    tweener.stop();
                    tweener.onFinish((function(chestAnimation, bonusAnimation, explosionAnim) {
                        return function() {
                            bonusAnimation[0].getDisplayObject().setAlpha(0);
                            chestAnimation[0].getDisplayObject().setAlpha(0);
                            resolve2(explosionAnim[0]);
                        };
                    })(chestAnimation, bonusAnimation, explosionAnim));
                    _g.tweens.push(tweener);
                }
            });
            return p;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.startTweens = function(initialTweenData) {
            var _g = this;
            var index = 0;
            var outArray = [];
            var $it0 = initialTweenData.keys();
            while ($it0.hasNext()) {
                var element = $it0.next();
                var element1 = [element];
                var p = new Promise((function(element1) {
                    return function(resolve, reject) {
                        var pos = initialTweenData.h[element1[0].__id__];
                        var flyAnimation = element1[0].get_animFly();
                        var explosionAnim = element1[0].get_animExplosion();
                        _hcmn_.haxe_Timer.delay((function() {
                            return function() {
                                _g.soundController.coinExplosion();
                                explosionAnim.play(false);
                            };
                        })(), index * 200);
                        explosionAnim.addEventListener("animationExplosionComplete", _g.startTweensFly(index, pos, explosionAnim, flyAnimation, resolve));
                    };
                })(element1));
                index++;
                outArray.push(p);
            }
            return outArray;
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.startTweensFly = function(index, pos, explosionAnim, flyAnimation, resolve) {
            var _g = this;
            return function() {
                var tweener = displayEngineUtils.TweenX.to(flyAnimation.getDisplayObject(), {
                    x: pos.x,
                    y: pos.y,
                    scaleX: 1.2,
                    scaleY: 1.2
                }, 600, null, null, null, null, null, null, null, {
                    fileName: "ChestBonusWinsPlugin.hx",
                    lineNumber: 719,
                    className: "components.gamecontroller.imp.controllers.ChestBonusWinsPlugin",
                    methodName: "startTweensFly"
                });
                _g.soundController.coinsFlyToMeter();
                tweener.stop();
                tweener.onFinish(function() {
                    _g.startSecondPartTweensFly(flyAnimation, index, _g.hasBonusAnimation, resolve);
                });
                _g.tweens.push(tweener);
                explosionAnim.stop();
                explosionAnim.removeEventListener("animationExplosionComplete");
            };
        };
        pBWOFExoticFarEastGameController.ChestBonusWinsPlugin.prototype.__class__ = pBWOFExoticFarEastGameController.ChestBonusWinsPlugin;
        pBWOFExoticFarEastGameController.SkipController = function(betPanelPort) {
            this.betPanelPort = betPanelPort;
            betPanelPort.onButtonPressed().subscribe($bind(this, this.onButtonPressed));
        };
        pBWOFExoticFarEastGameController.SkipController.__name__ = ["pBWOFExoticFarEastGameController", "SkipController"];
        pBWOFExoticFarEastGameController.SkipController.prototype.betPanelPort = null;
        pBWOFExoticFarEastGameController.SkipController.prototype.resolveFn = null;
        pBWOFExoticFarEastGameController.SkipController.prototype.onButtonPressed = function(e) {
            if (e.getPayload() == betPanelApi.EButton.SKIP) {
                if (this.resolveFn != null) {
                    this.resolveFn(null);
                    this.resolveFn = null;
                }
            }
        };
        pBWOFExoticFarEastGameController.SkipController.prototype.show = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFn = resolve;
                _g.betPanelPort.showButton().publish(betPanelApi.EButton.SKIP);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.SKIP);
            });
            return p;
        };
        pBWOFExoticFarEastGameController.SkipController.prototype.hide = function() {
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
        };
        pBWOFExoticFarEastGameController.SkipController.prototype.__class__ = pBWOFExoticFarEastGameController.SkipController;
        pBWOFExoticFarEastGameController.SoundController = function(soundPort) {
            this.isItResume = false;
            this.inactivitiON = false;
            this.winSixDeley = 0;
            this.pushCounter = 0;
            this.mainVolume = 1.0;
            this.afterWinSoundStartDalay = 1100;
            this.bgMusicStopDalayTime = 15000;
            this.bgVolumeIsDown = false;
            this.logoFlip = false;
            this.isCoinsSoundPlaying = false;
            this.bgMusicIsPlaying = false;
            this.inTension = false;
            this.soundON = true;
            this.winJingleEnd = "";
            this.winJingle = "";
            this.PICKER_LOOP = "BonusLoop";
            this.BG_MUSIC = "BaseGameLoop";
            this.BUTTON_PUSH = "Click";
            this.FREESPINS_WIN_SOUND_1 = "BaseGameRollupLoop";
            this.FREESPINS_LOOP = "FreeSpinLoop";
            this.BASEGAME_WIN_SOUND_4 = "BigWinLoop";
            this.WIN_SIX_END = "BigWinLoopTerm";
            this.WIN_JINGLE_END = "BaseGameRollupTerm";
            this.BASEGAME_WIN_SOUND_2 = "BigWinRollup";
            this.BASEGAME_WIN_SOUND_1 = "BaseGameRollupLoop";
            this.WIN_SOUND_1 = "BaseGameRollupTerm";
            this.BONUS_SYMBOL = ["FreeGamesSmart01", "", "FreeGamesSmart02", "", "FreeGamesTrigger"];
            this.REEL_STOP = "ReelStop";
            haxe.Log.trace("[SOUND_CONTROLLER] init", {
                fileName: "SoundController.hx",
                lineNumber: 56,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "new"
            });
            this.soundPort = soundPort;
            soundPort.muteAll().publish(null);
            soundPort.unmuteAll().publish(null);
        };
        pBWOFExoticFarEastGameController.SoundController.__name__ = ["pBWOFExoticFarEastGameController", "SoundController"];
        pBWOFExoticFarEastGameController.SoundController.prototype.REEL_STOP = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.BONUS_SYMBOL = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.WIN_SOUND_1 = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.BASEGAME_WIN_SOUND_1 = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.BASEGAME_WIN_SOUND_2 = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.WIN_JINGLE_END = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.WIN_SIX_END = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.BASEGAME_WIN_SOUND_4 = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.FREESPINS_LOOP = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.FREESPINS_WIN_SOUND_1 = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.BUTTON_PUSH = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.BG_MUSIC = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.PICKER_LOOP = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.winJingle = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.winJingleEnd = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.soundON = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.inTension = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.bgMusicIsPlaying = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.isCoinsSoundPlaying = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.logoFlip = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.bgVolumeIsDown = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.freegameOn = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.isWinPlaying = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.bgMusicStopDalayTime = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.afterWinSoundStartDalay = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.mainVolume = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.pushCounter = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.winSixDeley = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.inactivitiON = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.stopBackgroundMusic = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.finisherFS = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.finisherBG = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.beepLoopInterval = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.isItResume = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.soundPort = null;
        pBWOFExoticFarEastGameController.SoundController.prototype.setGameMode = function(freegame, afterPicker, resumeGame, pickerOn, afterFSbasegameOn) {
            if (afterFSbasegameOn == null) afterFSbasegameOn = false;
            if (pickerOn == null) pickerOn = false;
            if (resumeGame == null) resumeGame = false;
            if (afterPicker == null) afterPicker = false;
            var _g = this;
            haxe.Log.trace("setGameMode", {
                fileName: "SoundController.hx",
                lineNumber: 66,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "setGameMode",
                customParams: [resumeGame]
            });
            this.isItResume = resumeGame;
            if (!resumeGame) {
                if (pickerOn) {
                    if (this.bgMusicIsPlaying) {
                        this.stopSound(this.BG_MUSIC);
                        this.bgMusicIsPlaying = false;
                    }
                    this.playSound(this.PICKER_LOOP);
                    this.playSound("WOFCheering");
                }
                if (freegame) {
                    this.freegameOn = true;
                    this.fadeOut(this.BG_MUSIC, 1);
                    _hcmn_.haxe_Timer.delay(function() {
                        _g.inFreeGame();
                    }, 300);
                }
                if (afterFSbasegameOn) {
                    this.playSound("FreeSpinTerm");
                    this.freegameOn = false;
                    if (this.soundON) this.fadeOut(this.FREESPINS_LOOP, 150);
                    else this.stopSound(this.FREESPINS_LOOP);
                    this.checkBackgroundMusic();
                }
                if (afterPicker) {
                    this.playSound("BonusMusicTerm");
                    this.playSound("WheelBonusOutroTerm");
                    pickerOn = false;
                    if (this.soundON) this.fadeOut(this.PICKER_LOOP, 150);
                    else this.stopSound(this.PICKER_LOOP);
                    this.checkBackgroundMusic();
                }
            }
            if (resumeGame) {
                if (freegame) {
                    this.stopSound(this.BG_MUSIC);
                    this.freegameOn = true;
                    this.resumeInFreeGameLoop();
                }
                if (pickerOn) {
                    this.playSound(this.PICKER_LOOP);
                    if (!this.isItOS()) this.playSound("WOFCheering");
                }
            }
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.onReelStopped = function() {
            this.playSound(this.REEL_STOP);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.isItOS = function() {
            var iDevices = ["iPad", "iPhone", "iPod"];
            if (window.navigator.platform != null)
                while (iDevices.length > 0)
                    if (window.navigator.platform == iDevices.pop()) return true;
            return false;
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.playWinSound = function(winType, isFreeGame, includeCoinsSound, isHighWin) {
            if (isHighWin == null) isHighWin = true;
            if (includeCoinsSound == null) includeCoinsSound = false;
            if (isFreeGame == null) isFreeGame = false;
            var _g = this;
            this.isWinPlaying = true;
            if (isFreeGame) this.winJingle = this.FREESPINS_WIN_SOUND_1;
            else this.winJingle = this.BASEGAME_WIN_SOUND_1;
            this.winJingleEnd = this.WIN_JINGLE_END;
            if (winType == 6) this.bgVolumeDown(isFreeGame ? this.FREESPINS_LOOP : this.BG_MUSIC);
            this.clearBackgroundMusicStopTimeOut();
            switch (winType) {
                case 0:
                    return;
                case 1:
                    haxe.Log.trace("[SOUND_CONTROLLER] winCase 1", {
                        fileName: "SoundController.hx",
                        lineNumber: 154,
                        className: "components.gamecontroller.imp.controllers.SoundController",
                        methodName: "playWinSound"
                    });
                    if (!isHighWin) this.click();
                    else {
                        this.winJingle = this.WIN_SOUND_1;
                        this.playSound(this.winJingle);
                        this.isWinPlaying = false;
                        window.setTimeout(function() {
                            _g.startBackgroundMusicStopTimeOut();
                        }, this.afterWinSoundStartDalay);
                    }
                    break;
                case 2:
                    haxe.Log.trace("[SOUND_CONTROLLER] winCase 2", {
                        fileName: "SoundController.hx",
                        lineNumber: 167,
                        className: "components.gamecontroller.imp.controllers.SoundController",
                        methodName: "playWinSound"
                    });
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(1900);
                    break;
                case 3:
                    haxe.Log.trace("[SOUND_CONTROLLER] winCase 3", {
                        fileName: "SoundController.hx",
                        lineNumber: 171,
                        className: "components.gamecontroller.imp.controllers.SoundController",
                        methodName: "playWinSound"
                    });
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(3900);
                    break;
                case 4:
                    haxe.Log.trace("[SOUND_CONTROLLER] winCase 4", {
                        fileName: "SoundController.hx",
                        lineNumber: 175,
                        className: "components.gamecontroller.imp.controllers.SoundController",
                        methodName: "playWinSound"
                    });
                    this.winJingle = this.BASEGAME_WIN_SOUND_2;
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(3900);
                    break;
                case 5:
                    haxe.Log.trace("[SOUND_CONTROLLER] winCase 5", {
                        fileName: "SoundController.hx",
                        lineNumber: 180,
                        className: "components.gamecontroller.imp.controllers.SoundController",
                        methodName: "playWinSound"
                    });
                    this.winJingle = this.BASEGAME_WIN_SOUND_2;
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(9900);
                    break;
                case 6:
                    haxe.Log.trace("[SOUND_CONTROLLER] winCase 6", {
                        fileName: "SoundController.hx",
                        lineNumber: 185,
                        className: "components.gamecontroller.imp.controllers.SoundController",
                        methodName: "playWinSound"
                    });
                    this.winJingle = this.BASEGAME_WIN_SOUND_4;
                    this.playSound(this.winJingle);
                    this.winJingleEnd = this.WIN_SIX_END;
                    this.playSound("BigWinCheering");
                    this.winSixDeley = 2000;
                    window.setTimeout(function() {
                        haxe.Log.trace("[SOUND_CONTROLLER] medium win", {
                            fileName: "SoundController.hx",
                            lineNumber: 196,
                            className: "components.gamecontroller.imp.controllers.SoundController",
                            methodName: "playWinSound"
                        });
                        window.setTimeout(function() {
                            if (_g.isWinPlaying) _g.playCoin(includeCoinsSound);
                        }, 2000);
                        _g.winCaseSoundBehavior(6500, 5277);
                    }, this.winSixDeley);
                    break;
            }
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.playCoin = function(includeCoinsSound) {
            if (includeCoinsSound) {
                this.playSound("Coins");
                this.isCoinsSoundPlaying = true;
            }
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.onlyBaseGameWinCaseSoundBehavior = function(CurrentBaseGameWinSound) {
            var _g = this;
            if (!this.freegameOn) window.setTimeout(function() {
                _g.stopSound(_g.winJingle);
                _g.winJingle = CurrentBaseGameWinSound;
                if (_g.isWinPlaying) _g.playSound(_g.winJingle);
            }, 4300);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.winCaseSoundBehavior = function(ifIsFreeGameDelay, ifIsBaseGameDalay) {
            var _g = this;
            if (ifIsBaseGameDalay == null) ifIsBaseGameDalay = ifIsFreeGameDelay;
            if (this.freegameOn && this.isWinPlaying) this.finisherFS = window.setTimeout(function() {
                _g.winFinish();
            }, ifIsFreeGameDelay);
            if (!this.freegameOn && this.isWinPlaying) this.finisherBG = window.setTimeout(function() {
                _g.winFinish();
            }, ifIsBaseGameDalay);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.winFinish = function() {
            haxe.Log.trace("[SOUND_CONTROOLER] winFinish", {
                fileName: "SoundController.hx",
                lineNumber: 232,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "winFinish"
            });
            this.stopSound(this.winJingle);
            this.stopSound("BigWinCheering");
            this.winJingle = "";
            this.playWinJingleEndWithDelay();
            this.afterWinBackgroundSoundBehavior();
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.playWinJingleEndWithDelay = function() {
            var _g = this;
            window.setTimeout(function() {
                if (_g.isWinPlaying) {
                    _g.playSound(_g.winJingleEnd);
                    if (_g.isCoinsSoundPlaying) {
                        _g.stopSound("Coins");
                        _g.isCoinsSoundPlaying = false;
                    }
                    _g.isWinPlaying = false;
                }
                _g.clearFinisher();
            }, 0);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.afterWinBackgroundSoundBehavior = function() {
            var _g = this;
            window.setTimeout(function() {
                _g.bgVolumeUp(_g.freegameOn ? _g.FREESPINS_LOOP : _g.BG_MUSIC);
                _g.startBackgroundMusicStopTimeOut();
            }, this.afterWinSoundStartDalay);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.clearBackgroundMusicStopTimeOut = function() {
            window.clearTimeout(this.stopBackgroundMusic);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.clearFinisher = function() {
            window.clearTimeout(this.finisherBG);
            window.clearTimeout(this.finisherFS);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.startBackgroundMusicStopTimeOut = function() {
            var _g = this;
            this.clearBackgroundMusicStopTimeOut();
            this.stopBackgroundMusic = window.setTimeout(function() {
                if (_g.bgMusicIsPlaying) {
                    if (_g.soundON) {
                        _g.fadeOut(_g.BG_MUSIC, 2000);
                        _g.bgMusicIsPlaying = false;
                    } else _g.stopSound(_g.BG_MUSIC);
                    _g.bgMusicIsPlaying = false;
                }
                _g.clearBackgroundMusicStopTimeOut();
            }, this.bgMusicStopDalayTime);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.turnSoundOn = function() {
            this.soundPort.unmuteAll().publish(null);
            this.soundON = true;
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.turnSoundOff = function() {
            this.soundPort.muteAll().publish(null);
            this.soundON = false;
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.onStartSpin = function() {
            this.inactivitiON = true;
            this.checkBackgroundMusic();
            this.clearBackgroundMusicStopTimeOut();
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.playSound = function(sound) {
            this.soundPort.play().publish(sound);
            haxe.Log.trace("[SOUND_CONTROLLER] playSound()", {
                fileName: "SoundController.hx",
                lineNumber: 322,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "playSound",
                customParams: [sound]
            });
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.playSoundButtonPush = function() {
            if (this.pushCounter == 1) this.playSound(this.BUTTON_PUSH);
            else this.pushCounter = 1;
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.muteSound = function(sound) {
            this.soundPort.mute().publish(sound);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.stopSound = function(sound) {
            this.soundPort.stop().publish(sound);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.playTensionSound = function() {
            this.playSound("Reel5Anticipation");
            this.clearBackgroundMusicStopTimeOut();
            this.inTension = true;
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.stopTensionSound = function() {
            this.stopSound("Reel5Anticipation");
            this.inTension = false;
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.bgVolumeDown = function(sound) {
            if (!this.bgVolumeIsDown) {
                this.setVolume(sound, 0.4, 100);
                this.setVolume(sound, 0.3, 200);
                this.setVolume(sound, 0.1, 250);
                this.bgVolumeIsDown = true;
            }
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.bgVolumeUp = function(sound) {
            if (this.bgVolumeIsDown) {
                this.setVolume(sound, 0.2, 100);
                this.setVolume(sound, 0.3, 200);
                this.setVolume(sound, this.mainVolume, 250);
                this.bgVolumeIsDown = false;
            }
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.setVolume = function(sound, volume, time) {
            var _g = this;
            window.setTimeout(function() {
                _g.soundPort.volume().publish(new soundManagerApi.SoundVolumeData(sound, volume));
            }, time);
            haxe.Log.trace("[SOUND_CONTROLLER] set volume  ", {
                fileName: "SoundController.hx",
                lineNumber: 377,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "setVolume",
                customParams: [sound, " ", volume]
            });
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.checkBackgroundMusic = function() {
            haxe.Log.trace("[SOUND_CONTROLLER] checkBackgroundMusic()", {
                fileName: "SoundController.hx",
                lineNumber: 382,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "checkBackgroundMusic",
                customParams: [this.bgMusicIsPlaying]
            });
            if (!this.bgMusicIsPlaying && !this.freegameOn) {
                this.playSound(this.BG_MUSIC);
                this.bgMusicIsPlaying = true;
                if (this.inactivitiON) this.startBackgroundMusicStopTimeOut();
            }
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.freeGameLoop = function() {
            if (this.soundON) this.fadeIn(this.FREESPINS_LOOP, 500);
            else this.playSound(this.FREESPINS_LOOP);
            this.playSound("FreeGamesWin");
            this.playSound("YouHaveFS2");
            this.bgMusicIsPlaying = false;
            this.setVolume(this.FREESPINS_LOOP, this.mainVolume, 0);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.inFreeGame = function() {
            if (this.freegameOn) this.freeGameLoop();
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.resumeInFreeGameLoop = function() {
            if (this.soundON) this.fadeIn(this.FREESPINS_LOOP, 500);
            else this.playSound(this.FREESPINS_LOOP);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.betPanleStakeChanged = function(currentBPL, maxValue, previousBPL) {
            if (currentBPL == maxValue) {
                this.playSound("MaxBet");
                return;
            }
            if (currentBPL > previousBPL) this.playSound("BetUp");
            if (currentBPL < previousBPL) this.playSound("BetDown");
            if (currentBPL == previousBPL) this.playSound("Click");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.autoSpin = function(isOn) {
            if (isOn == null) isOn = false;
            if (isOn) this.playSound("Autoplay");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.fadeIn = function(soundId, length) {
            this.soundPort.fadeIn().publish(new soundManagerApi.SoundActionProperties(soundId, length));
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.fadeOut = function(soundId, length) {
            this.soundPort.fadeOut().publish(new soundManagerApi.SoundActionProperties(soundId, length));
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.logoFLip = function() {
            this.playSound("LogoFlip");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.coinsOnReel = function(id) {
            this.playSound("CoinSmart");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.chestOnReel = function(id, bg, fs) {
            if (this.freegameOn && fs > 0) this.playSound("ChestLand");
            if (!this.freegameOn && bg > 0) this.playSound("ChestLand");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.coinExplosion = function() {
            this.playSound("CoinBurst");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.coinsFlyToMeter = function() {
            this.playSound("CoinsFlyToMeter");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.flCreditMeterUp = function() {
            this.playSound("FLCreditMeterUp");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.flCreditTerm = function() {
            this.stopSound("FLCreditMeterUp");
            this.playSound("FLCreditMeterUpTerm");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.bonusCoin = function() {
            this.playSound("CLSmart");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.vana = function() {
            this.playSound("Applause");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.wheelSpining = function() {
            var _g = this;
            this.playSound("WheelSpinLoop");
            this.stopSound("BeepLoop");
            this.stopSound("SpinWheel");
            this.setVolume(this.PICKER_LOOP, 0.1, 100);
            _hcmn_.haxe_Timer.delay(function() {
                _g.playSound("AfterButtonPress03");
            }, 4000);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.stopWheelSpining = function() {
            var _g = this;
            this.stopSound("WheelSpinLoop");
            this.playSound("WheelStop");
            _hcmn_.haxe_Timer.delay(function() {
                _g.setVolume(_g.PICKER_LOOP, 1.0, 100);
            }, 1000);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.bplPopup = function(bpl) {
            this.playSound("JT" + bpl + "PointersAwarded");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.reelShake = function() {
            var _g = this;
            this.playSound("ReelShake");
            _hcmn_.haxe_Timer.delay(function() {
                _g.stopSound("ReelShake");
            }, 1800);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.click = function() {
            this.playSound("Click");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.wheelLands = function() {
            if (this.isItOS()) {
                if (!this.isItResume) {
                    this.playSound("WheelLandsMusic");
                    this.playSound("BeepLoop");
                    this.playSound("SpinWheel");
                }
            } else if (!this.isItResume) {
                this.playSound("WheelLandsMusic");
                this.playSound("BeepLoop");
                this.playSound("SpinWheel");
            }
            this.setVolume(this.PICKER_LOOP, 0.3, 100);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.wheelOutroAnim = function(wheelWinType) {
            if (wheelWinType <= 4) this.playSound("Excellent");
            if (wheelWinType == 5) this.playSound("Spectacular");
            if (wheelWinType == 6) this.playSound("Tremendous");
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.bonusOnReel = function(id, array) {
            if (id == 0) this.playSound(this.BONUS_SYMBOL[0]);
            if (id == 2 && array[0] && array[2]) this.playSound(this.BONUS_SYMBOL[2]);
            if (id == 4 && array[0] && array[2] && array[4]) this.playSound(this.BONUS_SYMBOL[4]);
        };
        pBWOFExoticFarEastGameController.SoundController.prototype.__class__ = pBWOFExoticFarEastGameController.SoundController;
        pBWOFExoticFarEastGameController.TopicToRequest = function(requestTopic, responseTopic) {
            this.responseTopic = responseTopic;
            this.requestTopic = requestTopic;
        };
        pBWOFExoticFarEastGameController.TopicToRequest.__name__ = ["pBWOFExoticFarEastGameController", "TopicToRequest"];
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.requestTopic = null;
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.responseTopic = null;
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.subscription = null;
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.resolve = null;
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.beforeResolve = null;
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.onBeforeResolve = function(callback) {
            this.beforeResolve = callback;
            return this;
        };
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.execute = function(payload) {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolve = resolve;
                _g.subscription = _g.responseTopic.subscribe($bind(_g, _g.onResponse));
                _g.requestTopic.publish(payload);
            });
            return p;
        };
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.onResponse = function(e) {
            var payload = e.getPayload();
            this.subscription.unsubscribe();
            if (this.beforeResolve != null) this.beforeResolve(payload);
            this.resolve(payload);
            this.resolve = null;
        };
        pBWOFExoticFarEastGameController.TopicToRequest.prototype.__class__ = pBWOFExoticFarEastGameController.TopicToRequest;
        if (typeof components == 'undefined') {
            var components = {};
        };
        if (!components.gamecontroller) {
            components.gamecontroller = {};
        };
        if (!components.gamecontroller.imp) {
            components.gamecontroller.imp = {};
        };
        if (!components.gamecontroller.imp.controllers) {
            components.gamecontroller.imp.controllers = {};
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload = function(requestTopic, responseTopic) {
            this.responseTopic = responseTopic;
            this.requestTopic = requestTopic;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.__name__ = ["components", "gamecontroller", "imp", "controllers", "TopicToRequest_winmeter_api_port_payload_WinMeterPayload"];
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.requestTopic = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.responseTopic = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.subscription = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.resolve = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.beforeResolve = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.onBeforeResolve = function(callback) {
            this.beforeResolve = callback;
            return this;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.execute = function(payload) {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolve = resolve;
                _g.subscription = _g.responseTopic.subscribe($bind(_g, _g.onResponse));
                _g.requestTopic.publish(payload);
            });
            return p;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.onResponse = function(e) {
            var payload = e.getPayload();
            this.subscription.unsubscribe();
            if (this.beforeResolve != null) this.beforeResolve(payload);
            this.resolve(payload);
            this.resolve = null;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.__class__ = components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload;
        pBWOFExoticFarEastGameController.WinMeterController = function(port) {
            this.port = port;
        };
        pBWOFExoticFarEastGameController.WinMeterController.__name__ = ["pBWOFExoticFarEastGameController", "WinMeterController"];
        pBWOFExoticFarEastGameController.WinMeterController.prototype.port = null;
        pBWOFExoticFarEastGameController.WinMeterController.prototype.payload = null;
        pBWOFExoticFarEastGameController.WinMeterController.prototype.showWin = function(payload) {
            this.payload = payload;
            var request = new components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload(this.port.displayWin(), this.port.onDisplayWinFinished());
            return request.execute(payload);
        };
        pBWOFExoticFarEastGameController.WinMeterController.prototype.show = function(winAmount, bigWin, isHighWin) {
            if (isHighWin == null) isHighWin = false;
            var instant = !isHighWin;
            var payload = new winMeterApi.WinMeterPayload(winAmount, bigWin.winSegments, instant);
            return this.showWin(payload);
        };
        pBWOFExoticFarEastGameController.WinMeterController.prototype.stop = function() {
            this.port.displayWin().publish(new winMeterApi.WinMeterPayload(this.payload.winAmount, this.payload.winSegments, true));
        };
        pBWOFExoticFarEastGameController.WinMeterController.prototype.clear = function() {
            this.port.showMessage().publish("");
        };
        pBWOFExoticFarEastGameController.WinMeterController.prototype.showIntro = function(winAmount, bigWin) {
            var payload = new winMeterApi.WinMeterPayload(winAmount, bigWin.winSegments, true, null, false);
            return this.showWin(payload);
        };
        pBWOFExoticFarEastGameController.WinMeterController.prototype.showInFS = function(winAmount, bigWin, startingAmount, conditionalPlayVBAnimationBig, isHighWin) {
            if (isHighWin == null) isHighWin = false;
            var instant = !isHighWin;
            var payload = new winMeterApi.WinMeterPayload(winAmount, bigWin.winSegments, instant, startingAmount, conditionalPlayVBAnimationBig);
            return this.showWin(payload);
        };
        pBWOFExoticFarEastGameController.WinMeterController.prototype.__class__ = pBWOFExoticFarEastGameController.WinMeterController;
        pBWOFExoticFarEastGameController.LocalStoragePolyfill = function() {
            this.values = new _hcmn_.haxe_ds_StringMap();
        };
        pBWOFExoticFarEastGameController.LocalStoragePolyfill.__name__ = ["pBWOFExoticFarEastGameController", "LocalStoragePolyfill"];
        pBWOFExoticFarEastGameController.LocalStoragePolyfill.prototype.values = null;
        pBWOFExoticFarEastGameController.LocalStoragePolyfill.prototype.setItem = function(key, val) {
            var value = val;
            this.values.set(key, value);
        };
        pBWOFExoticFarEastGameController.LocalStoragePolyfill.prototype.getItem = function(key) {
            return this.values.get(key);
        };
        pBWOFExoticFarEastGameController.LocalStoragePolyfill.prototype.removeItem = function(key) {
            this.values.remove(key);
        };
        pBWOFExoticFarEastGameController.LocalStoragePolyfill.prototype.__class__ = pBWOFExoticFarEastGameController.LocalStoragePolyfill;
        pBWOFExoticFarEastGameController.Storage = function() {
            try {
                js.Browser.getLocalStorage().setItem("ollie_settings_" + "test", "test");
                js.Browser.getLocalStorage().removeItem("ollie_settings_" + "test");
                this.storage = js.Browser.getLocalStorage();
            } catch (err) {
                if (err instanceof js._Boot.HaxeError) err = err.val;
                this.storage = new pBWOFExoticFarEastGameController.LocalStoragePolyfill();
            }
        };
        pBWOFExoticFarEastGameController.Storage.__name__ = ["pBWOFExoticFarEastGameController", "Storage"];
        pBWOFExoticFarEastGameController.Storage.prototype.storage = null;
        pBWOFExoticFarEastGameController.Storage.prototype.writeOption = function(id, value) {
            this.storage.setItem("ollie_settings_" + id, value);
        };
        pBWOFExoticFarEastGameController.Storage.prototype.readOption = function(id) {
            return this.storage.getItem("ollie_settings_" + id);
        };
        pBWOFExoticFarEastGameController.Storage.prototype.hasOption = function(id) {
            return this.storage.getItem("ollie_settings_" + id) != null;
        };
        pBWOFExoticFarEastGameController.Storage.prototype.__class__ = pBWOFExoticFarEastGameController.Storage;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

        haxe.IMap = function() {}
        haxe.IMap.prototype = {

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            },
            set: function(k, v) {
                return {
                    arguments: ["*", "*"],
                    returns: "void"
                };
            }
        };
        haxe.Log = function() {};
        haxe.Log.__name__ = ["haxe", "Log"];
        haxe.Log.trace = function(v, infos) {
            _hcmn_.js_Boot.__trace(v, infos);
        };
        haxe.Log.prototype.__class__ = haxe.Log;
        if (!haxe.ds) {
            haxe.ds = {};
        };
        haxe.ds.ObjectMap = function() {
            this.h = {};
            this.h.__keys__ = {};
        };
        haxe.ds.ObjectMap.__interfaces__ = [haxe.IMap];
        haxe.ds.ObjectMap.__name__ = ["haxe", "ds", "ObjectMap"];
        haxe.ds.ObjectMap.prototype.h = null;
        haxe.ds.ObjectMap.prototype.set = function(key, value) {
            var id = key.__id__ || (key.__id__ = ++haxe.ds.ObjectMap.count);
            this.h[id] = value;
            this.h.__keys__[id] = key;
        };
        haxe.ds.ObjectMap.prototype.get = function(key) {
            return this.h[key.__id__];
        };
        haxe.ds.ObjectMap.prototype.keys = function() {
            var a = [];
            for (var key in this.h.__keys__) {
                if (this.h.hasOwnProperty(key)) a.push(this.h.__keys__[key]);
            }
            return _hcmn_.HxOverrides.iter(a);
        };
        haxe.ds.ObjectMap.prototype.__class__ = haxe.ds.ObjectMap;
        if (typeof js == 'undefined') {
            var js = {};
        };
        if (!js._Boot) {
            js._Boot = {};
        };
        js._Boot.HaxeError = function(val) {
            Error.call(this);
            this.val = val;
            this.message = String(val);
            if (Error.captureStackTrace) Error.captureStackTrace(this, js._Boot.HaxeError);
        };
        js._Boot.HaxeError.__name__ = ["js", "_Boot", "HaxeError"];
        js._Boot.HaxeError.__super__ = Error;
        for (var k in Error.prototype) js._Boot.HaxeError.prototype[k] = Error.prototype[k];
        js._Boot.HaxeError.prototype.val = null;
        js._Boot.HaxeError.prototype.__class__ = js._Boot.HaxeError;
        js.Browser = function() {};
        js.Browser.__name__ = ["js", "Browser"];
        js.Browser.window = null;
        js.Browser.document = null;
        js.Browser.location = null;
        js.Browser.navigator = null;
        js.Browser.console = null;
        js.Browser.supported = null;
        js.Browser.getLocalStorage = function() {
            try {
                var s = window.localStorage;
                s.getItem("");
                return s;
            } catch (e) {
                if (e instanceof js._Boot.HaxeError) e = e.val;
                return null;
            }
        };
        js.Browser.prototype.__class__ = js.Browser;
        pBWOFExoticFarEastGameController.StateMachineDef.ID = "GAMECONTROLLERSM_";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_INTRO_ENDED = "FS_INTRO_ENDED";;
        pBWOFExoticFarEastGameController.StateMachineDef.START_REEL_SPIN = "START_REEL_SPIN";;
        pBWOFExoticFarEastGameController.StateMachineDef.PRESENT_SPIN_OUTCOME = "PRESENT_SPIN_OUTCOME";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTRO_END = "FS_OUTRO_END";;
        pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE_ENABLED = "CONTINUE_ENABLED";;
        pBWOFExoticFarEastGameController.StateMachineDef.ABORT_SPIN = "ABORT_SPIN";;
        pBWOFExoticFarEastGameController.StateMachineDef.SPIN_ENABLED = "SPIN_ENABLED";;
        pBWOFExoticFarEastGameController.StateMachineDef.PRESENT_RESULT = "PRESENT_RESULT";;
        pBWOFExoticFarEastGameController.StateMachineDef.INIT_ACTION = "INIT_ACTION";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTCOME_DONE = "FS_OUTCOME_DONE";;
        pBWOFExoticFarEastGameController.StateMachineDef.STOP_REEL_SPIN = "STOP_REEL_SPIN";;
        pBWOFExoticFarEastGameController.StateMachineDef.RETRIGGER_SHOWN = "RETRIGGER_SHOWN";;
        pBWOFExoticFarEastGameController.StateMachineDef.PREPARE_RESUME = "PREPARE_RESUME";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_ENTRY_SHOWN = "FS_ENTRY_SHOWN";;
        pBWOFExoticFarEastGameController.StateMachineDef.CONTINUE = "CONTINUE";;
        pBWOFExoticFarEastGameController.StateMachineDef.SPIN_STARTING_ENDED = "SPIN_STARTING_ENDED";;
        pBWOFExoticFarEastGameController.StateMachineDef.LOADING_STATE = "LOADING_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.PREPARE_RESUME_STATE = "PREPARE_RESUME_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.INIT_STATE = "INIT_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.INTRO_STATE = "INTRO_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.IDLE_STATE = "IDLE_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.SPINNING_STATE = "SPINNING_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_IDLE = "FS_IDLE";;
        pBWOFExoticFarEastGameController.StateMachineDef.ABORT_SPIN_STATE = "ABORT_SPIN_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.STOPPING_STATE = "STOPPING_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.AWARD_CAP_STATE = "AWARD_CAP_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.AWARD_CAP_PREPARE = "AWARD_CAP_PREPARE";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_ENTRY = "FS_ENTRY";;
        pBWOFExoticFarEastGameController.StateMachineDef.BASEGAME_OUTCOME = "BASEGAME_OUTCOME";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTCOME = "FS_OUTCOME";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_INTRO = "FS_INTRO";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTRO = "FS_OUTRO";;
        pBWOFExoticFarEastGameController.StateMachineDef.RETRIGGER_STATE = "RETRIGGER_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_OUTCOME_PRESENTED = "FS_OUTCOME_PRESENTED";;
        pBWOFExoticFarEastGameController.StateMachineDef.FS_SUMMARY = "FS_SUMMARY";;
        pBWOFExoticFarEastGameController.StateMachineDef.BET_CONFIRM = "BET_CONFIRM";;
        pBWOFExoticFarEastGameController.StateMachineDef.SHOW_WIN_STATE = "SHOW_WIN_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.SPIN_STARTING_STATE = "SPIN_STARTING_STATE";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_INTRO_ENDED = "WHEEL_INTRO_ENDED";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_OUTRO_END = "WHEEL_OUTRO_END";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_OUTCOME_DONE = "WHEEL_OUTCOME_DONE";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_ENTRY_SHOWN = "WHEEL_ENTRY_SHOWN";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_STOPPED = "WHEEL_STOPPED";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_IDLE = "WHEEL_IDLE";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_ENTRY = "WHEEL_ENTRY";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_OUTCOME = "WHEEL_OUTCOME";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_INTRO = "WHEEL_INTRO";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_OUTRO = "WHEEL_OUTRO";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_OUTCOME_PRESENTED = "WHEEL_OUTCOME_PRESENTED";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_SUMMARY = "WHEEL_SUMMARY";;
        pBWOFExoticFarEastGameController.StateMachineDef.WHEEL_SUMMARY_END = "WHEEL_SUMMARY_END";;
        pBWOFExoticFarEastGameController.StateMachineDef.SET_WHEEL_IDLE = "SET_WHEEL_IDLE";;
        pBWOFExoticFarEastGameController.StateMachineDef.FSM = "<fsm initial='LOADING_STATE'>\r\n  <state name='LOADING_STATE'>\r\n    <transition target='PREPARE_RESUME_STATE' action='PREPARE_RESUME'/>\r\n    <transition target='INIT_STATE' action='INIT_ACTION'/>\r\n    <operation type='do' method='attachComponents'/>\r\n  </state>\r\n  <state name='PREPARE_RESUME_STATE'>\r\n    <transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n\t<transition target='WHEEL_IDLE' action='SET_WHEEL_IDLE'/>\r\n    <operation type='do' method='prepareResume'/>\r\n  </state>\r\n  <state name='INIT_STATE'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n    <operation type='do' method='initGame'/>\r\n  </state>\r\n  <state name='IDLE_STATE'>\r\n    <transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='onBaseGameIdle'/>\r\n    <operation type='exit' method='updateBetPanel'/>\r\n  </state>\r\n  <state name='SPIN_STARTING_STATE'>\r\n    <transition target='SPINNING_STATE' action='SPIN_STARTING_ENDED'/>\r\n    <operation type='do' method='clearAllWins'/>\r\n    <operation type='do' method='startSpin'/>\r\n  </state>\r\n  <state name='SPINNING_STATE'>\r\n    <transition target='STOPPING_STATE' action='STOP_REEL_SPIN'/>\r\n    <transition target='ABORT_SPIN_STATE' action='ABORT_SPIN'/>\r\n    <operation type='do' method='checkForStopOrAbort'/>\r\n  </state>\r\n  <state name='FS_IDLE'>\r\n    <transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='executeContinueCommand'/>\r\n    <operation type='exit' method='updateBetPanelFS'/>\r\n  </state>\r\n  <state name='WHEEL_IDLE'>\r\n    <transition target='WHEEL_OUTRO' condition='!awardCapExceeded,Stage==WheelBonus,NextStage==BaseGame' action='WHEEL_STOPPED'/>\r\n\t<transition target='ABORT_WHEEL_IDLE' action='ABORT_SPIN'/>\r\n\t<transition target='AWARD_CAP_PREPARE' condition='awardCapExceeded' action='WHEEL_STOPPED'/>\r\n    <operation type='do' method='showWheel'/>\r\n    <operation type='exit' method='updateBetPanelWheel'/>\r\n  </state>\r\n  <state name='ABORT_WHEEL_IDLE'>\r\n    <transition target='WHEEL_IDLE' action='SET_WHEEL_IDLE'/>\r\n  <operation type='do' method='abortWheel'/>\r\n  </state>\r\n  <state name='ABORT_SPIN_STATE'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n\t<transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n\t<operation type='entry' method='applyAbortData'/>\r\n  </state>\r\n  <state name='STOPPING_STATE'>\r\n    <transition target='FS_ENTRY' condition='!awardCapExceeded,Stage==BaseGame,NextStage==FreeSpin' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='BASEGAME_OUTCOME' condition='!awardCapExceeded,Stage==BaseGame,NextStage==BaseGame' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='FS_OUTCOME' condition='!awardCapExceeded,Stage==FreeSpin' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='AWARD_CAP_PREPARE' condition='awardCapExceeded' action='PRESENT_SPIN_OUTCOME'/>\r\n\t<transition target='WHEEL_ENTRY' condition='!awardCapExceeded,Stage==BaseGame,NextStage==WheelBonus' action='PRESENT_SPIN_OUTCOME'/>\r\n    <operation type='entry' method='stopReels'/>\r\n  </state>\r\n  <state name='AWARD_CAP_PREPARE'>\r\n    <transition target='AWARD_CAP_STATE' action='PRESENT_RESULT'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n    <operation type='do' method='setBaseGameOutcome'/>\r\n  </state>\r\n  <state name='AWARD_CAP_STATE'>\r\n    <transition target='BET_CONFIRM' action='CONTINUE'/>\r\n    <operation type='do' method='showAwardCapScreen'/>\r\n  </state>\r\n  <state name='FS_ENTRY'>\r\n    <transition target='FS_INTRO' action='FS_ENTRY_SHOWN'/>\r\n    <operation type='do' method='showScatterWins'/>\r\n  </state>\r\n  <state name='WHEEL_ENTRY'>\r\n  <transition target='WHEEL_INTRO' action='WHEEL_ENTRY_SHOWN'/>\r\n    <operation type='do' method='showCashLinkWins'/>\r\n  </state>\r\n  <state name='BASEGAME_OUTCOME'>\r\n    <transition target='BET_CONFIRM' action='PRESENT_RESULT'/>\r\n    <operation type='entry' method='showBaseGameOutcome'/>\r\n  </state>\r\n  <state name='FS_OUTCOME'>\r\n    <transition target='RETRIGGER_STATE' condition='retrigger' action='FS_OUTCOME_DONE'/>\r\n    <transition target='FS_OUTCOME_PRESENTED' condition='!retrigger' action='FS_OUTCOME_DONE'/>\r\n\t<operation type='do' method='showFreeSpinOutcome'/>\r\n  </state>\r\n  <state name='FS_INTRO'>\r\n    <transition target='FS_OUTCOME_PRESENTED' action='FS_INTRO_ENDED'/>\r\n    <operation type='entry' method='startFSIntroAnim'/>\r\n    <operation type='exit' method='prepareFreeSpin'/>\r\n  </state>\r\n   <state name='WHEEL_INTRO'>\r\n    <transition target='WHEEL_IDLE' action='WHEEL_INTRO_ENDED'/>\r\n    <operation type='entry' method='startWheelIntroAnim'/>\r\n    <operation type='exit' method='prepareWheel'/>\r\n  </state>\r\n  <state name='RETRIGGER_STATE'>\r\n    <transition target='FS_OUTCOME_PRESENTED' action='RETRIGGER_SHOWN'/>\r\n    <operation type='do' method='showRetriggerScreen'/>\r\n  </state>\r\n  <state name='FS_OUTCOME_PRESENTED'>\r\n    <transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n    <transition target='FS_OUTRO' action='PRESENT_RESULT'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n  </state>\r\n  <state name='FS_OUTRO'>\r\n    <transition target='FS_SUMMARY' action='FS_OUTRO_END'/>\r\n    <operation type='do' method='startFSOutroAnim'/>\r\n  </state>\r\n   <state name='WHEEL_OUTRO'>\r\n    <transition target='WHEEL_SUMMARY' action='WHEEL_OUTRO_END'/>\r\n    <operation type='do' method='startWheelOutroAnim'/>\r\n  </state>\r\n  <state name='FS_SUMMARY'>\r\n    <transition target='BET_CONFIRM' action='CONTINUE'/>\r\n    <operation type='entry' method='setBaseGameOutcome'/>\r\n    <operation type='do' method='showFreeSpinSummary'/>\r\n  </state>\r\n    <state name='WHEEL_SUMMARY'>\r\n    <transition target='BET_CONFIRM' action='WHEEL_SUMMARY_END'/>\r\n    <operation type='entry' method='setBaseGameOutcome'/>\r\n    <operation type='do' method='showWheelSummary'/>\r\n\t<operation type='do' method='showBaseGameOutcome'/>\r\n  </state>\r\n  <state name='BET_CONFIRM'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n\t<transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='publishResultPresented'/>\r\n  </state>\r\n</fsm>";;
        pBWOFExoticFarEastGameController.TransitionConstants.REELS_SHAKE = "REELS_SHAKE";;
        pBWOFExoticFarEastGameController.Storage.PREFIX_ID = "ollie_settings_";;
        haxe.ds.ObjectMap.count = 0;;
        return {
            exports: pBWOFExoticFarEastGameController,
            activator: pBWOFExoticFarEastGameController.Activator
        };
    });
//# sourceURL=pbWofExoticFarEastGameController.js