<commit_before><template lang="pug">
  v-navigation-drawer(
    app
    fixed
    v-model="appDrawer"
    :stateless="stateless"
  )#app-drawer
    div.text-xs-center
      div.diamond-sponsor-label Diamond Sponsors
      div(
        v-for="diamond in diamonds"
        :key="diamond.title"
      )
        a(:href="diamond.href" target="_blank" rel="noopener")
          img.diamond-sponsor(
            :src="`/static/doc-images/${diamond.src}`"
            :alt="diamond.title"
          )
    v-container(fluid)
      v-text-field(
        placeholder="Search"
        append-icon="search"
        id="search"
        clearable
        single-line
        solo
        key="search"
        v-model="search"
        ref="search"
        light
      )
    div.py-3.text-xs-center
      a(
        href="https://vuejobs.com/?utm_source=vuejobs&utm_medium=banner&utm_campaign=linking"
        target="_blank"
        rel="noopener"
        class="d-inline-block"
      )
        img(
          src="/static/doc-images/affiliates/vuejobs-logo.svg"
          alt="VueJobs"
          title="VueJobs"
          width="30%"
        )
    v-list(dense expand)
      template(v-for="item in items")
        v-list-group(
          v-if="item.items"
          :group="item.group"
          :prepend-icon="item.icon"
          no-action
        )
          v-list-tile(slot="activator" ripple)
            v-list-tile-content
              v-list-tile-title {{ item.title }}
          template(v-for="(subItem, i) in item.items")
            v-list-group(
              v-if="subItem.items"
              :group="subItem.group"
              sub-group
            )
              v-list-tile(slot="activator" ripple)
                v-list-tile-content
                  v-list-tile-title {{ subItem.title }}
              v-list-tile(
                v-for="(grand, i) in subItem.items"
                :key="i"
                :to="`${item.group}/${grand.href}`"
                ripple
              )
                v-list-tile-content
                  v-list-tile-title {{ grand.title }}
            v-list-tile(
              :key="i"
              v-bind="{ \
                to: !subItem.target ? `${item.group}/${subItem.href}` : null, \
                href: subItem.target && subItem.href \
              }"
              :disabled="subItem.disabled"
              :target="subItem.target"
              ripple
              v-else
            )
              v-list-tile-content
                v-list-tile-title
                  span {{ subItem.title }}
              v-chip(
                v-if="subItem.badge"
                class="white--text pa-0 chip--x-small"
                color="primary"
                disabled
              ) {{ subItem.badge }}
              v-list-tile-action(v-if="subItem.action")
                v-icon(:class="[subItem.actionClass || 'success--text']") {{ subItem.action }}
        v-subheader(v-else-if="item.header").grey--text {{ item.header }}
        v-divider(v-else-if="item.divider")
        v-list-tile(
          v-bind="{ \
            to: !item.target ? item.href : null, \
            href: item.target && item.href \
          }"
          ripple
          v-bind:disabled="item.disabled"
          v-bind:target="item.target"
          rel="noopener"
          v-else
        )
          v-list-tile-action(v-if="item.icon")
            v-icon {{ item.icon }}
          v-list-tile-content
            v-list-tile-title {{ item.title }}
          v-chip(
            v-if="item.badge"
            class="white--text pa-0 chip--x-small"
            color="primary"
            disabled
          ) {{ item.badge }}
          v-list-tile-action(v-if="item.subAction")
            v-icon(class="success--text") {{ item.subAction }}
          v-chip(
            v-else-if="item.chip"
            label
            small
            class="caption blue lighten-2 white--text mx-0"
          ) {{ item.chip }}
</template>

