{"version":3,"sources":["webpack:///D:/JenkinsWorkspace/workspace/vas-multipay-front-pipeline/vas-common-js/services/i18n/Localizer.vue","webpack:///../../vas-common-js/services/i18n/Localizer.vue","webpack:///D:/JenkinsWorkspace/workspace/vas-multipay-front-pipeline/vas-common-js/services/i18n/Localizer.vue?5605","webpack:///D:/JenkinsWorkspace/workspace/vas-multipay-front-pipeline/vas-common-js/services/i18n/Localizer.vue?071b","webpack:///D:/JenkinsWorkspace/workspace/vas-multipay-front-pipeline/vas-common-js/services/i18n/Localizer.vue?b907"],"names":["render","_vm","this","_c","_self","uiTranslationsLoaded","alternativeFullPage","_t","setLocale","staticClass","_e","staticRenderFns","config","require","name","props","translationsPath","type","String","default","savePreferredLanguage","Function","console","warn","localeCookieName","Boolean","data","locale","watch","currentLocale","mounted","getLocaleCode","methods","setPreferredLanguage","_this","newLocale","dateFormattingCountryCode","substring","toLowerCase","$store","dispatch","isoCountryCode","$cookie","set","setUiLocale","then","Vue","prototype","$t","t","window","document","documentElement","lang","eventHub","$emit","catch","err","debug","error","isValidLocale","cookieLocale","get","defaultLocale","component"],"mappings":"4VAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAQF,EAAII,qBAAsBF,EAAG,MAAM,CAAEF,EAAIK,oBAAqBL,EAAIM,GAAG,gCAAgC,KAAK,CAAC,UAAYN,EAAIO,YAAYL,EAAG,MAAM,CAACM,YAAY,OAAO,CAACN,EAAG,MAAM,CAACM,YAAY,YAAY,CAACR,EAAIM,GAAG,eAAe,GAAGJ,EAAG,MAAM,CAACM,YAAY,eAAe,CAACR,EAAIM,GAAG,cAAcN,EAAIM,GAAG,OAAO,KAAK,CAAC,UAAYN,EAAIO,aAAa,MAAM,GAAGP,EAAIS,MAE1ZC,EAAkB,G,6CC4BtBC,EAAAC,EAAA,QAEe,GACfC,KAAA,YACAC,MAAA,CACAC,iBAAA,CACAC,KAAAC,OACAC,QAAA,uBAEAC,sBAAA,CACAH,KAAAI,SACAF,QAAA,WAEAG,QAAAC,KAAA,oDAGAC,iBAAA,CACAP,KAAAC,OACAC,QAAA,iBAEAb,oBAAA,CACAW,KAAAQ,QACAN,SAAA,IAGAO,KAAA,WACA,OACAC,OAAA,KACAtB,sBAAA,IAGAuB,MAAA,CACAD,OAAA,WACA,KAAAA,SAAAE,kBACA,KAAArB,UAAA,KAAAmB,UAIAG,QAAA,WACA,KAAAH,OAAA,KAAAnB,UAAA,KAAAuB,kBAEAC,QAAA,CACAxB,UAAA,SAAAmB,EAAAM,GAAA,IAAAC,EAAA,KACA,IAAAP,OAAAE,iBAAA,CAEA,KAAAxB,sBAAA,EACA,IAAA8B,EAAA,KAAAJ,cAAAJ,GACAS,EAAAD,EAAAE,UAAA,KAAAC,cACA,KAAAC,OAAAC,SAAA,+BAAAJ,GACA,IAAAK,EAAAN,EAAAE,UAAA,KACA,KAAAE,OAAAC,SAAA,oBAAAC,GACA,KAAAC,QAAAC,IAAA,KAAAnB,iBAAAW,GAEAS,eAAAT,EAAA,KAAAnB,iBAAAiB,EAAA,KAAAb,uBACAyB,MAAA,WACAC,IAAAC,UAAAC,GAAAC,OAEAf,EAAA7B,sBAAA,EACA6C,OAAAC,SAAAC,gBAAAC,KAAA1B,EACA2B,OAAAC,MAAA,8BAEAC,OAAA,SAAAC,GAEA7C,EAAA8C,OAAApC,QAAAqC,MAAAF,QAGA1B,cAAA,SAAAI,GACA,GAAAA,GAAAyB,eAAAzB,GAAA,OAAAA,EAEA,IAAA0B,EAAA,KAAAnB,QAAAoB,IAAA,KAAAtC,kBACA,OAAAoC,eAAAC,KAAAE,UCpGmf,I,wBCQ/eC,EAAY,eACd,EACAhE,EACAW,GACA,EACA,KACA,WACA,MAIa,aAAAqD,E,6CCnBf","file":"js/chunk-2278e9fe.62577816.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.uiTranslationsLoaded)?_c('div',[(_vm.alternativeFullPage)?_vm._t(\"alternative-full-page-content\",null,{\"setLocale\":_vm.setLocale}):_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-auto\"},[_vm._t(\"navigation\")],2),_c('div',{staticClass:\"col content\"},[_vm._t(\"breadcrumb\"),_vm._t(\"main\",null,{\"setLocale\":_vm.setLocale})],2)])],2):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n  <div v-if=\"uiTranslationsLoaded\">\r\n    <slot\r\n      v-if=\"alternativeFullPage\"\r\n      name=\"alternative-full-page-content\" \r\n      :set-locale=\"setLocale\" \r\n    />\r\n    <div \r\n      v-else\r\n      class=\"row\"\r\n    >\r\n      <div class=\"col-auto\">\r\n        <slot name=\"navigation\" />\r\n      </div>\r\n      <div class=\"col content\">\r\n        <slot name=\"breadcrumb\" />\r\n        <slot \r\n          name=\"main\" \r\n          :set-locale=\"setLocale\" \r\n        />\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nimport Vue from 'vue';\r\nimport { isValidLocale, defaultLocale, setUiLocale, t, currentLocale } from './index';\r\nimport { eventHub } from '../../util';\r\n\r\nconst config = require('../../config.json');\r\n\r\nexport default {\r\n  name: 'Localizer',\r\n  props: {\r\n    translationsPath: {\r\n      type: String,\r\n      default: 'static/translations',\r\n    },\r\n    savePreferredLanguage: {\r\n      type: Function,\r\n      default: function () {\r\n        /* eslint-disable-next-line no-console */\r\n        console.warn('Calling default savePreferredLanguage function');\r\n      },\r\n    },\r\n    localeCookieName: {\r\n      type: String,\r\n      default: 'camUiLanguage',\r\n    },\r\n    alternativeFullPage: {\r\n      type: Boolean,\r\n      default: false\r\n    }\r\n  },\r\n  data() {\r\n    return {\r\n      locale: null,\r\n      uiTranslationsLoaded: false,\r\n    };\r\n  },\r\n  watch: {\r\n    locale() {\r\n      if (this.locale !== currentLocale()) {\r\n        this.setLocale(this.locale);\r\n      }\r\n    },\r\n  },\r\n  mounted() {\r\n    this.locale = this.setLocale(this.getLocaleCode());\r\n  },\r\n  methods: {\r\n    setLocale(locale, setPreferredLanguage) {\r\n      if (locale && locale === currentLocale()) return;\r\n\r\n      this.uiTranslationsLoaded = false;\r\n      const newLocale = this.getLocaleCode(locale);\r\n      const dateFormattingCountryCode = newLocale.substring(0, 2).toLowerCase();\r\n      this.$store.dispatch('setdateFormattingCountryCode', dateFormattingCountryCode);\r\n      const isoCountryCode = newLocale.substring(3, 5);\r\n      this.$store.dispatch('setisoCountryCode', isoCountryCode);\r\n      this.$cookie.set(this.localeCookieName, newLocale);\r\n\r\n      setUiLocale(newLocale, this.translationsPath, setPreferredLanguage, this.savePreferredLanguage)\r\n        .then(() => {\r\n          Vue.prototype.$t = t;\r\n\r\n          this.uiTranslationsLoaded = true;\r\n          window.document.documentElement.lang = locale;\r\n          eventHub.$emit('uiTranslationsLoaded', true);\r\n        })\r\n        .catch((err) => {\r\n          /* eslint-disable-next-line no-console */\r\n          if (config.debug) console.error(err);\r\n        });\r\n    },\r\n    getLocaleCode(newLocale) {\r\n      if (newLocale && isValidLocale(newLocale)) return newLocale;\r\n\r\n      let cookieLocale = this.$cookie.get(this.localeCookieName);\r\n      return isValidLocale(cookieLocale) ? cookieLocale : defaultLocale;\r\n    },\r\n  },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n@media screen and (min-width: 1200px) {\r\n  .row {\r\n    justify-content: center;\r\n    flex-wrap: nowrap;\r\n  }\r\n  .content {\r\n    min-width: 1070px;\r\n  }\r\n}\r\n@media screen and (max-width: 1200px) {\r\n  .row {\r\n    display: block;\r\n  }\r\n}\r\n</style>\r\n","import mod from \"-!../../../vas-multipay-front/ClientApp/node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../vas-multipay-front/ClientApp/node_modules/thread-loader/dist/cjs.js!../../../vas-multipay-front/ClientApp/node_modules/babel-loader/lib/index.js!../../../vas-multipay-front/ClientApp/node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../vas-multipay-front/ClientApp/node_modules/vue-loader/lib/index.js??vue-loader-options!./Localizer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../vas-multipay-front/ClientApp/node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../vas-multipay-front/ClientApp/node_modules/thread-loader/dist/cjs.js!../../../vas-multipay-front/ClientApp/node_modules/babel-loader/lib/index.js!../../../vas-multipay-front/ClientApp/node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../vas-multipay-front/ClientApp/node_modules/vue-loader/lib/index.js??vue-loader-options!./Localizer.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Localizer.vue?vue&type=template&id=7fc10ad7&scoped=true&\"\nimport script from \"./Localizer.vue?vue&type=script&lang=js&\"\nexport * from \"./Localizer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Localizer.vue?vue&type=style&index=0&id=7fc10ad7&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vas-multipay-front/ClientApp/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"7fc10ad7\",\n  null\n  \n)\n\nexport default component.exports","export * from \"-!../../../vas-multipay-front/ClientApp/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../vas-multipay-front/ClientApp/node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../vas-multipay-front/ClientApp/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../vas-multipay-front/ClientApp/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../vas-multipay-front/ClientApp/node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../vas-multipay-front/ClientApp/node_modules/vue-loader/lib/index.js??vue-loader-options!./Localizer.vue?vue&type=style&index=0&id=7fc10ad7&prod&scoped=true&lang=css&\""],"sourceRoot":""}