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AA8B,KAA9B,EAAqC;AAAA,sBAA5B,GAA4B;AAcpC;AAED,mBAAO,KAAK,cAAL,CAAoB,OAApB,EAA6B,QAA7B,CAAP;AACD;AA1BM,KATF;AAsCP,UAtCO,oBAsCD;AACJ,eAAO,KAAK,QAAL,CAAc,gDAAd,EAAgE,CACrE,KAAK,QAAL,EADqE,CAAhE,EAEJ,KAAK,kBAFD,CAAP;AAGD;AA1CM,CAHM,C","sourcesContent":["// Mixins\nimport DatePickerTable from './mixins/date-picker-table'\n\n// Utils\nimport { pad, createNativeLocaleFormatter } from './util'\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\nimport { DatePickerFormatter } from './util/createNativeLocaleFormatter'\n\nexport default mixins(\n DatePickerTable\n/* @vue/component */\n).extend({\n name: 'v-date-picker-month-table',\n\n computed: {\n formatter (): DatePickerFormatter {\n return this.format || createNativeLocaleFormatter(this.locale, { month: 'short', timeZone: 'UTC' }, { start: 5, length: 2 })\n }\n },\n\n methods: {\n calculateTableDate (delta: number) {\n return `${parseInt(this.tableDate, 10) + Math.sign(delta || 1)}`\n },\n genTBody () {\n const children = []\n const cols = Array(3).fill(null)\n const rows = 12 / cols.length\n\n for (let row = 0; row < rows; row++) {\n const tds = cols.map((_, col) => {\n const month = row * cols.length + col\n const date = `${this.displayedYear}-${pad(month + 1)}`\n return this.$createElement('td', {\n key: month\n }, [\n this.genButton(date, false, 'month', this.formatter)\n ])\n })\n\n children.push(this.$createElement('tr', {\n key: row\n }, tds))\n }\n\n return this.$createElement('tbody', children)\n }\n },\n\n render (): VNode {\n return this.genTable('v-date-picker-table v-date-picker-table--month', [\n this.genTBody()\n ], this.calculateTableDate)\n }\n})\n"],"sourceRoot":""}