<commit_before>BEST.component('famous:html-element', {
    behaviors: {
        '$self': {
            '$yield': true,
            '$self:id': function(id) {
                return id;
            },
            '$self:content': function(content) {
                return content;
            },
            '$self:style': function(style) {
                return style;
            },
            '$self:attributes': function(attributes) {
                return attributes;
            },
            '$self:true-size': function(trueSize) {
                return trueSize;
            },
            '$self:locals': function(locals) {
                return locals;
            }
        }
    },
    events: {
        public: {
            '$yield': function(state, message) {
                var content = '';
                var surrogates = message.surrogateRoot.childNodes;
                for (var i = 0; i < surrogates.length; i++) {
                    var outerHTML = surrogates[i].outerHTML;
                    content += (outerHTML) ? outerHTML : '';
                }
                state.set('content', content);
            },
            'id': function(state, message) {
                state.set('id', message);
            },
            'content': function(state, message) {
                state.set('content', message);
            },
            'style': function(state, message) {
                state.set('style', message);
            },
            'attributes': function(state, message) {
                state.set('attributes', message);
            },
            'unselectable': function(state, message) {
                if (message) {
                    var style = state.get('style') || {};
                    style['-moz-user-select'] = '-moz-none';
                    style['-khtml-user-select'] = 'none';
                    style['-webkit-user-select'] = 'none';
                    style['-o-user-select'] = 'none';
                    style['user-select'] = 'none';
                    state.set('style', style);
                }
            },
            'backface-visible': function(state, message) {
                var style = state.get('style') || {};
                style['-webkit-backface-visibility'] = (message) ? 'visible' : 'hidden';
                style['backface-visibility'] = (message) ? 'visible' : 'hidden';
                state.set('style', style);
            },
            'box-shadow': function(state, message) {
                var style = state.get('style') || {};
                style['-webkit-box-shadow'] = message;
                style['-moz-box-shadow'] = message;
                style['box-shadow'] = message;
                state.set('style', style);

            },
            'true-size': function(state, message) {
                state.set('trueSize', !!message);
            },
            'template': function(state, locals) {
                state.set('locals', locals);
            }
        },
        handlers: {
            'id': function($HTMLElement, $payload) {
                $HTMLElement.id($payload);
            },
            'content': function($HTMLElement, $payload) {
                $HTMLElement.content($payload);
            },
            'style': function($HTMLElement, $payload) {
                for (var styleName in $payload) {
                    $HTMLElement.property(styleName, $payload[styleName]);
                }
            },
            'attributes': function($HTMLElement, $payload) {
                for (var attributeName in $payload) {
                    $HTMLElement.attribute(attributeName, $payload[attributeName]);
                }
            },
            'true-size': function($HTMLElement, $payload) {
                $HTMLElement.trueSize(!!$payload, !!$payload);
            },
            'locals': function($mustache, $state, $payload) {
                if ($state.get('didTemplate')) {
                    var initialContent = $state.get('initialContent');
                }
                else {
                    var initialContent = $state.get('content');
                    $state.set('initialContent', initialContent);
                    $state.set('didTemplate', true);
                }
                var templatedContent = $mustache(initialContent, $payload);
                $state.set('content', templatedContent);
            }
        }
    },
    states: {
        'id': null,
        'content': '',
        'style': {},
        'attributes': {},
        'locals': {},
        'didTemplate': false,
        'initialContent': ''
    }
});<commit_msg>Fix typo<commit_after>BEST.component('famous:html-element', {
    behaviors: {
        '$self': {
            '$yield': true,
            '$self:id': function(id) {
                return id;
            },
            '$self:content': function(content) {
                return content;
            },
            '$self:style': function(style) {
                return style;
            },
            '$self:attributes': function(attributes) {
                return attributes;
            },
            '$self:true-size': function(trueSize) {
                return trueSize;
            },
            '$self:locals': function(locals) {
                return locals;
            }
        }
    },
    events: {
        public: {
            '$yield': function(state, message) {
                var content = '';
                var surrogates = message.surrogateRoot.childNodes;
                for (var i = 0; i < surrogates.length; i++) {
                    var outerHTML = surrogates[i].outerHTML;
                    content += (outerHTML) ? outerHTML : '';
                }
                state.set('content', content);
            },
            'id': function(state, message) {
                state.set('id', message);
            },
            'content': function(state, message) {
                state.set('content', message);
            },
            'style': function(state, message) {
                state.set('style', message);
            },
            'attributes': function(state, message) {
                state.set('attributes', message);
            },
            'unselectable': function(state, message) {
                if (message) {
                    var style = state.get('style') || {};
                    style['-moz-user-select'] = '-moz-none';
                    style['-khtml-user-select'] = 'none';
                    style['-webkit-user-select'] = 'none';
                    style['-o-user-select'] = 'none';
                    style['user-select'] = 'none';
                    state.set('style', style);
                }
            },
            'backface-visible': function(state, message) {
                var style = state.get('style') || {};
                style['-webkit-backface-visibility'] = (message) ? 'visible' : 'hidden';
                style['backface-visibility'] = (message) ? 'visible' : 'hidden';
                state.set('style', style);
            },
            'box-shadow': function(state, message) {
                var style = state.get('style') || {};
                style['-webkit-box-shadow'] = message;
                style['-moz-box-shadow'] = message;
                style['box-shadow'] = message;
                state.set('style', style);

            },
            'true-size': function(state, message) {
                state.set('trueSize', !!message);
            },
            'template': function(state, locals) {
                state.set('locals', locals);
            }
        },
        handlers: {
            'id': function($HTMLElement, $payload) {
                $HTMLElement.id($payload);
            },
            'content': function($HTMLElement, $payload) {
                $HTMLElement.content($payload);
            },
            'style': function($HTMLElement, $payload) {
                for (var styleName in $payload) {
                    $HTMLElement.property(styleName, $payload[styleName]);
                }
            },
            'attributes': function($HTMLElement, $payload) {
                for (var attributeName in $payload) {
                    $HTMLElement.attribute(attributeName, $payload[attributeName]);
                }
            },
            'true-size': function($HTMLElement, $payload) {
                $HTMLElement.trueSize(!!$payload, !!$payload);
            },
            'locals': function($mustache, $state, $payload) {
                if ($state.get('didTemplate')) {
                    var initialContent = $state.get('initialContent');
                }
                else {
                    var initialContent = $state.get('content');
                    $state.set('initialContent', initialContent);
                    $state.set('didTemplate', true);
                }
                var templatedContent = $mustache(initialContent, $payload);
                $state.set('content', templatedContent);
            }
        }
    },
    states: {
        'id': '',
        'content': '',
        'style': {},
        'attributes': {},
        'locals': {},
        'didTemplate': false,
        'initialContent': ''
    }
});
{'fraction_non_alphanumeric': 0.14574986464537087, 'fraction_numerical': 0.0002165674066053059, 'mean_word_length': 1.3113113113113113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5442529', 'n_tokens_mistral': 2372, 'n_tokens_neox': 2269, 'n_words': 402}