<commit_before>
Oxe.component.define({
    name: 'o-optgroup',
    style: 'o-optgroup { display: block; } o-optgroup::before { content: attr(label); }',
    template: '<slot></slot>',
    attributes: [ 'disabled' ],
    properties: {
        _disabled: {
            writable: true,
            value: false
        },
        disabled: {
            enumerable: true,
            get: function () {
                return this._disabled;
            },
            set: function (data) {
                this._disabled = data ? true : false;

                if (this._disabled) {
                    this.setAttribute('disabled', '');
                } else {
                    this.removeAttribute('disabled');
                }

                return this._disabled;
            }
        }
    },
    attributed: function (name, _, value) {
        this._disabled = value !== null && value !== 'false' ? true : false;
    }
});

Oxe.component.define({
    name: 'o-options',
    style: 'o-options { display: block; } o-options::before { content: attr(label); }',
    template: '<slot></slot>',
    attributes: [ 'disabled' ],
    properties: {
        _disabled: {
            writable: true,
            value: false
        },
        disabled: {
            enumerable: true,
            get: function () {
                return this._disabled;
            },
            set: function (data) {
                this._disabled = data ? true : false;

                if (this._disabled) {
                    this.setAttribute('disabled', '');
                } else {
                    this.removeAttribute('disabled');
                }

                return this._disabled;
            }
        }
    },
    attributed: function (name, _, value) {
        this._disabled = value !== null && value !== 'false' ? true : false;
    }
});

Oxe.component.define({
    name: 'o-option',
    template: '<slot></slot>',
    style: 'o-option { display: block; }',
    attributes: [ 'selected', 'disabled' ],
    properties: {
        _disabled: {
            writable: true,
            value: false
        },
        _selected: {
            writable: true,
            value: false
        },
        selected: {
            enumerable: true,
            get: function () {
                return this._selected;
            },
            set: function (data) {
                this._selected = data ? true : false;

                if (this._selected) {
                    this.setAttribute('selected', '');
                } else {
                    this.removeAttribute('selected');
                }

                return this._selected;
            }
        },
        disabled: {
            enumerable: true,
            get: function () {
                return this._disabled;
            },
            set: function (data) {
                this._disabled = data ? true : false;

                if (this._disabled) {
                    this.setAttribute('disabled', '');
                } else {
                    this.removeAttribute('disabled');
                }

                return this._disabled;
            }
        }
    },
    attributed: function (name, _, value) {
        if (name === 'selected' || name === 'disabled') {
            this['_' + name] = value !== null && value !== 'false' ? true : false;
        }
    }
});

export default {
    name: 'o-select',
    template: '<slot></slot>',
    style: 'o-select { display: block; }',
    model: [],
    properties: {
        options: {
            enumerable: true,
            get: function () {
                return this.querySelectorAll('o-option');
            }<commit_msg>fixed default value not working<commit_after>
Oxe.component.define({
    name: 'o-optgroup',
    style: 'o-optgroup { display: block; } o-optgroup::before { content: attr(label); }',
    template: '<slot></slot>',
    attributes: [ 'disabled' ],
    properties: {
        _disabled: {
            writable: true,
            value: false
        },
        disabled: {
            enumerable: true,
            get: function () {
                return this._disabled;
            },
            set: function (data) {
                this._disabled = data ? true : false;

                if (this._disabled) {
                    this.setAttribute('disabled', '');
                } else {
                    this.removeAttribute('disabled');
                }

                return this._disabled;
            }
        }
    },
    attributed: function (name, _, value) {
        this._disabled = value !== null && value !== 'false' ? true : false;
    }
});

Oxe.component.define({
    name: 'o-options',
    style: 'o-options { display: block; } o-options::before { content: attr(label); }',
    template: '<slot></slot>',
    attributes: [ 'disabled' ],
    properties: {
        _disabled: {
            writable: true,
            value: false
        },
        disabled: {
            enumerable: true,
            get: function () {
                return this._disabled;
            },
            set: function (data) {
                this._disabled = data ? true : false;

                if (this._disabled) {
                    this.setAttribute('disabled', '');
                } else {
                    this.removeAttribute('disabled');
                }

                return this._disabled;
            }
        }
    },
    attributed: function (name, _, value) {
        this._disabled = value !== null && value !== 'false' ? true : false;
    }
});

Oxe.component.define({
    name: 'o-option',
    template: '<slot></slot>',
    style: 'o-option { display: block; }',
    attributes: [ 'value', 'selected', 'disabled' ],
    properties: {
        _valueDefaultLocked: {
            writable: true,
            value: false
        },
        _value: {
            writable: true,
            value: ''
        },
        _disabled: {
            writable: true,
            value: false
        },
        _selected: {
            writable: true,
            value: false
        },
        value: {
            enumerable: true,
            get: function () {
                if (!this._value && !this._valueDefaultLocked) {
                    return this.getAttribute('value') || '';
                } else {
                    return this._value;
                }
            },
            set: function (data) {
                this._valueDefaultLocked = true;
                this._value = data || '';
                return this._value;
            }
        },
        selected: {
            enumerable: true,
            get: function () {
                return this._selected;
            },
            set: function (data) {
                this._selected = data ? true : false;

                if (this._selected) {
                    this.setAttribute('selected', '');
                } else {
                    this.removeAttribute('selected');
                }

                return this._selected;
            }
        },
        disabled: {
            enumerable: true,
            get: function () {
                return this._disabled;
            },
            set: function (data) {
                this._disabled = data ? true : false;

                if (this._disabled) {
                    this.setAttribute('disabled', '');
                } else {
                    this.removeAttribute('disabled');
                }

                return this._disabled;
            }
        }
    },
    attributed: function (name, _, value) {
        if (name === 'value') {
            this._value = value || '';
        } else if (name === 'selected' || name === 'disabled') {
            this['_' + name] = value !== null && value !== 'false' ? true : false;
        }
    }
});

export default {
    name: 'o-select',
    template: '<slot></slot>',
    style: 'o-select { display: block; }',
    model: [],
    properties: {
        options: {
            enumerable: true,
            get: function () {
                return this.querySelectorAll('o-option');
            }
{'fraction_non_alphanumeric': 0.13190862196020633, 'fraction_numerical': 0.0, 'mean_word_length': 1.2334064728469556, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '4908694', 'n_tokens_mistral': 2092, 'n_tokens_neox': 2028, 'n_words': 454}