<commit_before><template>
    <Wrapper title="New Weapon" :time="releaseTime">
        <div class="new-weapon" v-if="newWeapons">
            <div style="display: flex; align-items: center; justify-content: center;">
                <div v-for="(weapon, index) in newWeapons" style="margin: 0 20px">
                    <NewWeaponBox
                        :weapon="weapon"
                        :class="(index % 2 == 0) ? 'tilt-left' : 'tilt-right'"
                        title="Now Available"
                        ></NewWeaponBox>
                </div>
            </div>
        </div>
    </Wrapper>
</template>

<script>
import axios from 'axios';
import Wrapper from '@/js/components/screenshots/Wrapper.vue';
import NewWeaponBox from '@/js/components/splatoon/NewWeaponBox.vue';

export default {
    components: { Wrapper, NewWeaponBox },
    props: ['releaseTime'],
    data() {
        return {
            timeline: null,
        };
    },
    computed: {
        newWeapons() {
            if (this.timeline && this.timeline.weapon_availability && this.timeline.weapon_availability.availabilities) {
                let weapons = this.timeline.weapon_availability.availabilities
                    .filter(a => a.release_time == this.releaseTime)
                    .map(a => a.weapon);

                if (weapons.length > 0)
                    return weapons;
            }
        },
    },
    created() {
        axios.get('data/timeline.json')<commit_msg>Update "new weapon" twitter screenshot title<commit_after><template>
    <Wrapper :title="title" :time="releaseTime">
        <div class="new-weapon" v-if="newWeapons">
            <div style="display: flex; align-items: center; justify-content: center;">
                <div v-for="(weapon, index) in newWeapons" style="margin: 0 20px">
                    <NewWeaponBox
                        :weapon="weapon"
                        :class="(index % 2 == 0) ? 'tilt-left' : 'tilt-right'"
                        title="Now Available"
                        ></NewWeaponBox>
                </div>
            </div>
        </div>
    </Wrapper>
</template>

<script>
import axios from 'axios';
import Wrapper from '@/js/components/screenshots/Wrapper.vue';
import NewWeaponBox from '@/js/components/splatoon/NewWeaponBox.vue';

export default {
    components: { Wrapper, NewWeaponBox },
    props: ['releaseTime'],
    data() {
        return {
            timeline: null,
        };
    },
    computed: {
        newWeapons() {
            if (this.timeline && this.timeline.weapon_availability && this.timeline.weapon_availability.availabilities) {
                let weapons = this.timeline.weapon_availability.availabilities
                    .filter(a => a.release_time == this.releaseTime)
                    .map(a => a.weapon);

                if (weapons.length > 0)
                    return weapons;
            }
        },
        title() {
            if (this.newWeapons && this.newWeapons.length == 1)
                return 'New Weapon';
            return 'New Weapons';
        },
    },
    created() {
        axios.get('data/timeline.json')
{'fraction_non_alphanumeric': 0.13183686373695858, 'fraction_numerical': 0.004110022130888397, 'mean_word_length': 1.7158798283261802, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, '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': '6341265', 'n_tokens_mistral': 952, 'n_tokens_neox': 888, 'n_words': 180}