<commit_before>var opg = opg || {};

// call with a selector for a group that 
(function ($, opg) {

    var RadioGroup = function(element, opts) {
        this.fieldset = $(element);
        this.formControls = this.fieldset.find('.form-control.radio-vertical');
        this.radios = this.fieldset.find('input');
        this.addEvents();
        this.focusedClass = 'focused';
        this.selectedClass = 'selected';
    };
        
    RadioGroup.prototype.markSelected = function(radio) {
        this.fieldset.find('.selected').removeClass(this.selectedClass);
        radio.addClass(this.selectedClass);
        radio.find('input').prop('checked', true);
    };
    RadioGroup.prototype.markFocused = function(target, state) {
        if (state === 'focused') {
          target.parent().parent().addClass(this.focusedClass);
        } else {
          target.parent().parent().removeClass(this.focusedClass);
        }
    };
    
    RadioGroup.prototype.getClickHandler = function () {
        return function (e) {
            this.markSelected($(e.currentTarget));
        }.bind(this);
    };
    RadioGroup.prototype.getFocusHandler = function (opts) {
        var focusEvent = (opts.level === 'document') ? 'focusin' : 'focus';

        return function (e) {
            var state = (e.type === focusEvent) ? 'focused' : 'blurred';
            this.markFocused($(e.target), state);
        }.bind(this);
    };
    
    RadioGroup.prototype.addEvents = function () {
        this.clickHandler = this.getClickHandler();
        this.focusHandler = this.getFocusHandler({ 'level' : 'element' });

        this.formControls.on('click', this.clickHandler);
        this.radios.on('focus blur', this.focusHandler);
    };
    
    
    
    opg.RadioGroup = RadioGroup;


})(jQuery, opg);<commit_msg>fixes for local jenkins build<commit_after>var opg = opg || {};

// call with a selector for a group that 
(function ($, opg) {

    var FOCUSEDCLASS = 'focused',
        SELECTEDCLASS = 'selected';


    var RadioGroup = function(element, opts) {
        this.fieldset = $(element);
        this.formControls = this.fieldset.find('.form-control.radio-vertical');
        this.radios = this.fieldset.find('input');
        this.addEvents();

    };
        
    RadioGroup.prototype.markSelected = function(radio) {
        this.fieldset.find(SELECTEDCLASS).removeClass(SELECTEDCLASS);
        radio.addClass(SELECTEDCLASS);
        radio.find('input').prop('checked', true);
    };
    RadioGroup.prototype.markFocused = function(target, state) {
        if (state === 'focused') {
          target.parent().parent().addClass(FOCUSEDCLASS);
        } else {
          target.parent().parent().removeClass(FOCUSEDCLASS);
        }
    };
    
    RadioGroup.prototype.getClickHandler = function () {
        return function (e) {
            this.markSelected($(e.currentTarget));
        }.bind(this);
    };
    RadioGroup.prototype.getFocusHandler = function (opts) {
        var focusEvent = (opts.level === 'document') ? 'focusin' : 'focus';

        return function (e) {
            var state = (e.type === focusEvent) ? 'focused' : 'blurred';
            this.markFocused($(e.target), state);
        }.bind(this);
    };
    
    RadioGroup.prototype.addEvents = function () {
        this.clickHandler = this.getClickHandler();
        this.focusHandler = this.getFocusHandler({ 'level' : 'element' });

        this.formControls.on('click', this.clickHandler);
        this.radios.on('focus blur', this.focusHandler);
    };
        
    opg.RadioGroup = RadioGroup;


})(jQuery, opg);
{'fraction_non_alphanumeric': 0.15164957028001108, 'fraction_numerical': 0.0, 'mean_word_length': 2.516569200779727, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4261042', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1029, 'n_words': 180}