{"version":3,"sources":["webpack:///./src/components/_global/DataFetcher.vue?0fc9","webpack:///./src/components/_global/DataFetcher.vue?77e7","webpack:///./src/components/_global/DataFetcher.vue","webpack:///./src/components/_global/DataFetcher.vue?6448","webpack:///./src/components/_global/DataFetcher.vue?d9b7","webpack:///./src/AppTeamLayout.vue?4af3","webpack:///./src/AppTeamLayout.vue","webpack:///./src/AppTeamLayout.vue?cdc9","webpack:///./src/AppTeamLayout.vue?80c2"],"names":["render","_vm","this","_h","$createElement","_c","_self","_t","_v","attrs","loading","silentLoading","on","handleLoad","_s","hideLoading","staticClass","staticRenderFns","useSilentLoading","handleSecondaryLoad","$emit","fetchData","error","secondaryFetchData","type","Function","required","Boolean","default","component","fetch","currentTeam","isLoading","_e","teamModule","teamInfos","$route","meta","$team","$teamHub","startSignalR","id","connectToGuild","stopSignalR","State","components","DataFetcher"],"mappings":"gHAAA,W,kCCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAQF,EAAS,MAAEI,EAAG,MAAM,CAACJ,EAAIM,GAAG,WAAU,WAAW,MAAO,CAACF,EAAG,IAAI,CAACJ,EAAIO,GAAG,iDAAgDH,EAAG,SAAS,CAACI,MAAM,CAAC,SAAWR,EAAIS,SAAWT,EAAIU,eAAeC,GAAG,CAAC,MAAQX,EAAIY,aAAa,CAACZ,EAAIO,GAAG,SAASP,EAAIa,GAAGb,EAAIS,QAAU,cAAgB,SAAS,WAAW,IAAIT,EAAIS,SAAYT,EAAIU,eAAkBV,EAAIc,YAAyEV,EAAG,MAAM,CAACW,YAAY,eAAe,CAACf,EAAIM,GAAG,YAAY,GAArHF,EAAG,MAAM,CAACW,YAAY,eAAe,CAACX,EAAG,gBAAgB,IACjfY,EAAkB,G,imBC8BtB,IAAqB,EAArB,ugBA6BW,GA7BX,kDA8BiB,GA9BjB,0CA+BS,GA/BT,yGAiCC,8GACOf,KAAKW,aADZ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8B,cAAgB9B,EAAI+B,UAAW3B,EAAG,eAAeJ,EAAIgC,MAAM,IAClOhB,EAAkB,G,ynBC0BtB,IAAMiB,EAAa,eAAU,QAKR,EAArB,4ZAgBC,kIAhBD,qIAmBC,kHACOC,EAAYjC,KAAKkC,OAAOC,KAAKF,UADpC,SAEOjC,KAAKoC,MAAMR,MAAMK,GAFxB,uBAIOjC,KAAKqC,SAASC,aAAd,wCAA2B,kGAC5BL,EAAUM,GADkB,gCAEzB,EAAKF,SAASG,eAAeP,EAAUM,IAFd,4CAJlC,gDAnBD,yIA8BC,8GACOvC,KAAKqC,SAASI,cADrB,gDA9BD,8DAA2C,QAS1C,gBADCT,EAAWU,MAAM,S,kCAIlB,gBADCV,EAAWU,MAAM,c,gCAXE,EAAa,gBAHjC,eAAU,CACVC,WAAY,CAACC,cAAA,SAEO,WChCiW,I,YCOlXjB,EAAY,eACd,EACA7B,EACAiB,GACA,EACA,KACA,KACA,MAIa,aAAAY,E","file":"dist/js/chunk-58d0691a.e1799e93.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error)?_c('div',[_vm._t(\"message\",function(){return [_c('p',[_vm._v(\"Something went wrong. Please try again.\")])]}),_c('button',{attrs:{\"disabled\":_vm.loading || _vm.silentLoading},on:{\"click\":_vm.handleLoad}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.loading ? \"Retrying...\" : \"Retry\")+\"\\n\\t\")])],2):(_vm.loading && !_vm.silentLoading && !_vm.hideLoading)?_c('div',{staticClass:\"fill-height\"},[_c('app-loading')],1):_c('div',{staticClass:\"fill-height\"},[_vm._t(\"default\")],2)}\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\n\n\n\n\n\n\n\n\nimport { Vue, Component, Prop, Watch } from \"vue-property-decorator\";\n\n@Component\nexport default class DataFetcher extends Vue {\n\t@Prop() id?: string; // ID passed as a prop (from route)\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: true\n\t})\n\treadonly fetchData!: () => Promise;\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: false\n\t})\n\treadonly secondaryFetchData?: () => Promise;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly useSilentLoading!: boolean;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly hideLoading!: boolean;\n\n\tloading = false;\n\tsilentLoading = false;\n\terror = false;\n\n\tasync created() {\n\t\tawait this.handleLoad();\n\t}\n\n\n\t// Watch for route param changes (id change)\n\t@Watch(\"id\")\n\tasync onIdChange() {\n\t\tif (this.useSilentLoading) {\n\t\t\tthis.silentLoading = true;\n\t\t}\n\t\tawait this.handleSecondaryLoad();\n\t}\n\n\tasync handleLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tawait this.fetchData();\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n\n\tasync handleSecondaryLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tif (this.secondaryFetchData) {\n\t\t\t\tawait this.secondaryFetchData();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tawait this.fetchData();\n\t\t\t}\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n}\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!./DataFetcher.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!./DataFetcher.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataFetcher.vue?vue&type=template&id=452e8cc9&scoped=true&\"\nimport script from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"\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 \"452e8cc9\",\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('data-fetcher',{attrs:{\"fetch-data\":_vm.fetch,\"hide-loading\":\"\"}},[(_vm.currentTeam && !_vm.isLoading)?_c('router-view'):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\nimport { Component, Vue } from \"vue-property-decorator\";\nimport { namespace } from \"vuex-class\";\n\n/**\n * Helpers\n */\n\n/**\n * Utils\n */\n\n/**\n * API\n */\nimport { GetOneTeamResponse } from \"@/api/teams/get-one-team.response\";\nimport DataFetcher from \"@/components/_global/DataFetcher.vue\";\n\n/**\n * VueX Modules\n */\nconst teamModule = namespace(\"team\");\n\n@Component({\n\tcomponents: {DataFetcher}\n})\nexport default class AppTeamLayout extends Vue {\n\t/// Injections\n\n\t/// Properties\n\n\t/// Attributes\n\n\t/// VueX Modules\n\t@teamModule.State(\"team\")\n\tcurrentTeam!: GetOneTeamResponse;\n\n\t@teamModule.State(\"isLoading\")\n\tisLoading!: boolean;\n\n\n\t/// Methods\n\tasync created() {\n\t}\n\n\tasync fetch() {\n\t\tconst teamInfos = this.$route.meta.teamInfos;\n\t\tawait this.$team.fetch(teamInfos);\n\t\t\n\t\tawait this.$teamHub.startSignalR(async () => {\n\t\t\tif (teamInfos.id) {\n\t\t\t\tawait this.$teamHub.connectToGuild(teamInfos.id);\n\t\t\t}\n\t\t});\n\t}\n\n\tasync destroyed() {\n\t\tawait this.$teamHub.stopSignalR();\n\t}\n}\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!./AppTeamLayout.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!./AppTeamLayout.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AppTeamLayout.vue?vue&type=template&id=38d62f71&\"\nimport script from \"./AppTeamLayout.vue?vue&type=script&lang=ts&\"\nexport * from \"./AppTeamLayout.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":""}