<commit_before><template>
    <div>
        <header>
            <b-navbar
                toggleable="lg"
                type="dark"
                variant="dark"
            >
                <b-navbar-brand
                    href="https://github.com/mlocati/php-cs-fixer-configurator"
                    class="mr-1"
                >
                    <span class="d-none d-md-inline">PHP-CS-Fixer configuration v</span>
                    <span class="d-md-none">P.C.F. config v</span>
                </b-navbar-brand>
                <b-dropdown
                    size="sm"
                    variant="light"
                    v-bind:text="configuration.version.fullVersion"
                    v-bind:disabled="busy"
                >
                    <b-dropdown-item
                        v-for="v in versions"
                        v-bind:key="v.fullVersion"
                        v-bind:active="v === configuration.version"
                        v-on:click.prevent="switchToVersion(v)"
                    >{{ v.fullVersion }}</b-dropdown-item>
                    <template v-if="versions.length &gt; 1">
                        <b-dropdown-divider></b-dropdown-divider>
                        <b-dropdown-item
                            v-bind:disabled="busy"
                            v-b-modal.compare-versions
                        >Compare versions</b-dropdown-item>
                    </template>
                </b-dropdown>
                <b-navbar-nav class="ml-auto">
                    <b-input-group size="sm">
                        <b-form-input
                            placeholder="Search"
                            v-model.trim="searchText"
                            v-on:input="applyFilter"
                            v-bind:disabled="busy"
                        ></b-form-input>
                        <b-dropdown
                            text="Sets"
                            right
                            size="sm"
                            v-if="configuration.version.fixerSets.length !== 0"
                            v-bind:disabled="busy"
                        >
                            <b-dropdown-item>
                                <div v-on:click.prevent.stop="toggleSearchFixerSet(null)">
                                    <i
                                        class="far"
                                        v-bind:class="searchFixerSets.indexOf(null) === -1 ? 'fa-square' : 'fa-check-square'"
                                    ></i>
                                    In no presets
                                </div>
                            </b-dropdown-item>
                            <b-dropdown-divider></b-dropdown-divider>
                            <b-dropdown-item
                                v-for="fixerSet in configuration.version.fixerSets"
                                v-bind:key="fixerSet.uniqueKey"
                            >
                                <div v-on:click.prevent.stop="toggleSearchFixerSet(fixerSet)">
                                    <i
                                        class="far"
                                        v-bind:class="searchFixerSets.indexOf(fixerSet) === -1 ? 'fa-square' : 'fa-check-square'"
                                    ></i>
                                    {{ fixerSet.name }}
                                </div>
                            </b-dropdown-item>
                        </b-dropdown>
                    </b-input-group>
                    <b-input-group
                        v-if="configuring"
                        class="ml-sm-1"
                        size="sm"
                    >
                        <span class="form-control configure-selected-fixer-sets">
                            <b-badge
                                v-for="(fixerSet, fixerSetIndex) in configuration.fixerSets"
                                v-bind:key="fixerSet + '@' + fixerSetIndex + '@' + configuration.fullVersion"
                                v-bind:variant="fixerSet.charAt(0) === '-' ? 'danger' : 'success'"
                            >
                                {{ fixerSet.replace(/^-/, '') }}
                                <b-badge variant="warning">
                                    <a
                                        href="#"
                                        v-on:click.prevent="unsetFixerSet(fixerSet)"
                                        v-bind:disabled="busy"
                                    >
                                        <i class="fas fa-times"></i>
                                    </a>
                                </b-badge>
                            </b-badge>
                        </span>
                        <b-dropdown
                            right
                            size="sm"
                            v-bind:disabled="busy"
                        >
                            <template slot="button-content">
                                <i class="fas fa-plus"></i>
                            </template>
                            <b-dropdown-item
                                v-for="fixerSet in unselectedFixerSets"
                                v-bind:key="fixerSet.uniqueKey"
                            >
                                <div v-on:click.prevent.stop>
                                    <b-button
                                        variant="success"
                                        size="sm"
                                        v-on:click.prevent.stop="includeFixerSet(fixerSet)"
                                    >
                                        <i class="fas fa-plus"></i>
                                    </b-button>
                                    <b-button
                                        variant="danger"
                                        size="sm"
                                        v-if="configuration.fixerSets.length"
                                        v-on:click.prevent.stop="excludeFixerSet(fixerSet)"
                                    >
                                        <i class="fas fa-minus"></i>
                                    </b-button>
                                    {{ fixerSet.name }}
                                </div>
                            </b-dropdown-item>
                        </b-dropdown>
                    </b-input-group>
                    <b-button-group
                        class="ml-sm-1"
                        size="sm"
                    >
                        <b-button
                            v-for="(viewData, viewKey) in views"
                            v-bind:key="viewKey"
                            v-bind:disabled="busy"
                            v-on:click.prevent="view = viewKey"
                            v-bind:variant="view === viewKey ? 'success' : ''"
                        >
                            <i v-bind:class="viewData.icon"></i>
                        </b-button>
                        <b-button
                            v-if="configuring"
                            v-bind:disabled="busy"
                            v-b-modal.import-modal
                        >
                            <i class="fas fa-file-import"></i>
                        </b-button>
                        <b-button
                            v-if="configuring"
                            v-bind:disabled="busy"
                            v-b-modal.export-modal
                        >
                            <i class="fas fa-file-export"></i>
                        </b-button>
                        <b-button
                            v-if="configuring"
                            v-bind:disabled="busy"
                            v-bind:variant="rememberConfiguration ? 'success' : ''"
                            v-on:click="rememberConfiguration =! rememberConfiguration"
                        >
                            <i class="fas fa-thumbtack"></i>
                        </b-button>
                        <b-button
                            v-on:click.prevent="configuring = !configuring"
                            v-bind:disabled="busy"
                            v-bind:variant="configuring ? 'success' : ''"
                        >
                            <i class="fas fa-cog"></i>
                        </b-button>
                        <b-button v-b-modal.help-modal>
                            <i class="fas fa-question-circle"></i>
                        </b-button>
                    </b-button-group>
                </b-navbar-nav>
            </b-navbar>
        </header>

        <main>
            <b-container fluid>
                <grid-view
                    v-if="view === 'GRID'"
                    v-bind:fixers="visibleFixers"
                    v-bind:configuration="configuring ? configuration : null"
                ></grid-view>
                <table-view
                    v-if="view === 'TABLE'"
                    v-bind:fixers="visibleFixers"
                    v-bind:configuration="configuring ? configuration : null"
                ></table-view>
            </b-container>
        </main>

        <b-modal
            id="help-modal"
            title="Help"
            size="lg"
            scrollable
            no-fade
            ok-only
            ok-title="Close"
        ><commit_msg>Add tooltips to toolbar buttons<commit_after><template>
    <div>
        <header>
            <b-navbar
                toggleable="lg"
                type="dark"
                variant="dark"
            >
                <b-navbar-brand
                    href="https://github.com/mlocati/php-cs-fixer-configurator"
                    class="mr-1"
                >
                    <span class="d-none d-md-inline">PHP-CS-Fixer configuration v</span>
                    <span class="d-md-none">P.C.F. config v</span>
                </b-navbar-brand>
                <b-dropdown
                    size="sm"
                    variant="light"
                    v-bind:text="configuration.version.fullVersion"
                    v-bind:disabled="busy"
                >
                    <b-dropdown-item
                        v-for="v in versions"
                        v-bind:key="v.fullVersion"
                        v-bind:active="v === configuration.version"
                        v-on:click.prevent="switchToVersion(v)"
                    >{{ v.fullVersion }}</b-dropdown-item>
                    <template v-if="versions.length &gt; 1">
                        <b-dropdown-divider></b-dropdown-divider>
                        <b-dropdown-item
                            v-bind:disabled="busy"
                            v-b-modal.compare-versions
                        >Compare versions</b-dropdown-item>
                    </template>
                </b-dropdown>
                <b-navbar-nav class="ml-auto">
                    <b-input-group size="sm">
                        <b-form-input
                            placeholder="Search"
                            v-model.trim="searchText"
                            v-on:input="applyFilter"
                            v-bind:disabled="busy"
                        ></b-form-input>
                        <b-dropdown
                            text="Sets"
                            right
                            size="sm"
                            v-if="configuration.version.fixerSets.length !== 0"
                            v-bind:disabled="busy"
                        >
                            <b-dropdown-item>
                                <div v-on:click.prevent.stop="toggleSearchFixerSet(null)">
                                    <i
                                        class="far"
                                        v-bind:class="searchFixerSets.indexOf(null) === -1 ? 'fa-square' : 'fa-check-square'"
                                    ></i>
                                    In no presets
                                </div>
                            </b-dropdown-item>
                            <b-dropdown-divider></b-dropdown-divider>
                            <b-dropdown-item
                                v-for="fixerSet in configuration.version.fixerSets"
                                v-bind:key="fixerSet.uniqueKey"
                            >
                                <div v-on:click.prevent.stop="toggleSearchFixerSet(fixerSet)">
                                    <i
                                        class="far"
                                        v-bind:class="searchFixerSets.indexOf(fixerSet) === -1 ? 'fa-square' : 'fa-check-square'"
                                    ></i>
                                    {{ fixerSet.name }}
                                </div>
                            </b-dropdown-item>
                        </b-dropdown>
                    </b-input-group>
                    <b-input-group
                        v-if="configuring"
                        class="ml-sm-1"
                        size="sm"
                    >
                        <span class="form-control configure-selected-fixer-sets">
                            <b-badge
                                v-for="(fixerSet, fixerSetIndex) in configuration.fixerSets"
                                v-bind:key="fixerSet + '@' + fixerSetIndex + '@' + configuration.fullVersion"
                                v-bind:variant="fixerSet.charAt(0) === '-' ? 'danger' : 'success'"
                            >
                                {{ fixerSet.replace(/^-/, '') }}
                                <b-badge variant="warning">
                                    <a
                                        href="#"
                                        v-on:click.prevent="unsetFixerSet(fixerSet)"
                                        v-bind:disabled="busy"
                                    >
                                        <i class="fas fa-times"></i>
                                    </a>
                                </b-badge>
                            </b-badge>
                        </span>
                        <b-dropdown
                            right
                            size="sm"
                            v-bind:disabled="busy"
                        >
                            <template slot="button-content">
                                <i class="fas fa-plus"></i>
                            </template>
                            <b-dropdown-item
                                v-for="fixerSet in unselectedFixerSets"
                                v-bind:key="fixerSet.uniqueKey"
                            >
                                <div v-on:click.prevent.stop>
                                    <b-button
                                        variant="success"
                                        size="sm"
                                        v-on:click.prevent.stop="includeFixerSet(fixerSet)"
                                    >
                                        <i class="fas fa-plus"></i>
                                    </b-button>
                                    <b-button
                                        variant="danger"
                                        size="sm"
                                        v-if="configuration.fixerSets.length"
                                        v-on:click.prevent.stop="excludeFixerSet(fixerSet)"
                                    >
                                        <i class="fas fa-minus"></i>
                                    </b-button>
                                    {{ fixerSet.name }}
                                </div>
                            </b-dropdown-item>
                        </b-dropdown>
                    </b-input-group>
                    <b-button-group
                        class="ml-sm-1"
                        size="sm"
                    >
                        <b-button
                            v-for="(viewData, viewKey) in views"
                            v-bind:key="viewKey"
                            v-bind:disabled="busy"
                            v-on:click.prevent="view = viewKey"
                            v-bind:variant="view === viewKey ? 'success' : ''"
                            v-bind:title="viewData.helpText"
                        >
                            <i v-bind:class="viewData.icon"></i>
                        </b-button>
                        <b-button
                            v-if="configuring"
                            v-bind:disabled="busy"
                            v-b-modal.import-modal
                            title="Import"
                        >
                            <i class="fas fa-file-import"></i>
                        </b-button>
                        <b-button
                            v-if="configuring"
                            v-bind:disabled="busy"
                            v-b-modal.export-modal
                            title="Export"
                        >
                            <i class="fas fa-file-export"></i>
                        </b-button>
                        <b-button
                            v-if="configuring"
                            v-bind:disabled="busy"
                            v-bind:variant="rememberConfiguration ? 'success' : ''"
                            v-on:click="rememberConfiguration =! rememberConfiguration"
                            title="Remember configuration"
                        >
                            <i class="fas fa-thumbtack"></i>
                        </b-button>
                        <b-button
                            v-on:click.prevent="configuring = !configuring"
                            v-bind:disabled="busy"
                            v-bind:variant="configuring ? 'success' : ''"
                            v-bind:title="configuring ? 'Switch to View mode' : 'Switch to Configuration mode'"
                        >
                            <i class="fas fa-cog"></i>
                        </b-button>
                        <b-button
                            v-b-modal.help-modal
                            title="Get some help"
                        >
                            <i class="fas fa-question-circle"></i>
                        </b-button>
                    </b-button-group>
                </b-navbar-nav>
            </b-navbar>
        </header>

        <main>
            <b-container fluid>
                <grid-view
                    v-if="view === 'GRID'"
                    v-bind:fixers="visibleFixers"
                    v-bind:configuration="configuring ? configuration : null"
                ></grid-view>
                <table-view
                    v-if="view === 'TABLE'"
                    v-bind:fixers="visibleFixers"
                    v-bind:configuration="configuring ? configuration : null"
                ></table-view>
            </b-container>
        </main>

        <b-modal
            id="help-modal"
            title="Help"
            size="lg"
            scrollable
            no-fade
            ok-only
            ok-title="Close"
        >
{'fraction_non_alphanumeric': 0.10296451794582971, 'fraction_numerical': 0.0008192104858942194, 'mean_word_length': 0.6530128639133378, 'pattern_counts': {'":': 0, '<': 221, '<?xml version=': 0, '>': 221, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 76, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5180447', 'n_tokens_mistral': 4442, 'n_tokens_neox': 4181, 'n_words': 549}