define("betPanel", ["viewBuilderApi", "componentmodelComponentApi", "clientkernelLoaderApi", "slotModelApi", "displayEngineApi", "displayEngineUtils", "gameLayoutApi", "PIXI", "BABYLON", "clientkernelEventbusApi", "clientkernelModulesApi", "betPanelApi", "moneyApi"],
    function(viewBuilderApi, componentmodelComponentApi, clientkernelLoaderApi, slotModelApi, displayEngineApi, displayEngineUtils, gameLayoutApi, PIXI, BABYLON, clientkernelEventbusApi, clientkernelModulesApi, betPanelApi, moneyApi) {
        "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 betPanel == 'undefined') {
            var betPanel = {};
        };
        betPanel.Activator = function(context) {};
        betPanel.Activator = ck_implements(betPanel.Activator, clientkernelModulesApi.IModuleActivator);
        betPanel.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        betPanel.Activator.__name__ = ["betPanel", "Activator"];
        betPanel.Activator.prototype.start = function(context) {
            context.getServiceTracker([displayEngineApi.IDisplayProvider, viewBuilderApi.IViewBuilderFactory, moneyApi.IMoneyFormatter]).then(function(context1) {
                betPanel.ExternalService.initialize(context1);
                context1.registerService(new betPanel.BetPanelFactory(context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null)), betPanelApi.BetPanelDeclaration, null);
            });
        };
        betPanel.Activator.prototype.stop = function(context) {};
        betPanel.Activator.main = function() {};
        betPanel.Activator.prototype.__class__ = betPanel.Activator;

        betPanel.IAutoPlayPanelControl = function() {}
        betPanel.IAutoPlayPanelControl.prototype = {

            setAutoPlayValues: function(values) {
                return {
                    arguments: ["array"],
                    returns: "void"
                };
            },
            getEvents: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            enable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            disable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            open: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            close: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            configure: function(config) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };

        betPanel.IBetLines = function() {}
        betPanel.IBetLines.prototype = {

            setBetLinesValue: function(value) {
                return {
                    arguments: ["number"],
                    returns: "void"
                };
            },
            getBetLinesValue: function() {
                return {
                    arguments: [],
                    returns: "number"
                };
            }
        };

        betPanel.IBetPanel = function() {}
        betPanel.IBetPanel.prototype = {

            getDisplayObject: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getComponent: function(component) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            },
            getWinMeterComponent: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getSpinButtonComponent: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getSkipButtonComponent: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getInfoBarComponent: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getTotalBetControlComponent: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            getAutoplayControlComponent: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };

        betPanel.IPaytableControl = function() {}
        betPanel.IPaytableControl.prototype = {

            toggleButton: function(e) {
                return {
                    arguments: ["boolean"],
                    returns: "void"
                };
            },
            setLabel: function(value) {
                return {
                    arguments: ["number"],
                    returns: "void"
                };
            },
            configure: function(cfg) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            getEvents: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            enable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            disable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            }
        };

        betPanel.ITotalBetControl = function() {}
        betPanel.ITotalBetControl.prototype = {

            setTotalBet: function(totalBetValue, betPerLineValue) {
                return {
                    arguments: ["string", "string"],
                    returns: "void"
                };
            },
            setValuePairsArray: function(values) {
                return {
                    arguments: ["array"],
                    returns: "void"
                };
            },
            setBetLinesValue: function(lines) {
                return {
                    arguments: ["number"],
                    returns: "void"
                };
            },
            getBetLinesValue: function() {
                return {
                    arguments: [],
                    returns: "number"
                };
            },
            getEvents: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            enable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            disable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            open: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            close: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            configure: function(config) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            getBetLines: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            setValuePairsArrayLines: function(totalBetsForSelectedBetPerLine) {
                return {
                    arguments: ["array"],
                    returns: "void"
                };
            },
            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            show: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            }
        };

        betPanel.IWinMeter = function() {}
        betPanel.IWinMeter.prototype = {

            updateWinAmount: function(amount) {
                return {
                    arguments: ["string"],
                    returns: "void"
                };
            },
            setWaitForResults: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            countUpWin: function(from, to) {
                return {
                    arguments: ["string", "string"],
                    returns: "void"
                };
            },
            show: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            getEvents: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        betPanel.BetPanel = function(context, factory) {
            this.initialized = false;
            this.layoutPayload = null;
            this.configDefinitionLoaded = false;
            this.assetsLoaded = false;
            this.ANIMATIONS_ID = "panel_animations.viewbuilder.json";
            this.DEFINITION_CONFIG_ID = "betpanel_definition_config.json";
            this.LAYOUT_ID = "panel_layout.viewbuilder.json";
            var _g = this;
            this.context = context;
            this.factory = factory;
            this.port = context.getImplementedPort(betPanelApi.IBetPanelImplementationPort);
            betPanel.ExternalService.port = this.port;
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.updateLayout));
            this.slotModelPort = context.getUsedPort(slotModelApi.ISlotModelPort);
            this.components = new haxe.ds.EnumValueMap();
            new betPanel.BetPanelComponentsModel(this.components);
            this.controller = new betPanel.BetPanelController(this);
            betPanel.ExternalService.assetRegistry.getAsset(this.DEFINITION_CONFIG_ID).getContent().then(function(config) {
                betPanel.BetPanelConfiguration.initialize(config);
                _g.configDefinitionLoaded = true;
                _g.initialize();
            });
            betPanel.ExternalService.assetRegistry.getAsset(this.LAYOUT_ID).getContent().then(function(vb) {
                betPanel.ExternalService.loadedScene = vb;
                _g.checkIsMobile();
                if (_g.isMobile) betPanel.ExternalService.assetRegistry.getAsset(_g.ANIMATIONS_ID).getContent().then(function(vba) {
                    betPanel.ExternalService.loadedAnimations = vba;
                    _g.assetsLoaded = true;
                    _g.initialize();
                });
                else {
                    _g.assetsLoaded = true;
                    _g.initialize();
                }
            });
        };
        betPanel.BetPanel = ck_implements(betPanel.BetPanel, betPanel.IBetPanel);
        betPanel.BetPanel.__interfaces__ = [betPanel.IBetPanel];
        betPanel.BetPanel.__name__ = ["betPanel", "BetPanel"];
        betPanel.BetPanel.prototype.LAYOUT_ID = null;
        betPanel.BetPanel.prototype.DEFINITION_CONFIG_ID = null;
        betPanel.BetPanel.prototype.ANIMATIONS_ID = null;
        betPanel.BetPanel.prototype.components = null;
        betPanel.BetPanel.prototype.factory = null;
        betPanel.BetPanel.prototype.controller = null;
        betPanel.BetPanel.prototype.view = null;
        betPanel.BetPanel.prototype.port = null;
        betPanel.BetPanel.prototype.layoutPort = null;
        betPanel.BetPanel.prototype.isTouchLayout = null;
        betPanel.BetPanel.prototype.slotmodelInitializeGamePhasePort = null;
        betPanel.BetPanel.prototype.slotmodelOutcomePhasePort = null;
        betPanel.BetPanel.prototype.slotModelPort = null;
        betPanel.BetPanel.prototype.assetsLoaded = null;
        betPanel.BetPanel.prototype.configDefinitionLoaded = null;
        betPanel.BetPanel.prototype.layoutPayload = null;
        betPanel.BetPanel.prototype.context = null;
        betPanel.BetPanel.prototype.totalBetControll = null;
        betPanel.BetPanel.prototype.betLines = null;
        betPanel.BetPanel.prototype.paytableControll = null;
        betPanel.BetPanel.prototype.initialized = null;
        betPanel.BetPanel.prototype.isMobile = null;
        betPanel.BetPanel.prototype.checkIsMobile = function() {
            var _g1 = 0;
            var _g = betPanel.ExternalService.loadedScene.getConfiguration().components.length;
            while (_g1 < _g) {
                var i = _g1++;
                if (betPanel.ExternalService.loadedScene.getConfiguration().components[i].id.indexOf("bp_bet") != -1) {
                    this.isMobile = true;
                    return;
                }
            }
            this.isMobile = false;
        };
        betPanel.BetPanel.prototype.updateLayout = function(e) {
            this.layoutPayload = e.getPayload();
            if (!this.initialized) this.initialize();
            else {
                this.controller.updateLayout(this.layoutPayload);
                this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
            }
        };
        betPanel.BetPanel.prototype.initialize = function() {
            if (this.assetsLoaded && this.configDefinitionLoaded && this.layoutPayload != null) {
                this.view = this.factory.createView(betPanel.ExternalService.loadedScene);
                if (this.isMobile) this.updateLabelIDsMobile();
                this.registerAllComponents();
                this.controller.init();
                this.initialized = true;
                this.controller.updateLayout(this.layoutPayload);
                this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
            }
        };
        betPanel.BetPanel.prototype.registerAllComponents = function() {
            var layerContainers = this.view.getChildComponents();
            var $it0 = layerContainers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var $it1 = (function($this) {
                    var $r;
                    var this1 = (_hcmn_.__map_reserved[layerId] != null ? layerContainers.getReserved(layerId) : layerContainers.h[layerId]).getChildComponents();
                    $r = this1.keys();
                    return $r;
                }(this));
                while ($it1.hasNext()) {
                    var componentId = $it1.next();
                    var constructorIndex;
                    var _this = _hcmn_.Type.getEnumConstructs(betPanel.ComponentsEnum);
                    constructorIndex = _hcmn_.HxOverrides.indexOf(_this, componentId, 0);
                    if (constructorIndex < 0) continue;
                    var componentEnum = _hcmn_.Type.createEnum(betPanel.ComponentsEnum, componentId, null);
                    if (!this.registerComponent(componentEnum, layerId)) continue;
                }
            }
        };
        betPanel.BetPanel.prototype.registerComponent = function(componentEnum, layerId) {
            switch (componentEnum[1]) {
                case 6:
                    this.registerContainerComponent(betPanel.ComponentsEnum.AUTOPLAY_PANEL, layerId, betPanel.AutoPlayPanelControl);
                    this.controller.autoPlayEnabled = true;
                    break;
                case 7:
                    this.registerContainerComponent(betPanel.ComponentsEnum.AUTOPLAY_PANEL_MOBILE, layerId, betPanel.AutoPlayPanelControlMobile);
                    this.controller.autoPlayEnabled = true;
                    break;
                case 1:
                    this.registerButtonContainerComponent(betPanel.ComponentsEnum.SOUND_ON, layerId);
                    break;
                case 0:
                    this.registerButtonContainerComponent(betPanel.ComponentsEnum.SOUND_OFF, layerId);
                    break;
                case 2:
                    this.registerButtonContainerComponent(betPanel.ComponentsEnum.SPIN_BUTTON, layerId);
                    break;
                case 4:
                    this.registerButtonContainerComponent(betPanel.ComponentsEnum.SKIP_BUTTON, layerId);
                    break;
                case 11:
                    this.registerContainerComponent(betPanel.ComponentsEnum.WIN_METER, layerId, betPanel.WinMeter);
                    break;
                case 5:
                    this.registerContainerComponent(betPanel.ComponentsEnum.INFO_BAR, layerId);
                    break;
                case 21:
                    this.registerContainerComponent(betPanel.ComponentsEnum.PAYS, layerId);
                    break;
                case 12:
                    this.registerContainerComponent(betPanel.ComponentsEnum.BET_LINES, layerId, betPanel.BetLines);
                    break;
                case 15:
                    this.registerContainerComponent(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_IGT, layerId, betPanel.IgtBetControlDesktop);
                    this.isTouchLayout = false;
                    break;
                case 19:
                    this.registerContainerComponent(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_HYBRID, layerId, betPanel.HybridBetControlDesktop);
                    this.isTouchLayout = false;
                    break;
                case 16:
                    this.registerContainerComponent(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE_IGT, layerId, betPanel.IgtTotalBetControllerMobile);
                    this.isTouchLayout = true;
                    break;
                case 17:
                    this.registerContainerComponent(betPanel.ComponentsEnum.BALANCE_DISPLAY, layerId);
                    break;
                case 9:
                    this.registerContainerComponent(betPanel.ComponentsEnum.PAYTABLE_PANEL, layerId, betPanel.PaytableControl);
                    break;
                case 8:
                    this.registerContainerComponent(betPanel.ComponentsEnum.AUTO_PLAY_BUTTON_CONTROL, layerId, betPanel.AutoPlayButtonControll);
                    break;
                case 10:
                    if (this.registerContainerComponent(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE, layerId, betPanel.GtechTotalBetControlMobile)) this.isTouchLayout = true;
                    break;
                case 18:
                    if (this.registerContainerComponent(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP, layerId, betPanel.GtechBetControlDesktop)) this.isTouchLayout = false;
                    break;
                case 22:
                    this.registerContainerComponent(betPanel.ComponentsEnum.OPEN_TOTAL_BET, layerId, betPanel.OpenTotalBetComponent);
                    break;
                case 23:
                    this.registerContainerComponent(betPanel.ComponentsEnum.TOTAL_BET_DISPLAY, layerId, betPanel.TotalBetDisplayController);
                    break;
                case 24:
                    this.controller.isConnectingRegistred = true;
                    break;
                case 25:
                    this.registerButtonContainerComponent(componentEnum, layerId);
                    break;
                case 26:
                    this.registerContainerComponent(betPanel.ComponentsEnum.COIN_VALUE, layerId, betPanel.CoinValue);
                    break;
                default:
                    return false;
            }
            return true;
        };
        betPanel.BetPanel.prototype.updateLabelIDsMobile = function() {
            betPanel.WinMeter.LABEL_WINMETER_LABEL_ID = "WinMeterLabel";
            betPanel.BetLines.LABEL_BETLINES_VALUE_ID = "BetLineValue";
            betPanel.GtechTotalBetControlMobile.LABEL_INFOBAR_LABEL_ID = "InfoBarLabel";
            betPanel.GtechTotalBetControlMobile.LABEL_INFOBAR_VALUE_ID = "InfoBarLabelValue";
            betPanel.GtechTotalBetControlMobile.LABEL_TOTALBET_VALUE_ID = "TotalBetLabel";
        };
        betPanel.BetPanel.prototype.registerButtonContainerComponent = function(component, layerId) {
            var layer = this.view.getComponentById(layerId);
            var container = layer.getComponentById(component[0]);
            if (container == null) return false;
            var value;
            value = _hcmn_.js_Boot.__cast(container, viewBuilderApi.IButtonContainer);
            this.components.set(component, value);
            return true;
        };
        betPanel.BetPanel.prototype.registerContainerComponent = function(component, layerId, componentClass) {
            var layer = this.view.getComponentById(layerId);
            var container = layer.getComponentById(component[0]);
            if (container == null) return false;
            if (componentClass != null) {
                var specificComponent = _hcmn_.Type.createInstance(componentClass, [container]);
                this.components.set(component, specificComponent);
            } else this.components.set(component, container);
            return true;
        };
        betPanel.BetPanel.prototype.getComponent = function(component) {
            return this.components.get(component);
        };
        betPanel.BetPanel.prototype.getLayer = function(layer) {
            if (this.view.getComponentById(layer[0]) != null) return _hcmn_.js_Boot.__cast(this.view.getComponentById(layer[0]), viewBuilderApi.IViewBuilderContainer);
            else return null;
        };
        betPanel.BetPanel.prototype.getComponentVBContainer = function(component) {
            switch (component[1]) {
                case 7:
                case 2:
                case 4:
                    return this.getLayer(betPanel.LayersEnum.bp_spin).getComponentById(component[0]);
                case 11:
                case 6:
                case 12:
                case 17:
                    return this.getLayer(betPanel.LayersEnum.bp_bar).getComponentById(component[0]);
                case 9:
                case 5:
                case 18:
                    return this.getLayer(betPanel.LayersEnum.bp_bar).getComponentById(component[0]);
                case 10:
                    return this.getLayer(betPanel.LayersEnum.bp_bet).getComponentById(component[0]);
                case 21:
                    return this.getLayer(betPanel.LayersEnum.bp_pays).getComponentById(component[0]);
                case 25:
                    return this.getLayer(betPanel.LayersEnum.bp_maxbet).getComponentById(component[0]);
                default:
                    return null;
            }
        };
        betPanel.BetPanel.prototype.getWinMeterComponent = function() {
            return this.components.get(betPanel.ComponentsEnum.WIN_METER);
        };
        betPanel.BetPanel.prototype.getAutoPlayButtonControll = function() {
            return this.components.get(betPanel.ComponentsEnum.AUTO_PLAY_BUTTON_CONTROL);
        };
        betPanel.BetPanel.prototype.getCoinValue = function() {
            return this.components.get(betPanel.ComponentsEnum.COIN_VALUE);
        };
        betPanel.BetPanel.prototype.getSpinButtonComponent = function() {
            return this.components.get(betPanel.ComponentsEnum.SPIN_BUTTON);
        };
        betPanel.BetPanel.prototype.getSoundOffButtonComponent = function() {
            return this.components.get(betPanel.ComponentsEnum.SOUND_OFF);
        };
        betPanel.BetPanel.prototype.getSoundOnButtonComponent = function() {
            return this.components.get(betPanel.ComponentsEnum.SOUND_ON);
        };
        betPanel.BetPanel.prototype.getPaytablePanelComponent = function() {
            if (this.paytableControll != null) return this.paytableControll;
            if (this.isTouchLayout) {
                if (this.getLayer(betPanel.LayersEnum.bp_pays) != null) this.paytableControll = this.getLayer(betPanel.LayersEnum.bp_pays).getComponentById("PaysButton");
            } else this.paytableControll = this.components.get(betPanel.ComponentsEnum.PAYTABLE_PANEL);
            return this.paytableControll;
        };
        betPanel.BetPanel.prototype.getInfoBarComponent = function() {
            return this.components.get(betPanel.ComponentsEnum.INFO_BAR);
        };
        betPanel.BetPanel.prototype.getSkipButtonComponent = function() {
            return this.components.get(betPanel.ComponentsEnum.SKIP_BUTTON);
        };
        betPanel.BetPanel.prototype.getMaxBetButtonContainer = function() {
            return this.components.get(betPanel.ComponentsEnum.MAX_BET_BUTTON);
        };
        betPanel.BetPanel.prototype.getBetLinesCompoent = function() {
            if (this.betLines != null) return this.betLines;
            if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "GTECH" || betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "HYBRID") this.betLines = _hcmn_.js_Boot.__cast(this.components.get(betPanel.ComponentsEnum.BET_LINES), betPanel.IBetLines);
            else this.betLines = _hcmn_.js_Boot.__cast(this.getTotalBetControlComponent().getBetLines(), betPanel.IBetLines);
            return this.betLines;
        };
        betPanel.BetPanel.prototype.getTotalBetControlComponent = function() {
            if (this.totalBetControll != null) return this.totalBetControll;
            if (this.isTouchLayout) {
                if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "GTECH") this.totalBetControll = _hcmn_.js_Boot.__cast(this.components.get(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE), betPanel.ITotalBetControl);
                else if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "IGT") this.totalBetControll = _hcmn_.js_Boot.__cast(this.components.get(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE_IGT), betPanel.ITotalBetControl);
            } else if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "GTECH") this.totalBetControll = _hcmn_.js_Boot.__cast(this.components.get(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP), betPanel.ITotalBetControl);
            else if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "IGT") this.totalBetControll = _hcmn_.js_Boot.__cast(this.components.get(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_IGT), betPanel.ITotalBetControl);
            else if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "HYBRID") this.totalBetControll = _hcmn_.js_Boot.__cast(this.components.get(betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_HYBRID), betPanel.ITotalBetControl);
            return this.totalBetControll;
        };
        betPanel.BetPanel.prototype.getAutoplayControlComponent = function() {
            if (this.isTouchLayout) return this.components.get(betPanel.ComponentsEnum.AUTOPLAY_PANEL_MOBILE);
            else return this.components.get(betPanel.ComponentsEnum.AUTOPLAY_PANEL);
        };
        betPanel.BetPanel.prototype.getDisplayObject = function() {
            return this.view.getDisplayObject();
        };
        betPanel.BetPanel.prototype.__class__ = betPanel.BetPanel;
        betPanel.BetPanelComponentsModel = function(conponents) {
            betPanel.BetPanelComponentsModel.components = conponents;
        };
        betPanel.BetPanelComponentsModel.__name__ = ["betPanel", "BetPanelComponentsModel"];
        betPanel.BetPanelComponentsModel.components = null;
        betPanel.BetPanelComponentsModel.getComponentByID = function(e) {
            return betPanel.BetPanelComponentsModel.components.get(e);
        };
        betPanel.BetPanelComponentsModel.prototype.__class__ = betPanel.BetPanelComponentsModel;
        betPanel.BetPanelConfiguration = function() {};
        betPanel.BetPanelConfiguration.__name__ = ["betPanel", "BetPanelConfiguration"];
        betPanel.BetPanelConfiguration.initialize = function(config) {
            if (config.bet_panel_type != null) betPanel.BetPanelConfiguration.BET_PANEL_TYPE = config.bet_panel_type;
            var nova = betPanel.BetPanelConfiguration.BET_PANEL_TYPE;
            if (config.info_panel_positions != null) {
                betPanel.BetPanelConfiguration.RIGHT_ANIMATIONS = config.info_panel_positions.RIGHT.animations;
                betPanel.BetPanelConfiguration.LEFT_ANIMATIONS = config.info_panel_positions.LEFT.animations;
                betPanel.BetPanelConfiguration.UP_ANIMATIONS = config.info_panel_positions.UP.animations;
                betPanel.BetPanelConfiguration.RIGHT_POSITIONS = config.info_panel_positions.RIGHT.positions;
                betPanel.BetPanelConfiguration.LEFT_POSITIONS = config.info_panel_positions.LEFT.positions;
                betPanel.BetPanelConfiguration.UP_POSITIONS = config.info_panel_positions.UP.positions;
            }
            if (config.base_button_positions != null) betPanel.BetPanelConfiguration.TOTAL_BET_BTN_POSITIONS = config.base_button_positions;
            if (config.chevron_arrows_positions != null) {
                betPanel.BetPanelConfiguration.CHEVRON_UP_POSITIONS = config.chevron_arrows_positions.up;
                betPanel.BetPanelConfiguration.CHEVRON_DOWN_POSITIONS = config.chevron_arrows_positions.down;
                betPanel.BetPanelConfiguration.CHEVRON_LEFT_POSITIONS = config.chevron_arrows_positions.left;
                betPanel.BetPanelConfiguration.CHEVRON_RIGHT_POSITIONS = config.chevron_arrows_positions.right;
            }
            if (config.connecting_animation_position != null) {
                betPanel.BetPanelConfiguration.CONNECTING_POSITIONS = config.connecting_animation_position.positions;
                betPanel.BetPanelConfiguration.CONNECTING_SPEED = config.connecting_animation_position.speed;
            }
            if (config.totalPages != null) betPanel.BetPanelConfiguration.TOTAL_PAGES = config.totalPages;
            if (config.customData != null) betPanel.BetPanelConfiguration.AUTOSPIN_LABEL_OUT = config.customData.autospinLabelOut;
        };
        betPanel.BetPanelConfiguration.prototype.__class__ = betPanel.BetPanelConfiguration;
        betPanel.BetPanelController = function(betPanel) {
            this.flag_addedToStage = false;
            this.flag_initializeGameReceived = false;
            this.betPanel = betPanel;
            betPanel.slotModelPort.getStages().getInitStage().getInitializeGamePhase().getInitializeGame().subscribe($bind(this, this.handleInitializeGame));
            betPanel.slotModelPort.getStages().getResumeStage().getPrepareResume().subscribe($bind(this, this.handleResumeGame));
            betPanel.port.setContent().subscribe($bind(this, this.handleSetContent));
            betPanel.port.setAutoPlayButtonState().subscribe($bind(this, this.setAutoPlayButtonState));
            betPanel.port.setCustomButtonState().subscribe($bind(this, this.setCustomButtonState));
        };
        betPanel.BetPanelController.__name__ = ["betPanel", "BetPanelController"];
        betPanel.BetPanelController.prototype.betPanel = null;
        betPanel.BetPanelController.prototype.presentationInitializationPayload = null;
        betPanel.BetPanelController.prototype.resumeContentPayload = null;
        betPanel.BetPanelController.prototype.flag_initializeGameReceived = null;
        betPanel.BetPanelController.prototype.flag_addedToStage = null;
        betPanel.BetPanelController.prototype.panelControlsEnabled = null;
        betPanel.BetPanelController.prototype.paysButton = null;
        betPanel.BetPanelController.prototype.stopEnabled = null;
        betPanel.BetPanelController.prototype.autoPlayEnabled = null;
        betPanel.BetPanelController.prototype.isConnectingRegistred = null;
        betPanel.BetPanelController.prototype.connecting = null;
        betPanel.BetPanelController.prototype.connectingDO = null;
        betPanel.BetPanelController.prototype.init = function() {
            this.betPanel.getSpinButtonComponent().disable();
            this.betPanel.getSpinButtonComponent().getEvents().DOWN().addListener($bind(this, this.handleStartSpinButtonPressed));
            this.betPanel.getSkipButtonComponent().getEvents().DOWN().addListener($bind(this, this.handleSkipButtonPressed));
            var maxBetButton = this.betPanel.getMaxBetButtonContainer();
            if (maxBetButton != null) maxBetButton.getEvents().DOWN().addListener($bind(this, this.handleMaxBetButtonPressed));
            if (this.betPanel.getSoundOffButtonComponent() != null) this.betPanel.getSoundOffButtonComponent().getEvents().DOWN().addListener($bind(this, this.handleSoundOffButtonPressed));
            if (this.betPanel.getSoundOnButtonComponent() != null) this.betPanel.getSoundOnButtonComponent().getEvents().DOWN().addListener($bind(this, this.handleSoundOnButtonPressed));
            if (this.betPanel.getAutoPlayButtonControll() != null) {
                this.betPanel.getAutoPlayButtonControll().startButton.getEvents().DOWN().addListener($bind(this, this.startAutoPlayListener));
                this.betPanel.getAutoPlayButtonControll().stopButton.getEvents().DOWN().addListener($bind(this, this.stopAutoPlayListener));
                this.betPanel.port.setNumberOffAutoSpinsLeft().subscribe($bind(this, this.setNumberOfAutoSpinsLeft));
            }
            this.betPanel.getTotalBetControlComponent().getEvents().VALUE_CHANGED().addListener($bind(this, this.handleBetPerLineValueChanged));
            this.betPanel.port.showButton().subscribe($bind(this, this.onShowButton));
            this.betPanel.port.hideButton().subscribe($bind(this, this.onHideButton));
            this.betPanel.port.enableButton().subscribe($bind(this, this.onEnableButton));
            this.betPanel.port.disableButton().subscribe($bind(this, this.onDisableButton));
            this.betPanel.port.getCoinValue().subscribe($bind(this, this.handleCoinValue));
            this.betPanel.port.setBalance().subscribe($bind(this, this.handleUpdateBalance));
            this.betPanel.port.setStake().subscribe($bind(this, this.handleChangeStake));
            this.betPanel.port.hideBetPanell().subscribe($bind(this, this.hideBetPanell));
            this.betPanel.port.showBetPanell().subscribe($bind(this, this.showBetPannel));
            this.betPanel.getTotalBetControlComponent().getEvents().CONTROL_IN_USE().addListener($bind(this, this.handleTotalBetControlUseChanged));
            if (this.autoPlayEnabled) {
                this.betPanel.getAutoplayControlComponent().getEvents().CONTROL_IN_USE().addListener($bind(this, this.handleAutoplayControlUseChanged));
                this.betPanel.getAutoplayControlComponent().disable();
            }
            if (this.betPanel.getSoundOffButtonComponent() != null) this.betPanel.getSoundOffButtonComponent().hide();
            if (this.betPanel.getSoundOnButtonComponent() != null) this.betPanel.getSoundOnButtonComponent().show();
            this.initConnectingAnimation();
            this.betPanel.port.showPaytableControl().subscribe($bind(this, this.showPaytableControl));
            this.betPanel.port.hidePaytableControl().subscribe($bind(this, this.hidePaytableControl));
            if (!this.betPanel.isTouchLayout && this.betPanel.getPaytablePanelComponent() != null) {
                this.betPanel.getPaytablePanelComponent().getEvents().BACK().addListener($bind(this, this.handlePaytableButtonBack));
                this.betPanel.getPaytablePanelComponent().getEvents().OPEN().addListener($bind(this, this.handlePaytableButtonPressed));
                this.betPanel.getPaytablePanelComponent().getEvents().PREVIOUS().addListener($bind(this, this.handlePaytableButtonPrevious));
                this.betPanel.getPaytablePanelComponent().getEvents().NEXT().addListener($bind(this, this.handlePaytableButtonNext));
            } else {
                var legacyAPP = this.betPanel.getComponentVBContainer(betPanel.ComponentsEnum.AUTOPLAY_PANEL_MOBILE);
                if (legacyAPP != null) legacyAPP.hide();
            }
            this.panelControlsEnabled = false;
        };
        betPanel.BetPanelController.prototype.setNumberOfAutoSpinsLeft = function(e) {
            if (this.betPanel.getAutoPlayButtonControll() != null) this.betPanel.getAutoPlayButtonControll().label.setText(e.getPayload());
        };
        betPanel.BetPanelController.prototype.hideBetPanell = function(e) {
            this.betPanel.getLayer(betPanel.LayersEnum.bp_bar).getDisplayObject().setVisible(false);
        };
        betPanel.BetPanelController.prototype.showBetPannel = function(e) {
            this.betPanel.getLayer(betPanel.LayersEnum.bp_bar).getDisplayObject().setVisible(true);
        };
        betPanel.BetPanelController.prototype.stopAutoPlayListener = function(e) {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON_STOP);
        };
        betPanel.BetPanelController.prototype.startAutoPlayListener = function(e) {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON_PLAY);
        };
        betPanel.BetPanelController.prototype.setAutoPlayButtonState = function(e) {
            var _g = e.getPayload();
            switch (_g[1]) {
                case 0:
                    this.betPanel.getAutoPlayButtonControll().showPlayButton();
                    break;
                case 1:
                    this.betPanel.getAutoPlayButtonControll().showStopButton();
                    break;
            }
        };
        betPanel.BetPanelController.prototype.initConnectingAnimation = function() {
            if (this.isConnectingRegistred) {
                this.connecting = this.betPanel.getLayer(betPanel.LayersEnum.bp_spin).getContainerById("CONNECTING");
                this.connecting.hide();
                this.connectingDO = this.connecting.getDisplayObject();
                this.connectingDO.setPivot(new displayEngineApi.Point(this.connectingDO.getWidth() / 2, this.connectingDO.getHeight() / 2));
                this.connectingDO.setX(this.connectingDO.getWidth() / 2 + betPanel.BetPanelConfiguration.CONNECTING_POSITIONS.x);
                this.connectingDO.setY(this.connectingDO.getHeight() / 2 + betPanel.BetPanelConfiguration.CONNECTING_POSITIONS.y);
            }
        };
        betPanel.BetPanelController.prototype.setCustomButtonState = function(e) {
            var _g = e.getPayload().button;
            switch (_g[1]) {
                case 1:
                    this.animateConnecting(e.getPayload().state);
                    break;
                case 3:
                    this.animateConnecting(e.getPayload().state);
                    break;
                default:
                    return;
            }
        };
        betPanel.BetPanelController.prototype.animateConnecting = function(state) {
            this.connecting.show();
            if (state == betPanelApi.CustomButtonStatePayload.CONNECTING_STATE) {
                displayEngineUtils.TweenX.from(this.connectingDO, {
                    rotation: 0
                }, null, null, null, null, {
                    fileName: "BetPanelController.hx",
                    lineNumber: 249,
                    className: "betpanel.component.imp.BetPanelController",
                    methodName: "animateConnecting"
                });
                displayEngineUtils.TweenX.to(this.connectingDO, {
                    rotation: 360
                }, betPanel.BetPanelConfiguration.CONNECTING_SPEED, null, null, null, null, null, null, null, {
                    fileName: "BetPanelController.hx",
                    lineNumber: 250,
                    className: "betpanel.component.imp.BetPanelController",
                    methodName: "animateConnecting"
                }).repeat(0);
            } else if (state == betPanelApi.CustomButtonStatePayload.CONNECTED_STATE) this.connecting.hide();
        };
        betPanel.BetPanelController.prototype.onShowButton = function(e) {
            var _g = e.getPayload();
            switch (_g[1]) {
                case 1:
                    this.betPanel.getSpinButtonComponent().show();
                    this.betPanel.getSkipButtonComponent().hide();
                    break;
                case 3:
                    this.betPanel.getSpinButtonComponent().hide();
                    this.betPanel.getSkipButtonComponent().show();
                    break;
                case 12:
                    this.betPanel.getAutoPlayButtonControll().show();
                    break;
                case 13:
                    this.betPanel.getAutoPlayButtonControll().show();
                    break;
                case 14:
                    this.betPanel.getAutoPlayButtonControll().show();
                    break;
                case 15:
                    var maxBetButton = this.betPanel.getMaxBetButtonContainer();
                    if (maxBetButton != null) maxBetButton.show();
                    break;
                case 11:
                    this.betPanel.getTotalBetControlComponent().show();
                    break;
                default:
                    return;
            }
        };
        betPanel.BetPanelController.prototype.onHideButton = function(e) {
            var _g = e.getPayload();
            switch (_g[1]) {
                case 1:
                    this.betPanel.getSpinButtonComponent().hide();
                    break;
                case 3:
                    this.betPanel.getSkipButtonComponent().hide();
                    break;
                case 12:
                    this.betPanel.getAutoPlayButtonControll().hide();
                    break;
                case 15:
                    var maxBetButton = this.betPanel.getMaxBetButtonContainer();
                    if (maxBetButton != null) maxBetButton.hide();
                    break;
                case 11:
                    this.betPanel.getTotalBetControlComponent().hide();
                    break;
                default:
                    return;
            }
        };
        betPanel.BetPanelController.prototype.onEnableButton = function(e) {
            var _g = e.getPayload();
            switch (_g[1]) {
                case 1:
                    this.betPanel.getSpinButtonComponent().enable();
                    this.panelControlsEnabled = true;
                    if (this.autoPlayEnabled) this.betPanel.getAutoplayControlComponent().enable();
                    break;
                case 3:
                    this.betPanel.getSkipButtonComponent().enable();
                    break;
                case 15:
                    var maxBetButton = this.betPanel.getMaxBetButtonContainer();
                    if (maxBetButton != null) maxBetButton.enable();
                    break;
                case 5:
                    if (!this.betPanel.isTouchLayout) {
                        if (this.betPanel.getPaytablePanelComponent() == null) return;
                        this.betPanel.getPaytablePanelComponent().enable();
                    } else {
                        if (this.paysButton == null) return;
                        this.paysButton.enable();
                    }
                    break;
                case 9:
                    this.enableSoundButton();
                    break;
                case 11:
                    this.betPanel.getTotalBetControlComponent().enable();
                    break;
                case 12:
                    this.betPanel.getAutoPlayButtonControll().enable();
                    break;
                case 13:
                    this.betPanel.getAutoPlayButtonControll().enable();
                    break;
                case 14:
                    this.betPanel.getAutoPlayButtonControll().enable();
                    break;
                default:
                    return;
            }
        };
        betPanel.BetPanelController.prototype.handleCoinValue = function(e) {
            this.betPanel.getCoinValue().setLabel(e.getPayload());
        };
        betPanel.BetPanelController.prototype.onDisableButton = function(e) {
            var _g = e.getPayload();
            switch (_g[1]) {
                case 1:
                    this.betPanel.getSpinButtonComponent().disable();
                    this.panelControlsEnabled = false;
                    if (this.autoPlayEnabled) this.betPanel.getAutoplayControlComponent().disable();
                    break;
                case 3:
                    this.betPanel.getSkipButtonComponent().disable();
                    break;
                case 5:
                    if (!this.betPanel.isTouchLayout) {
                        if (this.betPanel.getPaytablePanelComponent() == null) return;
                        this.betPanel.getPaytablePanelComponent().disable();
                    } else {
                        if (this.paysButton == null) return;
                        this.paysButton.disable();
                    }
                    break;
                case 10:
                    this.disableSoundButton();
                    break;
                case 11:
                    this.betPanel.getTotalBetControlComponent().disable();
                    break;
                case 12:
                    this.betPanel.getAutoPlayButtonControll().disable();
                    break;
                case 13:
                    this.betPanel.getAutoPlayButtonControll().disable();
                    break;
                case 14:
                    this.betPanel.getAutoPlayButtonControll().disable();
                    break;
                case 15:
                    var maxBetButton = this.betPanel.getMaxBetButtonContainer();
                    if (maxBetButton != null) maxBetButton.disable();
                    break;
                default:
                    return;
            }
        };
        betPanel.BetPanelController.prototype.disableSoundButton = function() {
            if (this.betPanel.getSoundOffButtonComponent() != null) {
                this.betPanel.getSoundOffButtonComponent().show();
                this.betPanel.getSoundOffButtonComponent().enable();
                this.betPanel.getSoundOffButtonComponent().getDisplayObject().bringToTop();
            }
            if (this.betPanel.getSoundOnButtonComponent() != null) {
                this.betPanel.getSoundOnButtonComponent().hide();
                this.betPanel.getSoundOnButtonComponent().disable();
            }
        };
        betPanel.BetPanelController.prototype.enableSoundButton = function() {
            if (this.betPanel.getSoundOffButtonComponent() != null) {
                this.betPanel.getSoundOffButtonComponent().hide();
                this.betPanel.getSoundOffButtonComponent().disable();
            }
            if (this.betPanel.getSoundOnButtonComponent() != null) {
                this.betPanel.getSoundOnButtonComponent().show();
                this.betPanel.getSoundOnButtonComponent().enable();
                this.betPanel.getSoundOnButtonComponent().getDisplayObject().bringToTop();
            }
        };
        betPanel.BetPanelController.prototype.handlePaytableButtonNext = function() {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.PAYTABLE_NEXT);
        };
        betPanel.BetPanelController.prototype.handlePaytableButtonPrevious = function() {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.PAYTABLE_PREVIOUS);
        };
        betPanel.BetPanelController.prototype.handlePaytableButtonPressed = function() {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.PAYTABLE);
        };
        betPanel.BetPanelController.prototype.handlePaytableButtonBack = function() {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.PAYTABLE_CLOSE);
        };
        betPanel.BetPanelController.prototype.handleAutoplayControlUseChanged = function(inUse) {
            var totalBetComponent = this.betPanel.getTotalBetControlComponent();
            var spinButtonComponent = this.betPanel.getSpinButtonComponent();
            if (this.betPanel.isTouchLayout) {
                if (!inUse && this.panelControlsEnabled) {
                    totalBetComponent.enable();
                    spinButtonComponent.enable();
                } else {
                    totalBetComponent.disable();
                    spinButtonComponent.disable();
                }
            } else if (inUse) totalBetComponent.close();
        };
        betPanel.BetPanelController.prototype.handleTotalBetControlUseChanged = function(inUse) {
            var spinButtonComponent = this.betPanel.getSpinButtonComponent();
            var autoplayComponent = this.betPanel.getAutoplayControlComponent();
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.TOTAL_BET);
            if (this.betPanel.isTouchLayout) {
                if (!inUse && this.panelControlsEnabled) {
                    spinButtonComponent.enable();
                    if (this.betPanel.getPaytablePanelComponent() != null) this.betPanel.getPaytablePanelComponent().enable();
                } else {
                    if (this.autoPlayEnabled) autoplayComponent.disable();
                    spinButtonComponent.disable();
                    if (this.betPanel.getPaytablePanelComponent() != null) this.betPanel.getPaytablePanelComponent().disable();
                }
            } else if (inUse) {
                if (this.autoPlayEnabled) autoplayComponent.close();
            }
        };
        betPanel.BetPanelController.prototype.initializeContent = function() {
            var winMeterValue = "0.00";
            var stake = this.presentationInitializationPayload.defaultStake;
            if (this.resumeContentPayload != null) {
                winMeterValue = this.resumeContentPayload.win;
                stake = this.resumeContentPayload.stake;
            } else null;
            this.betPanel.getLayer(betPanel.LayersEnum.bp_bar).getDisplayObject().setCacheAsBitmap(false);
            if (this.betPanel.getWinMeterComponent() != null) this.betPanel.getWinMeterComponent().hide();
            this.betPanel.getTotalBetControlComponent().setValuePairsArray(stake.totalBetsForSelectedLines);
            this.betPanel.getTotalBetControlComponent().setTotalBet(stake.totalBet, stake.stakeItems.betPerLine);
            this.betPanel.getTotalBetControlComponent().setValuePairsArrayLines(stake.totalBetsForSelectedBetPerLine);
            if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "GTECH" || betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "HYBRID") this.betPanel.getBetLinesCompoent().setBetLinesValue(stake.stakeItems.lineCount);
            else if (betPanel.BetPanelConfiguration.BET_PANEL_TYPE == "IGT") this.betPanel.getTotalBetControlComponent().setBetLinesValue(stake.stakeItems.lineCount);
            if (this.betPanel.isTouchLayout) {
                this.betPanel.getLayer(betPanel.LayersEnum.bp_bar).getDisplayObject().setCacheAsBitmap(true);
                if (this.betPanel.getLayer(betPanel.LayersEnum.bp_pays) != null) {
                    if (this.betPanel.getLayer(betPanel.LayersEnum.bp_pays).getComponentById("PaysButton") != null) {
                        this.paysButton = this.betPanel.getLayer(betPanel.LayersEnum.bp_pays).getComponentById("PaysButton");
                        this.paysButton.getEvents().DOWN().addListener($bind(this, this.handlePaysButtonPressed));
                    }
                }
            }
            var autoplayButtonControll = this.betPanel.getAutoPlayButtonControll();
            if (autoplayButtonControll != null) {
                var autoButtonEabled = this.presentationInitializationPayload.slotDefinition.autoSpins.enabled;
                if (!autoButtonEabled) autoplayButtonControll.remove();
            }
        };
        betPanel.BetPanelController.prototype.handleInitializeGame = function(e) {
            this.flag_initializeGameReceived = true;
            this.presentationInitializationPayload = e.getPayload();
            if (this.flag_addedToStage) this.initializeContent();
        };
        betPanel.BetPanelController.prototype.handleResumeGame = function(e) {
            this.flag_initializeGameReceived = true;
            this.presentationInitializationPayload = e.getPayload().initializationProperties;
            if (this.flag_addedToStage) this.initializeContent();
        };
        betPanel.BetPanelController.prototype.handleSetContent = function(e) {
            this.resumeContentPayload = e.getPayload();
            if (this.flag_initializeGameReceived && this.flag_addedToStage) this.initializeContent();
        };
        betPanel.BetPanelController.prototype.handleStartSpinButtonPressed = function(data) {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.SPIN);
        };
        betPanel.BetPanelController.prototype.handleStopSpinButtonPressed = function(data) {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.STOP);
        };
        betPanel.BetPanelController.prototype.handleSkipButtonPressed = function(data) {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.SKIP);
        };
        betPanel.BetPanelController.prototype.handleMaxBetButtonPressed = function(data) {
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.MAX_BET);
        };
        betPanel.BetPanelController.prototype.handleSoundOnButtonPressed = function(data) {
            this.betPanel.getSoundOffButtonComponent().show();
            this.betPanel.getSoundOffButtonComponent().enable();
            this.betPanel.getSoundOffButtonComponent().getDisplayObject().bringToTop();
            this.betPanel.getSoundOnButtonComponent().hide();
            this.betPanel.getSoundOnButtonComponent().disable();
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.SOUND_ON);
        };
        betPanel.BetPanelController.prototype.handleSoundOffButtonPressed = function(data) {
            this.betPanel.getSoundOffButtonComponent().hide();
            this.betPanel.getSoundOffButtonComponent().disable();
            this.betPanel.getSoundOnButtonComponent().show();
            this.betPanel.getSoundOnButtonComponent().enable();
            this.betPanel.getSoundOnButtonComponent().getDisplayObject().bringToTop();
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.SOUND_OFF);
        };
        betPanel.BetPanelController.prototype.handlePaysButtonPressed = function(data) {
            if (!this.panelControlsEnabled) {
                this.paysButton.disable();
                return;
            }
            this.betPanel.port.onButtonPressed().publish(betPanelApi.EButton.PAYTABLE);
        };
        betPanel.BetPanelController.prototype.handleBetPerLineValueChanged = function(value) {
            this.betPanel.port.onStakeChanged().publish(new slotModelApi.StakeItems(this.betPanel.getBetLinesCompoent().getBetLinesValue(), value));
        };
        betPanel.BetPanelController.prototype.updateLayout = function(layoutPayload) {
            var $it0 = layoutPayload.containers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var layerEnum = _hcmn_.Type.createEnum(betPanel.LayersEnum, layerId, null);
                var layerPayload = layoutPayload.containers.get(layerId);
                var cfg = layerPayload.configuration;
                var stage;
                var this1 = betPanel.ExternalService.displayProvider.getStages();
                stage = this1.get(layerPayload.stage);
                var container = this.betPanel.getLayer(layerEnum);
                var containerDO = container.getDisplayObject();
                containerDO.setCacheAsBitmap(false);
                if (!this.flag_addedToStage) stage.addChild(containerDO);
                containerDO.setX(layerPayload.left);
                containerDO.setY(layerPayload.top);
                containerDO.setScaleX(layerPayload.width / containerDO.getUserData().viewBuilderW);
                containerDO.setScaleY(layerPayload.height / containerDO.getUserData().viewBuilderH);
                containerDO.setZIndex(layerPayload.zIndex);
                if (cfg == null) continue;
                var $it1 = (function($this) {
                    var $r;
                    var this2 = container.getChildComponents();
                    $r = this2.keys();
                    return $r;
                }(this));
                while ($it1.hasNext()) {
                    var componentId = $it1.next();
                    var constructorIndex;
                    var _this = _hcmn_.Type.getEnumConstructs(betPanel.ComponentsEnum);
                    constructorIndex = _hcmn_.HxOverrides.indexOf(_this, componentId, 0);
                    if (constructorIndex < 0) continue;
                    var componentEnum = _hcmn_.Type.createEnum(betPanel.ComponentsEnum, componentId, null);
                    switch (componentEnum[1]) {
                        case 7:
                            this.betPanel.getAutoplayControlComponent().configure(cfg);
                            break;
                        case 10:
                            this.betPanel.getTotalBetControlComponent().configure(cfg);
                            break;
                        case 16:
                            this.betPanel.getTotalBetControlComponent().configure(cfg);
                            break;
                        case 22:
                            this.betPanel.getTotalBetControlComponent().configure(cfg);
                            break;
                        default:
                            continue;
                    }
                }
            }
            if (this.flag_initializeGameReceived && !this.flag_addedToStage) this.initializeContent();
            if (!this.flag_addedToStage) {
                this.flag_addedToStage = true;
                null;
            }
        };
        betPanel.BetPanelController.prototype.showPaytableControl = function(e) {
            if (!this.betPanel.isTouchLayout && this.betPanel.getPaytablePanelComponent() != null) {
                this.betPanel.getPaytablePanelComponent().setLabel(e.getPayload());
                this.betPanel.getPaytablePanelComponent().toggleButton(true);
                this.betPanel.getSpinButtonComponent().disable();
                this.betPanel.getTotalBetControlComponent().close();
            } else if (this.paysButton != null) this.paysButton.disable();
        };
        betPanel.BetPanelController.prototype.hidePaytableControl = function(e) {
            if (!this.betPanel.isTouchLayout) {
                if (this.panelControlsEnabled && this.betPanel.getPaytablePanelComponent() != null) {
                    this.betPanel.getPaytablePanelComponent().setLabel(null);
                    this.betPanel.getPaytablePanelComponent().toggleButton(false);
                    this.betPanel.getSpinButtonComponent().enable();
                }
            } else if (this.paysButton != null && this.panelControlsEnabled) this.paysButton.enable();
        };
        betPanel.BetPanelController.prototype.handleUpdateBalance = function(e) {
            if (this.betPanel.getComponentVBContainer(betPanel.ComponentsEnum.BALANCE_DISPLAY) != null) {
                var bdComponent = this.betPanel.getComponentVBContainer(betPanel.ComponentsEnum.BALANCE_DISPLAY);
                if (bdComponent.getComponentById("BalanceValue") != null) {
                    var balanceLabel;
                    balanceLabel = _hcmn_.js_Boot.__cast(bdComponent.getComponentById("BalanceValue"), viewBuilderApi.ILabel);
                    if (this.betPanel.isTouchLayout) {
                        var layer_bp_bar = this.betPanel.getLayer(betPanel.LayersEnum.bp_bar).getDisplayObject();
                        layer_bp_bar.setCacheAsBitmap(false);
                        balanceLabel.setText(e.getPayload());
                        layer_bp_bar.setCacheAsBitmap(true);
                    } else balanceLabel.setText(e.getPayload());
                }
            }
        };
        betPanel.BetPanelController.prototype.handleChangeStake = function(e) {
            if (this.betPanel.isTouchLayout) {
                var layer_bp_bar = this.betPanel.getLayer(betPanel.LayersEnum.bp_bar).getDisplayObject();
                layer_bp_bar.setCacheAsBitmap(false);
                this.betPanel.getTotalBetControlComponent().setValuePairsArray(e.getPayload().totalBetsForSelectedLines);
                this.betPanel.getTotalBetControlComponent().setTotalBet(e.getPayload().totalBet, e.getPayload().stakeItems.betPerLine);
                this.betPanel.getTotalBetControlComponent().setBetLinesValue(e.getPayload().stakeItems.lineCount);
                layer_bp_bar.setCacheAsBitmap(true);
            } else {
                this.betPanel.getTotalBetControlComponent().setValuePairsArray(e.getPayload().totalBetsForSelectedLines);
                this.betPanel.getTotalBetControlComponent().setTotalBet(e.getPayload().totalBet, e.getPayload().stakeItems.betPerLine);
                this.betPanel.getTotalBetControlComponent().setBetLinesValue(e.getPayload().stakeItems.lineCount);
            }
        };
        betPanel.BetPanelController.prototype.testParticles = function() {
            var animationCompoenent = this.betPanel.view.getComponentById("snow_particles");
            if (animationCompoenent == null) return;
            var snowParticleSystem = animationCompoenent.getParticleSystem();
            snowParticleSystem.start(betPanel.ExternalService.displayProvider.getDefaultStage());
            var snowAnimation = animationCompoenent.getAnimation();
            snowAnimation.start();
            var animationCompoenent1 = this.betPanel.view.getComponentById("snow_particles_border");
            if (animationCompoenent1 == null) return;
            var borderParticleSystem = animationCompoenent1.getParticleSystem();
            borderParticleSystem.start(betPanel.ExternalService.displayProvider.getDefaultStage());
            var borderAnimation = animationCompoenent1.getAnimation();
            borderAnimation.start();
        };
        betPanel.BetPanelController.moneyFormatter = null;
        betPanel.BetPanelController.prototype.__class__ = betPanel.BetPanelController;
        betPanel.BetPanelFactory = function(vbf) {
            this.vbf = vbf;
        };
        betPanel.BetPanelFactory = ck_implements(betPanel.BetPanelFactory, clientkernelModulesApi.IService);
        betPanel.BetPanelFactory = ck_implements(betPanel.BetPanelFactory, componentmodelComponentApi.IComponentFactory);
        betPanel.BetPanelFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        betPanel.BetPanelFactory.__name__ = ["betPanel", "BetPanelFactory"];
        betPanel.BetPanelFactory.prototype.vbf = null;
        betPanel.BetPanelFactory.prototype.getComponentDeclaration = function() {
            return betPanelApi.BetPanelDeclaration;
        };
        betPanel.BetPanelFactory.prototype.createComponent = function(context) {
            new betPanel.BetPanel(context, this.vbf);
        };
        betPanel.BetPanelFactory.prototype.__class__ = betPanel.BetPanelFactory;
        betPanel.ExternalService = function() {};
        betPanel.ExternalService.__name__ = ["betPanel", "ExternalService"];
        betPanel.ExternalService.displayProvider = null;
        betPanel.ExternalService.assetRegistry = null;
        betPanel.ExternalService.loadedScene = null;
        betPanel.ExternalService.loadedAnimations = null;
        betPanel.ExternalService.viewBuilderFactory = null;
        betPanel.ExternalService.variableRegistry = null;
        betPanel.ExternalService.moneyFormatter = null;
        betPanel.ExternalService.port = null;
        betPanel.ExternalService.initialize = function(context) {
            betPanel.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            betPanel.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            betPanel.ExternalService.viewBuilderFactory = context.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
            betPanel.ExternalService.variableRegistry = context.getAnyService(clientkernelLoaderApi.IVariableRegistry);
            betPanel.ExternalService.moneyFormatter = context.getAnyService(moneyApi.IMoneyFormatter);
        };
        betPanel.ExternalService.moneyFormatArray = function(array) {
            var formattedArray = [];
            var _g1 = 0;
            var _g = array.length;
            while (_g1 < _g) {
                var i = _g1++;
                formattedArray.push(betPanel.ExternalService.moneyFormatter.format(array[i]));
            }
            return formattedArray;
        };
        betPanel.ExternalService.prototype.__class__ = betPanel.ExternalService;
        betPanel.AutoPlayButtonControll = function(container) {
            this.activeEnabledState = true;
            this.container = container;
            try {
                this.stopButton = _hcmn_.js_Boot.__cast(container.getComponentById(betPanel.AutoPlayButtonControll.STOP_BUTTON), viewBuilderApi.IButton);
            } catch (E) {
                if (E instanceof js._Boot.HaxeError) E = E.val;
                if (_hcmn_.js_Boot.__instanceof(E, Error)) {} else throw (E);
            }
            if (this.stopButton == null) this.stopButton = _hcmn_.js_Boot.__cast(container.getComponentById(betPanel.AutoPlayButtonControll.STOP_BUTTON), viewBuilderApi.IButtonContainer);
            try {
                this.startButton = _hcmn_.js_Boot.__cast(container.getComponentById(betPanel.AutoPlayButtonControll.START_BUTTON), viewBuilderApi.IButton);
            } catch (e) {
                if (e instanceof js._Boot.HaxeError) e = e.val;
                if (_hcmn_.js_Boot.__instanceof(e, Error)) {} else throw (e);
            }
            if (this.startButton == null) this.startButton = _hcmn_.js_Boot.__cast(container.getComponentById(betPanel.AutoPlayButtonControll.START_BUTTON), viewBuilderApi.IButtonContainer);
            if (betPanel.BetPanelConfiguration.AUTOSPIN_LABEL_OUT) this.labelBkg = container.getContainerById(betPanel.AutoPlayButtonControll.NUMBER_OF_ASPINS_BKG);
            else this.labelBkg = null;
            this.label = _hcmn_.js_Boot.__cast(container.getComponentById(betPanel.AutoPlayButtonControll.NUMBER_OF_ASPINS), viewBuilderApi.ILabel);
            this.label.setText("");
            this.initiateView();
            this.updateView();
            this.disable();
        };
        betPanel.AutoPlayButtonControll.__name__ = ["betPanel", "AutoPlayButtonControll"];
        betPanel.AutoPlayButtonControll.prototype.container = null;
        betPanel.AutoPlayButtonControll.prototype.stopButton = null;
        betPanel.AutoPlayButtonControll.prototype.startButton = null;
        betPanel.AutoPlayButtonControll.prototype.labelBkg = null;
        betPanel.AutoPlayButtonControll.prototype.activeButton = null;
        betPanel.AutoPlayButtonControll.prototype.inactiveButton = null;
        betPanel.AutoPlayButtonControll.prototype.label = null;
        betPanel.AutoPlayButtonControll.prototype.activeEnabledState = null;
        betPanel.AutoPlayButtonControll.prototype.initiateView = function() {
            this.activeButton = this.startButton;
            this.inactiveButton = this.stopButton;
            this.label.getDisplayObject().setVisible(false);
            if (this.labelBkg != null) this.labelBkg.getDisplayObject().setVisible(false);
        };
        betPanel.AutoPlayButtonControll.prototype.updateView = function() {
            this.activeButton.getDisplayObject().setVisible(true);
            this.inactiveButton.getDisplayObject().setVisible(false);
        };
        betPanel.AutoPlayButtonControll.prototype.enable = function() {
            this.activeButton.enable();
            this.inactiveButton.disable();
            this.activeEnabledState = true;
            this.activeButton.getDisplayObject().setVisible(true);
            this.inactiveButton.getDisplayObject().setVisible(false);
        };
        betPanel.AutoPlayButtonControll.prototype.showPlayButton = function() {
            this.activeButton = this.startButton;
            this.inactiveButton = this.stopButton;
            this.label.getDisplayObject().setVisible(false);
            if (this.labelBkg != null) this.labelBkg.getDisplayObject().setVisible(false);
            if (this.activeEnabledState == true) this.enable();
            else this.disable();
            this.updateView();
        };
        betPanel.AutoPlayButtonControll.prototype.showStopButton = function() {
            this.activeButton = this.stopButton;
            this.inactiveButton = this.startButton;
            this.label.getDisplayObject().setVisible(true);
            if (this.labelBkg != null) this.labelBkg.getDisplayObject().setVisible(true);
            if (this.activeEnabledState == true) this.enable();
            else this.disable();
            this.updateView();
        };
        betPanel.AutoPlayButtonControll.prototype.disable = function() {
            this.activeEnabledState = false;
            this.activeButton.disable();
            this.inactiveButton.disable();
            this.activeButton.getDisplayObject().setVisible(true);
            this.inactiveButton.getDisplayObject().setVisible(false);
        };
        betPanel.AutoPlayButtonControll.prototype.hide = function() {
            this.activeButton.getDisplayObject().setVisible(false);
            this.inactiveButton.getDisplayObject().setVisible(false);
        };
        betPanel.AutoPlayButtonControll.prototype.show = function() {
            this.activeButton.getDisplayObject().setVisible(true);
            this.inactiveButton.getDisplayObject().setVisible(false);
        };
        betPanel.AutoPlayButtonControll.prototype.remove = function() {
            this.container.hide();
        };
        betPanel.AutoPlayButtonControll.prototype.__class__ = betPanel.AutoPlayButtonControll;
        betPanel.AutoPlayPanelControl = function(container) {
            this.panelVisible = false;
            this.container = container;
            this.events = new betPanel.AutoplayPanelControlEvents();
            var mainBtn;
            mainBtn = _hcmn_.js_Boot.__cast(container.getComponentById("BtnAutoPlay"), viewBuilderApi.IButton);
            mainBtn.getEvents().DOWN().addListener($bind(this, this.onDown));
            mainBtn.getEvents().OUT().addListener($bind(this, this.onOut));
            mainBtn.getEvents().OVER().addListener($bind(this, this.onOver));
            mainBtn.getEvents().UP().addListener($bind(this, this.onUp));
            this.comboBox = _hcmn_.js_Boot.__cast(container.getComponentById("AutoPlayComboBox"), viewBuilderApi.IComboBox);
            this.comboBox.getEvents().SELECTION_SET().addListener($bind(this, this.setSelection));
            this.setAutoPlayValues(["5", "10", "15", "20", "25"]);
            this.comboBox.colapse();
            this.totalAutoplayLabel = _hcmn_.js_Boot.__cast(container.getComponentById("AutoPlayBtnLabel"), viewBuilderApi.ILabel);
            this.defaultText = this.totalAutoplayLabel.getText();
            this.comboBox.setVanityBarVisible(false);
            this.disable();
        };
        betPanel.AutoPlayPanelControl = ck_implements(betPanel.AutoPlayPanelControl, betPanel.IAutoPlayPanelControl);
        betPanel.AutoPlayPanelControl.__interfaces__ = [betPanel.IAutoPlayPanelControl];
        betPanel.AutoPlayPanelControl.__name__ = ["betPanel", "AutoPlayPanelControl"];
        betPanel.AutoPlayPanelControl.prototype.container = null;
        betPanel.AutoPlayPanelControl.prototype.panelVisible = null;
        betPanel.AutoPlayPanelControl.prototype.comboBox = null;
        betPanel.AutoPlayPanelControl.prototype.totalAutoplayLabel = null;
        betPanel.AutoPlayPanelControl.prototype.defaultText = null;
        betPanel.AutoPlayPanelControl.prototype.events = null;
        betPanel.AutoPlayPanelControl.prototype.autoPlayValues = null;
        betPanel.AutoPlayPanelControl.prototype.onUp = function(data) {};
        betPanel.AutoPlayPanelControl.prototype.onOut = function(data) {};
        betPanel.AutoPlayPanelControl.prototype.onOver = function(data) {};
        betPanel.AutoPlayPanelControl.prototype.onDown = function(data) {
            if (this.comboBox.isExpanded()) {
                this.close();
                this.comboBox.setVanityBarVisible(false);
                this.totalAutoplayLabel.setText(this.defaultText);
            } else this.open();
        };
        betPanel.AutoPlayPanelControl.prototype.setSelection = function(index) {
            var selectedIndex = index;
            this.close();
            this.totalAutoplayLabel.setText(this.autoPlayValues[selectedIndex]);
            this.comboBox.setSelectedValue(this.autoPlayValues[selectedIndex]);
            this.comboBox.setVanityBarVisible(true);
        };
        betPanel.AutoPlayPanelControl.prototype.setAutoPlayValues = function(values) {
            this.autoPlayValues = values;
            this.comboBox.setComboBoxValues(values);
        };
        betPanel.AutoPlayPanelControl.prototype.enable = function() {
            this.container.enable();
        };
        betPanel.AutoPlayPanelControl.prototype.disable = function() {
            this.container.disable();
            this.close();
        };
        betPanel.AutoPlayPanelControl.prototype.open = function() {
            this.comboBox.expand();
            this.events.CONTROL_IN_USE().dispatch(true);
        };
        betPanel.AutoPlayPanelControl.prototype.close = function() {
            this.comboBox.colapse();
            this.events.CONTROL_IN_USE().dispatch(false);
        };
        betPanel.AutoPlayPanelControl.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.AutoPlayPanelControl.prototype.configure = function(config) {};
        betPanel.AutoPlayPanelControl.prototype.__class__ = betPanel.AutoPlayPanelControl;
        betPanel.AutoPlayPanelControlMobile = function(container) {
            this.autoplayCountIndex = 0;
            this.autoplayCountValues = ["1", "5", "10", "15", "20", "25", "30", "35", "40", "50"];
            this.position = 0;
            this._currMouseY = 0;
            this._currentMouseDir = -Infinity;
            this._finalOff = 0;
            this._stringOff = "";
            this._tmpOff = 0;
            this._off = 0;
            this.updateSpeedInPixels = 40;
            this.initialMouseY = 0;
            this.events = new betPanel.AutoplayPanelControlEvents();
            this.mockButton = _hcmn_.js_Boot.__cast(container.getComponentById("AutoplayBtn"), viewBuilderApi.IButton);
            this.mockButton.disable();
        };
        betPanel.AutoPlayPanelControlMobile = ck_implements(betPanel.AutoPlayPanelControlMobile, betPanel.IAutoPlayPanelControl);
        betPanel.AutoPlayPanelControlMobile.__interfaces__ = [betPanel.IAutoPlayPanelControl];
        betPanel.AutoPlayPanelControlMobile.__name__ = ["betPanel", "AutoPlayPanelControlMobile"];
        betPanel.AutoPlayPanelControlMobile.prototype.infoBarAmountLabel = null;
        betPanel.AutoPlayPanelControlMobile.prototype.autoPlayBtnLabel = null;
        betPanel.AutoPlayPanelControlMobile.prototype.autoPlayCountLabel = null;
        betPanel.AutoPlayPanelControlMobile.prototype.infoBar = null;
        betPanel.AutoPlayPanelControlMobile.prototype.topClip = null;
        betPanel.AutoPlayPanelControlMobile.prototype.bottomClip = null;
        betPanel.AutoPlayPanelControlMobile.prototype.arrowUp = null;
        betPanel.AutoPlayPanelControlMobile.prototype.arrowDown = null;
        betPanel.AutoPlayPanelControlMobile.prototype.roundedSlideIndicator = null;
        betPanel.AutoPlayPanelControlMobile.prototype.roundedSlideIndicatorPlaceholders = null;
        betPanel.AutoPlayPanelControlMobile.prototype.roundedSlideSingleStepImg = null;
        betPanel.AutoPlayPanelControlMobile.prototype.roundedSlideCanvas = null;
        betPanel.AutoPlayPanelControlMobile.prototype.roundedSlideCanvasCtx = null;
        betPanel.AutoPlayPanelControlMobile.prototype.arrowUpOriginalY = null;
        betPanel.AutoPlayPanelControlMobile.prototype.arrowDownOriginalY = null;
        betPanel.AutoPlayPanelControlMobile.prototype.topClipOriginalY = null;
        betPanel.AutoPlayPanelControlMobile.prototype.bottomClipOriginalY = null;
        betPanel.AutoPlayPanelControlMobile.prototype.initialMouseY = null;
        betPanel.AutoPlayPanelControlMobile.prototype.updateSpeedInPixels = null;
        betPanel.AutoPlayPanelControlMobile.prototype._off = null;
        betPanel.AutoPlayPanelControlMobile.prototype._tmpOff = null;
        betPanel.AutoPlayPanelControlMobile.prototype._stringOff = null;
        betPanel.AutoPlayPanelControlMobile.prototype._finalOff = null;
        betPanel.AutoPlayPanelControlMobile.prototype._currentMouseDir = null;
        betPanel.AutoPlayPanelControlMobile.prototype._currMouseY = null;
        betPanel.AutoPlayPanelControlMobile.prototype.position = null;
        betPanel.AutoPlayPanelControlMobile.prototype.autoplayCountValues = null;
        betPanel.AutoPlayPanelControlMobile.prototype.autoplayCountIndex = null;
        betPanel.AutoPlayPanelControlMobile.prototype.autoplayCount = null;
        betPanel.AutoPlayPanelControlMobile.prototype.slideButtonContainer = null;
        betPanel.AutoPlayPanelControlMobile.prototype.slideButtonDO = null;
        betPanel.AutoPlayPanelControlMobile.prototype.events = null;
        betPanel.AutoPlayPanelControlMobile.prototype._opened = null;
        betPanel.AutoPlayPanelControlMobile.prototype.mockButton = null;
        betPanel.AutoPlayPanelControlMobile.prototype.createProgressSlider = function(spritesheetID) {
            var assets = betPanel.ExternalService.loadedScene;
            var spritesheetJSON;
            var this1 = assets.getSpritesheetJSONs();
            spritesheetJSON = this1.get(spritesheetID);
            var spritesheetImage;
            var this2 = assets.getSpritesheetImages();
            spritesheetImage = this2.get(spritesheetID);
            var scaleFactor;
            if (assets.getConfiguration().scalefactor != null) scaleFactor = assets.getConfiguration().scalefactor;
            else scaleFactor = 1;
            var stepsNum = this.autoplayCountValues.length;
            this.roundedSlideSingleStepImg = displayEngineUtils.Utils.extractFrame(spritesheetImage, spritesheetJSON, "st_button", stepsNum - 1);
            var _this = window.document;
            this.roundedSlideCanvas = _this.createElement("canvas");
            this.roundedSlideCanvas.width = this.roundedSlideSingleStepImg.width;
            this.roundedSlideCanvas.height = this.roundedSlideSingleStepImg.height;
            this.roundedSlideCanvasCtx = this.roundedSlideCanvas.getContext("2d", null);
            this.roundedSlideIndicator = betPanel.ExternalService.displayProvider.getFactory().createBitmap(this.roundedSlideCanvas);
            this.roundedSlideIndicator.setScale(0.8 / scaleFactor);
            var roundedSlideCanvasPHs;
            var _this1 = window.document;
            roundedSlideCanvasPHs = _this1.createElement("canvas");
            roundedSlideCanvasPHs.width = this.roundedSlideSingleStepImg.width;
            roundedSlideCanvasPHs.height = this.roundedSlideSingleStepImg.height;
            this.roundedSlideIndicatorPlaceholders = betPanel.ExternalService.displayProvider.getFactory().createBitmap(roundedSlideCanvasPHs);
            this.roundedSlideIndicatorPlaceholders.setScale(0.8 / scaleFactor);
            this.drawSliderSteps(roundedSlideCanvasPHs, this.autoplayCountValues.length - 1);
            this.drawSliderSteps(this.roundedSlideCanvas, this.autoplayCountIndex);
            this.slideButtonContainer.getDisplayObject().addChild(this.roundedSlideIndicatorPlaceholders);
            this.slideButtonContainer.getDisplayObject().addChild(this.roundedSlideIndicator);
        };
        betPanel.AutoPlayPanelControlMobile.prototype.drawSliderSteps = function(canvas, stepCount) {
            if (stepCount == null) stepCount = 0;
            var img = this.roundedSlideSingleStepImg;
            var steps = this.autoplayCountValues.length;
            var incVal = 297 / steps * (_hcmn_.Math.PI / 180);
            var context = canvas.getContext("2d");
            var x = canvas.width / 2;
            var y = canvas.height / 2;
            var width = img.width;
            var height = img.height;
            context.clearRect(0, 0, canvas.width, canvas.height);
            var _g1 = 0;
            var _g = stepCount + 1;
            while (_g1 < _g) {
                var i = _g1++;
                context.translate(x, y);
                context.rotate(i * incVal);
                context.drawImage(img, -width / 2, -height / 2, width, height);
                context.rotate(-i * incVal);
                context.translate(-x, -y);
            }
        };
        betPanel.AutoPlayPanelControlMobile.prototype.handleMouseDown = function(data) {
            this.initialMouseY = data.y;
            this.open();
        };
        betPanel.AutoPlayPanelControlMobile.prototype.handleMouseUp = function(data) {
            this.close();
        };
        betPanel.AutoPlayPanelControlMobile.prototype.handleMouseMove = function(data) {
            if (this._currentMouseDir == -Infinity && data.y != this.initialMouseY) {
                if (data.y > this.initialMouseY) this._currentMouseDir = 1;
                else this._currentMouseDir = -1;
                this._currMouseY = data.y;
            }
            if (this._currentMouseDir > 0 && data.y < this._currMouseY) {
                this._currentMouseDir = -1;
                this.initialMouseY = data.y;
            }
            if (this._currentMouseDir < 0 && data.y > this._currMouseY) {
                this._currentMouseDir = 1;
                this.initialMouseY = data.y;
            }
            this._currMouseY = data.y;
            if (_hcmn_.HxOverrides.indexOf(this.autoplayCountValues, this.autoplayCount, 0) != -1) {
                this._tmpOff = (this.initialMouseY - data.y) / this.updateSpeedInPixels;
                var len = (this._tmpOff + "").indexOf(".");
                this._stringOff = _hcmn_.HxOverrides.substr(this._tmpOff + "", 0, len);
                this._finalOff = _hcmn_.Std.parseInt(this._stringOff);
                if (this._finalOff != this._off) {
                    if (this._finalOff > 0) this.autoplayCountIndex += 1;
                    else if (this._finalOff < 0) this.autoplayCountIndex -= 1;
                    this._off = this._finalOff;
                }
                if (this.autoplayCountIndex < 0) this.autoplayCountIndex = 0;
                if (this.autoplayCountIndex > this.autoplayCountValues.length - 1) this.autoplayCountIndex = this.autoplayCountValues.length - 1;
                if (this.autoplayCount != this.autoplayCountValues[this.autoplayCountIndex]) {
                    this.autoplayCount = this.autoplayCountValues[this.autoplayCountIndex];
                    this.infoBarAmountLabel.setText(this.autoplayCount);
                    this.drawSliderSteps(this.roundedSlideCanvas, this.autoplayCountIndex);
                }
            }
        };
        betPanel.AutoPlayPanelControlMobile.prototype.setTotalBetValues = function(autoplayCountValues) {
            this.autoplayCountValues = autoplayCountValues.slice();
        };
        betPanel.AutoPlayPanelControlMobile.prototype.disable = function() {
            this.mockButton.disable();
        };
        betPanel.AutoPlayPanelControlMobile.prototype.enable = function() {
            this.mockButton.enable();
        };
        betPanel.AutoPlayPanelControlMobile.prototype.open = function() {};
        betPanel.AutoPlayPanelControlMobile.prototype.close = function() {};
        betPanel.AutoPlayPanelControlMobile.prototype.setAutoPlayValues = function(values) {};
        betPanel.AutoPlayPanelControlMobile.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.AutoPlayPanelControlMobile.prototype.configure = function(config) {
            var _g = config.dir;
            switch (_g) {
                case "right":
                    this.mockButton.getDisplayObject().setRotation(90);
                    this.mockButton.getDisplayObject().setX(323);
                    this.mockButton.getDisplayObject().setY(88);
                    break;
                case "up":
                    this.mockButton.getDisplayObject().setRotation(0);
                    this.mockButton.getDisplayObject().setX(0);
                    this.mockButton.getDisplayObject().setY(0);
                    break;
            }
        };
        betPanel.AutoPlayPanelControlMobile.prototype.__class__ = betPanel.AutoPlayPanelControlMobile;
        betPanel.BetLines = function(container) {
            this.container = container;
            if (container.getComponentById(betPanel.BetLines.LABEL_BETLINES_VALUE_ID) != null) this.betLinesLabel = _hcmn_.js_Boot.__cast(container.getComponentById(betPanel.BetLines.LABEL_BETLINES_VALUE_ID), viewBuilderApi.ILabel);
        };
        betPanel.BetLines = ck_implements(betPanel.BetLines, betPanel.IBetLines);
        betPanel.BetLines.__interfaces__ = [betPanel.IBetLines];
        betPanel.BetLines.__name__ = ["betPanel", "BetLines"];
        betPanel.BetLines.prototype.titleLabel = null;
        betPanel.BetLines.prototype.betLinesLabel = null;
        betPanel.BetLines.prototype.betLinesValue = null;
        betPanel.BetLines.prototype.container = null;
        betPanel.BetLines.prototype.setBetLinesValue = function(value) {
            if (this.betLinesLabel != null) this.betLinesLabel.setText(value + "");
            this.betLinesValue = value;
        };
        betPanel.BetLines.prototype.getBetLinesValue = function() {
            return this.betLinesValue;
        };
        betPanel.BetLines.prototype.__class__ = betPanel.BetLines;
        betPanel.CoinValue = function(container) {
            this.container = container;
        };
        betPanel.CoinValue.__name__ = ["betPanel", "CoinValue"];
        betPanel.CoinValue.prototype.container = null;
        betPanel.CoinValue.prototype.setLabel = function(text) {
            if (this.container.getLabelById("CoinValue") != null) this.container.getLabelById("CoinValue").setText(text);
        };
        betPanel.CoinValue.prototype.__class__ = betPanel.CoinValue;
        betPanel.GtechBetControlDesktop = function(container) {
            this.panelVisible = false;
            this.container = container;
            this.events = new betPanel.TotalBetControlEvents();
            var mainBtn;
            mainBtn = _hcmn_.js_Boot.__cast(container.getComponentById("BtnTotalBet"), viewBuilderApi.IButton);
            mainBtn.getEvents().DOWN().addListener($bind(this, this.onDown));
            mainBtn.getEvents().OUT().addListener($bind(this, this.onOut));
            mainBtn.getEvents().OVER().addListener($bind(this, this.onOver));
            mainBtn.getEvents().UP().addListener($bind(this, this.onUp));
            this.comboBox = _hcmn_.js_Boot.__cast(container.getComponentById("TotalBetComboBox"), viewBuilderApi.IComboBox);
            this.comboBox.getEvents().SELECTION_SET().addListener($bind(this, this.setSelection));
            this.totalBetLabel = _hcmn_.js_Boot.__cast(container.getComponentById("TotalBetLabel"), viewBuilderApi.ILabel);
            if (container.getComponentById("TotalBetLabelTitle") != null) this.totalBetLabelTitle = _hcmn_.js_Boot.__cast(container.getComponentById("TotalBetLabelTitle"), viewBuilderApi.ILabel);
            this.comboBox.colapse();
        };
        betPanel.GtechBetControlDesktop = ck_implements(betPanel.GtechBetControlDesktop, betPanel.ITotalBetControl);
        betPanel.GtechBetControlDesktop.__interfaces__ = [betPanel.ITotalBetControl];
        betPanel.GtechBetControlDesktop.__name__ = ["betPanel", "GtechBetControlDesktop"];
        betPanel.GtechBetControlDesktop.prototype.container = null;
        betPanel.GtechBetControlDesktop.prototype.panelVisible = null;
        betPanel.GtechBetControlDesktop.prototype.comboBox = null;
        betPanel.GtechBetControlDesktop.prototype.totalBetLabel = null;
        betPanel.GtechBetControlDesktop.prototype.totalBetLabelTitle = null;
        betPanel.GtechBetControlDesktop.prototype.events = null;
        betPanel.GtechBetControlDesktop.prototype.betPerLineValue = null;
        betPanel.GtechBetControlDesktop.prototype.totalBetValue = null;
        betPanel.GtechBetControlDesktop.prototype.valuePairsArray = null;
        betPanel.GtechBetControlDesktop.prototype.onUp = function(data) {};
        betPanel.GtechBetControlDesktop.prototype.onOut = function(data) {};
        betPanel.GtechBetControlDesktop.prototype.onOver = function(data) {};
        betPanel.GtechBetControlDesktop.prototype.onDown = function(data) {
            if (this.comboBox.isExpanded()) this.close();
            else this.open();
        };
        betPanel.GtechBetControlDesktop.prototype.setSelection = function(value) {
            this.close();
            var selectedIndex = value;
            var newBetPerLineValue = this.valuePairsArray[selectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
        };
        betPanel.GtechBetControlDesktop.prototype.moneyFormatArray = function(array) {
            var formattedArray = [];
            var _g1 = 0;
            var _g = array.length;
            while (_g1 < _g) {
                var i = _g1++;
                formattedArray.push(betPanel.ExternalService.moneyFormatter.format(array[i]));
            }
            return formattedArray;
        };
        betPanel.GtechBetControlDesktop.prototype.enable = function() {
            var mainBtn;
            mainBtn = _hcmn_.js_Boot.__cast(this.container.getComponentById("BtnTotalBet"), viewBuilderApi.IButton);
            mainBtn.enable();
            if (this.totalBetLabelTitle != null) {
                this.totalBetLabelTitle.updateTo("TotalBetLabelTitle", "TotalBetLabelTitle");
                this.totalBetLabelTitle.getDisplayObject().setAlpha(1);
            }
            this.totalBetLabel.updateTo("TotalBetLabel", "TotalBetLabel");
            this.totalBetLabel.getDisplayObject().setAlpha(1);
            this.comboBox.enable();
        };
        betPanel.GtechBetControlDesktop.prototype.disable = function() {
            var mainBtn;
            mainBtn = _hcmn_.js_Boot.__cast(this.container.getComponentById("BtnTotalBet"), viewBuilderApi.IButton);
            this.close();
            mainBtn.disable();
            if (this.totalBetLabelTitle != null) {
                this.totalBetLabelTitle.updateTo("TotalBetLabelTitleDisabled", "TotalBetLabelTitleDisabled");
                this.totalBetLabelTitle.getDisplayObject().setAlpha(0.5);
            }
            this.totalBetLabel.updateTo("TotalBetLabelDisabled", "TotalBetLabelDisabled");
            this.totalBetLabel.getDisplayObject().setAlpha(0.5);
            this.comboBox.disable();
        };
        betPanel.GtechBetControlDesktop.prototype.setTotalBet = function(totalBetValue, betPerLineValue) {
            this.totalBetValue = totalBetValue;
            this.betPerLineValue = betPerLineValue;
            var formattedTotalBetValue = betPanel.ExternalService.moneyFormatter.format(totalBetValue);
            this.totalBetLabel.setText(formattedTotalBetValue);
            this.comboBox.setSelectedValue(formattedTotalBetValue);
        };
        betPanel.GtechBetControlDesktop.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.GtechBetControlDesktop.prototype.open = function() {
            if (this.comboBox.isExpanded()) return;
            this.comboBox.expand();
            this.events.CONTROL_IN_USE().dispatch(true);
        };
        betPanel.GtechBetControlDesktop.prototype.close = function() {
            if (!this.comboBox.isExpanded()) return;
            this.comboBox.colapse();
            this.events.CONTROL_IN_USE().dispatch(false);
        };
        betPanel.GtechBetControlDesktop.prototype.setValuePairsArray = function(values) {
            this.valuePairsArray = values;
            var displayValues = [];
            var _g = 0;
            var _g1 = this.valuePairsArray;
            while (_g < _g1.length) {
                var pair = _g1[_g];
                ++_g;
                displayValues.push(pair.key);
            }
            if (values.length <= 1) this.comboBox.setVanityBarVisible(false);
            this.comboBox.setComboBoxValues(this.moneyFormatArray(displayValues));
        };
        betPanel.GtechBetControlDesktop.prototype.configure = function(config) {};
        betPanel.GtechBetControlDesktop.prototype.setBetLinesValue = function(lines) {};
        betPanel.GtechBetControlDesktop.prototype.getBetLinesValue = function() {
            return 0;
        };
        betPanel.GtechBetControlDesktop.prototype.getBetLines = function() {
            return null;
        };
        betPanel.GtechBetControlDesktop.prototype.setValuePairsArrayLines = function(totalBetsForSelectedBetPerLine) {};
        betPanel.GtechBetControlDesktop.prototype.hide = function() {};
        betPanel.GtechBetControlDesktop.prototype.show = function() {};
        betPanel.GtechBetControlDesktop.prototype.__class__ = betPanel.GtechBetControlDesktop;
        betPanel.GtechTotalBetControlMobile = function(container) {
            this._opened = false;
            this.betPerLineValueIndex = 4;
            this._currMousePoint = {
                x: 0,
                y: 0
            };
            this._currMouseValue = 0;
            this._currentMouseDir = -Infinity;
            this.updateSpeedInPixels = 40;
            this.initialMousePoint = {
                x: 0,
                y: 0
            };
            this.initialMouseY = 0;
            this._off = 0;
            this.verticalMovementOffset = 180;
            this.progressSliderInitialized = false;
            this.slideButtonContainer = _hcmn_.js_Boot.__cast(container, viewBuilderApi.ISlideButtonContainer);
            this.events = new betPanel.TotalBetControlEvents();
            this.infoBar = this.slideButtonContainer.getComponentById("SlideBtnInfoContainer");
            this.infoBarBkg = _hcmn_.js_Boot.__cast(this.infoBar.getComponentById("SlideBtnInfoBar").getDisplayObject(), displayEngineApi.IBitmap);
            this.infoBarLabel = _hcmn_.js_Boot.__cast(this.infoBar.getComponentById(betPanel.GtechTotalBetControlMobile.LABEL_INFOBAR_LABEL_ID), viewBuilderApi.ILabel);
            this.infoBarAmountLabel = _hcmn_.js_Boot.__cast(this.infoBar.getComponentById(betPanel.GtechTotalBetControlMobile.LABEL_INFOBAR_VALUE_ID), viewBuilderApi.ILabel);
            this.btnAmountLabel = _hcmn_.js_Boot.__cast(this.slideButtonContainer.getComponentById(betPanel.GtechTotalBetControlMobile.LABEL_TOTALBET_VALUE_ID), viewBuilderApi.ILabel);
            if (this.slideButtonContainer.getComponentById(betPanel.GtechTotalBetControlMobile.LABEL_TOTALBET_TITLE_ID) != null) this.btnTotalBetLabelTitle = _hcmn_.js_Boot.__cast(this.slideButtonContainer.getComponentById(betPanel.GtechTotalBetControlMobile.LABEL_TOTALBET_TITLE_ID), viewBuilderApi.ILabel);
            this.slideButtonDO = this.slideButtonContainer.getBaseButton().getDisplayObject();
            this.slideButtonContainer.getEvents().DOWN().addListener($bind(this, this.handleMouseDown));
            this.slideButtonContainer.getEvents().UP().addListener($bind(this, this.handleMouseUp));
            var vba = betPanel.ExternalService.viewBuilderFactory.createView(betPanel.ExternalService.loadedAnimations);
            var vbAniamtionHolderUp = vba.createContainerFromStoredConfig("ANIMATION_HOLDER");
            var vbAniamtionComponentUp;
            vbAniamtionComponentUp = _hcmn_.js_Boot.__cast(vbAniamtionHolderUp.getComponentById("ANIMATION_CONTENT"), viewBuilderApi.IVBAnimationComponent);
            this.slideButtonContainer.addChildComponent(vbAniamtionComponentUp, "bet_btn_arrows_up");
            vbAniamtionComponentUp.play(false);
            vbAniamtionComponentUp.show();
            vbAniamtionComponentUp.getDisplayObject().sendToBottom();
            vbAniamtionComponentUp.getDisplayObject().setVisible(false);
            this.betArrowUp = vbAniamtionComponentUp;
            var vbAniamtionHolderDn = vba.createContainerFromStoredConfig("ANIMATION_HOLDER");
            var vbAniamtionComponentDn;
            vbAniamtionComponentDn = _hcmn_.js_Boot.__cast(vbAniamtionHolderDn.getComponentById("ANIMATION_CONTENT"), viewBuilderApi.IVBAnimationComponent);
            this.slideButtonContainer.addChildComponent(vbAniamtionComponentDn, "bet_btn_arrows_dn");
            vbAniamtionComponentDn.play(false);
            vbAniamtionComponentDn.show();
            vbAniamtionComponentDn.getDisplayObject().sendToBottom();
            vbAniamtionComponentDn.getDisplayObject().setVisible(false);
            this.betArrowDn = vbAniamtionComponentDn;
        };
        betPanel.GtechTotalBetControlMobile = ck_implements(betPanel.GtechTotalBetControlMobile, betPanel.ITotalBetControl);
        betPanel.GtechTotalBetControlMobile.__interfaces__ = [betPanel.ITotalBetControl];
        betPanel.GtechTotalBetControlMobile.__name__ = ["betPanel", "GtechTotalBetControlMobile"];
        betPanel.GtechTotalBetControlMobile.prototype.infoOpenedPosR = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoClosedPosR = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoOpenedPosL = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoClosedPosL = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoOpenedPosU = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoClosedPosU = null;
        betPanel.GtechTotalBetControlMobile.prototype.clipMovementTime = null;
        betPanel.GtechTotalBetControlMobile.prototype.btnAmountLabel = null;
        betPanel.GtechTotalBetControlMobile.prototype.btnTotalBetLabelTitle = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoBarAmountLabel = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoBarLabel = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoBar = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoBarBkg = null;
        betPanel.GtechTotalBetControlMobile.prototype.topClip = null;
        betPanel.GtechTotalBetControlMobile.prototype.bottomClip = null;
        betPanel.GtechTotalBetControlMobile.prototype.arrowUp = null;
        betPanel.GtechTotalBetControlMobile.prototype.arrowDown = null;
        betPanel.GtechTotalBetControlMobile.prototype.roundedSlideIndicator = null;
        betPanel.GtechTotalBetControlMobile.prototype.roundedSlideIndicatorPlaceholders = null;
        betPanel.GtechTotalBetControlMobile.prototype.roundedSlideSingleStepImg = null;
        betPanel.GtechTotalBetControlMobile.prototype.roundedSlideCanvas = null;
        betPanel.GtechTotalBetControlMobile.prototype.roundedSlideCanvasCtx = null;
        betPanel.GtechTotalBetControlMobile.prototype.progressSliderInitialized = null;
        betPanel.GtechTotalBetControlMobile.prototype.verticalMovementOffset = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoPanelOpenedPos = null;
        betPanel.GtechTotalBetControlMobile.prototype.infoPanelClosedPos = null;
        betPanel.GtechTotalBetControlMobile.prototype.arrowUpOriginalY = null;
        betPanel.GtechTotalBetControlMobile.prototype.arrowDownOriginalY = null;
        betPanel.GtechTotalBetControlMobile.prototype.topClipOriginalY = null;
        betPanel.GtechTotalBetControlMobile.prototype.bottomClipOriginalY = null;
        betPanel.GtechTotalBetControlMobile.prototype.arrowUpOriginalX = null;
        betPanel.GtechTotalBetControlMobile.prototype.arrowDownOriginalX = null;
        betPanel.GtechTotalBetControlMobile.prototype.topClipOriginalX = null;
        betPanel.GtechTotalBetControlMobile.prototype.bottomClipOriginalX = null;
        betPanel.GtechTotalBetControlMobile.prototype._off = null;
        betPanel.GtechTotalBetControlMobile.prototype.initialMouseY = null;
        betPanel.GtechTotalBetControlMobile.prototype.initialMousePoint = null;
        betPanel.GtechTotalBetControlMobile.prototype.updateSpeedInPixels = null;
        betPanel.GtechTotalBetControlMobile.prototype._currentMouseDir = null;
        betPanel.GtechTotalBetControlMobile.prototype._currMouseValue = null;
        betPanel.GtechTotalBetControlMobile.prototype._currMousePoint = null;
        betPanel.GtechTotalBetControlMobile.prototype.betPerLineValueIndex = null;
        betPanel.GtechTotalBetControlMobile.prototype.betPerLineValue = null;
        betPanel.GtechTotalBetControlMobile.prototype.totalBetValue = null;
        betPanel.GtechTotalBetControlMobile.prototype.valuePairsArray = null;
        betPanel.GtechTotalBetControlMobile.prototype.confirmedBetPerLineValue = null;
        betPanel.GtechTotalBetControlMobile.prototype.confirmedTotalBetValue = null;
        betPanel.GtechTotalBetControlMobile.prototype.slideButtonContainer = null;
        betPanel.GtechTotalBetControlMobile.prototype.slideButtonDO = null;
        betPanel.GtechTotalBetControlMobile.prototype.events = null;
        betPanel.GtechTotalBetControlMobile.prototype._opened = null;
        betPanel.GtechTotalBetControlMobile.prototype._activeConfig = null;
        betPanel.GtechTotalBetControlMobile.prototype.betArrowDn = null;
        betPanel.GtechTotalBetControlMobile.prototype.betArrowUp = null;
        betPanel.GtechTotalBetControlMobile.prototype._continiousBetUpdateTimer = null;
        betPanel.GtechTotalBetControlMobile.prototype.currentTween = null;
        betPanel.GtechTotalBetControlMobile.prototype.createProgressSlider = function(spritesheetID) {
            var assets = betPanel.ExternalService.loadedScene;
            var spritesheetJSON;
            var this1 = assets.getSpritesheetJSONs();
            spritesheetJSON = this1.get(spritesheetID);
            var spritesheetImage;
            var this2 = assets.getSpritesheetImages();
            spritesheetImage = this2.get(spritesheetID);
            var scaleFactor;
            if (assets.getConfiguration().scalefactor != null) scaleFactor = assets.getConfiguration().scalefactor;
            else scaleFactor = 1;
            var stepsNum = this.valuePairsArray.length;
            this.roundedSlideSingleStepImg = displayEngineUtils.Utils.extractFrame(spritesheetImage, spritesheetJSON, "st_button", stepsNum - 1);
            var _this = window.document;
            this.roundedSlideCanvas = _this.createElement("canvas");
            this.roundedSlideCanvas.width = this.roundedSlideSingleStepImg.width;
            this.roundedSlideCanvas.height = this.roundedSlideSingleStepImg.height;
            this.roundedSlideCanvasCtx = this.roundedSlideCanvas.getContext("2d", null);
            this.roundedSlideIndicator = betPanel.ExternalService.displayProvider.getFactory().createBitmap(this.roundedSlideCanvas);
            this.roundedSlideIndicator.setWebGL();
            this.roundedSlideIndicator.setScale(1 / scaleFactor);
            var roundedSlideCanvasPHs;
            var _this1 = window.document;
            roundedSlideCanvasPHs = _this1.createElement("canvas");
            roundedSlideCanvasPHs.width = this.roundedSlideSingleStepImg.width;
            roundedSlideCanvasPHs.height = this.roundedSlideSingleStepImg.height;
            this.roundedSlideIndicatorPlaceholders = betPanel.ExternalService.displayProvider.getFactory().createBitmap(roundedSlideCanvasPHs);
            this.roundedSlideIndicatorPlaceholders.setAlpha(0.15);
            this.roundedSlideIndicatorPlaceholders.setScale(1 / scaleFactor);
            var slideBtnProps = betPanel.BetPanelConfiguration.TOTAL_BET_BTN_POSITIONS.slide_indicator;
            if (slideBtnProps != null) {
                this.roundedSlideIndicator.setScaleX(this.roundedSlideIndicator.getScaleX() * slideBtnProps.scaleX);
                this.roundedSlideIndicator.setScaleY(this.roundedSlideIndicator.getScaleY() * slideBtnProps.scaleY);
                this.roundedSlideIndicator.setX(slideBtnProps.x);
                this.roundedSlideIndicator.setY(slideBtnProps.y);
                this.roundedSlideIndicatorPlaceholders.setScaleX(this.roundedSlideIndicatorPlaceholders.getScaleX() * slideBtnProps.scaleX);
                this.roundedSlideIndicatorPlaceholders.setScaleY(this.roundedSlideIndicatorPlaceholders.getScaleY() * slideBtnProps.scaleY);
                this.roundedSlideIndicatorPlaceholders.setX(slideBtnProps.x);
                this.roundedSlideIndicatorPlaceholders.setY(slideBtnProps.y);
            }
            this.drawSliderSteps(roundedSlideCanvasPHs, this.valuePairsArray.length - 1);
            this.drawSliderSteps(this.roundedSlideCanvas, this.betPerLineValueIndex);
            this.slideButtonContainer.getDisplayObject().addChild(this.roundedSlideIndicatorPlaceholders);
            this.slideButtonContainer.getDisplayObject().addChild(this.roundedSlideIndicator);
            this.progressSliderInitialized = true;
        };
        betPanel.GtechTotalBetControlMobile.prototype.drawSliderSteps = function(canvas, stepCount) {
            if (stepCount == null) stepCount = 0;
            var img = this.roundedSlideSingleStepImg;
            var steps = this.valuePairsArray.length;
            var incVal = 297 / steps * (_hcmn_.Math.PI / 180);
            var context = canvas.getContext("2d");
            var x = canvas.width / 2;
            var y = canvas.height / 2;
            var width = img.width;
            var height = img.height;
            context.clearRect(0, 0, canvas.width, canvas.height);
            var _g1 = 0;
            var _g = stepCount + 1;
            while (_g1 < _g) {
                var i = _g1++;
                context.translate(x, y);
                context.rotate(i * incVal);
                context.drawImage(img, -width / 2, -height / 2, width, height);
                context.rotate(-i * incVal);
                context.translate(-x, -y);
            }
        };
        betPanel.GtechTotalBetControlMobile.prototype.handleMouseDown = function(data) {
            if (this._opened) return;
            if (this.currentTween != null) return;
            this.initialMouseY = data.y;
            this.initialMousePoint = {
                x: data.x,
                y: data.y
            };
            this.open();
            this.betArrowUp.getDisplayObject().setVisible(true);
            this.betArrowDn.getDisplayObject().setVisible(true);
            this.betArrowUp.gotoAndPlay(false, "loop");
            this.betArrowDn.gotoAndPlay(false, "loop");
            this.betArrowDn.show();
            this.betArrowUp.show();
            this.slideButtonContainer.getEvents().MOVE().addListener($bind(this, this.handleMouseMove));
        };
        betPanel.GtechTotalBetControlMobile.prototype.handleMouseUp = function(data) {
            if (!this._opened) return;
            this.close();
            var newBetPerLine = this.valuePairsArray[this.betPerLineValueIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLine);
        };
        betPanel.GtechTotalBetControlMobile.prototype.handleMouseMove = function(data) {
            var newValue;
            if (this._activeConfig.dir == "up") newValue = data.x;
            else newValue = data.y;
            var initialValue;
            if (this._activeConfig.dir == "up") initialValue = this.initialMousePoint.x;
            else initialValue = this.initialMousePoint.y;
            var _tmpOff = 0;
            var _newOff = 0;
            if (this._activeConfig.dir == "up") {
                _tmpOff = (newValue - initialValue) / this.updateSpeedInPixels;
                if (newValue < initialValue) this._currentMouseDir = 1;
                else this._currentMouseDir = -1;
            } else {
                _tmpOff = (initialValue - newValue) / this.updateSpeedInPixels;
                if (newValue > initialValue) this._currentMouseDir = 1;
                else this._currentMouseDir = -1;
            }
            _newOff = _hcmn_.Math.round(_tmpOff);
            if (_newOff == this._off) return;
            if (_hcmn_.Math.abs(_newOff) < _hcmn_.Math.abs(this._off)) this._currentMouseDir *= -1;
            this._off = _newOff;
            this.updateBetFromContinousBetUpdater();
        };
        betPanel.GtechTotalBetControlMobile.prototype.updateBetFromContinousBetUpdater = function() {
            if (this._currentMouseDir < 0) this.betPerLineValueIndex += 1;
            else if (this._currentMouseDir > 0) this.betPerLineValueIndex -= 1;
            this.updateSlider();
            if (this.betPerLineValueIndex < 0) this.betPerLineValueIndex = 0;
            if (this.betPerLineValueIndex > this.valuePairsArray.length - 1) this.betPerLineValueIndex = this.valuePairsArray.length - 1;
            var newBetPerLine = this.valuePairsArray[this.betPerLineValueIndex].value;
            var newTotalBet = this.valuePairsArray[this.betPerLineValueIndex].key;
            if (newBetPerLine != this.betPerLineValue) this.updateTotalBetView(newTotalBet, newBetPerLine);
        };
        betPanel.GtechTotalBetControlMobile.prototype.updateSlider = function() {
            if (this._currentMouseDir < 0) {
                this.betArrowDn.getDisplayObject().setVisible(false);
                this.betArrowUp.getDisplayObject().setVisible(true);
            } else if (this._currentMouseDir > 0) {
                this.betArrowDn.getDisplayObject().setVisible(true);
                this.betArrowUp.getDisplayObject().setVisible(false);
            }
            this.betArrowUp.gotoAndStop(false, "open");
            this.betArrowDn.gotoAndStop(false, "open");
        };
        betPanel.GtechTotalBetControlMobile.prototype.disable = function() {
            if (this.btnAmountLabel != null) {
                this.btnAmountLabel.updateTo("TotalBetLabelDisabled", "TotalBetLabelDisabled");
                this.btnAmountLabel.getDisplayObject().setAlpha(0.5);
            }
            if (this.btnTotalBetLabelTitle != null) {
                this.btnTotalBetLabelTitle.updateTo("TotalBetLabelTitleDisabled", "TotalBetLabelTitleDisabled");
                this.btnTotalBetLabelTitle.getDisplayObject().setAlpha(0.5);
            }
            this.slideButtonContainer.disable();
            this.betArrowDn.hide();
            this.betArrowUp.hide();
            if (this.roundedSlideIndicator != null) this.roundedSlideIndicator.setAlpha(0.4);
            if (this._opened) {
                this.resetTotalBet();
                this.close();
                if (this.currentTween != null) {
                    this.currentTween.stop();
                    this.currentTween = null;
                }
            }
        };
        betPanel.GtechTotalBetControlMobile.prototype.enable = function() {
            if (this.btnAmountLabel != null) {
                this.btnAmountLabel.updateTo("TotalBetLabel", "TotalBetLabel");
                this.btnAmountLabel.getDisplayObject().setAlpha(1);
            }
            if (this.btnTotalBetLabelTitle != null) {
                this.btnTotalBetLabelTitle.updateTo("TotalBetLabelTitle", "TotalBetLabelTitle");
                this.btnTotalBetLabelTitle.getDisplayObject().setAlpha(1);
            }
            this.slideButtonContainer.enable();
            this.roundedSlideIndicator.setAlpha(1);
        };
        betPanel.GtechTotalBetControlMobile.prototype.setTotalBet = function(totalBetValue, betPerLineValue) {
            this.confirmedBetPerLineValue = betPerLineValue;
            this.confirmedTotalBetValue = totalBetValue;
            this.updateTotalBetView(totalBetValue, betPerLineValue);
        };
        betPanel.GtechTotalBetControlMobile.prototype.updateTotalBetView = function(totalBetValue, betPerLineValue) {
            this.betPerLineValue = betPerLineValue;
            this.totalBetValue = totalBetValue;
            this.betPerLineValueIndex = 0;
            var _g = 0;
            var _g1 = this.valuePairsArray;
            while (_g < _g1.length) {
                var pair = _g1[_g];
                ++_g;
                if (pair.key == totalBetValue) break;
                this.betPerLineValueIndex++;
            }
            this.btnAmountLabel.setText(betPanel.ExternalService.moneyFormatter.format(totalBetValue));
            this.infoBarAmountLabel.setText(betPanel.ExternalService.moneyFormatter.format(totalBetValue));
            this.drawSliderSteps(this.roundedSlideCanvas, this.betPerLineValueIndex);
        };
        betPanel.GtechTotalBetControlMobile.prototype.resetTotalBet = function() {
            this.updateTotalBetView(this.confirmedTotalBetValue, this.confirmedBetPerLineValue);
        };
        betPanel.GtechTotalBetControlMobile.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.GtechTotalBetControlMobile.prototype.close = function() {
            var _g = this;
            if (!this._opened) return;
            this.betArrowUp.getDisplayObject().setVisible(false);
            this.betArrowDn.getDisplayObject().setVisible(false);
            this.slideButtonContainer.getEvents().MOVE().removeListener($bind(this, this.handleMouseMove));
            this.currentTween = displayEngineUtils.TweenX.to(this.infoBar.getDisplayObject(), this.infoPanelClosedPos, this.infoPanelClosedPos.time, null, null, null, null, null, null, null, {
                fileName: "GtechTotalBetControlMobile.hx",
                lineNumber: 518,
                className: "betpanel.component.imp.components.GtechTotalBetControlMobile",
                methodName: "close"
            }).onFinish(function() {
                _g.currentTween = null;
            });
            this._off = 0;
            this._opened = false;
            this.events.CONTROL_IN_USE().dispatch(this._opened);
        };
        betPanel.GtechTotalBetControlMobile.prototype.open = function() {
            var _g = this;
            if (this._opened) return;
            this.currentTween = displayEngineUtils.TweenX.to(this.infoBar.getDisplayObject(), this.infoPanelOpenedPos, this.infoPanelClosedPos.time, null, null, null, null, null, null, null, {
                fileName: "GtechTotalBetControlMobile.hx",
                lineNumber: 533,
                className: "betpanel.component.imp.components.GtechTotalBetControlMobile",
                methodName: "open"
            }).onFinish(function() {
                _g.currentTween = null;
            });
            this._opened = true;
            this.events.CONTROL_IN_USE().dispatch(this._opened);
        };
        betPanel.GtechTotalBetControlMobile.prototype.setValuePairsArray = function(values) {
            this.valuePairsArray = values;
            if (!this.progressSliderInitialized) this.createProgressSlider("panel_layout");
            if (values.length <= 1) {
                this.roundedSlideIndicatorPlaceholders.setVisible(false);
                this.roundedSlideIndicator.setVisible(false);
            }
        };
        betPanel.GtechTotalBetControlMobile.prototype.configure = function(config) {
            if (config == this._activeConfig) return;
            this._activeConfig = config;
            this.betArrowUp.getDisplayObject().setVisible(false);
            this.betArrowDn.getDisplayObject().setVisible(false);
            this.slideButtonContainer.getEvents().MOVE().removeListener($bind(this, this.handleMouseMove));
            var _g = config.dir;
            switch (_g) {
                case "left":
                    this.infoBar.getComponentById("SlideBtnInfoBarUp").getDisplayObject().setVisible(false);
                    this.infoBarBkg = _hcmn_.js_Boot.__cast(this.infoBar.getComponentById("SlideBtnInfoBar").getDisplayObject(), displayEngineApi.IBitmap);
                    this.infoBarBkg.setVisible(true);
                    this.infoBarBkg.setPivot({
                        x: this.infoBarBkg.getUserData().viewBuilderW / _hcmn_.Math.abs(this.infoBarBkg.getScaleX()),
                        y: 0
                    });
                    this.infoBarBkg.setScaleX(_hcmn_.Math.abs(this.infoBarBkg.getScaleX()) * -1);
                    this.applyDisplayProperties(this.infoBarBkg, betPanel.BetPanelConfiguration.LEFT_POSITIONS.infopanel_bkg);
                    this.applyDisplayProperties(this.infoBarLabel.getDisplayObject(), betPanel.BetPanelConfiguration.LEFT_POSITIONS.infopanel_label_title);
                    this.applyDisplayProperties(this.infoBarAmountLabel.getDisplayObject(), betPanel.BetPanelConfiguration.LEFT_POSITIONS.infopanel_label_value);
                    this.infoPanelOpenedPos = betPanel.BetPanelConfiguration.LEFT_ANIMATIONS.infopanel_visible;
                    this.infoPanelClosedPos = betPanel.BetPanelConfiguration.LEFT_ANIMATIONS.infopanel_hidden;
                    this.rearrangeForVerticalMovement();
                    break;
                case "up":
                    this.infoBar.getComponentById("SlideBtnInfoBar").getDisplayObject().setVisible(false);
                    this.infoBarBkg = _hcmn_.js_Boot.__cast(this.infoBar.getComponentById("SlideBtnInfoBarUp").getDisplayObject(), displayEngineApi.IBitmap);
                    this.infoBarBkg.setVisible(true);
                    this.applyDisplayProperties(this.infoBarBkg, betPanel.BetPanelConfiguration.UP_POSITIONS.infopanel_bkg);
                    this.applyDisplayProperties(this.infoBarLabel.getDisplayObject(), betPanel.BetPanelConfiguration.UP_POSITIONS.infopanel_label_title);
                    this.applyDisplayProperties(this.infoBarAmountLabel.getDisplayObject(), betPanel.BetPanelConfiguration.UP_POSITIONS.infopanel_label_value);
                    this.infoPanelOpenedPos = betPanel.BetPanelConfiguration.UP_ANIMATIONS.infopanel_visible;
                    this.infoPanelClosedPos = betPanel.BetPanelConfiguration.UP_ANIMATIONS.infopanel_hidden;
                    this.rearrangeForHorizontalMovement();
                    break;
                default:
                    this.infoBar.getComponentById("SlideBtnInfoBarUp").getDisplayObject().setVisible(false);
                    this.infoBarBkg = _hcmn_.js_Boot.__cast(this.infoBar.getComponentById("SlideBtnInfoBar").getDisplayObject(), displayEngineApi.IBitmap);
                    this.infoBarBkg.setVisible(true);
                    this.infoBarBkg.setPivot({
                        x: 0,
                        y: 0
                    });
                    this.infoBarBkg.setScaleX(_hcmn_.Math.abs(this.infoBarBkg.getScaleX()));
                    this.applyDisplayProperties(this.infoBarBkg, betPanel.BetPanelConfiguration.RIGHT_POSITIONS.infopanel_bkg);
                    this.applyDisplayProperties(this.infoBarLabel.getDisplayObject(), betPanel.BetPanelConfiguration.RIGHT_POSITIONS.infopanel_label_title);
                    this.applyDisplayProperties(this.infoBarAmountLabel.getDisplayObject(), betPanel.BetPanelConfiguration.RIGHT_POSITIONS.infopanel_label_value);
                    this.infoPanelOpenedPos = betPanel.BetPanelConfiguration.RIGHT_ANIMATIONS.infopanel_visible;
                    this.infoPanelClosedPos = betPanel.BetPanelConfiguration.RIGHT_ANIMATIONS.infopanel_hidden;
                    this.rearrangeForVerticalMovement();
            }
            if (this._opened) this.handleMouseUp(null);
        };
        betPanel.GtechTotalBetControlMobile.prototype.setBetLinesValue = function(lines) {};
        betPanel.GtechTotalBetControlMobile.prototype.getBetLinesValue = function() {
            return 0;
        };
        betPanel.GtechTotalBetControlMobile.prototype.applyDisplayProperties = function(displayObject, props) {
            if (props == null) return;
            if (props.y != null) displayObject.setY(props.y);
            if (props.x != null) displayObject.setX(props.x);
            if (props.scaleX != null) displayObject.setScaleX(props.scaleX);
            if (props.scaleY != null) displayObject.setScaleY(props.scaleY);
            if (props.alpha != null) displayObject.setAlpha(props.alpha);
        };
        betPanel.GtechTotalBetControlMobile.prototype.rearrangeForHorizontalMovement = function() {
            this.infoBar.getDisplayObject().setX(10);
            this.infoBar.getDisplayObject().setY(this.slideButtonDO.getY() + (this.slideButtonDO.getHeight() - this.infoBar.getDisplayObject().getHeight()) / 2);
            this.infoBar.getDisplayObject().setAlpha(0);
            this.betArrowUp.setX(betPanel.BetPanelConfiguration.CHEVRON_RIGHT_POSITIONS.x);
            this.betArrowUp.setY(betPanel.BetPanelConfiguration.CHEVRON_RIGHT_POSITIONS.y);
            this.betArrowUp.getDisplayObject().setRotation(90);
            this.betArrowDn.setX(betPanel.BetPanelConfiguration.CHEVRON_LEFT_POSITIONS.x);
            this.betArrowDn.setY(betPanel.BetPanelConfiguration.CHEVRON_LEFT_POSITIONS.y);
            this.betArrowDn.getDisplayObject().setRotation(-90);
            this.recalculateUpdateSpeedInPixels();
        };
        betPanel.GtechTotalBetControlMobile.prototype.rearrangeForVerticalMovement = function() {
            this.infoBar.getDisplayObject().setX(10);
            this.infoBar.getDisplayObject().setY(this.slideButtonDO.getY() + (this.slideButtonDO.getHeight() - this.infoBar.getDisplayObject().getHeight()) / 2);
            this.infoBar.getDisplayObject().setAlpha(0);
            this.betArrowUp.setX(betPanel.BetPanelConfiguration.CHEVRON_UP_POSITIONS.x);
            this.betArrowUp.setY(betPanel.BetPanelConfiguration.CHEVRON_UP_POSITIONS.y);
            this.betArrowUp.getDisplayObject().setRotation(0);
            this.betArrowDn.setX(betPanel.BetPanelConfiguration.CHEVRON_DOWN_POSITIONS.x);
            this.betArrowDn.setY(betPanel.BetPanelConfiguration.CHEVRON_DOWN_POSITIONS.y);
            this.betArrowDn.getDisplayObject().setRotation(-180);
            this.recalculateUpdateSpeedInPixels();
        };
        betPanel.GtechTotalBetControlMobile.prototype.recalculateUpdateSpeedInPixels = function() {
            var layerScale = this.slideButtonContainer.getDisplayObject().getParent().getScaleX();
            var realW = this.slideButtonDO.getUserData().viewBuilderW * betPanel.ExternalService.displayProvider.getDefaultStage().getScaleX();
            this.updateSpeedInPixels = _hcmn_.Math.floor(realW * layerScale / 4);
        };
        betPanel.GtechTotalBetControlMobile.prototype.getBetLines = function() {
            return null;
        };
        betPanel.GtechTotalBetControlMobile.prototype.setValuePairsArrayLines = function(totalBetsForSelectedBetPerLine) {};
        betPanel.GtechTotalBetControlMobile.prototype.hide = function() {};
        betPanel.GtechTotalBetControlMobile.prototype.show = function() {};
        betPanel.GtechTotalBetControlMobile.prototype.__class__ = betPanel.GtechTotalBetControlMobile;
        betPanel.HybridBetControlDesktop = function(container) {
            this.panelVisible = false;
            this.container = container;
            this.events = new betPanel.TotalBetControlEvents();
            var mainBtn;
            mainBtn = _hcmn_.js_Boot.__cast(container.getComponentById("BtnTotalBet"), viewBuilderApi.IButton);
            this.minusButton = container.getButtonById("MinusButton");
            this.minusButton.getEvents().DOWN().addListener($bind(this, this.reduceByClick));
            this.plusButton = container.getButtonById("PlusButton");
            this.plusButton.getEvents().DOWN().addListener($bind(this, this.increseByClick));
            mainBtn.getEvents().DOWN().addListener($bind(this, this.onDown));
            mainBtn.getEvents().OUT().addListener($bind(this, this.onOut));
            mainBtn.getEvents().OVER().addListener($bind(this, this.onOver));
            mainBtn.getEvents().UP().addListener($bind(this, this.onUp));
            this.comboBox = _hcmn_.js_Boot.__cast(container.getComponentById("TotalBetComboBox"), viewBuilderApi.IComboBox);
            this.comboBox.getEvents().SELECTION_SET().addListener($bind(this, this.setSelection));
            this.totalBetLabel = _hcmn_.js_Boot.__cast(container.getComponentById("TotalBetLabel"), viewBuilderApi.ILabel);
            if (container.getComponentById("TotalBetLabelTitle") != null) this.totalBetLabelTitle = _hcmn_.js_Boot.__cast(container.getComponentById("TotalBetLabelTitle"), viewBuilderApi.ILabel);
            this.comboBox.colapse();
        };
        betPanel.HybridBetControlDesktop = ck_implements(betPanel.HybridBetControlDesktop, betPanel.ITotalBetControl);
        betPanel.HybridBetControlDesktop.__interfaces__ = [betPanel.ITotalBetControl];
        betPanel.HybridBetControlDesktop.__name__ = ["betPanel", "HybridBetControlDesktop"];
        betPanel.HybridBetControlDesktop.prototype.container = null;
        betPanel.HybridBetControlDesktop.prototype.panelVisible = null;
        betPanel.HybridBetControlDesktop.prototype.comboBox = null;
        betPanel.HybridBetControlDesktop.prototype.totalBetLabel = null;
        betPanel.HybridBetControlDesktop.prototype.totalBetLabelTitle = null;
        betPanel.HybridBetControlDesktop.prototype.events = null;
        betPanel.HybridBetControlDesktop.prototype.betPerLineValue = null;
        betPanel.HybridBetControlDesktop.prototype.totalBetValue = null;
        betPanel.HybridBetControlDesktop.prototype.valuePairsArray = null;
        betPanel.HybridBetControlDesktop.prototype.minusButton = null;
        betPanel.HybridBetControlDesktop.prototype.plusButton = null;
        betPanel.HybridBetControlDesktop.prototype.enabledStepperButtons = null;
        betPanel.HybridBetControlDesktop.prototype.reduceByClick = function(data) {
            var selectedIndex = this.comboBox.getSelectedValueIndex();
            if (selectedIndex == 0) return;
            selectedIndex--;
            var newBetPerLineValue = this.valuePairsArray[selectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
            this.close();
        };
        betPanel.HybridBetControlDesktop.prototype.increseByClick = function(data) {
            var selectedIndex = this.comboBox.getSelectedValueIndex();
            if (selectedIndex == this.valuePairsArray.length - 1) return;
            selectedIndex++;
            var newBetPerLineValue = this.valuePairsArray[selectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
            this.close();
        };
        betPanel.HybridBetControlDesktop.prototype.onUp = function(data) {};
        betPanel.HybridBetControlDesktop.prototype.onOut = function(data) {};
        betPanel.HybridBetControlDesktop.prototype.onOver = function(data) {};
        betPanel.HybridBetControlDesktop.prototype.onDown = function(data) {
            if (this.comboBox.isExpanded()) this.close();
            else this.open();
        };
        betPanel.HybridBetControlDesktop.prototype.moneyFormatArray = function(array) {
            var formattedArray = [];
            var _g1 = 0;
            var _g = array.length;
            while (_g1 < _g) {
                var i = _g1++;
                formattedArray.push(betPanel.ExternalService.moneyFormatter.format(array[i]));
            }
            return formattedArray;
        };
        betPanel.HybridBetControlDesktop.prototype.enable = function() {
            var mainBtn;
            mainBtn = _hcmn_.js_Boot.__cast(this.container.getComponentById("BtnTotalBet"), viewBuilderApi.IButton);
            mainBtn.enable();
            var _g = 0;
            var _g1 = this.enabledStepperButtons;
            while (_g < _g1.length) {
                var btn = _g1[_g];
                ++_g;
                btn.enable();
            }
            if (this.totalBetLabelTitle != null) {
                this.totalBetLabelTitle.updateTo("TotalBetLabelTitle", "TotalBetLabelTitle");
                this.totalBetLabelTitle.getDisplayObject().setAlpha(1);
            }
            this.totalBetLabel.updateTo("TotalBetLabel", "TotalBetLabel");
            this.totalBetLabel.getDisplayObject().setAlpha(1);
            this.comboBox.enable();
            this.comboBox.getComponentById("ExpandColapsSign").getDisplayObject().setAlpha(1);
        };
        betPanel.HybridBetControlDesktop.prototype.disable = function() {
            var mainBtn;
            mainBtn = _hcmn_.js_Boot.__cast(this.container.getComponentById("BtnTotalBet"), viewBuilderApi.IButton);
            this.close();
            mainBtn.disable();
            this.minusButton.disable();
            this.plusButton.disable();
            if (this.totalBetLabelTitle != null) {
                this.totalBetLabelTitle.updateTo("TotalBetLabelTitleDisabled", "TotalBetLabelTitleDisabled");
                this.totalBetLabelTitle.getDisplayObject().setAlpha(0.5);
            }
            this.totalBetLabel.updateTo("TotalBetLabelDisabled", "TotalBetLabelDisabled");
            this.totalBetLabel.getDisplayObject().setAlpha(0.5);
            this.comboBox.disable();
            this.comboBox.getComponentById("ExpandColapsSign").getDisplayObject().setAlpha(0.5);
        };
        betPanel.HybridBetControlDesktop.prototype.setTotalBet = function(totalBetValue, betPerLineValue) {
            this.totalBetValue = totalBetValue;
            this.betPerLineValue = betPerLineValue;
            var formattedTotalBetValue = betPanel.ExternalService.moneyFormatter.format(totalBetValue);
            this.totalBetLabel.setText(formattedTotalBetValue);
            this.comboBox.setSelectedValue(formattedTotalBetValue);
            var selection = this.comboBox.getSelectedValueIndex();
            this.enabledStepperButtons = [];
            if (selection == 0) this.minusButton.disable();
            else {
                this.minusButton.enable();
                this.enabledStepperButtons.push(this.minusButton);
            }
            if (selection == this.valuePairsArray.length - 1) this.plusButton.disable();
            else {
                this.plusButton.enable();
                this.enabledStepperButtons.push(this.plusButton);
            }
        };
        betPanel.HybridBetControlDesktop.prototype.setSelection = function(value) {
            this.close();
            var selectedIndex = value;
            var newBetPerLineValue = this.valuePairsArray[selectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
        };
        betPanel.HybridBetControlDesktop.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.HybridBetControlDesktop.prototype.open = function() {
            if (this.comboBox.isExpanded()) return;
            this.comboBox.expand();
            this.events.CONTROL_IN_USE().dispatch(true);
        };
        betPanel.HybridBetControlDesktop.prototype.close = function() {
            if (!this.comboBox.isExpanded()) return;
            this.comboBox.colapse();
            this.events.CONTROL_IN_USE().dispatch(false);
        };
        betPanel.HybridBetControlDesktop.prototype.setValuePairsArray = function(values) {
            this.valuePairsArray = values;
            var displayValues = [];
            var _g = 0;
            var _g1 = this.valuePairsArray;
            while (_g < _g1.length) {
                var pair = _g1[_g];
                ++_g;
                displayValues.push(pair.key);
            }
            if (values.length <= 1) this.comboBox.setVanityBarVisible(false);
            this.comboBox.setComboBoxValues(this.moneyFormatArray(displayValues));
        };
        betPanel.HybridBetControlDesktop.prototype.configure = function(config) {};
        betPanel.HybridBetControlDesktop.prototype.setBetLinesValue = function(lines) {};
        betPanel.HybridBetControlDesktop.prototype.getBetLinesValue = function() {
            return 0;
        };
        betPanel.HybridBetControlDesktop.prototype.getBetLines = function() {
            return null;
        };
        betPanel.HybridBetControlDesktop.prototype.setValuePairsArrayLines = function(totalBetsForSelectedBetPerLine) {};
        betPanel.HybridBetControlDesktop.prototype.hide = function() {
            this.container.hide();
        };
        betPanel.HybridBetControlDesktop.prototype.show = function() {
            this.container.show();
        };
        betPanel.HybridBetControlDesktop.prototype.__class__ = betPanel.HybridBetControlDesktop;
        betPanel.IgtBetControlDesktop = function(container) {
            this.betPerLineSelectedIndex = 0;
            this.events = new betPanel.TotalBetControlEvents();
            this.container = container;
            this.betPerLinesStepperBox = _hcmn_.js_Boot.__cast(container.getComponentById("LINE_BET"), viewBuilderApi.IStepperBox);
            this.betPerLinesStepperBox.getEvents().SELECTION_SET().addListener($bind(this, this.betPerLineChanged));
            this.linesStepperBox = _hcmn_.js_Boot.__cast(container.getComponentById("LINES"), viewBuilderApi.IStepperBox);
            this.linesStepperBox.getEvents().SELECTION_SET().addListener($bind(this, this.numberOfLinesChanged));
            this.totalBetDisplayComponent = container.getComponentById("TOTAL_BET_DISPLAY");
            this.lineBet = new betPanel.LineBet(this.linesStepperBox);
            var tbdc = container.getComponentById("TOTAL_BET_DISPLAY");
            this.totalBetDisplayLabel = tbdc.getComponentById("ComponentLabel");
        };
        betPanel.IgtBetControlDesktop = ck_implements(betPanel.IgtBetControlDesktop, betPanel.ITotalBetControl);
        betPanel.IgtBetControlDesktop.__interfaces__ = [betPanel.ITotalBetControl];
        betPanel.IgtBetControlDesktop.__name__ = ["betPanel", "IgtBetControlDesktop"];
        betPanel.IgtBetControlDesktop.prototype.container = null;
        betPanel.IgtBetControlDesktop.prototype.totalBetDisplayComponent = null;
        betPanel.IgtBetControlDesktop.prototype.totalBetDisplayLabel = null;
        betPanel.IgtBetControlDesktop.prototype.linesStepperBox = null;
        betPanel.IgtBetControlDesktop.prototype.betPerLinesStepperBox = null;
        betPanel.IgtBetControlDesktop.prototype.events = null;
        betPanel.IgtBetControlDesktop.prototype.totalBetValue = null;
        betPanel.IgtBetControlDesktop.prototype.betPerLineValue = null;
        betPanel.IgtBetControlDesktop.prototype.betPerLineValuePairsArray = null;
        betPanel.IgtBetControlDesktop.prototype.numberOfLinesValuePairsArray = null;
        betPanel.IgtBetControlDesktop.prototype.lineBet = null;
        betPanel.IgtBetControlDesktop.prototype.betPerLineSelectedIndex = null;
        betPanel.IgtBetControlDesktop.prototype.numberOfLinesChanged = function(value) {
            var newBetPerLineValue = this.betPerLineValuePairsArray[this.betPerLineSelectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
        };
        betPanel.IgtBetControlDesktop.prototype.betPerLineChanged = function(value) {
            this.betPerLineSelectedIndex = value;
            var newBetPerLineValue = this.betPerLineValuePairsArray[this.betPerLineSelectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
        };
        betPanel.IgtBetControlDesktop.prototype.setTotalBet = function(totalBetValue, betPerLineValue) {
            this.totalBetValue = totalBetValue;
            this.betPerLineValue = betPerLineValue;
            var formattedTotalBetValue = betPanel.ExternalService.moneyFormatter.format(totalBetValue);
            this.totalBetDisplayLabel.setText(formattedTotalBetValue);
            this.betPerLinesStepperBox.setSelectedValue(betPanel.ExternalService.moneyFormatter.format(betPerLineValue));
            this.betPerLineSelectedIndex = this.betPerLinesStepperBox.getSelectedIndex();
        };
        betPanel.IgtBetControlDesktop.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.IgtBetControlDesktop.prototype.open = function() {
            this.events.CONTROL_IN_USE().dispatch(true);
        };
        betPanel.IgtBetControlDesktop.prototype.close = function() {
            this.events.CONTROL_IN_USE().dispatch(false);
        };
        betPanel.IgtBetControlDesktop.prototype.setValuePairsArray = function(values) {
            this.betPerLineValuePairsArray = values;
            var displayValues = [];
            var _g = 0;
            var _g1 = this.betPerLineValuePairsArray;
            while (_g < _g1.length) {
                var pair = _g1[_g];
                ++_g;
                displayValues.push(pair.value);
            }
            this.betPerLinesStepperBox.setStepperBoxValues(this.moneyFormatArray(displayValues), this.betPerLineSelectedIndex);
        };
        betPanel.IgtBetControlDesktop.prototype.configure = function(config) {};
        betPanel.IgtBetControlDesktop.prototype.enable = function() {
            this.linesStepperBox.enable();
            this.betPerLinesStepperBox.enable();
        };
        betPanel.IgtBetControlDesktop.prototype.disable = function() {
            this.linesStepperBox.disable();
            this.betPerLinesStepperBox.disable();
        };
        betPanel.IgtBetControlDesktop.prototype.setBetLinesValue = function(lines) {
            this.linesStepperBox.setSelectedValue(lines == null ? "null" : "" + lines);
        };
        betPanel.IgtBetControlDesktop.prototype.getBetLinesValue = function() {
            return _hcmn_.Std.parseInt(this.linesStepperBox.getSelectedValue());
        };
        betPanel.IgtBetControlDesktop.prototype.getBetLines = function() {
            return this.lineBet;
        };
        betPanel.IgtBetControlDesktop.prototype.setValuePairsArrayLines = function(newValue) {
            this.numberOfLinesValuePairsArray = [];
            var _g1 = 0;
            var _g = newValue.length;
            while (_g1 < _g) {
                var i = _g1++;
                this.numberOfLinesValuePairsArray.push(_hcmn_.Std.string(newValue[i].value));
            }
            this.linesStepperBox.setStepperBoxValues(this.numberOfLinesValuePairsArray);
        };
        betPanel.IgtBetControlDesktop.prototype.hide = function() {
            this.container.hide();
        };
        betPanel.IgtBetControlDesktop.prototype.show = function() {
            this.container.show();
        };
        betPanel.IgtBetControlDesktop.prototype.moneyFormatArray = function(array) {
            var formattedArray = [];
            var _g1 = 0;
            var _g = array.length;
            while (_g1 < _g) {
                var i = _g1++;
                formattedArray.push(betPanel.ExternalService.moneyFormatter.format(array[i]));
            }
            return formattedArray;
        };
        betPanel.IgtBetControlDesktop.prototype.__class__ = betPanel.IgtBetControlDesktop;
        betPanel.IgtTotalBetControllerMobile = function(totalBetContainer) {
            this.betPerLineSelectedIndex = 0;
            this._opened = false;
            this.totalBetContainer = totalBetContainer;
            this.events = new betPanel.TotalBetControlEvents();
            this.prepareView();
        };
        betPanel.IgtTotalBetControllerMobile = ck_implements(betPanel.IgtTotalBetControllerMobile, betPanel.ITotalBetControl);
        betPanel.IgtTotalBetControllerMobile.__interfaces__ = [betPanel.ITotalBetControl];
        betPanel.IgtTotalBetControllerMobile.__name__ = ["betPanel", "IgtTotalBetControllerMobile"];
        betPanel.IgtTotalBetControllerMobile.prototype._activeConfig = null;
        betPanel.IgtTotalBetControllerMobile.prototype.betPerLineValuePairsArray = null;
        betPanel.IgtTotalBetControllerMobile.prototype.valuePairsArrayLines = null;
        betPanel.IgtTotalBetControllerMobile.prototype.totalBetDisplayLabel1 = null;
        betPanel.IgtTotalBetControllerMobile.prototype.totalBetDisplayLabel2 = null;
        betPanel.IgtTotalBetControllerMobile.prototype.linesStepperBox = null;
        betPanel.IgtTotalBetControllerMobile.prototype.betPerLineStepperBox = null;
        betPanel.IgtTotalBetControllerMobile.prototype.openTotalBetButton = null;
        betPanel.IgtTotalBetControllerMobile.prototype._opened = null;
        betPanel.IgtTotalBetControllerMobile.prototype.events = null;
        betPanel.IgtTotalBetControllerMobile.prototype.confirmedBetPerLineValue = null;
        betPanel.IgtTotalBetControllerMobile.prototype.confirmedTotalBetValue = null;
        betPanel.IgtTotalBetControllerMobile.prototype.betPanel = null;
        betPanel.IgtTotalBetControllerMobile.prototype.betInfoContainer = null;
        betPanel.IgtTotalBetControllerMobile.prototype.totalBetContainer = null;
        betPanel.IgtTotalBetControllerMobile.prototype.betPerLineSelectedIndex = null;
        betPanel.IgtTotalBetControllerMobile.prototype.lineBet = null;
        betPanel.IgtTotalBetControllerMobile.prototype.totalBetDisplayComponent = null;
        betPanel.IgtTotalBetControllerMobile.prototype.totalBetDisplayLabel = null;
        betPanel.IgtTotalBetControllerMobile.prototype.numberOfLines = null;
        betPanel.IgtTotalBetControllerMobile.prototype.numberOfLinesValuePairsArray = null;
        betPanel.IgtTotalBetControllerMobile.prototype.prepareView = function() {
            var _g = this;
            this.linesStepperBox = _hcmn_.js_Boot.__cast(this.totalBetContainer.getComponentById("LINES"), viewBuilderApi.IStepperBox);
            this.linesStepperBox.setVanityBarVisible(true);
            this.betPerLineStepperBox = _hcmn_.js_Boot.__cast(this.totalBetContainer.getComponentById("LINE_BET"), viewBuilderApi.IStepperBox);
            this.betPerLineStepperBox.setVanityBarVisible(true);
            this.linesStepperBox.getEvents().SELECTION_SET().addListener($bind(this, this.numberOfLinesChanged));
            this.betPerLineStepperBox.getEvents().SELECTION_SET().addListener($bind(this, this.betPerLineChanged));
            this.lineBet = new betPanel.LineBet(this.linesStepperBox);
            _hcmn_.haxe_Timer.delay(function() {
                var tbdc = _g.totalBetContainer.getComponentById("TOTAL_BET_PREVIEW");
                _g.totalBetDisplayLabel1 = tbdc.getComponentById("TotalBetPreviewLabel");
                _g.totalBetDisplayLabel2 = betPanel.BetPanelComponentsModel.getComponentByID(betPanel.ComponentsEnum.TOTAL_BET_DISPLAY);
                _g.totalBetContainer.getDisplayObject().setVisible(false);
                var openTotalBetComponent;
                openTotalBetComponent = _hcmn_.js_Boot.__cast(betPanel.BetPanelComponentsModel.getComponentByID(betPanel.ComponentsEnum.OPEN_TOTAL_BET), betPanel.OpenTotalBetComponent);
                _g.openTotalBetButton = openTotalBetComponent.getButton();
                _g.openTotalBetButton.getEvents().DOWN().addListener($bind(_g, _g.openCloseTotalBet));
                var aprovePreview = _g.totalBetContainer.getComponentById("CheckButton");
                aprovePreview.getEvents().DOWN().addListener($bind(_g, _g.openCloseTotalBet));
            }, 0);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.openCloseTotalBet = function(e) {
            var visibility = !this.totalBetContainer.getDisplayObject().getVisible();
            this.totalBetContainer.getDisplayObject().setVisible(visibility);
            this.events.CONTROL_IN_USE().dispatch(visibility);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.openTotalBetPano = function(e) {
            this.totalBetContainer.getDisplayObject().setVisible(true);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.numberOfLinesChanged = function(value) {
            var newBetPerLineValue = this.betPerLineValuePairsArray[this.betPerLineSelectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.betPerLineChanged = function(value) {
            this.betPerLineSelectedIndex = value;
            var newBetPerLineValue = this.betPerLineValuePairsArray[this.betPerLineSelectedIndex].value;
            this.events.VALUE_CHANGED().dispatch(newBetPerLineValue);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.disable = function() {
            this.betPerLineStepperBox.disable();
            this.linesStepperBox.disable();
            this.totalBetContainer.getDisplayObject().setVisible(false);
            this.openTotalBetButton.disable();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.enable = function() {
            this.betPerLineStepperBox.enable();
            this.linesStepperBox.enable();
            this.openTotalBetButton.enable();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.setTotalBet = function(totalBetValue, betPerLineValue) {
            this.confirmedBetPerLineValue = betPerLineValue;
            this.betPerLineStepperBox.setSelectedValue(betPerLineValue);
            this.confirmedTotalBetValue = totalBetValue;
            this.betPerLineSelectedIndex = this.betPerLineStepperBox.getSelectedIndex();
            this.updateTotalBetView();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.updateTotalBetView = function() {
            this.betPerLineStepperBox.setSelectedValue(betPanel.ExternalService.moneyFormatter.format(this.confirmedBetPerLineValue));
            this.betPerLineSelectedIndex = this.betPerLineStepperBox.getSelectedIndex();
            var confirmedMonetarisedValue = betPanel.ExternalService.moneyFormatter.format(this.confirmedTotalBetValue);
            this.totalBetDisplayLabel1.setText(confirmedMonetarisedValue);
            this.totalBetDisplayLabel2.setText(confirmedMonetarisedValue);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.resetTotalBet = function() {
            this.updateTotalBetView();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.IgtTotalBetControllerMobile.prototype.close = function() {
            if (!this._opened) return;
            this._opened = false;
            this.events.CONTROL_IN_USE().dispatch(this._opened);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.open = function() {
            if (this._opened) return;
            this._opened = true;
            this.events.CONTROL_IN_USE().dispatch(this._opened);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.setValuePairsArray = function(value) {
            this.betPerLineValuePairsArray = value;
            var displayValues = [];
            var _g = 0;
            var _g1 = this.betPerLineValuePairsArray;
            while (_g < _g1.length) {
                var pair = _g1[_g];
                ++_g;
                displayValues.push(pair.value);
            }
            this.betPerLineStepperBox.setStepperBoxValues(betPanel.ExternalService.moneyFormatArray(displayValues), this.betPerLineSelectedIndex);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.setValuePairsArrayLines = function(newValue) {
            this.valuePairsArrayLines = newValue;
            this.numberOfLinesValuePairsArray = [];
            var _g1 = 0;
            var _g = newValue.length;
            while (_g1 < _g) {
                var i = _g1++;
                this.numberOfLinesValuePairsArray.push(_hcmn_.Std.string(newValue[i].value));
            }
            this.linesStepperBox.setStepperBoxValues(this.numberOfLinesValuePairsArray);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.configure = function(config) {
            var _g = this;
            if (config.rotation != null) _hcmn_.haxe_Timer.delay(function() {
                _g.openTotalBetButton.getDisplayObject().setRotation(_hcmn_.Std.parseFloat(config.rotation));
            }, 1);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.setBetLinesValue = function(lines) {
            this.numberOfLines = lines;
            this.linesStepperBox.setSelectedValue(_hcmn_.Std.string(this.numberOfLines));
            this.updateTotalBetView();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.getBetLinesValue = function() {
            return this.lineBet.getBetLinesValue();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.applyDisplayProperties = function(displayObject, props) {
            if (props == null) return;
            if (props.y != null) displayObject.setY(props.y);
            if (props.x != null) displayObject.setX(props.x);
            if (props.scaleX != null) displayObject.setScaleX(props.scaleX);
            if (props.scaleY != null) displayObject.setScaleY(props.scaleY);
            if (props.alpha != null) displayObject.setAlpha(props.alpha);
        };
        betPanel.IgtTotalBetControllerMobile.prototype.rearrangeForHorizontalMovement = function() {};
        betPanel.IgtTotalBetControllerMobile.prototype.rearrangeForVerticalMovement = function() {};
        betPanel.IgtTotalBetControllerMobile.prototype.getBetLines = function() {
            return this.lineBet;
        };
        betPanel.IgtTotalBetControllerMobile.prototype.hide = function() {
            this.openTotalBetButton.hide();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.show = function() {
            this.openTotalBetButton.show();
        };
        betPanel.IgtTotalBetControllerMobile.prototype.__class__ = betPanel.IgtTotalBetControllerMobile;
        betPanel.LineBet = function(stepperBox) {
            this.stepperBox = stepperBox;
        };
        betPanel.LineBet = ck_implements(betPanel.LineBet, betPanel.IBetLines);
        betPanel.LineBet.__interfaces__ = [betPanel.IBetLines];
        betPanel.LineBet.__name__ = ["betPanel", "LineBet"];
        betPanel.LineBet.prototype.stepperBox = null;
        betPanel.LineBet.prototype.setBetLinesValue = function(value) {
            this.stepperBox.setSelectedValue(value == null ? "null" : "" + value);
        };
        betPanel.LineBet.prototype.getBetLinesValue = function() {
            return _hcmn_.Std.parseInt(this.stepperBox.getSelectedValue());
        };
        betPanel.LineBet.prototype.__class__ = betPanel.LineBet;
        betPanel.OpenTotalBetComponent = function(component) {
            this.button = _hcmn_.js_Boot.__cast(component.getComponentById("OpenTotalBetButton"), viewBuilderApi.IButton);
        };
        betPanel.OpenTotalBetComponent.__name__ = ["betPanel", "OpenTotalBetComponent"];
        betPanel.OpenTotalBetComponent.prototype.button = null;
        betPanel.OpenTotalBetComponent.prototype.getButton = function() {
            return this.button;
        };
        betPanel.OpenTotalBetComponent.prototype.__class__ = betPanel.OpenTotalBetComponent;
        betPanel.PaytableControl = function(container) {
            this.container = container;
            this.events = new betPanel.PaytablePanelControlEvents();
            if (container.getComponentById("PaytableTitle") != null) this.mainBtnTitle = _hcmn_.js_Boot.__cast(container.getComponentById("PaytableTitle"), viewBuilderApi.ILabel);
            if (container.getComponentById("PageScroller") != null) {
                this.pageScroller = _hcmn_.js_Boot.__cast(container.getComponentById("PageScroller"), viewBuilderApi.IViewBuilderContainer);
                this.pageScroller.hide();
            }
            if (container.getComponentById("BtnPayTable") != null) {
                this.mainButton = _hcmn_.js_Boot.__cast(container.getComponentById("BtnPayTable"), viewBuilderApi.IButton);
                this.mainButton.getEvents().DOWN().addListener($bind(this, this.onOpen));
            }
            if (this.pageScroller.getComponentById("BtnPrevious") != null) {
                this.btnPrevious = _hcmn_.js_Boot.__cast(this.pageScroller.getComponentById("BtnPrevious"), viewBuilderApi.IButton);
                this.btnPrevious.getEvents().DOWN().addListener($bind(this, this.onPrevious));
            }
            if (this.pageScroller.getComponentById("BtnNext") != null) {
                this.btnNext = _hcmn_.js_Boot.__cast(this.pageScroller.getComponentById("BtnNext"), viewBuilderApi.IButton);
                this.btnNext.getEvents().DOWN().addListener($bind(this, this.onNext));
            }
            if (this.pageScroller.getComponentById("BtnBack") != null) {
                this.btnBack = _hcmn_.js_Boot.__cast(this.pageScroller.getComponentById("BtnBack"), viewBuilderApi.IButton);
                this.btnBack.getEvents().DOWN().addListener($bind(this, this.onBack));
            }
            if (this.pageScroller.getComponentById("PageDisplayLabel") != null) this.pageDisplayLabel = _hcmn_.js_Boot.__cast(this.pageScroller.getComponentById("PageDisplayLabel"), viewBuilderApi.ILabel);
        };
        betPanel.PaytableControl = ck_implements(betPanel.PaytableControl, betPanel.IPaytableControl);
        betPanel.PaytableControl.__interfaces__ = [betPanel.IPaytableControl];
        betPanel.PaytableControl.__name__ = ["betPanel", "PaytableControl"];
        betPanel.PaytableControl.prototype.container = null;
        betPanel.PaytableControl.prototype.events = null;
        betPanel.PaytableControl.prototype.pageScroller = null;
        betPanel.PaytableControl.prototype.mainButton = null;
        betPanel.PaytableControl.prototype.btnBack = null;
        betPanel.PaytableControl.prototype.btnPrevious = null;
        betPanel.PaytableControl.prototype.btnNext = null;
        betPanel.PaytableControl.prototype.pageDisplayLabel = null;
        betPanel.PaytableControl.prototype.mainBtnTitle = null;
        betPanel.PaytableControl.prototype.toggleButton = function(visible) {
            if (!visible) {
                if (this.pageScroller != null) {
                    this.pageScroller.hide();
                    this.pageScroller.disable();
                }
                if (this.mainButton != null) {
                    this.mainButton.show();
                    this.mainButton.enable();
                }
                if (this.mainBtnTitle != null) this.mainBtnTitle.show();
            } else {
                if (this.pageScroller != null) {
                    this.pageScroller.show();
                    this.pageScroller.enable();
                }
                if (this.mainButton != null) {
                    this.mainButton.disable();
                    this.mainButton.hide();
                }
                if (this.mainBtnTitle != null) this.mainBtnTitle.hide();
            }
        };
        betPanel.PaytableControl.prototype.disable = function() {
            if (this.mainButton != null) {
                this.mainButton.disable();
                if (this.mainBtnTitle != null) {
                    this.mainBtnTitle.updateTo("PaytableTitleDisabled", "PaytableTitleDisabled");
                    this.mainBtnTitle.getDisplayObject().setAlpha(0.5);
                }
            }
        };
        betPanel.PaytableControl.prototype.enable = function() {
            if (this.mainButton != null) {
                this.mainButton.enable();
                if (this.mainBtnTitle != null) {
                    this.mainBtnTitle.updateTo("PaytableTitle", "PaytableTitle");
                    this.mainBtnTitle.getDisplayObject().setAlpha(1);
                }
            }
        };
        betPanel.PaytableControl.prototype.setLabel = function(value) {
            if (this.pageDisplayLabel != null) this.pageDisplayLabel.setText(value + 1 + "/" + betPanel.BetPanelConfiguration.TOTAL_PAGES);
        };
        betPanel.PaytableControl.prototype.show = function() {
            this.container.show();
        };
        betPanel.PaytableControl.prototype.hide = function() {
            this.container.hide();
        };
        betPanel.PaytableControl.prototype.onPrevious = function(data) {
            this.events.PREVIOUS().dispatch();
        };
        betPanel.PaytableControl.prototype.onNext = function(data) {
            this.events.NEXT().dispatch();
        };
        betPanel.PaytableControl.prototype.onOpen = function(data) {
            this.events.OPEN().dispatch();
        };
        betPanel.PaytableControl.prototype.onBack = function(data) {
            this.events.BACK().dispatch();
        };
        betPanel.PaytableControl.prototype.configure = function(cfg) {};
        betPanel.PaytableControl.prototype.getEvents = function() {
            return this.events;
        };
        betPanel.PaytableControl.prototype.__class__ = betPanel.PaytableControl;
        betPanel.TotalBetDisplayController = function(container) {
            this.valueLabel = _hcmn_.js_Boot.__cast(container.getComponentById("TotalBetValue"), viewBuilderApi.ILabel);
        };
        betPanel.TotalBetDisplayController.__name__ = ["betPanel", "TotalBetDisplayController"];
        betPanel.TotalBetDisplayController.prototype.valueLabel = null;
        betPanel.TotalBetDisplayController.prototype.setText = function(value) {
            this.valueLabel.setText(value);
        };
        betPanel.TotalBetDisplayController.prototype.__class__ = betPanel.TotalBetDisplayController;
        betPanel.WinMeter = function(container) {
            this.container = container;
            this._events = new betPanel.WinMeterEvents();
            if (container.getComponentById(betPanel.WinMeter.LABEL_WINMETER_LABEL_ID) != null) this.winAmountLabel = _hcmn_.js_Boot.__cast(container.getComponentById(betPanel.WinMeter.LABEL_WINMETER_LABEL_ID), viewBuilderApi.ILabel);
        };
        betPanel.WinMeter = ck_implements(betPanel.WinMeter, betPanel.IWinMeter);
        betPanel.WinMeter.__interfaces__ = [betPanel.IWinMeter];
        betPanel.WinMeter.__name__ = ["betPanel", "WinMeter"];
        betPanel.WinMeter.prototype.titleLabel = null;
        betPanel.WinMeter.prototype.winAmountLabel = null;
        betPanel.WinMeter.prototype.container = null;
        betPanel.WinMeter.prototype.countUpTimer = null;
        betPanel.WinMeter.prototype.countUpStepAmount = null;
        betPanel.WinMeter.prototype.currentCountUpValue = null;
        betPanel.WinMeter.prototype.countUpTotalCount = null;
        betPanel.WinMeter.prototype.countUpCurrentCount = null;
        betPanel.WinMeter.prototype.countUpFinalAmount = null;
        betPanel.WinMeter.prototype._events = null;
        betPanel.WinMeter.prototype.updateWinAmount = function(amount) {
            if (this.winAmountLabel != null) {
                this.winAmountLabel.show();
                this.winAmountLabel.setText(amount);
            }
        };
        betPanel.WinMeter.prototype.setWaitForResults = function() {};
        betPanel.WinMeter.prototype.show = function() {
            this.container.show();
        };
        betPanel.WinMeter.prototype.hide = function() {
            this.container.hide();
        };
        betPanel.WinMeter.prototype.getEvents = function() {
            return this._events;
        };
        betPanel.WinMeter.prototype.countUpWin = function(from, to) {
            try {
                this.countUpFinalAmount = betPanel.ExternalService.moneyFormatter.format(to);
                if (this.winAmountLabel != null) {
                    if (to == "0" || this.winAmountLabel.getText() == this.countUpFinalAmount) {
                        this._events.COUNT_UP_COMPLETED().dispatch();
                        this.updateWinAmount(this.countUpFinalAmount);
                        return;
                    }
                }
                var winText = "";
                if (this.winAmountLabel.getText() != null) winText = this.winAmountLabel.getText();
                if (from == null) from = _hcmn_.StringTools.replace(winText, "£", "");
                var from_float = parseFloat(from);
                var to_float = parseFloat(to);
                var stepTime = 200;
                this.countUpStepAmount = 1;
                this.countUpTotalCount = _hcmn_.Math.floor((to_float - from_float) / this.countUpStepAmount);
                if (this.countUpTotalCount <= 0) {
                    this._events.COUNT_UP_COMPLETED().dispatch();
                    this.updateWinAmount(this.countUpFinalAmount);
                    return;
                }
                this.currentCountUpValue = from_float;
                this.countUpCurrentCount = 0;
                if (this.countUpTotalCount > 50) stepTime = 100;
                this.countUpTimer = new _hcmn_.haxe_Timer(stepTime);
                this.countUpTimer.run = $bind(this, this.countUpStep);
            } catch (e) {
                if (e instanceof js._Boot.HaxeError) e = e.val;
                if (_hcmn_.js_Boot.__instanceof(e, Error)) {
                    this._events.COUNT_UP_COMPLETED().dispatch();
                    this.updateWinAmount(this.countUpFinalAmount);
                } else throw (e);
            }
            null;
        };
        betPanel.WinMeter.prototype.countUpStep = function() {
            this.countUpCurrentCount++;
            this.currentCountUpValue += this.countUpStepAmount;
            this.currentCountUpValue *= 100;
            this.currentCountUpValue = _hcmn_.Math.floor(this.currentCountUpValue / 100);
            this.winAmountLabel.setText(betPanel.ExternalService.moneyFormatter.format(this.currentCountUpValue + ""));
            if (this.countUpCurrentCount > 100 || this.countUpCurrentCount == this.countUpTotalCount) {
                this.countUpTimer.stop();
                this.countUpTimer = null;
                this._events.COUNT_UP_COMPLETED().dispatch();
                this.updateWinAmount(this.countUpFinalAmount);
            }
        };
        betPanel.WinMeter.prototype.__class__ = betPanel.WinMeter;
        betPanel.ComponentsEnum = {
            __ename__: ["betPanel", "ComponentsEnum"],
            __constructs__: ["SOUND_OFF", "SOUND_ON", "SPIN_BUTTON", "STOP_BUTTON", "SKIP_BUTTON", "INFO_BAR", "AUTOPLAY_PANEL", "AUTOPLAY_PANEL_MOBILE", "AUTO_PLAY_BUTTON_CONTROL", "PAYTABLE_PANEL", "TOTAL_BET_CONTROL_MOBILE", "WIN_METER", "BET_LINES", "LINE_BET", "LINES", "TOTAL_BET_CONTROL_DESKTOP_IGT", "TOTAL_BET_CONTROL_MOBILE_IGT", "BALANCE_DISPLAY", "TOTAL_BET_CONTROL_DESKTOP", "TOTAL_BET_CONTROL_DESKTOP_HYBRID", "SETTINGS", "PAYS", "OPEN_TOTAL_BET", "TOTAL_BET_DISPLAY", "CONNECTING", "MAX_BET_BUTTON", "COIN_VALUE"]
        };
        betPanel.ComponentsEnum.CONNECTING = ["CONNECTING", 24];
        betPanel.ComponentsEnum.CONNECTING.toString = $estr;
        betPanel.ComponentsEnum.CONNECTING.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.SOUND_OFF = ["SOUND_OFF", 0];
        betPanel.ComponentsEnum.SOUND_OFF.toString = $estr;
        betPanel.ComponentsEnum.SOUND_OFF.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.AUTOPLAY_PANEL = ["AUTOPLAY_PANEL", 6];
        betPanel.ComponentsEnum.AUTOPLAY_PANEL.toString = $estr;
        betPanel.ComponentsEnum.AUTOPLAY_PANEL.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.AUTO_PLAY_BUTTON_CONTROL = ["AUTO_PLAY_BUTTON_CONTROL", 8];
        betPanel.ComponentsEnum.AUTO_PLAY_BUTTON_CONTROL.toString = $estr;
        betPanel.ComponentsEnum.AUTO_PLAY_BUTTON_CONTROL.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.OPEN_TOTAL_BET = ["OPEN_TOTAL_BET", 22];
        betPanel.ComponentsEnum.OPEN_TOTAL_BET.toString = $estr;
        betPanel.ComponentsEnum.OPEN_TOTAL_BET.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.PAYTABLE_PANEL = ["PAYTABLE_PANEL", 9];
        betPanel.ComponentsEnum.PAYTABLE_PANEL.toString = $estr;
        betPanel.ComponentsEnum.PAYTABLE_PANEL.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.SOUND_ON = ["SOUND_ON", 1];
        betPanel.ComponentsEnum.SOUND_ON.toString = $estr;
        betPanel.ComponentsEnum.SOUND_ON.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.AUTOPLAY_PANEL_MOBILE = ["AUTOPLAY_PANEL_MOBILE", 7];
        betPanel.ComponentsEnum.AUTOPLAY_PANEL_MOBILE.toString = $estr;
        betPanel.ComponentsEnum.AUTOPLAY_PANEL_MOBILE.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.COIN_VALUE = ["COIN_VALUE", 26];
        betPanel.ComponentsEnum.COIN_VALUE.toString = $estr;
        betPanel.ComponentsEnum.COIN_VALUE.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.LINES = ["LINES", 14];
        betPanel.ComponentsEnum.LINES.toString = $estr;
        betPanel.ComponentsEnum.LINES.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.SPIN_BUTTON = ["SPIN_BUTTON", 2];
        betPanel.ComponentsEnum.SPIN_BUTTON.toString = $estr;
        betPanel.ComponentsEnum.SPIN_BUTTON.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.BALANCE_DISPLAY = ["BALANCE_DISPLAY", 17];
        betPanel.ComponentsEnum.BALANCE_DISPLAY.toString = $estr;
        betPanel.ComponentsEnum.BALANCE_DISPLAY.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_HYBRID = ["TOTAL_BET_CONTROL_DESKTOP_HYBRID", 19];
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_HYBRID.toString = $estr;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_HYBRID.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.WIN_METER = ["WIN_METER", 11];
        betPanel.ComponentsEnum.WIN_METER.toString = $estr;
        betPanel.ComponentsEnum.WIN_METER.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.LINE_BET = ["LINE_BET", 13];
        betPanel.ComponentsEnum.LINE_BET.toString = $estr;
        betPanel.ComponentsEnum.LINE_BET.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.SKIP_BUTTON = ["SKIP_BUTTON", 4];
        betPanel.ComponentsEnum.SKIP_BUTTON.toString = $estr;
        betPanel.ComponentsEnum.SKIP_BUTTON.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.STOP_BUTTON = ["STOP_BUTTON", 3];
        betPanel.ComponentsEnum.STOP_BUTTON.toString = $estr;
        betPanel.ComponentsEnum.STOP_BUTTON.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE_IGT = ["TOTAL_BET_CONTROL_MOBILE_IGT", 16];
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE_IGT.toString = $estr;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE_IGT.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.SETTINGS = ["SETTINGS", 20];
        betPanel.ComponentsEnum.SETTINGS.toString = $estr;
        betPanel.ComponentsEnum.SETTINGS.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.MAX_BET_BUTTON = ["MAX_BET_BUTTON", 25];
        betPanel.ComponentsEnum.MAX_BET_BUTTON.toString = $estr;
        betPanel.ComponentsEnum.MAX_BET_BUTTON.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.BET_LINES = ["BET_LINES", 12];
        betPanel.ComponentsEnum.BET_LINES.toString = $estr;
        betPanel.ComponentsEnum.BET_LINES.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.TOTAL_BET_DISPLAY = ["TOTAL_BET_DISPLAY", 23];
        betPanel.ComponentsEnum.TOTAL_BET_DISPLAY.toString = $estr;
        betPanel.ComponentsEnum.TOTAL_BET_DISPLAY.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_IGT = ["TOTAL_BET_CONTROL_DESKTOP_IGT", 15];
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_IGT.toString = $estr;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP_IGT.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE = ["TOTAL_BET_CONTROL_MOBILE", 10];
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE.toString = $estr;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_MOBILE.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.INFO_BAR = ["INFO_BAR", 5];
        betPanel.ComponentsEnum.INFO_BAR.toString = $estr;
        betPanel.ComponentsEnum.INFO_BAR.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.PAYS = ["PAYS", 21];
        betPanel.ComponentsEnum.PAYS.toString = $estr;
        betPanel.ComponentsEnum.PAYS.__enum__ = betPanel.ComponentsEnum;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP = ["TOTAL_BET_CONTROL_DESKTOP", 18];
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP.toString = $estr;
        betPanel.ComponentsEnum.TOTAL_BET_CONTROL_DESKTOP.__enum__ = betPanel.ComponentsEnum;
        betPanel.LayersEnum = {
            __ename__: ["betPanel", "LayersEnum"],
            __constructs__: ["bp_sound", "bp_spin", "bp_bet", "bp_settings", "bp_bar", "bp_pays", "bp_open", "bp_autoplaybutton", "bp_maxbet"]
        };
        betPanel.LayersEnum.bp_settings = ["bp_settings", 3];
        betPanel.LayersEnum.bp_settings.toString = $estr;
        betPanel.LayersEnum.bp_settings.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_spin = ["bp_spin", 1];
        betPanel.LayersEnum.bp_spin.toString = $estr;
        betPanel.LayersEnum.bp_spin.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_autoplaybutton = ["bp_autoplaybutton", 7];
        betPanel.LayersEnum.bp_autoplaybutton.toString = $estr;
        betPanel.LayersEnum.bp_autoplaybutton.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_bet = ["bp_bet", 2];
        betPanel.LayersEnum.bp_bet.toString = $estr;
        betPanel.LayersEnum.bp_bet.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_bar = ["bp_bar", 4];
        betPanel.LayersEnum.bp_bar.toString = $estr;
        betPanel.LayersEnum.bp_bar.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_pays = ["bp_pays", 5];
        betPanel.LayersEnum.bp_pays.toString = $estr;
        betPanel.LayersEnum.bp_pays.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_maxbet = ["bp_maxbet", 8];
        betPanel.LayersEnum.bp_maxbet.toString = $estr;
        betPanel.LayersEnum.bp_maxbet.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_open = ["bp_open", 6];
        betPanel.LayersEnum.bp_open.toString = $estr;
        betPanel.LayersEnum.bp_open.__enum__ = betPanel.LayersEnum;
        betPanel.LayersEnum.bp_sound = ["bp_sound", 0];
        betPanel.LayersEnum.bp_sound.toString = $estr;
        betPanel.LayersEnum.bp_sound.__enum__ = betPanel.LayersEnum;
        betPanel.AutoplayPanelControlEvents = function() {
            this.valueChanged = new betPanel.BaseEvent();
            this.controlInUse = new betPanel.BaseEvent();
        };
        betPanel.AutoplayPanelControlEvents.__name__ = ["betPanel", "AutoplayPanelControlEvents"];
        betPanel.AutoplayPanelControlEvents.prototype.valueChanged = null;
        betPanel.AutoplayPanelControlEvents.prototype.controlInUse = null;
        betPanel.AutoplayPanelControlEvents.prototype.VALUE_CHANGED = function() {
            return this.valueChanged;
        };
        betPanel.AutoplayPanelControlEvents.prototype.CONTROL_IN_USE = function() {
            return this.controlInUse;
        };
        betPanel.AutoplayPanelControlEvents.prototype.__class__ = betPanel.AutoplayPanelControlEvents;
        betPanel.BaseEvent = function() {
            this._signal = new _hcmn_.msignal_Signal1();
        };
        betPanel.BaseEvent.__name__ = ["betPanel", "BaseEvent"];
        betPanel.BaseEvent.prototype._signal = null;
        betPanel.BaseEvent.prototype.addListener = function(listener) {
            this._signal.add(listener);
        };
        betPanel.BaseEvent.prototype.removeListener = function(listener) {
            this._signal.remove(listener);
        };
        betPanel.BaseEvent.prototype.dispatch = function(data) {
            this._signal.dispatch(data);
        };
        betPanel.BaseEvent.prototype.__class__ = betPanel.BaseEvent;
        betPanel.PaytablePanelControlEvents = function() {
            this.back = new betPanel.BaseEvent();
            this.previous = new betPanel.BaseEvent();
            this.next = new betPanel.BaseEvent();
            this.open = new betPanel.BaseEvent();
        };
        betPanel.PaytablePanelControlEvents.__name__ = ["betPanel", "PaytablePanelControlEvents"];
        betPanel.PaytablePanelControlEvents.prototype.back = null;
        betPanel.PaytablePanelControlEvents.prototype.open = null;
        betPanel.PaytablePanelControlEvents.prototype.previous = null;
        betPanel.PaytablePanelControlEvents.prototype.next = null;
        betPanel.PaytablePanelControlEvents.prototype.BACK = function() {
            return this.back;
        };
        betPanel.PaytablePanelControlEvents.prototype.OPEN = function() {
            return this.open;
        };
        betPanel.PaytablePanelControlEvents.prototype.PREVIOUS = function() {
            return this.previous;
        };
        betPanel.PaytablePanelControlEvents.prototype.NEXT = function() {
            return this.next;
        };
        betPanel.PaytablePanelControlEvents.prototype.__class__ = betPanel.PaytablePanelControlEvents;
        betPanel.TotalBetControlEvents = function() {
            this.valueChanged = new betPanel.BaseEvent();
            this.controlInUse = new betPanel.BaseEvent();
        };
        betPanel.TotalBetControlEvents.__name__ = ["betPanel", "TotalBetControlEvents"];
        betPanel.TotalBetControlEvents.prototype.valueChanged = null;
        betPanel.TotalBetControlEvents.prototype.controlInUse = null;
        betPanel.TotalBetControlEvents.prototype.VALUE_CHANGED = function() {
            return this.valueChanged;
        };
        betPanel.TotalBetControlEvents.prototype.CONTROL_IN_USE = function() {
            return this.controlInUse;
        };
        betPanel.TotalBetControlEvents.prototype.__class__ = betPanel.TotalBetControlEvents;
        betPanel.WinMeterEvents = function() {
            this.countUpCompleted = new betPanel.BaseEvent();
        };
        betPanel.WinMeterEvents.__name__ = ["betPanel", "WinMeterEvents"];
        betPanel.WinMeterEvents.prototype.countUpCompleted = null;
        betPanel.WinMeterEvents.prototype.COUNT_UP_COMPLETED = function() {
            return this.countUpCompleted;
        };
        betPanel.WinMeterEvents.prototype.__class__ = betPanel.WinMeterEvents;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            },
            keys: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            }
        };
        if (!haxe.ds) {
            haxe.ds = {};
        };
        haxe.ds.BalancedTree = function() {};
        haxe.ds.BalancedTree.__name__ = ["haxe", "ds", "BalancedTree"];
        haxe.ds.BalancedTree.prototype.root = null;
        haxe.ds.BalancedTree.prototype.set = function(key, value) {
            this.root = this.setLoop(key, value, this.root);
        };
        haxe.ds.BalancedTree.prototype.get = function(key) {
            var node = this.root;
            while (node != null) {
                var c = this.compare(key, node.key);
                if (c == 0) return node.value;
                if (c < 0) node = node.left;
                else node = node.right;
            }
            return null;
        };
        haxe.ds.BalancedTree.prototype.keys = function() {
            var ret = [];
            this.keysLoop(this.root, ret);
            return _hcmn_.HxOverrides.iter(ret);
        };
        haxe.ds.BalancedTree.prototype.setLoop = function(k, v, node) {
            if (node == null) return new haxe.ds.TreeNode(null, k, v, null);
            var c = this.compare(k, node.key);
            if (c == 0) return new haxe.ds.TreeNode(node.left, k, v, node.right, node == null ? 0 : node._height);
            else if (c < 0) {
                var nl = this.setLoop(k, v, node.left);
                return this.balance(nl, node.key, node.value, node.right);
            } else {
                var nr = this.setLoop(k, v, node.right);
                return this.balance(node.left, node.key, node.value, nr);
            }
        };
        haxe.ds.BalancedTree.prototype.keysLoop = function(node, acc) {
            if (node != null) {
                this.keysLoop(node.left, acc);
                acc.push(node.key);
                this.keysLoop(node.right, acc);
            }
        };
        haxe.ds.BalancedTree.prototype.balance = function(l, k, v, r) {
            var hl;
            if (l == null) hl = 0;
            else hl = l._height;
            var hr;
            if (r == null) hr = 0;
            else hr = r._height;
            if (hl > hr + 2) {
                if ((function($this) {
                        var $r;
                        var _this = l.left;
                        $r = _this == null ? 0 : _this._height;
                        return $r;
                    }(this)) >= (function($this) {
                        var $r;
                        var _this1 = l.right;
                        $r = _this1 == null ? 0 : _this1._height;
                        return $r;
                    }(this))) return new haxe.ds.TreeNode(l.left, l.key, l.value, new haxe.ds.TreeNode(l.right, k, v, r));
                else return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l.left, l.key, l.value, l.right.left), l.right.key, l.right.value, new haxe.ds.TreeNode(l.right.right, k, v, r));
            } else if (hr > hl + 2) {
                if ((function($this) {
                        var $r;
                        var _this2 = r.right;
                        $r = _this2 == null ? 0 : _this2._height;
                        return $r;
                    }(this)) > (function($this) {
                        var $r;
                        var _this3 = r.left;
                        $r = _this3 == null ? 0 : _this3._height;
                        return $r;
                    }(this))) return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l, k, v, r.left), r.key, r.value, r.right);
                else return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l, k, v, r.left.left), r.left.key, r.left.value, new haxe.ds.TreeNode(r.left.right, r.key, r.value, r.right));
            } else return new haxe.ds.TreeNode(l, k, v, r, (hl > hr ? hl : hr) + 1);
        };
        haxe.ds.BalancedTree.prototype.compare = function(k1, k2) {
            return _hcmn_.Reflect.compare(k1, k2);
        };
        haxe.ds.BalancedTree.prototype.__class__ = haxe.ds.BalancedTree;
        haxe.ds.TreeNode = function(l, k, v, r, h) {
            if (h == null) h = -1;
            this.left = l;
            this.key = k;
            this.value = v;
            this.right = r;
            if (h == -1) this._height = ((function($this) {
                var $r;
                var _this = $this.left;
                $r = _this == null ? 0 : _this._height;
                return $r;
            }(this)) > (function($this) {
                var $r;
                var _this1 = $this.right;
                $r = _this1 == null ? 0 : _this1._height;
                return $r;
            }(this)) ? (function($this) {
                var $r;
                var _this2 = $this.left;
                $r = _this2 == null ? 0 : _this2._height;
                return $r;
            }(this)) : (function($this) {
                var $r;
                var _this3 = $this.right;
                $r = _this3 == null ? 0 : _this3._height;
                return $r;
            }(this))) + 1;
            else this._height = h;
        };
        haxe.ds.TreeNode.__name__ = ["haxe", "ds", "TreeNode"];
        haxe.ds.TreeNode.prototype.left = null;
        haxe.ds.TreeNode.prototype.right = null;
        haxe.ds.TreeNode.prototype.key = null;
        haxe.ds.TreeNode.prototype.value = null;
        haxe.ds.TreeNode.prototype._height = null;
        haxe.ds.TreeNode.prototype.__class__ = haxe.ds.TreeNode;
        haxe.ds.EnumValueMap = function() {
            haxe.ds.BalancedTree.call(this);
        };
        haxe.ds.EnumValueMap.__interfaces__ = [haxe.IMap];
        haxe.ds.EnumValueMap.__name__ = ["haxe", "ds", "EnumValueMap"];
        haxe.ds.EnumValueMap.__super__ = haxe.ds.BalancedTree;
        for (var k in haxe.ds.BalancedTree.prototype) haxe.ds.EnumValueMap.prototype[k] = haxe.ds.BalancedTree.prototype[k];
        haxe.ds.EnumValueMap.prototype.compare = function(k1, k2) {
            var d = k1[1] - k2[1];
            if (d != 0) return d;
            var p1 = k1.slice(2);
            var p2 = k2.slice(2);
            if (p1.length == 0 && p2.length == 0) return 0;
            return this.compareArgs(p1, p2);
        };
        haxe.ds.EnumValueMap.prototype.compareArgs = function(a1, a2) {
            var ld = a1.length - a2.length;
            if (ld != 0) return ld;
            var _g1 = 0;
            var _g = a1.length;
            while (_g1 < _g) {
                var i = _g1++;
                var d = this.compareArg(a1[i], a2[i]);
                if (d != 0) return d;
            }
            return 0;
        };
        haxe.ds.EnumValueMap.prototype.compareArg = function(v1, v2) {
            if (_hcmn_.Reflect.isEnumValue(v1) && _hcmn_.Reflect.isEnumValue(v2)) return this.compare(v1, v2);
            else if ((v1 instanceof Array) && v1.__enum__ == null && ((v2 instanceof Array) && v2.__enum__ == null)) return this.compareArgs(v1, v2);
            else return _hcmn_.Reflect.compare(v1, v2);
        };
        haxe.ds.EnumValueMap.prototype.__class__ = haxe.ds.EnumValueMap;
        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;
        betPanel.BetPanelConfiguration.GTECH_BET_PANO = "GTECH";;
        betPanel.BetPanelConfiguration.IGT_BET_PANO = "IGT";;
        betPanel.BetPanelConfiguration.HYBRID_BET_PANO = "HYBRID";;
        betPanel.BetPanelConfiguration.TOTAL_BET_BTN_POSITIONS = {};;
        betPanel.BetPanelConfiguration.RIGHT_ANIMATIONS = {};;
        betPanel.BetPanelConfiguration.LEFT_ANIMATIONS = {};;
        betPanel.BetPanelConfiguration.UP_ANIMATIONS = {};;
        betPanel.BetPanelConfiguration.RIGHT_POSITIONS = {};;
        betPanel.BetPanelConfiguration.LEFT_POSITIONS = {};;
        betPanel.BetPanelConfiguration.UP_POSITIONS = {};;
        betPanel.BetPanelConfiguration.CHEVRON_UP_POSITIONS = {};;
        betPanel.BetPanelConfiguration.CHEVRON_DOWN_POSITIONS = {};;
        betPanel.BetPanelConfiguration.CHEVRON_LEFT_POSITIONS = {};;
        betPanel.BetPanelConfiguration.CHEVRON_RIGHT_POSITIONS = {};;
        betPanel.BetPanelConfiguration.BET_PANEL_TYPE = "GTECH";;
        betPanel.BetPanelConfiguration.TOTAL_PAGES = "5";;
        betPanel.BetPanelConfiguration.AUTOSPIN_LABEL_OUT = false;;
        betPanel.BetPanelConfiguration.CONNECTING_SPEED = 500;;
        betPanel.BetPanelConfiguration.CONNECTING_POSITIONS = {
            'x': 0,
            'y': 0
        };;
        betPanel.AutoPlayButtonControll.STOP_BUTTON = "StopAutoPlay";;
        betPanel.AutoPlayButtonControll.START_BUTTON = "StartAutoPlay";;
        betPanel.AutoPlayButtonControll.NUMBER_OF_ASPINS = "NumberOfAutoSpinsLabel";;
        betPanel.AutoPlayButtonControll.NUMBER_OF_ASPINS_BKG = "AutoSpinsLabelBck";;
        betPanel.AutoPlayPanelControlMobile.CLIP_Y_MOVEMENT_OFFSET = 180;;
        betPanel.AutoPlayPanelControlMobile.ARROW_Y_MOVEMENT_OFFSET = 40;;
        betPanel.AutoPlayPanelControlMobile.ARROW_MOVEMENT_TIME = 100;;
        betPanel.AutoPlayPanelControlMobile.INFO_BAR_MOVEMENT_OFFSET = -120;;
        betPanel.AutoPlayPanelControlMobile.CLIP_MOVEMENT_TIME = 150;;
        betPanel.AutoPlayPanelControlMobile.SPRITESHEET_ID = "panel_layout";;
        betPanel.BetLines.LABEL_BETLINES_VALUE_ID = "BetLineValue";;
        betPanel.GtechTotalBetControlMobile.UPDATE_TIMER_THRESHOLD = 3;;
        betPanel.GtechTotalBetControlMobile.UPDATE_TIMER_SPEED = 125;;
        betPanel.GtechTotalBetControlMobile.SPRITESHEET_ID = "panel_layout";;
        betPanel.GtechTotalBetControlMobile.LABEL_INFOBAR_LABEL_ID = "InfoBarLabel";;
        betPanel.GtechTotalBetControlMobile.LABEL_INFOBAR_VALUE_ID = "InfoBarLabelValue";;
        betPanel.GtechTotalBetControlMobile.LABEL_TOTALBET_VALUE_ID = "TotalBetLabel";;
        betPanel.GtechTotalBetControlMobile.LABEL_TOTALBET_TITLE_ID = "TotalBetLabelTitle";;
        betPanel.IgtBetControlDesktop.BET_LINES = "LINE_BET";;
        betPanel.IgtBetControlDesktop.LINES = "LINES";;
        betPanel.IgtBetControlDesktop.TOTAL_BET_DISPLAY = "TOTAL_BET_DISPLAY";;
        betPanel.IgtBetControlDesktop.TOTAL_BET_DISPLAY_LABEL_ID = "ComponentLabel";;
        betPanel.IgtBetControlDesktop.TOTAL_BET_DISPLAY_LABEL_TITLE_ID = "ComponentTitle";;
        betPanel.IgtTotalBetControllerMobile.BET_LINES = "LINE_BET";;
        betPanel.IgtTotalBetControllerMobile.LINES = "LINES";;
        betPanel.IgtTotalBetControllerMobile.TOTAL_BET_PREVIEW = "TOTAL_BET_PREVIEW";;
        betPanel.IgtTotalBetControllerMobile.TOTAL_BET_DISPLAY_LABEL_ID = "TotalBetPreviewLabel";;
        betPanel.WinMeter.LABEL_WINMETER_LABEL_ID = "WinMeterLabel";;
        return {
            exports: betPanel,
            activator: betPanel.Activator
        };
    });
//# sourceURL=slotBetPanel.js