{"version":3,"sources":["webpack:///./src/components/common/loading/loading.vue?91b3","webpack:///./src/components/common/loading/loading.ts","webpack:///./src/components/common/loading/loading.ts?d597","webpack:///./src/components/common/loading/loading.vue","webpack:///./src/components/index.vue?9dd7","webpack:///./src/components/index.ts","webpack:///./src/components/index.ts?6dc3","webpack:///./src/components/index.vue","webpack:///./src/components/common/loading/PageLoading.vue?c233","webpack:///./src/components/common/loading/PageLoading.vue","webpack:///./src/components/common/loading/PageLoading.vue?74b4","webpack:///./src/components/common/loading/PageLoading.vue?dd9d"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","class","color","style","width","size","height","staticRenderFns","default","component","getUser","$store","dispatch","then","res","pipe","tap","user","routeAuth","catchError","error","account","getters","ClientAuthError","$router","push","of","subscribe","roleName","year","state","Common","currentYear","toLowerCase","isJuryWhenParticipantPeriod","isJuryWhenJuryPeriod","components","PageLoading","staticStyle","attrs","Loading"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,MAAM,CAACE,YAAY,eAAeC,MAAMP,EAAIQ,MAAMC,MAAM,CAAGC,MAAOV,EAAIW,KAAO,KAAMC,OAAQZ,EAAIW,KAAO,WAC/OE,EAAkB,G,wECGD,EAArB,qIAAqC,cAEnC,gBADC,eAAK,CAAEC,QAAS,Y,4BAIjB,gBADC,eAAK,CAAEA,QAAS,M,2BAJE,EAAO,gBAD3B,QACoB,WCJuY,I,YCOxZC,EAAY,eACd,EACAhB,EACAc,GACA,EACA,KACA,KACA,MAIa,OAAAE,E,oDClBf,IAAIhB,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,gBAC/FS,EAAkB,G,6JCaD,EAArB,yKACS,WACLZ,KAA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AAOE,EAAG,MAAM,CAACwC,YAAY,CAAC,SAAW,QAAQ,IAAM,IAAI,KAAO,IAAI,OAAS,IAAI,MAAQ,IAAI,WAAa,2BAA2B,UAAU,QAAQ,CAACxC,EAAG,UAAU,CAACwC,YAAY,CAAC,SAAW,WAAW,IAAM,mBAAmB,KAAO,oBAAoBC,MAAM,CAAC,KAAO,SAAS,IAC3WhC,EAAkB,G,oFC4BtB,uIAA6B,cAA7B,kBALC,eAAU,CACT6B,WAAY,CACVI,QAAA,WAG+B,G,QC7BuY,I,YCOta/B,EAAY,eACd,EACAhB,EACAc,GACA,EACA,KACA,KACA,MAIa,OAAAE,E","file":"js/chunk-6be24f15.3dbb7e88.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"loading-wrapper\"},[_c('div',{staticClass:\"loading-item\",class:_vm.color,style:({ width: _vm.size + 'px', height: _vm.size + 'px' })})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Vue from \"vue\";\r\nimport { Component, Prop } from \"vue-property-decorator\";\r\n\r\n@Component\r\nexport default class Loading extends Vue {\r\n @Prop({ default: \"purple\" })\r\n public readonly color!: string;\r\n\r\n @Prop({ default: 20 })\r\n public readonly size!: number;\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/eslint-loader/index.js??ref--13-0!./loading.ts?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/eslint-loader/index.js??ref--13-0!./loading.ts?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./loading.vue?vue&type=template&id=0b0d2312&\"\nimport script from \"./loading.ts?vue&type=script&lang=js&\"\nexport * from \"./loading.ts?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('PageLoading')}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Vue from \"vue\";\r\nimport { Component } from \"vue-property-decorator\";\r\nimport PageLoading from \"@/components/common/loading/PageLoading.vue\";\r\nimport { catchError, tap } from \"rxjs/operators\";\r\nimport { of } from \"rxjs\";\r\nimport { StoreData } from \"@/store\";\r\nimport { Store } from \"vuex\";\r\nimport { ClientAuthError } from \"msal\";\r\n\r\n@Component({\r\n components: {\r\n PageLoading,\r\n },\r\n})\r\nexport default class Index extends Vue {\r\n public mounted(): void {\r\n this.getUser();\r\n }\r\n\r\n public getUser(): void {\r\n this.$store.dispatch(\"AuthStore/getUser\").then((res) => {\r\n res\r\n .pipe(\r\n tap((user: any) => {\r\n this.routeAuth(user);\r\n }),\r\n catchError((error) => {\r\n const account = this.$store.getters[\"AuthStore/getAccount\"];\r\n console.log(error, error.name, account);\r\n if (account === null || error instanceof ClientAuthError) {\r\n this.$router.push(\"/login\");\r\n } else {\r\n this.$router.push(\"/registration\");\r\n }\r\n\r\n // this.$router.push(\"/registration\");\r\n // console.log(this.$router);\r\n // this.$store.dispatch(\"AuthStore/logout\").then(() => {\r\n // this.$router.push(\"/login\");\r\n // });\r\n // await this.$router.push(\"/login\").catch(() => {\r\n // console.log(\"asd\");\r\n // });\r\n return of(null);\r\n })\r\n )\r\n .subscribe();\r\n });\r\n }\r\n\r\n private routeAuth(user: any) {\r\n if (user && user.user && user.user.roleName) {\r\n const year = (this.$store as Store).state.Common.currentYear;\r\n this.$store\r\n .dispatch(\"PeriodManagementStore/getPeriodManagementsByYear\", { year })\r\n .then((res) =>\r\n res\r\n .pipe(\r\n tap(() => {\r\n const roleName = user.user.roleName.toLowerCase();\r\n if (roleName === \"commitee\") {\r\n this.$router.push(\"/commitee\");\r\n } else if (\r\n roleName === \"participant\" ||\r\n this.isJuryWhenParticipantPeriod(roleName)\r\n ) {\r\n this.$router.push(\"/participant\");\r\n } else if (this.isJuryWhenJuryPeriod(roleName)) {\r\n this.$router.push(\"/jury\");\r\n } else {\r\n this.$router.push(\"/participant\");\r\n }\r\n })\r\n )\r\n .subscribe()\r\n );\r\n }\r\n }\r\n\r\n private isJuryWhenJuryPeriod(roleName: any): boolean {\r\n return (\r\n roleName === \"jury\" &&\r\n this.$store.getters[\"PeriodManagementStore/isJuryPeriod\"]\r\n );\r\n }\r\n\r\n private isJuryWhenParticipantPeriod(roleName: any): boolean {\r\n return (\r\n roleName === \"jury\" &&\r\n this.$store.getters[\"PeriodManagementStore/isParticipantPeriod\"]\r\n );\r\n }\r\n}\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/eslint-loader/index.js??ref--13-0!./index.ts?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/eslint-loader/index.js??ref--13-0!./index.ts?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=f4c805d4&\"\nimport script from \"./index.ts?vue&type=script&lang=js&\"\nexport * from \"./index.ts?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{\"position\":\"fixed\",\"top\":\"0\",\"left\":\"0\",\"bottom\":\"0\",\"right\":\"0\",\"background\":\"rgba(255, 255, 255, 0.7)\",\"z-index\":\"100\"}},[_c('loading',{staticStyle:{\"position\":\"absolute\",\"top\":\"calc(50% - 25px)\",\"left\":\"calc(50% - 25px)\"},attrs:{\"size\":\"50\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Vue from \"vue\";\r\nimport { Component } from \"vue-property-decorator\";\r\nimport Loading from \"@/components/common/loading/loading.vue\";\r\n\r\n@Component({\r\n components: {\r\n Loading,\r\n },\r\n})\r\nexport default class extends Vue {}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PageLoading.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PageLoading.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PageLoading.vue?vue&type=template&id=7eeaed98&\"\nimport script from \"./PageLoading.vue?vue&type=script&lang=ts&\"\nexport * from \"./PageLoading.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}