define("wolfRunSlotModelGleGamePlugin", ["clientkernelLoaderApi", "slotModelApi", "slotmodelGamePluginCommonGle", "money", "clientkernelEventbusApi", "clientkernelModulesApi", "slotmodelGamePluginApi", "clientkernelLoggerApi"],
    function(clientkernelLoaderApi, slotModelApi, slotmodelGamePluginCommonGle, money, clientkernelEventbusApi, clientkernelModulesApi, slotmodelGamePluginApi, clientkernelLoggerApi) {
        "use strict";

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

        function $bind(o, m) {
            if (m == null) return null;
            if (m.__id__ == null) m.__id__ = $fid++;
            var f;
            if (o.hx__closures__ == null) o.hx__closures__ = {};
            else f = o.hx__closures__[m.__id__];
            if (f == null) {
                f = function() {
                    return f.method.apply(f.scope, arguments);
                };
                f.scope = o;
                f.method = m;
                o.hx__closures__[m.__id__] = f;
            }
            return f;
        };
        var $_;
        var $estr = function() {
            return _hcmn_.js_Boot.__string_rec(this, '');
        };
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

        };
        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 wolfRunSlotModelGleGamePlugin == 'undefined') {
            var wolfRunSlotModelGleGamePlugin = {};
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin = function() {
            this.commonParser = new slotmodelGamePluginCommonGle.PfPluginCommonResponseParser(wolfRunSlotModelGleGamePlugin.GamePlugin.GAME_ID, $bind(this, this.onError), wolfRunSlotModelGleGamePlugin.GamePlugin.PF_RESPONSE_PARSER_ERROR_ID);
            this.nexSpinStripeLayers = new wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers();
            this.payLines = new _hcmn_.haxe_ds_StringMap();
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin = ck_implements(wolfRunSlotModelGleGamePlugin.GamePlugin, clientkernelModulesApi.IService);
        wolfRunSlotModelGleGamePlugin.GamePlugin = ck_implements(wolfRunSlotModelGleGamePlugin.GamePlugin, slotmodelGamePluginApi.IGamePlugin);
        wolfRunSlotModelGleGamePlugin.GamePlugin.__interfaces__ = [clientkernelModulesApi.IService, slotmodelGamePluginApi.IGamePlugin];
        wolfRunSlotModelGleGamePlugin.GamePlugin.__name__ = ["wolfRunSlotModelGleGamePlugin", "GamePlugin"];
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.commonParser = null;
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.nexSpinStripeLayers = null;
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.payLines = null;
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getAdditionalLineWins = function(platformResponse, stage, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getBonusWins = function(platformResponse, stage, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getCustomBigWin = function(totalStakeCredit, totalWinCredit) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getImplementedFeatures = function() {
            return [slotmodelGamePluginApi.EPluginFeature.CUSTOM_DATA, slotmodelGamePluginApi.EPluginFeature.STRIPE_LAYER_PER_BET];
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getNextSpinStripeLayersForSynchronizedReels = function(platformResponse, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getNextSpinStripeLayersPerBet = function(platformResponse, slotDefinition) {
            this.payLines = wolfRunSlotModelGleGamePlugin.Parser.parsePayLines(platformResponse);
            return this.nexSpinStripeLayers;
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getProgressMeter = function(platformResponse, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getResumePerStake = function(platformResponse, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.getScatterWins = function(platformResponse, stage, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.parseCustomData = function(platformResponse) {
            return {
                payLines: this.payLines
            };
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.stop = function(context) {};
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.onError = function(error) {
            slotmodelGamePluginCommonGle.Log.getLogger(this).error("[GamePlugin][" + error.id + "] " + error.message);
            throw new js._Boot.HaxeError(error);
        };
        wolfRunSlotModelGleGamePlugin.GamePlugin.prototype.__class__ = wolfRunSlotModelGleGamePlugin.GamePlugin;
        wolfRunSlotModelGleGamePlugin.ModuleActivator = function() {};
        wolfRunSlotModelGleGamePlugin.ModuleActivator = ck_implements(wolfRunSlotModelGleGamePlugin.ModuleActivator, clientkernelModulesApi.IModuleActivator);
        wolfRunSlotModelGleGamePlugin.ModuleActivator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        wolfRunSlotModelGleGamePlugin.ModuleActivator.__name__ = ["wolfRunSlotModelGleGamePlugin", "ModuleActivator"];
        wolfRunSlotModelGleGamePlugin.ModuleActivator.prototype.gamePlugin = null;
        wolfRunSlotModelGleGamePlugin.ModuleActivator.prototype.registration = null;
        wolfRunSlotModelGleGamePlugin.ModuleActivator.prototype.start = function(context) {
            var _g = this;
            context.getServiceTracker([clientkernelLoaderApi.IAssetRegistry, clientkernelLoggerApi.ILoggerFactory, clientkernelEventbusApi.IEventBus]).then(function(context1) {
                _g.gamePlugin = new wolfRunSlotModelGleGamePlugin.GamePlugin();
                _g.registration = context1.registerService(_g.gamePlugin, slotmodelGamePluginApi.IGamePlugin, null);
            });
        };
        wolfRunSlotModelGleGamePlugin.ModuleActivator.prototype.stop = function(context) {
            if (this.gamePlugin != null) this.gamePlugin.stop(context);
            if (this.registration != null) this.registration.unregister();
        };
        wolfRunSlotModelGleGamePlugin.ModuleActivator.main = function() {};
        wolfRunSlotModelGleGamePlugin.ModuleActivator.prototype.__class__ = wolfRunSlotModelGleGamePlugin.ModuleActivator;
        wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers = function() {};
        wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers = ck_implements(wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers, slotmodelGamePluginApi.INextSpinStripeLayers);
        wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers.__interfaces__ = [slotmodelGamePluginApi.INextSpinStripeLayers];
        wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers.__name__ = ["wolfRunSlotModelGleGamePlugin", "NextSpinStripeLayers"];
        wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers.prototype.getStripeLayersForSynchronizedReels = function(stage, lineCount, betPerLineCredit) {
            return [0, 0, 0, 0, 0, 0];
        };
        wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers.prototype.getStripeLayersPerBet = function(slotDefinition, stage, stakeItems) {
            if (stage == "BaseGame") return [0, 0, 0, 0, 0];
            else return [1, 1, 1, 1, 1];
        };
        wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers.prototype.__class__ = wolfRunSlotModelGleGamePlugin.NextSpinStripeLayers;
        wolfRunSlotModelGleGamePlugin.Parser = function() {};
        wolfRunSlotModelGleGamePlugin.Parser.__name__ = ["wolfRunSlotModelGleGamePlugin", "Parser"];
        wolfRunSlotModelGleGamePlugin.Parser.parsePayLines = function(paytableResponse) {
            var payLines = new _hcmn_.haxe_ds_StringMap();
            var patterns = slotmodelGamePluginCommonGle.StdHelper.getArrayField(paytableResponse, "PatternInfo");
            var _g = 0;
            while (_g < patterns.length) {
                var pattern = patterns[_g];
                ++_g;
                var isPayline = slotmodelGamePluginCommonGle.StdHelper.getField(pattern, "@name");
                if (isPayline == "Paylines") {
                    var lines = slotmodelGamePluginCommonGle.StdHelper.getArrayField(pattern, "Pattern");
                    var _g1 = 0;
                    while (_g1 < lines.length) {
                        var line = lines[_g1];
                        ++_g1;
                        var lineId = slotmodelGamePluginCommonGle.StdHelper.getField(line, "@name").split("Line ")[1];
                        var cells = slotmodelGamePluginCommonGle.StdHelper.getArrayField(line, "Cell");
                        var linePositions = [];
                        var position = null;
                        var _g2 = 0;
                        while (_g2 < cells.length) {
                            var cell = cells[_g2];
                            ++_g2;
                            var name = slotmodelGamePluginCommonGle.StdHelper.getField(cell, "@name");
                            position = wolfRunSlotModelGleGamePlugin.Parser.parsePosition(name);
                            linePositions.push(position);
                        }
                        payLines.set("bg_" + lineId, linePositions);
                    }
                }
            }
            return payLines;
        };
        wolfRunSlotModelGleGamePlugin.Parser.parsePosition = function(name) {
            var pos = {
                x: _hcmn_.Std.parseInt(name.split("C")[1].split("R")[0]),
                y: _hcmn_.Std.parseInt(name.split("R")[1])
            };
            return pos;
        };
        wolfRunSlotModelGleGamePlugin.Parser.prototype.__class__ = wolfRunSlotModelGleGamePlugin.Parser;
        wolfRunSlotModelGleGamePlugin.GamePlugin.IMPLEMENTED = [slotmodelGamePluginApi.EPluginFeature.STRIPE_LAYER_PER_BET];;
        wolfRunSlotModelGleGamePlugin.GamePlugin.GAME_ID = "wolfRun";;
        wolfRunSlotModelGleGamePlugin.GamePlugin.PF_RESPONSE_PARSER_ERROR_ID = 9999;;
        return {
            exports: wolfRunSlotModelGleGamePlugin,
            activator: wolfRunSlotModelGleGamePlugin.ModuleActivator
        };
    });
//# sourceURL=wolfRunSlotModelGleGamePlugin.js