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AAA,QACpC,SAAS,SAAS,WAAW;AAAA,MAC/B,GAAG,MAAM,GAAe,CAAC,QAAQ,SAAS,CAAC,IAAI,QAAQ,CAAC,IACxD,uDAAmB,CAAC,QAAQ,IAAI;AAAA,IACtC,CAAC;AAAA,EACH,CAAC;AACH;;;;;;;;;;;;AC/CA;;;;;;;;;;;;;;;;ACA0F;AACtB;AACL;;AAE/D,CAAwF;;AAEL;AACnF,iCAAiC,yFAAe,CAAC,sFAAM,aAAa,oGAAM;AAC1E;AACA,IAAI,KAAU,EAAE,EAYf;;;AAGD,+DAAe;;;;;;;;;;;;;;;ACxBoM","sources":["webpack:///./web_src/js/components/RepoRecentCommits.vue","webpack:///./web_src/js/components/RepoRecentCommits.vue?5ef8","webpack:///./web_src/js/components/RepoRecentCommits.vue?61f3","webpack:///./web_src/js/components/RepoRecentCommits.vue?f7fa","webpack:///./web_src/js/components/RepoRecentCommits.vue?e0d1","webpack:///./web_src/js/components/RepoRecentCommits.vue?b575"],"sourcesContent":["\nimport {SvgIcon} from '../svg.js';\nimport {\n Chart,\n Tooltip,\n BarElement,\n LinearScale,\n TimeScale,\n} from 'chart.js';\nimport {GET} from '../modules/fetch.js';\nimport {Bar} from 'vue-chartjs';\nimport {\n startDaysBetween,\n firstStartDateAfterDate,\n fillEmptyStartDaysWithZeroes,\n} from '../utils/time.js';\nimport {chartJsColors} from '../utils/color.js';\nimport {sleep} from '../utils.js';\nimport 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';\n\nconst {pageData} = window.config;\n\nChart.defaults.color = chartJsColors.text;\nChart.defaults.borderColor = chartJsColors.border;\n\nChart.register(\n TimeScale,\n LinearScale,\n BarElement,\n Tooltip,\n);\n\nexport default {\n components: {Bar, SvgIcon},\n props: {\n locale: {\n type: Object,\n required: true,\n },\n },\n data: () => ({\n isLoading: false,\n errorText: '',\n repoLink: pageData.repoLink || [],\n data: [],\n }),\n mounted() {\n this.fetchGraphData();\n },\n methods: {\n async fetchGraphData() {\n this.isLoading = true;\n try {\n let response;\n do {\n response = await GET(`${this.repoLink}/activity/recent-commits/data`);\n if (response.status === 202) {\n await sleep(1000); // wait for 1 second before retrying\n }\n } while (response.status === 202);\n if (response.ok) {\n const data = await response.json();\n const start = Object.values(data)[0].week;\n const end = firstStartDateAfterDate(new Date());\n const startDays = startDaysBetween(new Date(start), new Date(end));\n this.data = fillEmptyStartDaysWithZeroes(startDays, data).slice(-52);\n this.errorText = '';\n } else {\n this.errorText = response.statusText;\n }\n } catch (err) {\n this.errorText = err.message;\n } finally {\n this.isLoading = false;\n }\n },\n\n toGraphData(data) {\n return {\n datasets: [\n {\n data: data.map((i) => ({x: i.week, y: i.commits})),\n label: 'Commits',\n backgroundColor: chartJsColors['commits'],\n borderWidth: 0,\n tension: 0.3,\n },\n ],\n };\n },\n\n getOptions() {\n return {\n responsive: true,\n maintainAspectRatio: false,\n animation: true,\n scales: {\n x: {\n type: 'time',\n grid: {\n display: false,\n },\n time: {\n minUnit: 'week',\n },\n ticks: {\n maxRotation: 0,\n maxTicksLimit: 52,\n },\n },\n y: {\n ticks: {\n maxTicksLimit: 6,\n },\n },\n },\n };\n },\n },\n};\n","// extracted by mini-css-extract-plugin\nexport {};","import { render } from \"./RepoRecentCommits.vue?vue&type=template&id=9e1e8130&scoped=true\"\nimport script from \"./RepoRecentCommits.vue?vue&type=script&lang=js\"\nexport * from \"./RepoRecentCommits.vue?vue&type=script&lang=js\"\n\nimport \"./RepoRecentCommits.vue?vue&type=style&index=0&id=9e1e8130&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-9e1e8130\"],['__file',\"web_src/js/components/RepoRecentCommits.vue\"]])\n/* hot reload */\nif (module.hot) {\n __exports__.__hmrId = \"9e1e8130\"\n const api = __VUE_HMR_RUNTIME__\n module.hot.accept()\n if (!api.createRecord('9e1e8130', __exports__)) {\n api.reload('9e1e8130', __exports__)\n }\n \n module.hot.accept(\"./RepoRecentCommits.vue?vue&type=template&id=9e1e8130&scoped=true\", () => {\n api.rerender('9e1e8130', render)\n })\n\n}\n\n\nexport default __exports__","export { default } from \"-!../../../node_modules/esbuild-loader/dist/index.cjs??clonedRuleSet-1.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0]!./RepoRecentCommits.vue?vue&type=script&lang=js\"; export * from \"-!../../../node_modules/esbuild-loader/dist/index.cjs??clonedRuleSet-1.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0]!./RepoRecentCommits.vue?vue&type=script&lang=js\"","export * from \"-!../../../node_modules/esbuild-loader/dist/index.cjs??clonedRuleSet-1.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0]!./RepoRecentCommits.vue?vue&type=template&id=9e1e8130&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-2.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-2.use[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0]!./RepoRecentCommits.vue?vue&type=style&index=0&id=9e1e8130&scoped=true&lang=css\""],"names":[],"sourceRoot":""}