<commit_before>mixin device-input(port, device, input, inputName)
    .form-group
        .col-xs-3.col-xs-offset-1.text-right
            label #{inputName}
        .col-xs-3
            span {{ getMappedInputName(#{port}, '#{device}', '#{input}') }}
        .col-xs-3
            button.btn.btn-default(ng-click="recordInput(#{port}, '#{device}', '#{input}')") Change

mixin device(port)
    .col-xs-6
        .device-select
            label Controller&nbsp;#{port}
            .btn-group
                button.btn.btn-default(ng-model="controls.devices[#{port}]" btn-radio="'none'") None
                button.btn.btn-default(ng-model="controls.devices[#{port}]" btn-radio="'joypad'") Joypad
                button.btn.btn-default(ng-model="controls.devices[#{port}]" btn-radio="'zapper'") Zapper
        div(ng-show="controls.devices[#{port}] == 'joypad'")
            +device-input(port, "joypad", "a",      "A")
            +device-input(port, "joypad", "b",      "B")
            +device-input(port, "joypad", "start",  "Start")
            +device-input(port, "joypad", "select", "Select")
            +device-input(port, "joypad", "left",   "Left")
            +device-input(port, "joypad", "right",  "Right")
            +device-input(port, "joypad", "up",     "Up")
            +device-input(port, "joypad", "down",   "Down")
        div(ng-show="controls.devices[#{port}] == 'zapper'")
            +device-input(port, "zapper", "trigger", "Trigger")

.container
    h1 Configuration

    accordion.form-horizontal
        accordion-group(heading="Emulation" is-open="emulation.visible")
            .form-group
                label.control-label.col-xs-2(for="tv-system") TV system
                .col-xs-4
                    select.form-control(id="tv-system" ng-model="emulation.tvSystem")
                        option(value="auto") Autodetect
                        option(value="ntsc") NTSC
                        option(value="pal")  PAL

        accordion-group(heading="Video" is-open="video.visible")
            .form-group
                label.control-label.col-xs-2(for="video-debugging") Output scale
                .col-xs-3
                    input.form-control(id="video-scale" type="number" ng-model="video.scale" min="1" max="{{video.maxScale}}")
                .col-xs-6.col-xs-offset-1
                    input(id="video-smoothing" type="checkbox" ng-model="video.smoothing")
                    label(for="video-smoothing") Enable smoothing
            .form-group
                label.control-label.col-xs-2(for="color-palette") Color palette
                .col-xs-3
                    select.form-control(id="color-palette" ng-model="video.palette")
                        option(value="default")   Default
                        option(value="bright")    Bright
                        option(value="realistic") Realistic
                .col-xs-6.col-xs-offset-1
                    input(id="video-debugging" type="checkbox" ng-model="video.debugging")
                    label(for="video-debugging") Show patterns and paletts
            .form-group(ng-show="video.webGLSupported")
                .col-xs-6.col-xs-offset-6
                    input(id="video-webgl" type="checkbox" ng-model="video.webGL")
                    label(for="video-webgl") Use WebGL for rendering

        accordion-group(heading="Audio" is-open="audio.visible" ng-show="audio.supported")
            .form-group
                label.control-label.col-xs-2(for="audio-volume") Volume
                .col-xs-3
                    slider(id="audio-volume" ng-model="audio.volume" ng-disabled="!audio.enabled" min="0" step="1" max="100" formater="percentageFormater" style="width: 100%")
                .col-xs-6.col-xs-offset-1
                    input(id="audio-pulse-1-enabled" type="checkbox" ng-model="audio.channels.pulse1" ng-disabled="!audio.enabled")
                    label(for="audio-pulse-1-enabled") Enable pulse channel 1
            .form-group
                .col-xs-4.col-xs-offset-2
                    input(id="audio-enabled" type="checkbox" ng-model="audio.enabled")
                    label(for="audio-enabled") Enable audio
                .col-xs-5.col-xs-offset-0
                    input(id="audio-triangle-enabled" type="checkbox" ng-model="audio.channels.triangle" ng-disabled="!audio.enabled")
                    label(for="audio-triangle-enabled") Enable triangle channel
            .form-group
                .col-xs-6.col-xs-offset-6
                    input(id="audio-pulse-2-enabled" type="checkbox" ng-model="audio.channels.pulse2" ng-disabled="!audio.enabled")
                    label(for="audio-pulse-2-enabled") Enable pulse channel 2
            .form-group
                .col-xs-6.col-xs-offset-6<commit_msg>Fixed audio config UI layout.<commit_after>mixin device-input(port, device, input, inputName)
    .form-group
        .col-xs-3.col-xs-offset-1.text-right
            label #{inputName}
        .col-xs-3
            span {{ getMappedInputName(#{port}, '#{device}', '#{input}') }}
        .col-xs-3
            button.btn.btn-default(ng-click="recordInput(#{port}, '#{device}', '#{input}')") Change

mixin device(port)
    .col-xs-6
        .device-select
            label Controller&nbsp;#{port}
            .btn-group
                button.btn.btn-default(ng-model="controls.devices[#{port}]" btn-radio="'none'") None
                button.btn.btn-default(ng-model="controls.devices[#{port}]" btn-radio="'joypad'") Joypad
                button.btn.btn-default(ng-model="controls.devices[#{port}]" btn-radio="'zapper'") Zapper
        div(ng-show="controls.devices[#{port}] == 'joypad'")
            +device-input(port, "joypad", "a",      "A")
            +device-input(port, "joypad", "b",      "B")
            +device-input(port, "joypad", "start",  "Start")
            +device-input(port, "joypad", "select", "Select")
            +device-input(port, "joypad", "left",   "Left")
            +device-input(port, "joypad", "right",  "Right")
            +device-input(port, "joypad", "up",     "Up")
            +device-input(port, "joypad", "down",   "Down")
        div(ng-show="controls.devices[#{port}] == 'zapper'")
            +device-input(port, "zapper", "trigger", "Trigger")

.container
    h1 Configuration

    accordion.form-horizontal
        accordion-group(heading="Emulation" is-open="emulation.visible")
            .form-group
                label.control-label.col-xs-2(for="tv-system") TV system
                .col-xs-4
                    select.form-control(id="tv-system" ng-model="emulation.tvSystem")
                        option(value="auto") Autodetect
                        option(value="ntsc") NTSC
                        option(value="pal")  PAL

        accordion-group(heading="Video" is-open="video.visible")
            .form-group
                label.control-label.col-xs-2(for="video-debugging") Output scale
                .col-xs-3
                    input.form-control(id="video-scale" type="number" ng-model="video.scale" min="1" max="{{video.maxScale}}")
                .col-xs-6.col-xs-offset-1
                    input(id="video-smoothing" type="checkbox" ng-model="video.smoothing")
                    label(for="video-smoothing") Enable smoothing
            .form-group
                label.control-label.col-xs-2(for="color-palette") Color palette
                .col-xs-3
                    select.form-control(id="color-palette" ng-model="video.palette")
                        option(value="default")   Default
                        option(value="bright")    Bright
                        option(value="realistic") Realistic
                .col-xs-6.col-xs-offset-1
                    input(id="video-debugging" type="checkbox" ng-model="video.debugging")
                    label(for="video-debugging") Show patterns and paletts
            .form-group(ng-show="video.webGLSupported")
                .col-xs-6.col-xs-offset-6
                    input(id="video-webgl" type="checkbox" ng-model="video.webGL")
                    label(for="video-webgl") Use WebGL for rendering

        accordion-group(heading="Audio" is-open="audio.visible" ng-show="audio.supported")
            .form-group
                label.control-label.col-xs-2(for="audio-volume") Volume
                .col-xs-3
                    slider(id="audio-volume" ng-model="audio.volume" ng-disabled="!audio.enabled" min="0" step="1" max="100" formater="percentageFormater" style="width: 100%")
                .col-xs-6.col-xs-offset-1
                    input(id="audio-pulse-1-enabled" type="checkbox" ng-model="audio.channels.pulse1" ng-disabled="!audio.enabled")
                    label(for="audio-pulse-1-enabled") Enable pulse channel 1
            .form-group
                .col-xs-4.col-xs-offset-2
                    input(id="audio-enabled" type="checkbox" ng-model="audio.enabled")
                    label(for="audio-enabled") Enable audio
                .col-xs-5.col-xs-offset-0
                    input(id="audio-pulse-2-enabled" type="checkbox" ng-model="audio.channels.pulse2" ng-disabled="!audio.enabled")
                    label(for="audio-pulse-2-enabled") Enable pulse channel 2
            .form-group
                .col-xs-6.col-xs-offset-6
                    input(id="audio-triangle-enabled" type="checkbox" ng-model="audio.channels.triangle" ng-disabled="!audio.enabled")
                    label(for="audio-triangle-enabled") Enable triangle channel
            .form-group
                .col-xs-6.col-xs-offset-6
{'fraction_non_alphanumeric': 0.15938864628820962, 'fraction_numerical': 0.009773341651070909, 'mean_word_length': 1.9148484848484848, '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': '1325063', 'n_tokens_mistral': 2937, 'n_tokens_neox': 2796, 'n_words': 405}