<commit_before><template>
    <div>
        <div class="row justify-content-center">
            <template v-for="team in teams">
                <div :class="rowclass" style="padding-top:50px">
                    <!-- Yes, this is _supposed_ to be a div. Don't make it a button. -->
                    <div class="btn btn-kiosk btn-secondary" :id="team.id" v-on:click="clicked">
                        {{ team.name }}
                    </div>
                </div>
            </template>
        </div>
        <div class="row d-none">
            <div class="col-sm-1" style="padding-top: 20px">
                <object id="nfc-logo" data="/img/nfc-logo.svg" type="image/svg+xml" style="max-width: 20px"></object>
            </div>
        </div>
    </div>
</template>

<script>
    function checkboxEventListener(e) {
        this.stickToTeam = e.target.checked;
        document.activeElement.blur();
    }

    export default {
        data() {
            return {
                attendance: {
                    gtid: '',
                    attendable_id: '',
                    attendable_type: 'App\\Team',
                    source: 'kiosk',
                    include: 'attendee',
                },
                attendanceBaseUrl: '/api/v1/attendance',
                teamsBaseUrl: '/api/v1/teams',
                usersBaseUrl: '/api/v1/users',
                teams: [],
                stickToTeam: false,
                submitting: false,
                cardType: null
            };
        },
        mounted() {
            //Remove focus from button
            document.activeElement.blur();
            axios.defaults.headers.common['Authorization'] = 'Bearer ' + localStorage.getItem('api_token');
            this.loadTeams();
        },
        methods: {
            loadTeams() {
                // Fetch teams from the API to populate buttons
                axios
                    .get(this.teamsBaseUrl)
                    .then(response => {
                        let rawTeams = response.data.teams;
                        if (rawTeams.length < 1) {
                            Swal.fire('Bueller...Bueller...', 'No teams found.', 'warning');
                        } else {
                            this.teams = response.data.teams.filter(function (item) {
                                return item.visible && item.attendable;
                            }).sort(function (a, b) {
                                return a.name > b.name ? 1 : b.name > a.name ? -1 : 0;
                            }).forEach(function (team) {
                                // If the team name starts with Robo and the next letter is a capital letter, insert
                                // 0xAD (an invisible hyphen) to allow the browser to break the word up if necessary.
                                if (team.name.length < 5) return;
                                let startsWithRobo = team.name.startsWith('Robo');<commit_msg>Fix teams parsing<commit_after><template>
    <div>
        <div class="row justify-content-center">
            <template v-for="team in teams">
                <div :class="rowclass" style="padding-top:50px">
                    <!-- Yes, this is _supposed_ to be a div. Don't make it a button. -->
                    <div class="btn btn-kiosk btn-secondary" :id="team.id" v-on:click="clicked">
                        {{ team.name }}
                    </div>
                </div>
            </template>
        </div>
        <div class="row d-none">
            <div class="col-sm-1" style="padding-top: 20px">
                <object id="nfc-logo" data="/img/nfc-logo.svg" type="image/svg+xml" style="max-width: 20px"></object>
            </div>
        </div>
    </div>
</template>

<script>
    function checkboxEventListener(e) {
        this.stickToTeam = e.target.checked;
        document.activeElement.blur();
    }

    export default {
        data() {
            return {
                attendance: {
                    gtid: '',
                    attendable_id: '',
                    attendable_type: 'App\\Team',
                    source: 'kiosk',
                    include: 'attendee',
                },
                attendanceBaseUrl: '/api/v1/attendance',
                teamsBaseUrl: '/api/v1/teams',
                usersBaseUrl: '/api/v1/users',
                teams: [],
                stickToTeam: false,
                submitting: false,
                cardType: null
            };
        },
        mounted() {
            //Remove focus from button
            document.activeElement.blur();
            axios.defaults.headers.common['Authorization'] = 'Bearer ' + localStorage.getItem('api_token');
            this.loadTeams();
        },
        methods: {
            loadTeams() {
                // Fetch teams from the API to populate buttons
                axios
                    .get(this.teamsBaseUrl)
                    .then(response => {
                        let rawTeams = response.data.teams;
                        if (rawTeams.length < 1) {
                            Swal.fire('Bueller...Bueller...', 'No teams found.', 'warning');
                        } else {
                            this.teams = response.data.teams.filter(function (item) {
                                return item.visible && item.attendable;
                            }).sort(function (a, b) {
                                return a.name > b.name ? 1 : b.name > a.name ? -1 : 0;
                            });
                            this.teams.forEach(function (team) {
                                // If the team name starts with Robo and the next letter is a capital letter, insert
                                // 0xAD (an invisible hyphen) to allow the browser to break the word up if necessary.
                                if (team.name.length < 5) return;
                                let startsWithRobo = team.name.startsWith('Robo');
{'fraction_non_alphanumeric': 0.11835106382978723, 'fraction_numerical': 0.005319148936170213, 'mean_word_length': 1.1435696473102956, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '823148', 'n_tokens_mistral': 1608, 'n_tokens_neox': 1528, 'n_words': 355}