define("smashThePigWinAnimator", ["viewBuilderApi", "smashThePigWinAnimatorPort", "componentmodelComponentApi", "clientkernelLoaderApi", "slotModelApi", "displayEngineApi", "clientkernelTestableApi", "gameLayoutApi", "clientkernelEventbusApi", "clientkernelModulesApi"],
    function(viewBuilderApi, smashThePigWinAnimatorPort, componentmodelComponentApi, clientkernelLoaderApi, slotModelApi, displayEngineApi, clientkernelTestableApi, gameLayoutApi, 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 haxe == 'undefined') {
            var haxe = {};
        };

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

        };
        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 (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;
        if (typeof smashThePigWinAnimator == 'undefined') {
            var smashThePigWinAnimator = {};
        };
        smashThePigWinAnimator.Activator = function(context) {};
        smashThePigWinAnimator.Activator = ck_implements(smashThePigWinAnimator.Activator, clientkernelModulesApi.IModuleActivator);
        smashThePigWinAnimator.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        smashThePigWinAnimator.Activator.__name__ = ["smashThePigWinAnimator", "Activator"];
        smashThePigWinAnimator.Activator.prototype.factory = null;
        smashThePigWinAnimator.Activator.prototype.mcontext = null;
        smashThePigWinAnimator.Activator.prototype.start = function(context) {
            var _g = this;
            context.getServiceTracker([displayEngineApi.IDisplayProvider, clientkernelTestableApi.ITestable, viewBuilderApi.IViewBuilderFactory]).then(function(context1) {
                smashThePigWinAnimator.ExternalService.initialize(context1);
                _g.mcontext = context1;
                _g.factory = context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
                smashThePigWinAnimator.ExternalService.viewBuilderFactory = _g.factory;
                smashThePigWinAnimator.ExternalService.loadConfig("win-animator-layout-configuration", $bind(_g, _g.configLoaded));
            });
        };
        smashThePigWinAnimator.Activator.prototype.configLoaded = function(data) {
            smashThePigWinAnimator.WinAnimatorModel.configLoaded(data);
            this.mcontext.registerService(new smashThePigWinAnimator.WinAnimatorFactory(this.factory), smashThePigWinAnimatorPort.WinAnimatorDeclaration, null);
        };
        smashThePigWinAnimator.Activator.prototype.stop = function(context) {};
        smashThePigWinAnimator.Activator.main = function() {};
        smashThePigWinAnimator.Activator.prototype.__class__ = smashThePigWinAnimator.Activator;
        smashThePigWinAnimator.ExternalService = function() {};
        smashThePigWinAnimator.ExternalService.__name__ = ["smashThePigWinAnimator", "ExternalService"];
        smashThePigWinAnimator.ExternalService.displayProvider = null;
        smashThePigWinAnimator.ExternalService.assetRegistry = null;
        smashThePigWinAnimator.ExternalService.testableLogger = null;
        smashThePigWinAnimator.ExternalService.viewBuilderFactory = null;
        smashThePigWinAnimator.ExternalService.initialize = function(context) {
            smashThePigWinAnimator.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            smashThePigWinAnimator.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            var testable = context.getAnyService(clientkernelTestableApi.ITestable, null);
            smashThePigWinAnimator.ExternalService.testableLogger = testable.getLogger(context);
        };
        smashThePigWinAnimator.ExternalService.loadConfig = function(config_id, configCallback) {
            smashThePigWinAnimator.ExternalService.assetRegistry.getAsset(config_id).getContent().then(function(data) {
                configCallback(data);
            });
        };
        smashThePigWinAnimator.ExternalService.prototype.__class__ = smashThePigWinAnimator.ExternalService;
        smashThePigWinAnimator.WinAnimations = function(context, factory) {
            this.context = context;
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.implementationPort = context.getImplementedPort(smashThePigWinAnimatorPort.IWinAnimatorImplementationPort);
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.updateLayout));
            this.controller = new smashThePigWinAnimator.WinAnimatorController(this, this.layoutPort);
            new smashThePigWinAnimator.WinAnimatorModel($bind(this, this.modelInitialised));
        };
        smashThePigWinAnimator.WinAnimations.__name__ = ["smashThePigWinAnimator", "WinAnimations"];
        smashThePigWinAnimator.WinAnimations.prototype.controller = null;
        smashThePigWinAnimator.WinAnimations.prototype.implementationPort = null;
        smashThePigWinAnimator.WinAnimations.prototype.context = null;
        smashThePigWinAnimator.WinAnimations.prototype.layoutPayload = null;
        smashThePigWinAnimator.WinAnimations.prototype.layoutPort = null;
        smashThePigWinAnimator.WinAnimations.prototype.modelInitialised = function() {
            this.initialize();
        };
        smashThePigWinAnimator.WinAnimations.prototype.updateLayout = function(e) {
            this.layoutPayload = e.getPayload();
            if (!smashThePigWinAnimator.WinAnimatorModel.initialised) this.initialize();
            else this.controller.updateLayout(this.layoutPayload, this.context.getInstance());
        };
        smashThePigWinAnimator.WinAnimations.prototype.initialize = function() {
            if (smashThePigWinAnimator.WinAnimatorModel.initialised == false && this.layoutPayload != null) {
                this.controller.init();
                this.controller.setupConfiguration();
                this.controller.updateLayout(this.layoutPayload, this.context.getInstance());
                smashThePigWinAnimator.WinAnimatorModel.initialised = true;
            }
        };
        smashThePigWinAnimator.WinAnimations.prototype.__class__ = smashThePigWinAnimator.WinAnimations;
        smashThePigWinAnimator.Controller = function(controllerInstance) {
            smashThePigWinAnimator.Controller._CONTROLLERS.push(controllerInstance);
        };
        smashThePigWinAnimator.Controller.__name__ = ["smashThePigWinAnimator", "Controller"];
        smashThePigWinAnimator.Controller.prototype.sendMessage = function(message) {
            var _g1 = 0;
            var _g = smashThePigWinAnimator.Controller._CONTROLLERS.length;
            while (_g1 < _g) {
                var i = _g1++;
                var controller = smashThePigWinAnimator.Controller._CONTROLLERS[i];
                var controllerEvents = controller.getInterests();
                var _g3 = 0;
                var _g2 = controllerEvents.length;
                while (_g3 < _g2) {
                    var m = _g3++;
                    var interestedInMessage = controllerEvents[m];
                    if (interestedInMessage == message._messageName) {
                        controller.processMessage(message);
                        break;
                    }
                }
            }
        };
        smashThePigWinAnimator.Controller.prototype.getInterests = function() {
            return [];
        };
        smashThePigWinAnimator.Controller.prototype.processMessage = function(message) {};
        smashThePigWinAnimator.Controller.prototype.__class__ = smashThePigWinAnimator.Controller;
        smashThePigWinAnimator.WinAnimatorController = function(winAnimations, layoutPort) {
            this.winAnimations = winAnimations;
            this.layoutPort = layoutPort;
            smashThePigWinAnimator.Controller.call(this, this);
        };
        smashThePigWinAnimator.WinAnimatorController.__name__ = ["smashThePigWinAnimator", "WinAnimatorController"];
        smashThePigWinAnimator.WinAnimatorController.__super__ = smashThePigWinAnimator.Controller;
        for (var k in smashThePigWinAnimator.Controller.prototype) smashThePigWinAnimator.WinAnimatorController.prototype[k] = smashThePigWinAnimator.Controller.prototype[k];
        smashThePigWinAnimator.WinAnimatorController.prototype.winAnimations = null;
        smashThePigWinAnimator.WinAnimatorController.prototype.layoutPort = null;
        smashThePigWinAnimator.WinAnimatorController.prototype.init = function() {
            new smashThePigWinAnimator.WinAnimationsPortController(this.winAnimations.implementationPort, this.layoutPort, this.winAnimations);
        };
        smashThePigWinAnimator.WinAnimatorController.prototype.updateLayout = function(layoutPayload, instance) {
            this.sendMessage(new smashThePigWinAnimator.WinAnimatorMessagePayload("updateUpdatedComponentsPort", instance));
        };
        smashThePigWinAnimator.WinAnimatorController.prototype.setupConfiguration = function() {
            this.sendMessage(new smashThePigWinAnimator.WinAnimatorMessagePayload("setupConfiguration"));
        };
        smashThePigWinAnimator.WinAnimatorController.prototype.__class__ = smashThePigWinAnimator.WinAnimatorController;
        smashThePigWinAnimator.WinAnimatorFactory = function(vbf) {
            this.vbf = vbf;
        };
        smashThePigWinAnimator.WinAnimatorFactory = ck_implements(smashThePigWinAnimator.WinAnimatorFactory, clientkernelModulesApi.IService);
        smashThePigWinAnimator.WinAnimatorFactory = ck_implements(smashThePigWinAnimator.WinAnimatorFactory, componentmodelComponentApi.IComponentFactory);
        smashThePigWinAnimator.WinAnimatorFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        smashThePigWinAnimator.WinAnimatorFactory.__name__ = ["smashThePigWinAnimator", "WinAnimatorFactory"];
        smashThePigWinAnimator.WinAnimatorFactory.prototype.vbf = null;
        smashThePigWinAnimator.WinAnimatorFactory.prototype.getComponentDeclaration = function() {
            return smashThePigWinAnimatorPort.WinAnimatorDeclaration;
        };
        smashThePigWinAnimator.WinAnimatorFactory.prototype.createComponent = function(context) {
            var _winlines = new smashThePigWinAnimator.WinAnimations(context, this.vbf);
        };
        smashThePigWinAnimator.WinAnimatorFactory.prototype.__class__ = smashThePigWinAnimator.WinAnimatorFactory;
        smashThePigWinAnimator.InternalMVCConstants = function() {};
        smashThePigWinAnimator.InternalMVCConstants.__name__ = ["smashThePigWinAnimator", "InternalMVCConstants"];
        smashThePigWinAnimator.InternalMVCConstants.prototype.__class__ = smashThePigWinAnimator.InternalMVCConstants;
        smashThePigWinAnimator.WinAnimationsPortController = function(implementationPort, layoutPort, winAnimations) {
            this.totalDisplayParts = 3;
            this.numberOfDisplayParts = 0;
            this.scaterActive = false;
            this.cellsNum = smashThePigWinAnimator.WinAnimatorModel.globalConfiguration.numberOfRows;
            this.reelsNum = smashThePigWinAnimator.WinAnimatorModel.globalConfiguration.numberOfColums;
            this.implementationPort = implementationPort;
            this.layoutPort = layoutPort;
            smashThePigWinAnimator.Controller.call(this, this);
            implementationPort.getShowOutcome().subscribe($bind(this, this.handleShowOutcome));
            implementationPort.getHideOutcome().subscribe($bind(this, this.handleHideOutcome));
            implementationPort.getHandleLandingSymbols().subscribe($bind(this, this.handleLandingSymbols));
            implementationPort.setVisible().subscribe($bind(this, this.handleSetVisible));
            implementationPort.requestDelegation().subscribe($bind(this, this.delegateComponentRequests));
            implementationPort.requestStopScaterLanding().subscribe($bind(this, this.requestStopScaterLanding));
        };
        smashThePigWinAnimator.WinAnimationsPortController.__name__ = ["smashThePigWinAnimator", "WinAnimationsPortController"];
        smashThePigWinAnimator.WinAnimationsPortController.__super__ = smashThePigWinAnimator.Controller;
        for (var k in smashThePigWinAnimator.Controller.prototype) smashThePigWinAnimator.WinAnimationsPortController.prototype[k] = smashThePigWinAnimator.Controller.prototype[k];
        smashThePigWinAnimator.WinAnimationsPortController.prototype.implementationPort = null;
        smashThePigWinAnimator.WinAnimationsPortController.prototype.reelsNum = null;
        smashThePigWinAnimator.WinAnimationsPortController.prototype.cellsNum = null;
        smashThePigWinAnimator.WinAnimationsPortController.prototype.layoutPort = null;
        smashThePigWinAnimator.WinAnimationsPortController.prototype.scaterActive = null;
        smashThePigWinAnimator.WinAnimationsPortController.prototype.numberOfDisplayParts = null;
        smashThePigWinAnimator.WinAnimationsPortController.prototype.totalDisplayParts = null;
        smashThePigWinAnimator.WinAnimationsPortController.prototype.requestStopScaterLanding = function(e) {
            haxe.Log.trace("***** request ", {
                fileName: "WinAnimationsPortController.hx",
                lineNumber: 54,
                className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                methodName: "requestStopScaterLanding"
            });
            if (this.scaterActive) {
                this.scaterActive = false;
                this.implementationPort.stopScaterLanding().publish(null);
                haxe.Log.trace("********** no problem all is published and scaterActive is false", {
                    fileName: "WinAnimationsPortController.hx",
                    lineNumber: 61,
                    className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                    methodName: "requestStopScaterLanding"
                });
            }
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.delegateComponentRequests = function(e) {
            var requestedDelegation = e.getPayload();
            var _g = requestedDelegation.messageName;
            switch (_g) {
                case smashThePigWinAnimatorPort.RequestDelegationPayload.GET_CURRENT_WIN:
                    this.implementationPort.getCurrentWin().publish(requestedDelegation.messageData);
                    break;
                case smashThePigWinAnimatorPort.RequestDelegationPayload.GET_WIN_LINES_CYCLE_ANIMATED:
                    this.implementationPort.getWinLineCycleAnimated().publish(null);
                    break;
                case smashThePigWinAnimatorPort.RequestDelegationPayload.GET_WIN_SYMBOLS_CREATED:
                    this.implementationPort.getWinSymbolsCreated().publish(null);
                    break;
            }
            haxe.Log.trace("[LN] winAnimator.delegateComponentRequests: ", {
                fileName: "WinAnimationsPortController.hx",
                lineNumber: 74,
                className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                methodName: "delegateComponentRequests",
                customParams: [e.getPayload()]
            });
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.getInterests = function() {
            return ["updateUpdatedComponentsPort", "setupConfiguration", "hideAll"];
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.processMessage = function(message) {
            var _g = message._messageName;
            switch (_g) {
                case "updateUpdatedComponentsPort":
                    this.updateLayoutUpdatedComponentsPort(message._messageData);
                    break;
                case "setupConfiguration":
                    this.setupConfiguration();
                    break;
                case "hideAll":
                    this.hideAll();
                    break;
            }
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.setupConfiguration = function() {
            var payload = new smashThePigWinAnimatorPort.SetupWinAnimatorComponentsPayload(smashThePigWinAnimator.WinAnimatorModel.scaterSymbolsConfiguration, smashThePigWinAnimator.WinAnimatorModel.topSymbosConfiguration, smashThePigWinAnimator.WinAnimatorModel.winFramesConfiguration, smashThePigWinAnimator.WinAnimatorModel.winSymbolsConfiguration, smashThePigWinAnimator.WinAnimatorModel.globalConfiguration);
            this.implementationPort.setupWinAnimatorComponents().publish(payload);
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.updateLayoutUpdatedComponentsPort = function(messageData) {
            var instance;
            instance = _hcmn_.js_Boot.__cast(messageData, componentmodelComponentApi.IComponentInstance);
            this.layoutPort.getComponentLayoutUpdated().publish(instance);
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.handleShowOutcome = function(e) {
            haxe.Log.trace("[LN], winAnimationsPortController.handleShowOutcome: ", {
                fileName: "WinAnimationsPortController.hx",
                lineNumber: 108,
                className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                methodName: "handleShowOutcome",
                customParams: [e.getPayload()]
            });
            var symbolOffset = 0;
            var outcomeOptionsPayload = e.getPayload();
            var outcome = outcomeOptionsPayload.spinOutcome;
            var allWinningSymbols = [];
            var _g1 = 0;
            var _g = this.reelsNum;
            while (_g1 < _g) {
                var i = _g1++;
                var a = [];
                allWinningSymbols.push(a);
                var _g3 = 0;
                var _g2 = this.cellsNum;
                while (_g3 < _g2) {
                    var j = _g3++;
                    a.push(false);
                }
            }
            if (outcome.lineWins != null && outcome.lineWins.length > 0) {
                var _g4 = 0;
                var _g11 = outcome.lineWins;
                while (_g4 < _g11.length) {
                    var lw = _g11[_g4];
                    ++_g4;
                    var _g31 = 0;
                    var _g21 = this.reelsNum;
                    while (_g31 < _g21) {
                        var i1 = _g31++;
                        var _g5 = 0;
                        var _g41 = this.cellsNum;
                        while (_g5 < _g41) {
                            var j1 = _g5++;
                            if (allWinningSymbols[i1][j1] || lw.winPath.reelsInfo[i1][j1 + symbolOffset] == 1) allWinningSymbols[i1][j1] = true;
                        }
                    }
                }
            }
            if (outcome.bonusWins != null && outcome.bonusWins.length > 0) {
                var _g6 = 0;
                var _g12 = outcome.bonusWins;
                while (_g6 < _g12.length) {
                    var bw = _g12[_g6];
                    ++_g6;
                    if (bw.type == smashThePigWinAnimator.WinAnimatorModel.globalConfiguration.bonusWinType) {
                        var _g32 = 0;
                        var _g22 = this.reelsNum;
                        while (_g32 < _g22) {
                            var i2 = _g32++;
                            var _g51 = 0;
                            var _g42 = this.cellsNum;
                            while (_g51 < _g42) {
                                var j2 = _g51++;
                                if (allWinningSymbols[i2][j2] || bw.winPath.reelsInfo[i2][j2 + symbolOffset] == 1) allWinningSymbols[i2][j2] = true;
                            }
                        }
                    }
                }
            }
            var showWinAnimationPayload = new smashThePigWinAnimatorPort.ShowWinAnimationPayload(allWinningSymbols, outcome, outcomeOptionsPayload);
            this.implementationPort.show().publish(showWinAnimationPayload);
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.handleHideOutcome = function(e) {
            _hcmn_.haxe_Timer.delay($bind(this, this.hideAll), 0);
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.handleLandingSymbols = function(e) {
            haxe.Log.trace("[zb] handleLandingSymbols: " + _hcmn_.Std.string(e.getPayload()), {
                fileName: "WinAnimationsPortController.hx",
                lineNumber: 162,
                className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                methodName: "handleLandingSymbols"
            });
            var outcomeOptionsPayload = e.getPayload();
            if (outcomeOptionsPayload != null) {
                var reelStopped = outcomeOptionsPayload.reelStopped;
                if (outcomeOptionsPayload.landingSymbols != null && outcomeOptionsPayload.landingSymbols.length > 0) {
                    this.implementationPort.showScaterLanding().publish(new smashThePigWinAnimatorPort.ShowScaterLandingPayload(outcomeOptionsPayload.landingSymbols[reelStopped], reelStopped));
                    this.scaterActive = true;
                    haxe.Log.trace("****** scater active ", {
                        fileName: "WinAnimationsPortController.hx",
                        lineNumber: 172,
                        className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                        methodName: "handleLandingSymbols"
                    });
                } else {
                    this.scaterActive = false;
                    haxe.Log.trace("****** scater inactive ", {
                        fileName: "WinAnimationsPortController.hx",
                        lineNumber: 175,
                        className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                        methodName: "handleLandingSymbols"
                    });
                }
            } else {
                this.scaterActive = false;
                haxe.Log.trace("****** scater inactive ", {
                    fileName: "WinAnimationsPortController.hx",
                    lineNumber: 179,
                    className: "smashthepig.components.winanimator.component.imp.controllers.WinAnimationsPortController",
                    methodName: "handleLandingSymbols"
                });
            }
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.handleSetVisible = function(e) {
            this.implementationPort.setSubComponentVisible().publish(e.getPayload());
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.hideAll = function() {
            this.implementationPort.hideAll().publish(null);
        };
        smashThePigWinAnimator.WinAnimationsPortController.prototype.__class__ = smashThePigWinAnimator.WinAnimationsPortController;
        smashThePigWinAnimator.WinAnimatorModel = function(modelInitialised) {
            this.callback = modelInitialised;
            this.callback();
        };
        smashThePigWinAnimator.WinAnimatorModel.__name__ = ["smashThePigWinAnimator", "WinAnimatorModel"];
        smashThePigWinAnimator.WinAnimatorModel.prototype.callback = null;
        smashThePigWinAnimator.WinAnimatorModel.winFramesConfiguration = null;
        smashThePigWinAnimator.WinAnimatorModel.globalConfiguration = null;
        smashThePigWinAnimator.WinAnimatorModel.scaterSymbolsConfiguration = null;
        smashThePigWinAnimator.WinAnimatorModel.topSymbosConfiguration = null;
        smashThePigWinAnimator.WinAnimatorModel.winSymbolsConfiguration = null;
        smashThePigWinAnimator.WinAnimatorModel.configLoaded = function(data) {
            var reelWidth = _hcmn_.Std.parseInt(data.reelWidth);
            var reelHeight = _hcmn_.Std.parseInt(data.reelHeight);
            var numberOfColumns = _hcmn_.Std.parseInt(data.numberOfColums);
            var numberOfRows = _hcmn_.Std.parseInt(data.numberOfRows);
            var vbAssets = [];
            var _g1 = 0;
            var _g = data.vbAssets.length;
            while (_g1 < _g) {
                var i = _g1++;
                vbAssets.push(data.vbAssets[i].name);
            }
            var mainAssetsId = data.mainAssetsId;
            var scaterSymbolName = data.scaterSymbolName;
            var scaterSymbolId = data.scaterSymbolId;
            var handleShowOutcomeOffset = _hcmn_.Std.parseInt(data.handleShowOutcomeOffset);
            var bonusWinType = data.bonusWinType;
            smashThePigWinAnimator.WinAnimatorModel.globalConfiguration = new smashThePigWinAnimatorPort.WinAnimatorGlobalConfiguration(reelWidth, reelHeight, numberOfColumns, numberOfRows, vbAssets, data.mainAssetsId, scaterSymbolName, scaterSymbolId, handleShowOutcomeOffset, bonusWinType);
            var winFrameWidth = _hcmn_.Std.parseInt(data.elements[0].width);
            var winFrameHeight = _hcmn_.Std.parseInt(data.elements[0].height);
            var winFrameMarginLeft = _hcmn_.Std.parseInt(data.elements[0].marginLeft);
            var winFrameMarginTop = _hcmn_.Std.parseInt(data.elements[0].marginTop);
            var winFramesxOffset = _hcmn_.Std.parseInt(data.elements[0].xOffset);
            var winFramesyOffset = _hcmn_.Std.parseInt(data.elements[0].yOffset);
            var winFramessymbolOffset = _hcmn_.Std.parseInt(data.elements[0].symbolOffset);
            smashThePigWinAnimator.WinAnimatorModel.winFramesConfiguration = new smashThePigWinAnimatorPort.WinFramesConfiguration(winFrameWidth, winFrameHeight, winFrameMarginLeft, winFrameMarginTop, winFramesxOffset, winFramesyOffset, winFramessymbolOffset);
            var scaterSymbolWidth = _hcmn_.Std.parseInt(data.elements[1].width);
            var scaterSymbolHeight = _hcmn_.Std.parseInt(data.elements[1].height);
            var scaterSymbolMarginLeft = _hcmn_.Std.parseInt(data.elements[1].marginLeft);
            var scaterSymbolMarginTop = _hcmn_.Std.parseInt(data.elements[1].marginTop);
            var scaterxOffset = _hcmn_.Std.parseInt(data.elements[1].xOffset);
            var scateryOffset = _hcmn_.Std.parseInt(data.elements[1].yOffset);
            var scatersymbolOffset = _hcmn_.Std.parseInt(data.elements[1].symbolOffset);
            smashThePigWinAnimator.WinAnimatorModel.scaterSymbolsConfiguration = new smashThePigWinAnimatorPort.ScaterSymbolsConfiguration(scaterSymbolWidth, scaterSymbolHeight, scaterSymbolMarginLeft, scaterSymbolMarginTop, scaterxOffset, scateryOffset, scatersymbolOffset);
            var topSymbolWidth = _hcmn_.Std.parseInt(data.elements[2].width);
            var topSymbolHeight = _hcmn_.Std.parseInt(data.elements[2].height);
            var topSymbolMarginLeft = _hcmn_.Std.parseInt(data.elements[2].marginLeft);
            var topSymbolMarginTop = _hcmn_.Std.parseInt(data.elements[2].marginTop);
            var topSymbolxOffset = _hcmn_.Std.parseInt(data.elements[2].xOffset);
            var topSymbolyOffset = _hcmn_.Std.parseInt(data.elements[2].yOffset);
            var topSymbolsymbolOffset = _hcmn_.Std.parseInt(data.elements[2].symbolOffset);
            var topSymbolId = data.elements[2].topSymbolId;
            var topSymbolIdsMap = new _hcmn_.haxe_ds_IntMap();
            var _g11 = 0;
            var _g2 = data.topSymbols.length;
            while (_g11 < _g2) {
                var n = _g11++;
                var key = _hcmn_.Std.parseInt(data.topSymbols[n].id);
                topSymbolIdsMap.h[key] = data.topSymbols[n].name;
            }
            var topSymbolName = data.topSymbolName;
            smashThePigWinAnimator.WinAnimatorModel.topSymbosConfiguration = new smashThePigWinAnimatorPort.TopSymbolsConfiguration(topSymbolWidth, topSymbolHeight, topSymbolMarginLeft, topSymbolMarginTop, topSymbolxOffset, topSymbolyOffset, topSymbolsymbolOffset, topSymbolIdsMap, topSymbolName, topSymbolId);
            var winSymbolWidth = _hcmn_.Std.parseInt(data.elements[3].width);
            var winSymbolHeight = _hcmn_.Std.parseInt(data.elements[3].height);
            var winSymbolMarginLeft = _hcmn_.Std.parseInt(data.elements[3].marginLeft);
            var winSymbolMarginTop = _hcmn_.Std.parseInt(data.elements[3].marginTop);
            var winSymbolxOffset = _hcmn_.Std.parseInt(data.elements[3].xOffset);
            var winSymbolyOffset = _hcmn_.Std.parseInt(data.elements[3].yOffset);
            var winSymbolsymbolOffset = _hcmn_.Std.parseInt(data.elements[3].symbolOffset);
            var winSymbolsMap = new _hcmn_.haxe_ds_IntMap();
            var winSymbolsOffsetMap = new _hcmn_.haxe_ds_IntMap();
            var _g12 = 0;
            var _g3 = data.winSymbols.length;
            while (_g12 < _g3) {
                var w = _g12++;
                var key1 = _hcmn_.Std.parseInt(data.winSymbols[w].id);
                var value = new smashThePigWinAnimatorPort.WinElementOffset(_hcmn_.Std.parseInt(data.winSymbols[w].xOffset), _hcmn_.Std.parseInt(data.winSymbols[w].yOffset));
                winSymbolsOffsetMap.h[key1] = value;
                var key2 = _hcmn_.Std.parseInt(data.winSymbols[w].id);
                winSymbolsMap.h[key2] = data.winSymbols[w].name;
            }
            smashThePigWinAnimator.WinAnimatorModel.winSymbolsConfiguration = new smashThePigWinAnimatorPort.WinSymbolsConfiguration(winSymbolWidth, winSymbolHeight, winSymbolMarginLeft, winSymbolMarginTop, winSymbolxOffset, winSymbolyOffset, winSymbolsymbolOffset, winSymbolsMap, winSymbolsOffsetMap);
            haxe.Log.trace("***** height " + smashThePigWinAnimator.WinAnimatorModel.winSymbolsConfiguration.height, {
                fileName: "WinAnimatorModel.hx",
                lineNumber: 117,
                className: "smashthepig.components.winanimator.component.imp.model.WinAnimatorModel",
                methodName: "configLoaded"
            });
        };
        smashThePigWinAnimator.WinAnimatorModel.prototype.__class__ = smashThePigWinAnimator.WinAnimatorModel;
        smashThePigWinAnimator.WinAnimatorMessagePayload = function(messageName, messageData) {
            this._messageName = messageName;
            this._messageData = messageData;
        };
        smashThePigWinAnimator.WinAnimatorMessagePayload.__name__ = ["smashThePigWinAnimator", "WinAnimatorMessagePayload"];
        smashThePigWinAnimator.WinAnimatorMessagePayload.prototype._messageName = null;
        smashThePigWinAnimator.WinAnimatorMessagePayload.prototype._messageData = null;
        smashThePigWinAnimator.WinAnimatorMessagePayload.prototype.__class__ = smashThePigWinAnimator.WinAnimatorMessagePayload;
        smashThePigWinAnimator.ExternalService.loadedAssets = new _hcmn_.haxe_ds_StringMap();;
        smashThePigWinAnimator.Controller._CONTROLLERS = [];;
        smashThePigWinAnimator.InternalMVCConstants.HIDE_ALL = "hideAll";;
        smashThePigWinAnimator.InternalMVCConstants.UPDATE_UPDATED_COMPONENTS_PORT = "updateUpdatedComponentsPort";;
        smashThePigWinAnimator.InternalMVCConstants.SETUP_CONFIGURATION = "setupConfiguration";;
        smashThePigWinAnimator.WinAnimatorModel.initialised = false;;
        return {
            exports: smashThePigWinAnimator,
            activator: smashThePigWinAnimator.Activator
        };
    });
//# sourceURL=smashThePigWinAnimator.js