(function(lib, img, cjs, ss, an) {

    var p; // shortcut to reference prototypes
    lib.webFontTxtInst = {};
    var loadedTypekitCount = 0;
    var loadedGoogleCount = 0;
    var gFontsUpdateCacheList = [];
    var tFontsUpdateCacheList = [];
    lib.ssMetadata = [{
        name: "FreeSpinControlSkin_atlas_P_",
        frames: [
            [552, 376, 180, 180],
            [752, 188, 186, 186],
            [564, 188, 186, 186],
            [376, 188, 186, 186],
            [370, 376, 180, 180],
            [188, 188, 186, 186],
            [0, 122, 186, 186],
            [678, 0, 186, 186],
            [188, 376, 180, 180],
            [490, 0, 186, 186],
            [302, 0, 186, 186],
            [0, 310, 186, 186],
            [866, 0, 70, 70],
            [0, 0, 300, 120]
        ]
    }];



    lib.updateListCache = function(cacheList) {
        for (var i = 0; i < cacheList.length; i++) {
            if (cacheList[i].cacheCanvas)
                cacheList[i].updateCache();
        }
    };

    lib.addElementsToCache = function(textInst, cacheList) {
        var cur = textInst;
        while (cur != exportRoot) {
            if (cacheList.indexOf(cur) != -1)
                break;
            cur = cur.parent;
        }
        if (cur != exportRoot) {
            var cur2 = textInst;
            var index = cacheList.indexOf(cur);
            while (cur2 != cur) {
                cacheList.splice(index, 0, cur2);
                cur2 = cur2.parent;
                index++;
            }
        } else {
            cur = textInst;
            while (cur != exportRoot) {
                cacheList.push(cur);
                cur = cur.parent;
            }
        }
    };

    lib.gfontAvailable = function(family, totalGoogleCount) {
        lib.properties.webfonts[family] = true;
        var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || [];
        for (var f = 0; f < txtInst.length; ++f)
            lib.addElementsToCache(txtInst[f], gFontsUpdateCacheList);

        loadedGoogleCount++;
        if (loadedGoogleCount == totalGoogleCount) {
            lib.updateListCache(gFontsUpdateCacheList);
        }
    };

    lib.tfontAvailable = function(family, totalTypekitCount) {
        lib.properties.webfonts[family] = true;
        var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || [];
        for (var f = 0; f < txtInst.length; ++f)
            lib.addElementsToCache(txtInst[f], tFontsUpdateCacheList);

        loadedTypekitCount++;
        if (loadedTypekitCount == totalTypekitCount) {
            lib.updateListCache(tFontsUpdateCacheList);
        }
    };
    // symbols:



    (lib.play_down_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(0);
    }).prototype = p = new cjs.Sprite();



    (lib.play_inactive_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(1);
    }).prototype = p = new cjs.Sprite();



    (lib.play_norm_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(2);
    }).prototype = p = new cjs.Sprite();



    (lib.play_over_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(3);
    }).prototype = p = new cjs.Sprite();



    (lib.skip_down_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(4);
    }).prototype = p = new cjs.Sprite();



    (lib.skip_inactive_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(5);
    }).prototype = p = new cjs.Sprite();



    (lib.skip_norm_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(6);
    }).prototype = p = new cjs.Sprite();



    (lib.skip_over_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(7);
    }).prototype = p = new cjs.Sprite();



    (lib.spin_down_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(8);
    }).prototype = p = new cjs.Sprite();



    (lib.spin_inactive_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(9);
    }).prototype = p = new cjs.Sprite();



    (lib.spin_norm_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(10);
    }).prototype = p = new cjs.Sprite();



    (lib.spin_over_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(11);
    }).prototype = p = new cjs.Sprite();



    (lib.spinButtonDesign_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(12);
    }).prototype = p = new cjs.Sprite();



    (lib.winPlaqueFree_im = function() {
        this.spriteSheet = ss["FreeSpinControlSkin_atlas_P_"];
        this.gotoAndStop(13);
    }).prototype = p = new cjs.Sprite();
    // helper functions:

    function mc_symbol_clone() {
        var clone = this._cloneProps(new this.constructor(this.mode, this.startPosition, this.loop));
        clone.gotoAndStop(this.currentFrame);
        clone.paused = this.paused;
        clone.framerate = this.framerate;
        return clone;
    }

    function getMCSymbolPrototype(symbol, nominalBounds, frameBounds) {
        var prototype = cjs.extend(symbol, cjs.MovieClip);
        prototype.clone = mc_symbol_clone;
        prototype.nominalBounds = nominalBounds;
        prototype.frameBounds = frameBounds;
        return prototype;
    }


    (lib.StartButton = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {
            _up: 0,
            _down: 4,
            _over: 9,
            _inactive: 15
        });

        // art
        this.instance = new lib.play_norm_im();
        this.instance.parent = this;
        this.instance.setTransform(-91, -88);

        this.instance_1 = new lib.play_down_im();
        this.instance_1.parent = this;
        this.instance_1.setTransform(-88, -85);

        this.instance_2 = new lib.play_over_im();
        this.instance_2.parent = this;
        this.instance_2.setTransform(-91, -88);

        this.instance_3 = new lib.play_inactive_im();
        this.instance_3.parent = this;
        this.instance_3.setTransform(-91, -88);

        this.timeline.addTween(cjs.Tween.get({}).to({
            state: [{
                t: this.instance
            }]
        }).to({
            state: [{
                t: this.instance_1
            }]
        }, 4).to({
            state: [{
                t: this.instance_2
            }]
        }, 5).to({
            state: [{
                t: this.instance_3
            }]
        }, 6).wait(5));

        // bounding
        this.shape = new cjs.Shape();
        this.shape.graphics.f("rgba(0,51,0,0)").s().p("AvTPUIAA+nIenAAIAAeng");

        this.timeline.addTween(cjs.Tween.get(this.shape).wait(20));

    }).prototype = p = new cjs.MovieClip();
    p.nominalBounds = new cjs.Rectangle(-98, -98, 196, 196);


    (lib.SpinButtonDesign = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // Layer 1
        this.instance = new lib.spinButtonDesign_im();
        this.instance.parent = this;
        this.instance.setTransform(-70, 70, 1, 1, 0, 180, 0);

        this.instance_1 = new lib.spinButtonDesign_im();
        this.instance_1.parent = this;
        this.instance_1.setTransform(70, 70, 1, 1, 180);

        this.instance_2 = new lib.spinButtonDesign_im();
        this.instance_2.parent = this;
        this.instance_2.setTransform(70, -70, 1, 1, 0, 0, 180);

        this.instance_3 = new lib.spinButtonDesign_im();
        this.instance_3.parent = this;
        this.instance_3.setTransform(-70, -70);

        this.timeline.addTween(cjs.Tween.get({}).to({
            state: [{
                t: this.instance_3
            }, {
                t: this.instance_2
            }, {
                t: this.instance_1
            }, {
                t: this.instance
            }]
        }).wait(1));

    }).prototype = getMCSymbolPrototype(lib.SpinButtonDesign, new cjs.Rectangle(-70, -70, 140, 140), null);


    (lib.SpinButton = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {
            "_up": 0,
            "_down": 4,
            "_over": 9,
            "_inactive": 15
        });

        // art
        this.instance = new lib.spin_norm_im();
        this.instance.parent = this;
        this.instance.setTransform(-91, -88);

        this.instance_1 = new lib.spin_down_im();
        this.instance_1.parent = this;
        this.instance_1.setTransform(-88, -85);

        this.instance_2 = new lib.spin_over_im();
        this.instance_2.parent = this;
        this.instance_2.setTransform(-91, -88);

        this.instance_3 = new lib.spin_inactive_im();
        this.instance_3.parent = this;
        this.instance_3.setTransform(-91, -88);

        this.timeline.addTween(cjs.Tween.get({}).to({
            state: [{
                t: this.instance
            }]
        }).to({
            state: [{
                t: this.instance_1
            }]
        }, 4).to({
            state: [{
                t: this.instance_2
            }]
        }, 5).to({
            state: [{
                t: this.instance_3
            }]
        }, 6).wait(5));

        // bounding
        this.shape = new cjs.Shape();
        this.shape.graphics.f("rgba(0,51,0,0)").s().p("AvTPUIAA+nIenAAIAAeng");

        this.timeline.addTween(cjs.Tween.get(this.shape).wait(20));

    }).prototype = p = new cjs.MovieClip();
    p.nominalBounds = new cjs.Rectangle(-98, -98, 196, 196);


    (lib.SkipButton = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {
            "_up": 0,
            "_down": 4,
            "_over": 9,
            "_inactive": 15
        });

        // art
        this.instance = new lib.skip_norm_im();
        this.instance.parent = this;
        this.instance.setTransform(-91, -88);

        this.instance_1 = new lib.skip_down_im();
        this.instance_1.parent = this;
        this.instance_1.setTransform(-88, -85);

        this.instance_2 = new lib.skip_over_im();
        this.instance_2.parent = this;
        this.instance_2.setTransform(-91, -88);

        this.instance_3 = new lib.skip_inactive_im();
        this.instance_3.parent = this;
        this.instance_3.setTransform(-91, -88);

        this.timeline.addTween(cjs.Tween.get({}).to({
            state: [{
                t: this.instance
            }]
        }).to({
            state: [{
                t: this.instance_1
            }]
        }, 4).to({
            state: [{
                t: this.instance_2
            }]
        }, 5).to({
            state: [{
                t: this.instance_3
            }]
        }, 6).wait(5));

        // bounding
        this.shape = new cjs.Shape();
        this.shape.graphics.f("rgba(0,51,0,0)").s().p("AvTPUIAA+nIenAAIAAeng");

        this.timeline.addTween(cjs.Tween.get(this.shape).wait(20));

    }).prototype = p = new cjs.MovieClip();
    p.nominalBounds = new cjs.Rectangle(-98, -98, 196, 196);


    (lib.SendReceiveArt = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // Layer 2
        this.shape = new cjs.Shape();
        this.shape.graphics.f("#FFFFFF").s().p("AjkF1QARAAARgCIAHBSQgRADgYAAgAisFwIAfgGIAUBSIgnAHgAh2FkIAdgKIAfBNQgQAIgUAFgAhBFQQAOgHALgIIAqBJIgfAQgAgREzIAVgQIA0BBQgOAMgNAIgAAaEQQAHgGACgDIAKgJIA8A6IgXAVgABADnIAPgTIBEAvIgSAYgABgC5QAHgMAEgJIBKAmIgNAZgAB4CGIAHgTIBPAaIgIAYgACIBSIAFgUIBSAOIgFAXgACRAaIAAgSIBUACIgCAWgACPguIBTgKIABAVIhSAGgACGhjIBPgWIAFATIhSARgABziXIBNghIAGAQIhOAdgABZjIIBIgrIAHAMIhIAqgAA6jzIA/g2IAIAKIhBAzgAATkaIA4g/IAHAHIg4A+gAgXk8IAthFIAHAEIguBGgAhGlVIAjhMIAGADIgkBKgAh5lpIAYhPIADAAIgYBQgAitl1IALhSIACAAIgMBSg");
        this.shape.setTransform(22.9, 0);

        this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

        // bounding
        this.shape_1 = new cjs.Shape();
        this.shape_1.graphics.f("rgba(0,204,0,0)").s().p("AlDFEQiGiGAAi+QAAi8CGiHQCHiGC8AAQC+AACGCGQCGCHAAC8QAAC+iGCGQiGCGi+AAQi8AAiHiGg");

        this.timeline.addTween(cjs.Tween.get(this.shape_1).wait(1));

    }).prototype = getMCSymbolPrototype(lib.SendReceiveArt, new cjs.Rectangle(-45.8, -45.8, 91.7, 91.7), null);


    (lib.TotalBetPlaqueBG = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // spinsPlaque
        this.instance = new lib.winPlaqueFree_im();
        this.instance.parent = this;

        this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

    }).prototype = getMCSymbolPrototype(lib.TotalBetPlaqueBG, new cjs.Rectangle(0, 0, 300, 120), null);


    (lib.meter_win = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // winPlaque
        this.instance = new lib.winPlaqueFree_im();
        this.instance.parent = this;

        this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

    }).prototype = getMCSymbolPrototype(lib.meter_win, new cjs.Rectangle(0, 0, 300, 120), null);


    (lib.SendReceive = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {
            "static": 0,
            on: 9,
            onLoop: 19,
            onDone: 54,
            off: 62
        });

        // art
        this.instance = new lib.SendReceiveArt();
        this.instance.parent = this;
        this.instance._off = true;
        this.instance.cache(-48, -48, 96, 96);

        this.timeline.addTween(cjs.Tween.get(this.instance).wait(19).to({
            _off: false
        }, 0).to({
            rotation: 90
        }, 9).to({
            rotation: 180
        }, 9).to({
            rotation: 270
        }, 9).to({
            scaleX: 1,
            scaleY: 1,
            rotation: 350
        }, 8).to({
            _off: true
        }, 1).wait(12));

    }).prototype = p = new cjs.MovieClip();
    p.nominalBounds = null;


    (lib.PlayButton = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // sendReceive
        this.sendReceive = new lib.SendReceive();
        this.sendReceive.parent = this;

        this.timeline.addTween(cjs.Tween.get(this.sendReceive).wait(1));

        // startButton
        this.startButton = new lib.StartButton();
        this.startButton.parent = this;
        this.startButton.setTransform(19.6, 19.6, 0.58, 0.58, 0, 0, 0, 33.7, 33.7);

        this.timeline.addTween(cjs.Tween.get(this.startButton).wait(1));

        // spinButton
        this.spinButton = new lib.SpinButton();
        this.spinButton.parent = this;
        this.spinButton.setTransform(19.6, 19.6, 0.58, 0.58, 0, 0, 0, 33.7, 33.7);

        this.timeline.addTween(cjs.Tween.get(this.spinButton).wait(1));

        // skipButton
        this.skipButton = new lib.SkipButton();
        this.skipButton.parent = this;
        this.skipButton.setTransform(19.6, 19.6, 0.58, 0.58, 0, 0, 0, 33.8, 33.8);

        this.timeline.addTween(cjs.Tween.get(this.skipButton).wait(1));

        // spin button design
        this.instance = new lib.SpinButtonDesign();
        this.instance.parent = this;

        this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

    }).prototype = getMCSymbolPrototype(lib.PlayButton, new cjs.Rectangle(-70, -70, 140, 140), null);


    (lib.SpinsPlayed = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // timeline functions:
        this.frame_0 = function() {
            this.label.params = {
                fontYOffset: -10,
                outline: {
                    size: 4,
                    yOffset: 0,
                    xOffset: 0,
                    color: "#634923"
                }
            }


            this.textField.params = {
                fontYOffset: 0,
                outline: {
                    size: 2,
                    yOffset: 0,
                    xOffset: 0,
                    color: "#333333"
                }
            }
        }

        // actions tween:
        this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));

        // text
        this.textField = new cjs.Text("XXXX", "bold 36px 'Futura Cdnsd BoldEuro LocCur'", "#FFFFFF");
        this.textField.name = "textField";
        this.textField.textAlign = "center";
        this.textField.lineHeight = 48;
        this.textField.lineWidth = 256;
        this.textField.parent = this;
        this.textField.setTransform(150, 54);
        this.textField.shadow = new cjs.Shadow("rgba(0,0,0,1)", 1, 1, 0);

        this.timeline.addTween(cjs.Tween.get(this.textField).wait(1));

        // label
        this.label = new cjs.Text("???", "26px 'Trajan Pro Loc Currency'", "#F2D854");
        this.label.name = "label";
        this.label.textAlign = "center";
        this.label.lineHeight = 32;
        this.label.lineWidth = 256;
        this.label.parent = this;
        this.label.setTransform(150, 22);
        this.label.shadow = new cjs.Shadow("rgba(0,0,0,1)", 1, 1, 0);

        this.timeline.addTween(cjs.Tween.get(this.label).wait(1));

        // plaque
        this.instance = new lib.TotalBetPlaqueBG();
        this.instance.parent = this;
        this.instance.setTransform(78, 31.5, 1, 1, 0, 0, 0, 78, 31.5);
        this.instance.cache(-2, -2, 304, 124);

        this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

    }).prototype = getMCSymbolPrototype(lib.SpinsPlayed, new cjs.Rectangle(0, 0, 300, 120), null);


    (lib.BonusWin = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // timeline functions:
        this.frame_0 = function() {
            this.label.params = {
                fontYOffset: -10,
                outline: {
                    size: 4,
                    yOffset: 0,
                    xOffset: 0,
                    color: "#634923"
                }
            }


            this.textField.params = {
                fontYOffset: 0,
                outline: {
                    size: 2,
                    yOffset: 0,
                    xOffset: 0,
                    color: "#333333"
                }
            }
        }

        // actions tween:
        this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));

        // text
        this.textField = new cjs.Text("XXXX", "bold 36px 'Futura Cdnsd BoldEuro LocCur'", "#FFFFFF");
        this.textField.name = "textField";
        this.textField.textAlign = "center";
        this.textField.lineHeight = 48;
        this.textField.lineWidth = 256;
        this.textField.parent = this;
        this.textField.setTransform(150, 54);
        this.textField.shadow = new cjs.Shadow("rgba(0,0,0,1)", 1, 1, 0);

        this.timeline.addTween(cjs.Tween.get(this.textField).wait(1));

        // label
        this.label = new cjs.Text("???", "26px 'Trajan Pro Loc Currency'", "#F2D854");
        this.label.name = "label";
        this.label.textAlign = "center";
        this.label.lineHeight = 32;
        this.label.lineWidth = 256;
        this.label.parent = this;
        this.label.setTransform(150, 22);
        this.label.shadow = new cjs.Shadow("rgba(0,0,0,1)", 1, 1, 0);

        this.timeline.addTween(cjs.Tween.get(this.label).wait(1));

        // plaque
        this.instance = new lib.meter_win();
        this.instance.parent = this;
        this.instance.setTransform(85.3, 36.6, 1, 1, 0, 0, 0, 85.3, 36.6);
        this.instance.cache(-2, -2, 304, 124);

        this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

    }).prototype = getMCSymbolPrototype(lib.BonusWin, new cjs.Rectangle(0, 0, 300, 120), null);


    // stage content:
    (lib.FreeSpinControlSkin = function(mode, startPosition, loop) {
        this.initialize(mode, startPosition, loop, {});

        // spin meter
        this.spinsPlayedMeter = new lib.SpinsPlayed();
        this.spinsPlayedMeter.parent = this;
        this.spinsPlayedMeter.setTransform(443, 726.5, 1, 1, 0, 0, 0, 78, 31.5);

        this.timeline.addTween(cjs.Tween.get(this.spinsPlayedMeter).wait(1));

        // win meter
        this.bonusWinMeter = new lib.BonusWin();
        this.bonusWinMeter.parent = this;
        this.bonusWinMeter.setTransform(879, 735.4, 1, 1, 0, 0, 0, 99, 40.4);

        this.timeline.addTween(cjs.Tween.get(this.bonusWinMeter).wait(1));

        // play button
        this.playButton = new lib.PlayButton();
        this.playButton.parent = this;
        this.playButton.setTransform(721.6, 754.4, 1, 1, 0, 0, 0, -0.4, -1.6);

        this.timeline.addTween(cjs.Tween.get(this.playButton).wait(1));

    }).prototype = p = new cjs.MovieClip();
    p.nominalBounds = new cjs.Rectangle(790, 1091, 1010, 140);
    // library properties:
    lib.properties = {
        width: 1440,
        height: 810,
        fps: 24,
        color: "#333333",
        opacity: 1.00,
        webfonts: {},
        manifest: [{
            src: "images/FreeSpinControlSkin_atlas_P_.png",
            id: "FreeSpinControlSkin_atlas_P_"
        }],
        preloads: []
    };




})(FreeSpinControlSkin = FreeSpinControlSkin || {}, images = images || {}, createjs = createjs || {}, ss = ss || {}, AdobeAn = AdobeAn || {});
var FreeSpinControlSkin, images, createjs, ss, AdobeAn;