{"version":3,"sources":["webpack:///./src/components/Tournament/JProps/JsonPropsEditor.vue?a17a","webpack:///src/components/Tournament/JProps/JsonPropsEditor.vue","webpack:///./src/components/Tournament/JProps/JsonPropsEditor.vue?c263","webpack:///./src/components/Tournament/JProps/JsonPropsEditor.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","loading","staticClass","_v","on","$event","stopPropagation","init","valid","model","value","callback","$$v","jprops","expression","prettyPrint","scopedSlots","_u","key","fn","ref","_g","staticStyle","onSaveClick","_e","staticRenderFns","props","data","computed","JSON","parse","dirty","methods","stringify","tournament","jProps","saveJProps","watch","active","mounted","component","VBtn","VCard","VContainer","VFabTransition","VIcon","VRow","VSpacer","VTextarea","VTooltip"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,MAAM,CAAC,KAAO,GAAG,KAAO,KAAK,CAACF,EAAG,cAAc,CAACE,MAAM,CAAC,MAAQN,EAAIO,WAAWH,EAAG,cAAc,CAACE,MAAM,CAAC,MAAQ,KAAK,CAACF,EAAG,QAAQ,CAACE,MAAM,CAAC,MAAQ,GAAG,QAAU,kBAAkB,CAACF,EAAG,OAAO,CAACI,YAAY,SAAS,CAACR,EAAIS,GAAG,gBAAgBL,EAAG,YAAYA,EAAG,QAAQ,CAACE,MAAM,CAAC,MAAQ,SAAS,KAAO,GAAG,KAAO,IAAII,GAAG,CAAC,MAAQ,SAASC,GAAiC,OAAzBA,EAAOC,kBAAyBZ,EAAIa,KAAKF,MAAW,CAACP,EAAG,SAAS,CAACJ,EAAIS,GAAG,sBAAsB,IAAI,GAAGL,EAAG,QAAQ,CAACE,MAAM,CAAC,MAAQ,KAAK,CAACF,EAAG,aAAa,CAACE,MAAM,CAAC,KAAO,YAAY,MAAQ,SAAS,YAAY,GAAG,iBAAiBN,EAAIc,MAAQ,GAAK,eAAe,SA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2d0e1400.dd2df06d.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-card',{attrs:{\"tile\":\"\",\"flat\":\"\"}},[_c('loading-bar',{attrs:{\"value\":_vm.loading}}),_c('v-container',{attrs:{\"fluid\":\"\"}},[_c('v-row',{attrs:{\"dense\":\"\",\"justify\":\"space-between\"}},[_c('span',{staticClass:\"title\"},[_vm._v(\"Json Props\")]),_c('v-spacer'),_c('v-btn',{attrs:{\"color\":\"color3\",\"text\":\"\",\"icon\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.init($event)}}},[_c('v-icon',[_vm._v(\"fas fa-sync-alt\")])],1)],1),_c('v-row',{attrs:{\"dense\":\"\"}},[_c('v-textarea',{attrs:{\"name\":\"input-7-1\",\"label\":\"jProps\",\"auto-grow\":\"\",\"error-messages\":_vm.valid ? [] : 'Invalid JSON',\"disabled\":_vm.loading},model:{value:(_vm.jprops),callback:function ($$v) {_vm.jprops=$$v},expression:\"jprops\"}})],1),_c('v-row',{staticClass:\"justify-end\",attrs:{\"dense\":\"\"}},[_c('v-btn',{attrs:{\"color\":\"color3\",\"text\":\"\",\"icon\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.prettyPrint($event)}}},[_c('v-icon',[_vm._v(\"fas fa-brackets-curly\")])],1)],1)],1),(_vm.dirty)?[_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-fab-transition',[_c('v-btn',_vm._g({key:\"save\",staticStyle:{\"margin-right\":\"120px\"},attrs:{\"color\":\"success white--text\",\"fab\":\"\",\"bottom\":\"\",\"right\":\"\",\"fixed\":\"\",\"disabled\":!_vm.valid,\"loading\":_vm.loading},on:{\"click\":function($event){$event.stopPropagation();return _vm.onSaveClick($event)}}},on),[_c('v-icon',[_vm._v(\"fas fa-save\")])],1)],1)]}}],null,false,4161750845)},[_c('span',[_vm._v(\"Save\")])]),_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-fab-transition',[_c('v-btn',_vm._g({staticStyle:{\"margin-right\":\"60px\"},attrs:{\"color\":\"error white--text\",\"fab\":\"\",\"bottom\":\"\",\"right\":\"\",\"fixed\":\"\",\"disabled\":_vm.loading},on:{\"click\":function($event){$event.stopPropagation();return _vm.init($event)}}},on),[_c('v-icon',[_vm._v(\"fas fa-times\")])],1)],1)]}}],null,false,2017401159)},[_c('span',[_vm._v(\"Cancel\")])])]:_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n  <v-card tile flat>\r\n    <loading-bar :value=\"loading\"></loading-bar>\r\n    <v-container fluid>\r\n      <v-row dense justify=\"space-between\">\r\n          <span class=\"title\">Json Props</span>\r\n          <v-spacer></v-spacer>\r\n          <v-btn color=\"color3\" text icon @click.stop=\"init\">\r\n            <v-icon>fas fa-sync-alt</v-icon>\r\n          </v-btn>\r\n      </v-row>\r\n      <v-row dense>\r\n        <v-textarea\r\n          name=\"input-7-1\"\r\n          label=\"jProps\"\r\n          v-model=\"jprops\"\r\n          auto-grow\r\n          :error-messages=\"valid ? [] : 'Invalid JSON'\"\r\n          :disabled=\"loading\"\r\n        ></v-textarea>\r\n      </v-row>\r\n      <v-row dense class=\"justify-end\">\r\n        <v-btn color=\"color3\" text icon @click.stop=\"prettyPrint\">\r\n          <v-icon>fas fa-brackets-curly</v-icon>\r\n        </v-btn>\r\n      </v-row>\r\n    </v-container>\r\n    <template v-if=\"dirty\">\r\n      <v-tooltip top>\r\n        <span>Save</span>\r\n        <template v-slot:activator=\"{ on }\">\r\n          <v-fab-transition>\r\n            <v-btn\r\n              v-on=\"on\"\r\n              color=\"success white--text\"\r\n              key=\"save\"\r\n              fab\r\n              bottom\r\n              right\r\n              fixed\r\n              style=\"margin-right: 120px\"\r\n              @click.stop=\"onSaveClick\"\r\n              :disabled=\"!valid\"\r\n              :loading=\"loading\"\r\n            >\r\n              <v-icon>fas fa-save</v-icon>\r\n            </v-btn>\r\n          </v-fab-transition>\r\n        </template>\r\n      </v-tooltip>\r\n      <v-tooltip top>\r\n        <span>Cancel</span>\r\n        <template v-slot:activator=\"{ on }\">\r\n          <v-fab-transition>\r\n            <v-btn\r\n              v-on=\"on\"\r\n              color=\"error white--text\"\r\n              fab\r\n              bottom\r\n              right\r\n              fixed\r\n              style=\"margin-right: 60px\"\r\n              @click.stop=\"init\"\r\n              :disabled=\"loading\"\r\n            >\r\n              <v-icon>fas fa-times</v-icon>\r\n            </v-btn>\r\n          </v-fab-transition>\r\n        </template>\r\n      </v-tooltip>\r\n    </template>\r\n  </v-card>\r\n</template>\r\n\r\n<script>\r\nimport { mapGetters } from 'vuex'\r\nexport default {\r\n  props: ['active'],\r\n  data () {\r\n    return {\r\n      loading: false,\r\n      jprops: null\r\n    }\r\n  },\r\n  computed: {\r\n    ...mapGetters(['tournament']),\r\n    valid () {\r\n      try {\r\n        JSON.parse(this.jprops)\r\n        return true\r\n      } catch (e) {\r\n        return false\r\n      }\r\n    },\r\n    dirty () {\r\n      if (!this.valid) return true\r\n      return (JSON.stringify(JSON.parse(this.jprops)) !== JSON.stringify(this.tournament.jProps))\r\n    }\r\n  },\r\n  methods: {\r\n    init () {\r\n      this.jprops = JSON.stringify(this.tournament.jProps, null, 2)\r\n    },\r\n    prettyPrint () {\r\n      this.jprops = JSON.stringify(JSON.parse(this.jprops), null, 2)\r\n    },\r\n    onSaveClick () {\r\n      this.loading = true\r\n      this.tournament.jProps = JSON.parse(this.jprops)\r\n      this.tournament.saveJProps()\r\n        .catch(e => console.log(e.response))\r\n        .finally(() => { this.loading = false })\r\n    }\r\n  },\r\n  watch: {\r\n    active: 'init'\r\n  },\r\n  mounted () {\r\n    this.init()\r\n  }\r\n}\r\n</script>\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--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./JsonPropsEditor.vue?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--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./JsonPropsEditor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./JsonPropsEditor.vue?vue&type=template&id=941c6658&\"\nimport script from \"./JsonPropsEditor.vue?vue&type=script&lang=js&\"\nexport * from \"./JsonPropsEditor.vue?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\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VFabTransition } from 'vuetify/lib/components/transitions';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextarea } from 'vuetify/lib/components/VTextarea';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VBtn,VCard,VContainer,VFabTransition,VIcon,VRow,VSpacer,VTextarea,VTooltip})\n"],"sourceRoot":""}