define("scarabStaticViews", ["viewBuilderApi", "componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "displayEngineApi", "scarabStaticViewsApi", "displayEngineUtils", "gameLayoutApi", "PIXI", "BABYLON", "clientkernelEventbusApi", "clientkernelModulesApi"],
    function(viewBuilderApi, componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, displayEngineApi, scarabStaticViewsApi, displayEngineUtils, gameLayoutApi, PIXI, BABYLON, clientkernelEventbusApi, clientkernelModulesApi) {
        "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 scarabStaticViews == 'undefined') {
            var scarabStaticViews = {};
        };
        scarabStaticViews.Activator = function(context) {};
        scarabStaticViews.Activator = ck_implements(scarabStaticViews.Activator, clientkernelModulesApi.IModuleActivator);
        scarabStaticViews.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        scarabStaticViews.Activator.__name__ = ["scarabStaticViews", "Activator"];
        scarabStaticViews.Activator.prototype.start = function(context) {
            context.getServiceTracker([clientkernelLoaderApi.IAssetRegistry, viewBuilderApi.IViewBuilderFactory, displayEngineApi.IDisplayProvider]).then(function(context1) {
                scarabStaticViews.ExternalService.initialize(context1);
                var vbf = context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
                scarabStaticViews.ExternalService.bus = context1.getAnyService(clientkernelEventbusApi.IEventBus, null);
                scarabStaticViews.ExternalService.viewBuilderFactory = vbf;
                context1.registerService(new scarabStaticViews.StaticViewsFactory(vbf, context1), scarabStaticViewsApi.StaticViewsDeclaration, null);
            });
        };
        scarabStaticViews.Activator.prototype.stop = function(context) {};
        scarabStaticViews.Activator.main = function() {};
        scarabStaticViews.Activator.prototype.__class__ = scarabStaticViews.Activator;
        scarabStaticViews.ExternalService = function() {};
        scarabStaticViews.ExternalService.__name__ = ["scarabStaticViews", "ExternalService"];
        scarabStaticViews.ExternalService.assetRegistry = null;
        scarabStaticViews.ExternalService.vbf = null;
        scarabStaticViews.ExternalService.displayProvider = null;
        scarabStaticViews.ExternalService.translationManager = null;
        scarabStaticViews.ExternalService.bus = null;
        scarabStaticViews.ExternalService.viewBuilderFactory = null;
        scarabStaticViews.ExternalService.assets = null;
        scarabStaticViews.ExternalService.initialize = function(context) {
            scarabStaticViews.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            scarabStaticViews.ExternalService.vbf = context.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
            scarabStaticViews.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            scarabStaticViews.ExternalService.assets = new _hcmn_.haxe_ds_StringMap();
        };
        scarabStaticViews.ExternalService.prototype.__class__ = scarabStaticViews.ExternalService;
        scarabStaticViews.StaticViews = function(context, vbf) {
            this.assets = new _hcmn_.haxe_ds_StringMap();
            this.assetsLoaded = false;
            this.initialized = false;
            this.layoutPayload = null;
            this.vba = null;
            this.cfgId = "static_views_definition_config.json";
            this.vbAssetID = "static_views.viewbuilder.json";
            this.vbf = vbf;
            this.context = context;
            this.components = new haxe.ds.EnumValueMap();
            this.baseEvents = new scarabStaticViews.BaseEvents();
            this.port = context.getImplementedPort(scarabStaticViewsApi.IStaticViewsImplementationPort);
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.updateLayout));
            this.layoutPort.getGameLayoutUpdateStarted().subscribe($bind(this, this.layoutUpdateStarted));
            this.loadConfigData();
        };
        scarabStaticViews.StaticViews.__name__ = ["scarabStaticViews", "StaticViews"];
        scarabStaticViews.StaticViews.prototype.vbAssetID = null;
        scarabStaticViews.StaticViews.prototype.cfgId = null;
        scarabStaticViews.StaticViews.prototype.view = null;
        scarabStaticViews.StaticViews.prototype.context = null;
        scarabStaticViews.StaticViews.prototype.vba = null;
        scarabStaticViews.StaticViews.prototype.vbf = null;
        scarabStaticViews.StaticViews.prototype.controller = null;
        scarabStaticViews.StaticViews.prototype.layoutPayload = null;
        scarabStaticViews.StaticViews.prototype.initialized = null;
        scarabStaticViews.StaticViews.prototype.assetsLoaded = null;
        scarabStaticViews.StaticViews.prototype.port = null;
        scarabStaticViews.StaticViews.prototype.layoutPort = null;
        scarabStaticViews.StaticViews.prototype.cfg = null;
        scarabStaticViews.StaticViews.prototype.assets = null;
        scarabStaticViews.StaticViews.prototype.vbView = null;
        scarabStaticViews.StaticViews.prototype.components = null;
        scarabStaticViews.StaticViews.prototype.baseEvents = null;
        scarabStaticViews.StaticViews.prototype.loadConfigData = function() {
            var _g = this;
            scarabStaticViews.ExternalService.assetRegistry.getAsset(this.cfgId).getContent().then(function(data) {
                _g.cfg = data;
                haxe.Log.trace("[STATIC_VIEWS] loadConfigData() ", {
                    fileName: "StaticViews.hx",
                    lineNumber: 70,
                    className: "game.staticviews.StaticViews",
                    methodName: "loadConfigData",
                    customParams: [_g.cfg]
                });
                _g.loadMainAssets();
            });
        };
        scarabStaticViews.StaticViews.prototype.loadMainAssets = function() {
            var _g = this;
            haxe.Log.trace("[STATIC_VIEWS] loadMainAssets()", {
                fileName: "StaticViews.hx",
                lineNumber: 78,
                className: "game.staticviews.StaticViews",
                methodName: "loadMainAssets"
            });
            scarabStaticViews.ExternalService.assetRegistry.getAsset(this.vbAssetID).getContent().then(function(vba) {
                _g.vba = vba;
                _g.loadVBAssets();
            });
        };
        scarabStaticViews.StaticViews.prototype.loadVBAssets = function() {
            var _g = this;
            scarabStaticViews.ExternalService.assetRegistry.getAssetsContent(this.cfg.vbAssets).then(function(data) {
                scarabStaticViews.ExternalService.assets = data;
                _g.assetsLoaded = true;
                _g.initialize();
            });
        };
        scarabStaticViews.StaticViews.prototype.layoutUpdateStarted = function(e) {
            if (this.components.exists(scarabStaticViewsApi.StaticViewTypeEnum.picker)) this.components.get(scarabStaticViewsApi.StaticViewTypeEnum.picker).onLayoutStarted();
        };
        scarabStaticViews.StaticViews.prototype.updateLayout = function(e) {
            haxe.Log.trace("[STATIC_VIEWS] updateLayout() ", {
                fileName: "StaticViews.hx",
                lineNumber: 107,
                className: "game.staticviews.StaticViews",
                methodName: "updateLayout"
            });
            this.layoutPayload = e.getPayload();
            if (!this.initialized) this.initialize();
            else {
                this.controller.updateLayout(this.layoutPayload);
                this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
            }
        };
        scarabStaticViews.StaticViews.prototype.initialize = function() {
            haxe.Log.trace("[STATIC_VIEWS] initialize() " + _hcmn_.Std.string(this.initialized) + _hcmn_.Std.string(this.layoutPayload), {
                fileName: "StaticViews.hx",
                lineNumber: 122,
                className: "game.staticviews.StaticViews",
                methodName: "initialize"
            });
            if (!this.initialized && this.vba != null && this.layoutPayload != null && this.assetsLoaded) {
                this.initialized = true;
                this.controller = new scarabStaticViews.StaticViewsController(this);
                this.view = this.vbf.createView(this.vba);
                this.registerAllComponents();
                this.controller.updateLayout(this.layoutPayload);
                this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
                this.port.getHide().subscribe($bind(this, this.handleHide));
                this.port.getShow().subscribe($bind(this, this.handleShow));
                this.port.getEnable().subscribe($bind(this, this.handleEnable));
                this.port.getDisable().subscribe($bind(this, this.handleDisable));
                this.baseEvents.choice.add($bind(this, this.handleChoice));
                this.baseEvents.layoutUpdated.add($bind(this, this.handleLayoutUpdated));
                this.port.getPlayFlyAnimation().subscribe($bind(this, this.onPlayFlyAnimation));
            }
        };
        scarabStaticViews.StaticViews.prototype.registerAllComponents = function() {
            haxe.Log.trace("[STATIC_VIEWS] registerAllComponents()", {
                fileName: "StaticViews.hx",
                lineNumber: 147,
                className: "game.staticviews.StaticViews",
                methodName: "registerAllComponents"
            });
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.view.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var compId = $it0.next();
                var constructorIndex;
                var _this = _hcmn_.Type.getEnumConstructs(scarabStaticViewsApi.StaticViewTypeEnum);
                constructorIndex = _hcmn_.HxOverrides.indexOf(_this, compId, 0);
                if (constructorIndex < 0) continue;
                var componentEnum = _hcmn_.Type.createEnum(scarabStaticViewsApi.StaticViewTypeEnum, compId, null);
                this.registerComponent(componentEnum);
            }
        };
        scarabStaticViews.StaticViews.prototype.registerComponent = function(componentEnum) {
            haxe.Log.trace("[STATIC_VIEWS] registerComponent", {
                fileName: "StaticViews.hx",
                lineNumber: 160,
                className: "game.staticviews.StaticViews",
                methodName: "registerComponent",
                customParams: [componentEnum]
            });
            switch (componentEnum[1]) {
                case 1:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.reel_background, scarabStaticViews.StaticView);
                    break;
                case 3:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.game_logo_portrait, scarabStaticViews.Logo);
                    break;
                case 2:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.game_logo_landscape, scarabStaticViews.Logo);
                    break;
                case 11:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.reel_frames, scarabStaticViews.StaticView);
                    break;
                case 0:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.picker, scarabStaticViews.Picker);
                    break;
                case 4:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary, scarabStaticViews.Congrats);
                    break;
                case 7:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.award_cap, scarabStaticViews.Congrats);
                    break;
                case 6:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.fs_award_cap, scarabStaticViews.Congrats);
                    break;
                case 9:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter, scarabStaticViews.BonusCounter);
                    break;
                case 10:
                    this.registerContainerComponent(scarabStaticViewsApi.StaticViewTypeEnum.fs_bonus_counter, scarabStaticViews.FSBonusCounter);
                    break;
                default:
                    return false;
            }
            return true;
        };
        scarabStaticViews.StaticViews.prototype.registerContainerComponent = function(componentEnum, componentClass) {
            haxe.Log.trace("[STATIC_VIEWS] registerContainerComponent", {
                fileName: "StaticViews.hx",
                lineNumber: 193,
                className: "game.staticviews.StaticViews",
                methodName: "registerContainerComponent"
            });
            var container = this.view.getContainerById(componentEnum[0]);
            if (container == null) return;
            var value = _hcmn_.Type.createInstance(componentClass, [container, this.view, this.cfg, this.baseEvents]);
            this.components.set(componentEnum, value);
        };
        scarabStaticViews.StaticViews.prototype.handleHide = function(e) {
            var componentId = e.getPayload().type;
            haxe.Log.trace("[STATIC_VIEWS] hide ", {
                fileName: "StaticViews.hx",
                lineNumber: 203,
                className: "game.staticviews.StaticViews",
                methodName: "handleHide",
                customParams: [componentId]
            });
            if (this.components.exists(componentId)) this.components.get(componentId).hide();
        };
        scarabStaticViews.StaticViews.prototype.handleShow = function(e) {
            haxe.Log.trace("[STATIC_VIEWS] show ", {
                fileName: "StaticViews.hx",
                lineNumber: 212,
                className: "game.staticviews.StaticViews",
                methodName: "handleShow",
                customParams: [e.getPayload().type]
            });
            var componentId = e.getPayload().type;
            if (this.components.exists(componentId)) this.components.get(componentId).show(componentId, e.getPayload().content);
        };
        scarabStaticViews.StaticViews.prototype.handleEnable = function(e) {
            haxe.Log.trace("[STATIC_VIEWS] handleEnable ", {
                fileName: "StaticViews.hx",
                lineNumber: 222,
                className: "game.staticviews.StaticViews",
                methodName: "handleEnable",
                customParams: [e.getPayload()]
            });
            var componentId = e.getPayload();
            if (this.components.exists(componentId)) this.components.get(componentId).enable();
        };
        scarabStaticViews.StaticViews.prototype.handleDisable = function(e) {
            haxe.Log.trace("[STATIC_VIEWS] handleEnable ", {
                fileName: "StaticViews.hx",
                lineNumber: 232,
                className: "game.staticviews.StaticViews",
                methodName: "handleDisable",
                customParams: [e.getPayload()]
            });
            var componentId = e.getPayload();
            if (this.components.exists(componentId)) this.components.get(componentId).disable();
        };
        scarabStaticViews.StaticViews.prototype.handleChoice = function(e) {
            haxe.Log.trace("[STATIC_VIEWS] handleChoice ", {
                fileName: "StaticViews.hx",
                lineNumber: 242,
                className: "game.staticviews.StaticViews",
                methodName: "handleChoice",
                customParams: [e]
            });
            this.port.getChoice().publish(e);
        };
        scarabStaticViews.StaticViews.prototype.onPlayFlyAnimation = function(e) {
            haxe.Log.trace("[STATIC_VIEWS] onPlayFlyAnimation ", {
                fileName: "StaticViews.hx",
                lineNumber: 248,
                className: "game.staticviews.StaticViews",
                methodName: "onPlayFlyAnimation",
                customParams: [e.getPayload()]
            });
            this.components.get(scarabStaticViewsApi.StaticViewTypeEnum.picker).playAnimation(e.getPayload());
        };
        scarabStaticViews.StaticViews.prototype.handleLayoutUpdated = function(e) {
            haxe.Log.trace("[STATIC_VIEWS] handleLayoutUpdated ", {
                fileName: "StaticViews.hx",
                lineNumber: 254,
                className: "game.staticviews.StaticViews",
                methodName: "handleLayoutUpdated",
                customParams: [e]
            });
            this.port.getLayoutUpdated().publish(e);
        };
        scarabStaticViews.StaticViews.prototype.__class__ = scarabStaticViews.StaticViews;
        scarabStaticViews.StaticViewsController = function(staticViews) {
            this.flag_addedToStage = false;
            this.staticViews = staticViews;
        };
        scarabStaticViews.StaticViewsController.__name__ = ["scarabStaticViews", "StaticViewsController"];
        scarabStaticViews.StaticViewsController.prototype.flag_addedToStage = null;
        scarabStaticViews.StaticViewsController.prototype.staticViews = null;
        scarabStaticViews.StaticViewsController.prototype.updateLayout = function(layoutPayload) {
            var $it0 = layoutPayload.containers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var layerPayload = layoutPayload.containers.get(layerId);
                var cfg = layerPayload.configuration;
                var stage;
                var this1 = scarabStaticViews.ExternalService.displayProvider.getStages();
                stage = this1.get(layerPayload.stage);
                if ((function($this) {
                        var $r;
                        var this2 = $this.staticViews.view.getChildComponents();
                        $r = this2.get(layerId);
                        return $r;
                    }(this)) != null) {
                    var container;
                    container = (function($this) {
                        var $r;
                        var this3 = $this.staticViews.view.getChildComponents();
                        $r = this3.get(layerId);
                        return $r;
                    }(this));
                    var containerDO = container.getDisplayObject();
                    if (!this.flag_addedToStage) stage.addChild(containerDO);
                    if (containerDO != null) {
                        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)((function($this) {
                        var $r;
                        var key = _hcmn_.Type.createEnum(scarabStaticViewsApi.StaticViewTypeEnum, layerId, null);
                        $r = $this.staticViews.components.get(key);
                        return $r;
                    }(this))).configure(cfg);
                    else((function($this) {
                        var $r;
                        var key1 = _hcmn_.Type.createEnum(scarabStaticViewsApi.StaticViewTypeEnum, layerId, null);
                        $r = $this.staticViews.components.get(key1);
                        return $r;
                    }(this))).configure();
                }
            }
            if (!this.flag_addedToStage) this.flag_addedToStage = true;
        };
        scarabStaticViews.StaticViewsController.prototype.__class__ = scarabStaticViews.StaticViewsController;
        scarabStaticViews.StaticViewsFactory = function(vbf, context) {
            this.context = context;
            this.vbf = vbf;
        };
        scarabStaticViews.StaticViewsFactory = ck_implements(scarabStaticViews.StaticViewsFactory, clientkernelModulesApi.IService);
        scarabStaticViews.StaticViewsFactory = ck_implements(scarabStaticViews.StaticViewsFactory, componentmodelComponentApi.IComponentFactory);
        scarabStaticViews.StaticViewsFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        scarabStaticViews.StaticViewsFactory.__name__ = ["scarabStaticViews", "StaticViewsFactory"];
        scarabStaticViews.StaticViewsFactory.prototype.context = null;
        scarabStaticViews.StaticViewsFactory.prototype.vbf = null;
        scarabStaticViews.StaticViewsFactory.prototype.getComponentDeclaration = function() {
            return scarabStaticViewsApi.StaticViewsDeclaration;
        };
        scarabStaticViews.StaticViewsFactory.prototype.createComponent = function(context) {
            new scarabStaticViews.StaticViews(context, this.vbf);
        };
        scarabStaticViews.StaticViewsFactory.prototype.__class__ = scarabStaticViews.StaticViewsFactory;

        scarabStaticViews.IStaticView = function() {}
        scarabStaticViews.IStaticView.prototype = {

            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            show: function(componentId, content) {
                return {
                    arguments: ["*", "array"],
                    returns: "void"
                };
            },
            enable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            disable: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            onLayoutStarted: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            configure: function(layoutConfig) {
                return {
                    arguments: [{
                        type: "*",
                        opt: true
                    }],
                    returns: "void"
                };
            },
            playAnimation: function(b) {
                return {
                    arguments: ["number"],
                    returns: "void"
                };
            }
        };
        scarabStaticViews.BonusCounter = function(container) {
            this.container = container;
            this.contentContainer = container.getContainerById("content");
            container.show();
            var numbers = this.contentContainer.getContainerById("numbers");
            var $it0 = (function($this) {
                var $r;
                var this1 = numbers.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                var numberHolder = numbers.getContainerById(key);
                numberHolder.hide();
            }
        };
        scarabStaticViews.BonusCounter = ck_implements(scarabStaticViews.BonusCounter, scarabStaticViews.IStaticView);
        scarabStaticViews.BonusCounter.__interfaces__ = [scarabStaticViews.IStaticView];
        scarabStaticViews.BonusCounter.__name__ = ["scarabStaticViews", "BonusCounter"];
        scarabStaticViews.BonusCounter.prototype.container = null;
        scarabStaticViews.BonusCounter.prototype.contentContainer = null;
        scarabStaticViews.BonusCounter.prototype.show = function(componentId, content) {
            var _g = this;
            this.container.show();
            haxe.Log.trace("[STATIC_VIEWS] BonusCounter " + _hcmn_.Std.string(content), {
                fileName: "BonusCounter.hx",
                lineNumber: 33,
                className: "game.staticviews.components.BonusCounter",
                methodName: "show"
            });
            var numbers = this.contentContainer.getContainerById("numbers");
            var $it0 = (function($this) {
                var $r;
                var this1 = numbers.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                var numberHolder = numbers.getContainerById(key);
                numberHolder.hide();
            }
            var currentNumber = "number" + "_" + content[0][0];
            if ((function($this) {
                    var $r;
                    var this2 = numbers.getChildComponents();
                    $r = this2.exists(currentNumber);
                    return $r;
                }(this))) {
                var currentNumberHolder = numbers.getContainerById(currentNumber);
                currentNumberHolder.show();
            }
            displayEngineUtils.TweenX.to(this.contentContainer.getDisplayObject(), {
                scaleX: 1.1,
                scaleY: 1.1
            }, 700, null, null, null, null, null, null, null, {
                fileName: "BonusCounter.hx",
                lineNumber: 50,
                className: "game.staticviews.components.BonusCounter",
                methodName: "show"
            }).ease(displayEngineUtils.EaseX.linear).onFinish(function() {
                displayEngineUtils.TweenX.to(_g.contentContainer.getDisplayObject(), {
                    scaleX: 1,
                    scaleY: 1
                }, 1500, null, null, null, null, null, null, null, {
                    fileName: "BonusCounter.hx",
                    lineNumber: 58,
                    className: "game.staticviews.components.BonusCounter",
                    methodName: "show"
                }).ease(displayEngineUtils.EaseX.linear);
            });
        };
        scarabStaticViews.BonusCounter.prototype.hide = function() {
            haxe.Log.trace("[STATIC_VIEWS] hide BonusCounter", {
                fileName: "BonusCounter.hx",
                lineNumber: 70,
                className: "game.staticviews.components.BonusCounter",
                methodName: "hide"
            });
            this.container.hide();
        };
        scarabStaticViews.BonusCounter.prototype.configure = function(layoutConfig) {};
        scarabStaticViews.BonusCounter.prototype.disable = function() {};
        scarabStaticViews.BonusCounter.prototype.enable = function() {};
        scarabStaticViews.BonusCounter.prototype.onLayoutStarted = function() {};
        scarabStaticViews.BonusCounter.prototype.playAnimation = function(b) {};
        scarabStaticViews.BonusCounter.prototype.__class__ = scarabStaticViews.BonusCounter;
        scarabStaticViews.Congrats = function(container, vbAnimView) {
            this.vbAnimView = vbAnimView;
            this.container = container;
            container.hide();
            haxe.Log.trace("[STATIC_VIEWS] congrats ", {
                fileName: "Congrats.hx",
                lineNumber: 17,
                className: "game.staticviews.components.Congrats",
                methodName: "new"
            });
        };
        scarabStaticViews.Congrats = ck_implements(scarabStaticViews.Congrats, scarabStaticViews.IStaticView);
        scarabStaticViews.Congrats.__interfaces__ = [scarabStaticViews.IStaticView];
        scarabStaticViews.Congrats.__name__ = ["scarabStaticViews", "Congrats"];
        scarabStaticViews.Congrats.prototype.container = null;
        scarabStaticViews.Congrats.prototype.vbAnimView = null;
        scarabStaticViews.Congrats.prototype.show = function(componentId, content) {
            this.container.show();
            haxe.Log.trace("[STATIC_VIEWS] show " + _hcmn_.Std.string(content), {
                fileName: "Congrats.hx",
                lineNumber: 23,
                className: "game.staticviews.components.Congrats",
                methodName: "show"
            });
            var contentExists;
            var this1 = this.container.getChildComponents();
            contentExists = this1.exists("content");
            if (!contentExists && content != null) {
                var contentHolder = this.container.createContainerFromStoredConfig("content");
                this.container.addChildComponent(contentHolder, "content");
                this.createContent(componentId, contentHolder, content[0]);
                contentHolder.show();
            }
        };
        scarabStaticViews.Congrats.prototype.createContent = function(componentId, content, contentData) {
            var _g1 = 0;
            var _g = contentData.length;
            while (_g1 < _g) {
                var i = _g1++;
                var labelId = componentId[0] + "_" + i;
                var text = contentData[i];
                var label = content.getLabelById(labelId);
                label.setText(text);
                var labelIdShadow = componentId[0] + "_" + i + "_shadow";
                var text1 = contentData[i];
                var labelShadow = content.getLabelById(labelIdShadow);
                labelShadow.setText(text1);
            }
        };
        scarabStaticViews.Congrats.prototype.hide = function() {
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.container.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                this.container.disposeChildComponent(key);
            }
            this.container.hide();
        };
        scarabStaticViews.Congrats.prototype.configure = function(layoutConfig) {};
        scarabStaticViews.Congrats.prototype.disable = function() {};
        scarabStaticViews.Congrats.prototype.enable = function() {};
        scarabStaticViews.Congrats.prototype.onLayoutStarted = function() {};
        scarabStaticViews.Congrats.prototype.playAnimation = function(b) {};
        scarabStaticViews.Congrats.prototype.__class__ = scarabStaticViews.Congrats;
        scarabStaticViews.FSBonusCounter = function(container) {
            this.firstEntry = false;
            this.bitmapRight = null;
            this.bitmapLeft = null;
            this.container = container;
            this.factory = scarabStaticViews.ExternalService.displayProvider.getFactory();
            container.hide();
        };
        scarabStaticViews.FSBonusCounter = ck_implements(scarabStaticViews.FSBonusCounter, scarabStaticViews.IStaticView);
        scarabStaticViews.FSBonusCounter.__interfaces__ = [scarabStaticViews.IStaticView];
        scarabStaticViews.FSBonusCounter.__name__ = ["scarabStaticViews", "FSBonusCounter"];
        scarabStaticViews.FSBonusCounter.prototype.container = null;
        scarabStaticViews.FSBonusCounter.prototype.factory = null;
        scarabStaticViews.FSBonusCounter.prototype.bitmapLeft = null;
        scarabStaticViews.FSBonusCounter.prototype.bitmapRight = null;
        scarabStaticViews.FSBonusCounter.prototype.firstEntry = null;
        scarabStaticViews.FSBonusCounter.prototype.init = function() {};
        scarabStaticViews.FSBonusCounter.prototype.show = function(componentId, content) {
            haxe.Log.trace("[STATIC_VIEWS] FSBonusCounter " + _hcmn_.Std.string(content), {
                fileName: "FSBonusCounter.hx",
                lineNumber: 38,
                className: "game.staticviews.components.FSBonusCounter",
                methodName: "show"
            });
            if (!this.firstEntry) {
                this.bitmapLeft = this.factory.createBitmapText("", {
                    font: "45px" + " " + "Font-export",
                    align: "right"
                });
                this.bitmapLeft.setX(this.container.getLabelById("fs_number_left_label").getDisplayObject().getX());
                this.bitmapLeft.setY(this.container.getLabelById("fs_number_left_label").getDisplayObject().getY());
                this.container.getDisplayObject().removeChild(this.container.getLabelById("fs_number_left_label").getDisplayObject());
                this.container.getDisplayObject().addChild(this.bitmapLeft);
                this.bitmapRight = this.factory.createBitmapText("", {
                    font: "45px" + " " + "Font-export",
                    align: "right"
                });
                this.bitmapRight.setX(this.container.getLabelById("fs_number_right_label").getDisplayObject().getX());
                this.bitmapRight.setY(this.container.getLabelById("fs_number_right_label").getDisplayObject().getY());
                this.container.getDisplayObject().removeChild(this.container.getLabelById("fs_number_right_label").getDisplayObject());
                this.container.getDisplayObject().addChild(this.bitmapRight);
                this.firstEntry = true;
            }
            var pom;
            if (_hcmn_.Std.parseInt(content[0][0]) > 9) pom = "";
            else pom = "  ";
            this.bitmapLeft.set_text(pom + content[0][0]);
            this.bitmapRight.set_text(content[0][1]);
            this.container.show();
        };
        scarabStaticViews.FSBonusCounter.prototype.hide = function() {
            haxe.Log.trace("[STATIC_VIEWS] hide BonusCounter", {
                fileName: "FSBonusCounter.hx",
                lineNumber: 71,
                className: "game.staticviews.components.FSBonusCounter",
                methodName: "hide"
            });
            this.container.hide();
        };
        scarabStaticViews.FSBonusCounter.prototype.configure = function(layoutConfig) {};
        scarabStaticViews.FSBonusCounter.prototype.disable = function() {};
        scarabStaticViews.FSBonusCounter.prototype.enable = function() {};
        scarabStaticViews.FSBonusCounter.prototype.onLayoutStarted = function() {};
        scarabStaticViews.FSBonusCounter.prototype.playAnimation = function(b) {};
        scarabStaticViews.FSBonusCounter.prototype.__class__ = scarabStaticViews.FSBonusCounter;
        scarabStaticViews.Logo = function(container, vbAnimView, cfg, baseEvents) {
            this.baseEvents = baseEvents;
            this.vbAnimView = vbAnimView;
            this.container = container;
            container.hide();
        };
        scarabStaticViews.Logo = ck_implements(scarabStaticViews.Logo, scarabStaticViews.IStaticView);
        scarabStaticViews.Logo.__interfaces__ = [scarabStaticViews.IStaticView];
        scarabStaticViews.Logo.__name__ = ["scarabStaticViews", "Logo"];
        scarabStaticViews.Logo.prototype.container = null;
        scarabStaticViews.Logo.prototype.vbAnimView = null;
        scarabStaticViews.Logo.prototype.baseEvents = null;
        scarabStaticViews.Logo.prototype.show = function(componentId, content) {
            this.container.show();
        };
        scarabStaticViews.Logo.prototype.hide = function() {
            this.container.hide();
        };
        scarabStaticViews.Logo.prototype.configure = function(layoutConfig) {
            if (layoutConfig != null) {
                var visible = layoutConfig.visible;
                this.container.getDisplayObject().setVisible(visible);
                if (visible) this.baseEvents.layoutUpdated.dispatch(this.container.getDisplayObject().getName());
            }
        };
        scarabStaticViews.Logo.prototype.disable = function() {};
        scarabStaticViews.Logo.prototype.enable = function() {};
        scarabStaticViews.Logo.prototype.onLayoutStarted = function() {};
        scarabStaticViews.Logo.prototype.playAnimation = function(b) {};
        scarabStaticViews.Logo.prototype.__class__ = scarabStaticViews.Logo;
        scarabStaticViews.Picker = function(container, vbAnimView, cfg, baseEvents) {
            this.direction = "landscape";
            this.baseEvents = baseEvents;
            this.cfg = cfg.picker;
            this.vbAnimView = vbAnimView;
            this.container = container;
            this.rotations = [-4, 0, 4];
            this.scales = [1.04, 1.0, 1.04];
            this.fPositions = [new displayEngineApi.Point(-2, 5), new displayEngineApi.Point(0, 14), new displayEngineApi.Point(2, 5)];
            this.positions = new _hcmn_.haxe_ds_StringMap();
            this.setPositionData();
            container.hide();
            this.isActive = false;
        };
        scarabStaticViews.Picker = ck_implements(scarabStaticViews.Picker, scarabStaticViews.IStaticView);
        scarabStaticViews.Picker.__interfaces__ = [scarabStaticViews.IStaticView];
        scarabStaticViews.Picker.__name__ = ["scarabStaticViews", "Picker"];
        scarabStaticViews.Picker.prototype.container = null;
        scarabStaticViews.Picker.prototype.vbAnimView = null;
        scarabStaticViews.Picker.prototype.cfg = null;
        scarabStaticViews.Picker.prototype.direction = null;
        scarabStaticViews.Picker.prototype.positions = null;
        scarabStaticViews.Picker.prototype.layoutConfig = null;
        scarabStaticViews.Picker.prototype.baseEvents = null;
        scarabStaticViews.Picker.prototype.activeTweens = null;
        scarabStaticViews.Picker.prototype.floatingTweens = null;
        scarabStaticViews.Picker.prototype.rotations = null;
        scarabStaticViews.Picker.prototype.scales = null;
        scarabStaticViews.Picker.prototype.fPositions = null;
        scarabStaticViews.Picker.prototype.isActive = null;
        scarabStaticViews.Picker.prototype.currentChoice = null;
        scarabStaticViews.Picker.prototype.setPositionData = function() {
            var _g = 0;
            var _g1 = _hcmn_.Reflect.fields(this.cfg);
            while (_g < _g1.length) {
                var element = _g1[_g];
                ++_g;
                var pos = _hcmn_.Reflect.field(this.cfg, element);
                this.positions.set(element == null ? "null" : "" + element, pos);
            }
        };
        scarabStaticViews.Picker.prototype.show = function(componentId, content) {
            this.isActive = false;
            this.floatingTweens = [];
            var background = this.container.createContainerFromStoredConfig("background");
            if (!(function($this) {
                    var $r;
                    var this1 = $this.container.getChildComponents();
                    $r = this1.exists("background");
                    return $r;
                }(this))) this.container.addChildComponent(background, "background");
            var _g1 = 0;
            var _g = content.length;
            while (_g1 < _g) {
                var i = _g1++;
                var childId = "picker_holder" + "_" + (i + 1);
                var contentExists;
                var this2 = this.container.getChildComponents();
                contentExists = this2.exists(childId);
                if (!contentExists) {
                    var holder = this.container.createContainerFromStoredConfig("picker_holder");
                    var btn = holder.getButtonById("btn");
                    btn.getMainMovieClip().setName(_hcmn_.Std.string(i + 1));
                    btn.disable();
                    var xPos = this.positions.get(this.direction)[i][0];
                    var yPos = this.positions.get(this.direction)[i][1];
                    holder.setX(xPos);
                    holder.setY(yPos);
                    this.container.addChildComponent(holder, childId);
                    var freeSpinsText = content[i][0];
                    var wildsText = content[i][1];
                    if ((function($this) {
                            var $r;
                            var this3 = holder.getChildComponents();
                            $r = this3.exists("picker_0");
                            return $r;
                        }(this))) holder.getLabelById("picker_0").setText(freeSpinsText);
                    if ((function($this) {
                            var $r;
                            var this4 = holder.getChildComponents();
                            $r = this4.exists("picker_4");
                            return $r;
                        }(this))) holder.getLabelById("picker_4").setText(wildsText);
                }
            }
            this.disable();
            this.container.show();
        };
        scarabStaticViews.Picker.prototype.onDown = function(e) {
            var btnId = e.id;
            this.currentChoice = btnId;
            this.disable();
            this.activeTweens = [];
            this.isActive = false;
            this.baseEvents.choice.dispatch(btnId);
            this.activeTweens = null;
            if (this.floatingTweens != null) {
                var _g1 = 0;
                var _g = this.floatingTweens.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    this.floatingTweens[i]["goto"](0, false);
                    this.floatingTweens[i].stop();
                }
                this.floatingTweens = null;
            }
        };
        scarabStaticViews.Picker.prototype.hide = function() {
            if (this.floatingTweens != null) {
                var _g1 = 0;
                var _g = this.floatingTweens.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    this.floatingTweens[i].stop();
                }
                this.floatingTweens = null;
            }
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.container.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                this.container.disposeChildComponent(key);
            }
            this.container.hide();
        };
        scarabStaticViews.Picker.prototype.configure = function(layoutConfig) {
            this.layoutConfig = layoutConfig;
            this.updatePosition();
        };
        scarabStaticViews.Picker.prototype.updatePosition = function() {
            var len = this.positions.get(this.direction).length;
            var _g = 0;
            while (_g < len) {
                var i = _g++;
                var childId = "picker_holder" + "_" + i + 1;
                var contentExists;
                var this1 = this.container.getChildComponents();
                contentExists = this1.exists(childId);
                if (contentExists) {
                    var holder = this.container.createContainerFromStoredConfig("picker_holder");
                    var xPos = this.positions.get(this.direction)[i][0];
                    var yPos = this.positions.get(this.direction)[i][1];
                    holder.setX(xPos);
                    holder.setY(yPos);
                }
            }
        };
        scarabStaticViews.Picker.prototype.onLayoutStarted = function() {};
        scarabStaticViews.Picker.prototype.disable = function() {
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.container.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                if (_hcmn_.StringTools.startsWith(key, "picker_holder")) {
                    var pickerHolder = this.container.getContainerById(key);
                    var btn = pickerHolder.getButtonById("btn");
                    btn.disable();
                    btn.getEvents().DOWN().removeListener($bind(this, this.onDown));
                }
            }
        };
        scarabStaticViews.Picker.prototype.enable = function() {
            var currentButton = 0;
            if (this.floatingTweens == null) this.floatingTweens = [];
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.container.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                if (_hcmn_.StringTools.startsWith(key, "picker_holder")) {
                    var pickerHolder = this.container.getContainerById(key);
                    this.initFloating(pickerHolder, currentButton - 1);
                    var btn = pickerHolder.getButtonById("btn");
                    btn.enable();
                    btn.getEvents().DOWN().addListener($bind(this, this.onDown));
                }
                currentButton++;
            }
        };
        scarabStaticViews.Picker.prototype.initFloating = function(holder, currentButton) {
            var initRotation = holder.getDisplayObject().getRotation();
            var initX = holder.getDisplayObject().getX();
            var initY = holder.getDisplayObject().getY();
            this.floatingTweens.push(displayEngineUtils.TweenX.to(holder.getDisplayObject(), {
                x: initX + this.fPositions[currentButton].x,
                y: initY + this.fPositions[currentButton].y,
                scaleX: this.scales[currentButton],
                scaleY: this.scales[currentButton],
                rotation: initRotation + this.rotations[currentButton]
            }, 2000, null, null, null, null, null, null, null, {
                fileName: "Picker.hx",
                lineNumber: 236,
                className: "game.staticviews.components.Picker",
                methodName: "initFloating"
            }).ease(displayEngineUtils.EaseX.linear).zigzag(true).repeat(0));
        };
        scarabStaticViews.Picker.prototype.playAnimation = function(btnId) {
            var _g = this;
            var btnId1;
            if (btnId == null) btnId1 = "null";
            else btnId1 = "" + btnId;
            haxe.Log.trace("[STATIC_VIEWS] onPlayFlyAnimation ", {
                fileName: "Picker.hx",
                lineNumber: 251,
                className: "game.staticviews.components.Picker",
                methodName: "playAnimation",
                customParams: [btnId1]
            });
            this.activeTweens = [];
            var totalTweens = 0;
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.container.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                var clickedBtnId = ["picker_holder" + "_" + btnId1];
                var dObj = this.container.getContainerById(key).getDisplayObject();
                if (_hcmn_.StringTools.startsWith(key, "picker_holder")) {
                    if (key != clickedBtnId[0]) {
                        this.isActive = true;
                        this.activeTweens.push(displayEngineUtils.TweenX.to(dObj, {
                            alpha: 0
                        }, 1000, null, null, null, null, null, null, null, {
                            fileName: "Picker.hx",
                            lineNumber: 265,
                            className: "game.staticviews.components.Picker",
                            methodName: "playAnimation"
                        }).ease(displayEngineUtils.EaseX.linear).onFinish((function(clickedBtnId) {
                            return function() {
                                totalTweens++;
                                if (totalTweens == _g.activeTweens.length) {
                                    var currentDObj = _g.container.getContainerById(clickedBtnId[0]).getDisplayObject();
                                    _g.activeTweens.push(displayEngineUtils.TweenX.to(currentDObj, {
                                        x: _g.positions.get(_g.direction)[1][0],
                                        y: _g.positions.get(_g.direction)[1][1]
                                    }, 1000, null, null, null, null, null, null, null, {
                                        fileName: "Picker.hx",
                                        lineNumber: 276,
                                        className: "game.staticviews.components.Picker",
                                        methodName: "playAnimation"
                                    }).ease(displayEngineUtils.EaseX.linear).onFinish((function() {
                                        return function() {
                                            _g.isActive = false;
                                            _g.activeTweens = null;
                                        };
                                    })()));
                                }
                            };
                        })(clickedBtnId)));
                    }
                }
            }
        };
        scarabStaticViews.Picker.prototype.rand = function(min, max) {
            return _hcmn_.Math.floor(_hcmn_.Math.random() * (max - min + 1) + min);
        };
        scarabStaticViews.Picker.prototype.__class__ = scarabStaticViews.Picker;
        scarabStaticViews.StaticView = function(container, vbAnimView) {
            this.vbAnimView = vbAnimView;
            this.container = container;
            container.show();
        };
        scarabStaticViews.StaticView = ck_implements(scarabStaticViews.StaticView, scarabStaticViews.IStaticView);
        scarabStaticViews.StaticView.__interfaces__ = [scarabStaticViews.IStaticView];
        scarabStaticViews.StaticView.__name__ = ["scarabStaticViews", "StaticView"];
        scarabStaticViews.StaticView.prototype.container = null;
        scarabStaticViews.StaticView.prototype.vbAnimView = null;
        scarabStaticViews.StaticView.prototype.show = function(componentId, content) {
            this.container.show();
        };
        scarabStaticViews.StaticView.prototype.hide = function() {
            this.container.hide();
        };
        scarabStaticViews.StaticView.prototype.configure = function(layoutConfig) {};
        scarabStaticViews.StaticView.prototype.disable = function() {};
        scarabStaticViews.StaticView.prototype.enable = function() {};
        scarabStaticViews.StaticView.prototype.onLayoutStarted = function() {};
        scarabStaticViews.StaticView.prototype.playAnimation = function(b) {};
        scarabStaticViews.StaticView.prototype.__class__ = scarabStaticViews.StaticView;
        scarabStaticViews.BaseEvents = function() {
            this.choice = new _hcmn_.msignal_Signal1();
            this.layoutUpdated = new _hcmn_.msignal_Signal1();
        };
        scarabStaticViews.BaseEvents.__name__ = ["scarabStaticViews", "BaseEvents"];
        scarabStaticViews.BaseEvents.prototype.choice = null;
        scarabStaticViews.BaseEvents.prototype.layoutUpdated = null;
        scarabStaticViews.BaseEvents.prototype.__class__ = scarabStaticViews.BaseEvents;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            },
            exists: function(k) {
                return {
                    arguments: ["*"],
                    returns: "boolean"
                };
            },
            keys: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            }
        };
        haxe.Log = function() {};
        haxe.Log.__name__ = ["haxe", "Log"];
        haxe.Log.trace = function(v, infos) {
            _hcmn_.js_Boot.__trace(v, infos);
        };
        haxe.Log.prototype.__class__ = haxe.Log;
        if (!haxe.ds) {
            haxe.ds = {};
        };
        haxe.ds.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.exists = function(key) {
            var node = this.root;
            while (node != null) {
                var c = this.compare(key, node.key);
                if (c == 0) return true;
                else if (c < 0) node = node.left;
                else node = node.right;
            }
            return false;
        };
        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;
        return {
            exports: scarabStaticViews,
            activator: scarabStaticViews.Activator
        };
    });
//# sourceURL=scarabStaticViews.js