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AkC;AAElC,gBAAM,8BAA4B,KAAK,WAAvC;AAEA,iBAAK,SAAL,CAAe,YAAK;AAClB,oBAAI,mCAAqB,MAAK,KAAL,CAAW,IAAhC,EAAsC,IAAtC,CAAJ,EAAiD;AAC/C,0BAAK,MAAL;AACD;AACF,aAJD;AAKD;AAvBM,KArDI;AA+Eb,UA/Ea,kBA+EL,CA/EK,EA+EJ;AACP,YAAM,OAAO,KAAK,iBAAL,CAAuB,KAAK,OAA5B,CAAb;AADO,YAEC,IAFD,GAEU,IAFV,CAEC,IAFD;AAIP;AACA;;AACA,YAAM,MAAM,KAAK,QAAL,GAAgB,KAAhB,GAAwB,KAAK,GAAzC;AAEA,aAAK,GAAL,GAAW,MAAX;AAEA,eAAO,EAAE,KAAF,EAAS;AACd,yBAAa;AADC,SAAT,EAEJ,CAAC,EAAE,GAAF,EAAO,IAAP,EAAa,KAAK,MAAL,CAAY,OAAzB,CAAD,CAFI,CAAP;AAGD;AA5FY,C","sourcesContent":["// Mixins\nimport { factory as GroupableFactory } from '../../mixins/groupable'\nimport Routable from '../../mixins/routable'\nimport Themeable from '../../mixins/themeable'\n\n// Utilities\nimport { getObjectValueByPath } from '../../util/helpers'\n\n/* @vue/component */\nexport default {\n name: 'v-tab',\n\n mixins: [\n Routable,\n // Must be after routable\n // to overwrite activeClass\n GroupableFactory('tabGroup'),\n Themeable\n ],\n\n props: {\n ripple: {\n type: [Boolean, Object],\n default: true\n }\n },\n\n computed: {\n classes () {\n return {\n 'v-tabs__item': true,\n 'v-tabs__item--disabled': this.disabled,\n ...this.groupClasses\n }\n },\n value () {\n let to = this.to || this.href || ''\n\n if (this.$router &&\n this.to === Object(this.to)\n ) {\n const resolve = this.$router.resolve(\n this.to,\n this.$route,\n this.append\n )\n\n to = resolve.href\n }\n\n return to.replace('#', '')\n }\n },\n\n watch: {\n $route: 'onRouteChange'\n },\n\n mounted () {\n this.onRouteChange()\n },\n\n methods: {\n click (e) {\n // If user provides an\n // actual link, do not\n // prevent default\n if (this.href &&\n this.href.indexOf('#') > -1\n ) e.preventDefault()\n\n this.$emit('click', e)\n\n this.to || this.toggle()\n },\n onRouteChange () {\n if (!this.to || !this.$refs.link) return\n\n const path = `_vnode.data.class.${this.activeClass}`\n\n this.$nextTick(() => {\n if (getObjectValueByPath(this.$refs.link, path)) {\n this.toggle()\n }\n })\n }\n },\n\n render (h) {\n const link = this.generateRouteLink(this.classes)\n const { data } = link\n\n // If disabled, use div as anchor tags do not support\n // being disabled\n const tag = this.disabled ? 'div' : link.tag\n\n data.ref = 'link'\n\n return h('div', {\n staticClass: 'v-tabs__div'\n }, [h(tag, data, this.$slots.default)])\n }\n}\n"],"sourceRoot":""}