<commit_before>LightPlayer = function () {};

LightPlayer.prototype = {
    add: function ( mod ) {
        this.widget.append( mod.init() );
    },

    addBlocks: function () {
        this.add( new LightPlayer.header( this.bus, this.json ) );
        this.add( new LightPlayer.title( this.bus, this.json ) );
        this.add( new LightPlayer.social( this.bus, this.json ) );
        this.add( new LightPlayer.stage( this.bus, this.json ) );
        this.add( new LightPlayer.playlist( this.bus, this.json ) );
        this.add( new LightPlayer.comments( this.bus, this.json ) );
    },

    open: function ( json ) {
        this.json = json;
        this.bus = $({});

        this.renderContainer();
        this.addBlocks();
        this.animateIn();
    }
};

LightPlayer.stage = function ( bus, json ) {
    this.bus = bus;
    this.json = json;
};

LightPlayer.stage.prototype = {
    init: function () {
        this.block = this.render( json );
        this.addEvents();

        return this.block;
    },

    addEvents: function () {
        var that = this;

        this.block.delegate( 'a', 'click', function () {
            that.bus.publish( 'event', {} );

        } );

        this.bus.subscribe( 'event', function ( json ) {
            
        } );
    },

    render: function ( json ) {
        var tmpl = [
                '<div class="header">',
                    '<h5>', json.title,'</h5>',
                    '<em class="subtitulo">', json.subtitle, '</em>',
                    '<a href="javascript:;" class="close">fechar</a>',
                '</div>'
            ].join();

        this.block = $( tmpl );
        this.widget.append( this.block );
    }
};

lightplayer1 = new LightPlayer();
lightplayer1.open({});<commit_msg>Draft de modulo comentado.<commit_after>LightPlayer = function () {};

LightPlayer.prototype = {
    add: function ( mod ) {
        this.widget.append( mod.init() );
    },

    addBlocks: function () {
        this.add( new Header( this.bus, this.json ) );
        this.add( new VideoTitle( this.bus, this.json ) );
        this.add( new Social( this.bus, this.json ) );
        this.add( new Stage( this.bus, this.json ) );
        this.add( new Playlist( this.bus, this.json ) );
        this.add( new Comments( this.bus, this.json ) );
    },

    open: function ( json ) {
        this.json = json;
        this.bus = $({});

        this.renderContainer();
        this.addBlocks();
        this.animateIn();
    }
};


/***********************************************
 * EXEMPLO DE MODULO: STAGE
 ***********************************************/

// A FUNCAO CONSTRUTORA RECEBERA UM BARRAMENTO E O JSON COM OS VIDEOS
Stage = function ( bus, json ) {
    this.bus = bus;
    this.json = json;
};

Stage.prototype = {
    // CHAMADO QUANDO MODULO EH ADICIONADO AO LIGHTPLAYER
    init: function () {
        this.block = this.render( json );
        this.addEvents();
        
        // DEVE RETORNA O NOH RAIZ DO HTML DO MODULO
        return this.block;
    },

    addEvents: function () {
        // SETA TODOS OS EVENTOS DO MODULO
    },

    render: function () {
        // TRANSFORMA JSON EM HTML VIA TEMPLATE OU JAVASCRIPT
    }
};

lightplayer1 = new LightPlayer();
lightplayer1.open({});
{'fraction_non_alphanumeric': 0.17711838482716427, 'fraction_numerical': 0.0018354236769654328, 'mean_word_length': 2.0193905817174516, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4539486', 'n_tokens_mistral': 1029, 'n_tokens_neox': 1003, 'n_words': 229}