<script>
  import { mapState } from 'vuex'

  export default {
    data: () => ({
      docSearch: {},
      isSearching: false,
      search: ''
    }),

    computed: {
      ...mapState({
        diamonds: state => state.supporters.diamond,
        items: state => state.appDrawerItems,
        stateless: state => state.stateless
      }),
      appDrawer: {
        get (state) {
          return this.$store.state.appDrawer
        },
        set (val) {
          this.$store.commit('app/DRAWER', val)
        }
      }
    },

    watch: {
      isSearching (val) {
        this.$refs.toolbar.isScrolling = !val

        if (val) {
          this.$nextTick(() => {
            this.$refs.search.focus()
          })
        } else {
          this.search = null
        }
      },
      search (val) {<commit_msg>fixed a bug where the drawer would not close on mobile when going to the theme generator<commit_after><template lang="pug">
  v-navigation-drawer(
    app
    fixed
    v-model="appDrawer"
    :stateless="stateless"
  )#app-drawer
    div.text-xs-center
      div.diamond-sponsor-label Diamond Sponsors
      div(
        v-for="diamond in diamonds"
        :key="diamond.title"
      )
        a(:href="diamond.href" target="_blank" rel="noopener")
          img.diamond-sponsor(
            :src="`/static/doc-images/${diamond.src}`"
            :alt="diamond.title"
          )
    v-container(fluid)
      v-text-field(
        placeholder="Search"
        append-icon="search"
        id="search"
        clearable
        single-line
        solo
        key="search"
        v-model="search"
        ref="search"
        light
      )
    div.py-3.text-xs-center
      a(
        href="https://vuejobs.com/?utm_source=vuejobs&utm_medium=banner&utm_campaign=linking"
        target="_blank"
        rel="noopener"
        class="d-inline-block"
      )
        img(
          src="/static/doc-images/affiliates/vuejobs-logo.svg"
          alt="VueJobs"
          title="VueJobs"
          width="30%"
        )
    v-list(dense expand)
      template(v-for="item in items")
        v-list-group(
          v-if="item.items"
          :group="item.group"
          :prepend-icon="item.icon"
          no-action
        )
          v-list-tile(slot="activator" ripple)
            v-list-tile-content
              v-list-tile-title {{ item.title }}
          template(v-for="(subItem, i) in item.items")
            v-list-group(
              v-if="subItem.items"
              :group="subItem.group"
              sub-group
            )
              v-list-tile(slot="activator" ripple)
                v-list-tile-content
                  v-list-tile-title {{ subItem.title }}
              v-list-tile(
                v-for="(grand, i) in subItem.items"
                :key="i"
                :to="`${item.group}/${grand.href}`"
                ripple
              )
                v-list-tile-content
                  v-list-tile-title {{ grand.title }}
            v-list-tile(
              :key="i"
              v-bind="{ \
                to: !subItem.target ? `${item.group}/${subItem.href}` : null, \
                href: subItem.target && subItem.href \
              }"
              :disabled="subItem.disabled"
              :target="subItem.target"
              ripple
              v-else
            )
              v-list-tile-content
                v-list-tile-title
                  span {{ subItem.title }}
              v-chip(
                v-if="subItem.badge"
                class="white--text pa-0 chip--x-small"
                color="primary"
                disabled
              ) {{ subItem.badge }}
              v-list-tile-action(v-if="subItem.action")
                v-icon(:class="[subItem.actionClass || 'success--text']") {{ subItem.action }}
        v-subheader(v-else-if="item.header").grey--text {{ item.header }}
        v-divider(v-else-if="item.divider")
        v-list-tile(
          v-bind="{ \
            to: !item.target ? item.href : null, \
            href: item.target && item.href \
          }"
          ripple
          v-bind:disabled="item.disabled"
          v-bind:target="item.target"
          rel="noopener"
          v-else
        )
          v-list-tile-action(v-if="item.icon")
            v-icon {{ item.icon }}
          v-list-tile-content
            v-list-tile-title {{ item.title }}
          v-chip(
            v-if="item.badge"
            class="white--text pa-0 chip--x-small"
            color="primary"
            disabled
          ) {{ item.badge }}
          v-list-tile-action(v-if="item.subAction")
            v-icon(class="success--text") {{ item.subAction }}
          v-chip(
            v-else-if="item.chip"
            label
            small
            class="caption blue lighten-2 white--text mx-0"
          ) {{ item.chip }}
</template>

<script>
  import { mapState } from 'vuex'

  export default {
    data: () => ({
      docSearch: {},
      isSearching: false,
      search: ''
    }),

    computed: {
      ...mapState({
        diamonds: state => state.supporters.diamond,
        items: state => state.appDrawerItems,
        stateless: state => state.stateless
      }),
      appDrawer: {
        get (state) {
          return this.$store.state.appDrawer
        },
        set (val) {
          this.$store.commit('app/DRAWER', val)
        }
      }
    },

    watch: {
      $route () {
        if(this.stateless &&
          this.appDrawer &&
          this.$vuetify.breakpoint.mdAndDown
        ) this.appDrawer = false
      },
      isSearching (val) {
        this.$refs.toolbar.isScrolling = !val

        if (val) {
          this.$nextTick(() => {
            this.$refs.search.focus()
          })
        } else {
          this.search = null
        }
      },
      search (val) {
{'fraction_non_alphanumeric': 0.14255210981189628, 'fraction_numerical': 0.0014234875444839859, 'mean_word_length': 1.32639545884579, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '1456539', 'n_tokens_mistral': 3078, 'n_tokens_neox': 2960, 'n_words': 434}