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AAA,IAAgBD,EAAAA,EAAAA,GAAA,gBACtB,IAAKA,EAAAA,EAAAA,GAAA,0BAAAA,EAAAA,EAAAA,GAAA,uBAEE,EAAK,CAE/BE,UACJC,SAASC,iBAAiB,WAAYC,IACnB,UAAXA,EAAEC,MAAoBD,EAAEE,UACxBvC,KAAKY,UAAY,GACjBZ,KAAKI,SAAU,EACfJ,KAAKwC,WAAU,KACX,MAAMC,EAAQzC,KAAK0C,MAAM,uBACX,OAAVD,GAEAA,EAAME,O,OAK1B,CAEQC,oBAAoBP,GACxB,GAAIrC,KAAKY,UAAUiC,OAAS,GAAe,UAAVR,EAAES,IAAiB,CAChD9C,KAAKuB,gBAAiB,EACtB,MAAMwB,QAAqD/C,KAAKgD,GAAGC,gBAAgB,CAACjD,KAAKY,YACrFmC,EAAeF,OACfK,OAAOC,SAASC,KAAO,GAAGC,EAAAA,EAAmBC,UAAUC,iBAAiBC,mBAAmBxD,KAAKY,aAEhGZ,KAAKuB,gBAAiB,C,KAET,WAAVc,EAAES,MACT9C,KAAKI,SAAU,EAEvB,CAEQkB,QACJtB,KAAKI,SAAU,CACnB,GAtCiBwB,GAAW6B,EAAAA,EAAAA,IAAA,EAH/BC,EAAAA,EAAAA,IAAU,CACPjD,KAAM,iBAEWmB,G,UCTyc,I,wBCQ1d+B,GAAY,OACd,EACA7D,EACA6B,GACA,EACA,KACA,KACA,MAIF,QAAegC,EAAiB,O,kBChBhC,IAAIC,EAAU,EAAQ,OACnBA,EAAQC,aAAYD,EAAUA,EAAQE,SACnB,kBAAZF,IAAsBA,EAAU,CAAC,CAAChE,EAAOC,GAAI+D,EAAS,MAC7DA,EAAQG,SAAQnE,EAAOoE,QAAUJ,EAAQG,QAE5C,IAAIE,EAAM,WACGA,EAAI,WAAYL,GAAS,EAAM,CAAC,WAAY,EAAM,YAAa,G","sources":["webpack://website-js/./src/components/go-to-product/GoToProduct.vue?e8db","webpack://website-js/./src/components/go-to-product/GoToProduct.vue","webpack://website-js/./src/components/go-to-product/GoToProduct.vue?6906","webpack://website-js/./src/components/go-to-product/GoToProduct.vue?d6ae","webpack://website-js/./src/components/go-to-product/GoToProduct.vue?4332","webpack://website-js/./src/components/go-to-product/GoToProduct.vue?550e"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.go-to-product{position:fixed;top:0;left:0;bottom:0;right:0;background:#0006;z-index:1022;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none}.go-to-product.display{opacity:1;pointer-events:inherit}.go-to-product-search-container{background:#fff;padding:10px}.go-to-product-search-container .uk-inline{width:400px}.go-to-product-no-product-found{margin-top:5px}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.display)?_c('div',{staticClass:\"go-to-product\",class:{ 'display': _vm.display }},[_c('div',{staticClass:\"go-to-product-search-container cbx-border\"},[_c('div',{staticClass:\"uk-inline\"},[_c('span',{staticClass:\"uk-form-icon\",attrs:{\"uk-icon\":\"icon: search\"}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.productId),expression:\"productId\"}],ref:\"go-to-product-input\",staticClass:\"uk-input uk-input-large\",attrs:{\"type\":\"text\",\"placeholder\":_vm.$t('search.insert-product-id', ['Insert product ID'])},domProps:{\"value\":(_vm.productId)},on:{\"keydown\":_vm.handleKeyDown,\"input\":function($event){if($event.target.composing)return;_vm.productId=$event.target.value}}})]),_c('button',{staticClass:\"uk-button uk-button-default uk-margin-small-left cbx-border\",on:{\"click\":_vm.close}},[_c('span',{attrs:{\"uk-icon\":\"icon: close; ratio: .9\"}})]),(_vm.noProductFound)?_c('div',{staticClass:\"go-to-product-no-product-found uk-alert uk-alert-primary uk-margin-remove-bottom\"},[_vm._v(\" \"+_vm._s(_vm.$t('search.product-id-not-found', ['Could not find product ID']))+\" \")]):_vm._e()])]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\nimport { ProductSearchResultProduct } from '@/models/Product';\r\nimport ProductService from '@/services/ProductService';\r\nimport { CbxVariablesModule } from '@/store/modules/CbxVariablesModule';\r\nimport { Component, Vue } from 'vue-property-decorator';\r\n\r\n@Component({\r\n name: 'GoToProduct',\r\n})\r\nexport default class GoToProduct extends Vue {\r\n private ps: ProductService = new ProductService();\r\n private display: boolean = false;\r\n private productId: string;\r\n private noProductFound: boolean = false;\r\n\r\n private created() {\r\n document.addEventListener('keydown', (e: KeyboardEvent) => {\r\n if (e.code === 'Space' && e.ctrlKey) {\r\n this.productId = '';\r\n this.display = true;\r\n this.$nextTick(() => {\r\n const input = this.$refs['go-to-product-input'];\r\n if (input !== null) {\r\n // @ts-ignore\r\n input.focus();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n private async handleKeyDown(e: KeyboardEvent) {\r\n if (this.productId.length > 0 && e.key === 'Enter') {\r\n this.noProductFound = false;\r\n const productReponse: ProductSearchResultProduct[] = await this.ps.getProductsById([this.productId]);\r\n if (productReponse.length) {\r\n window.location.href = `${CbxVariablesModule.VARIABLES.homepage}?goto=${encodeURIComponent(this.productId)}`;\r\n } else {\r\n this.noProductFound = true;\r\n }\r\n } else if (e.key === 'Escape') {\r\n this.display = false;\r\n }\r\n }\r\n\r\n private close() {\r\n this.display = false;\r\n }\r\n\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??clonedRuleSet-41.use[0]!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??clonedRuleSet-41.use[3]!../../../node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!../../../node_modules/@vue/cli-service/lib/config/vue-loader-v15-resolve-compat/vue-loader.js??vue-loader-options!./GoToProduct.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??clonedRuleSet-41.use[0]!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??clonedRuleSet-41.use[3]!../../../node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!../../../node_modules/@vue/cli-service/lib/config/vue-loader-v15-resolve-compat/vue-loader.js??vue-loader-options!./GoToProduct.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./GoToProduct.vue?vue&type=template&id=20c5a084&\"\nimport script from \"./GoToProduct.vue?vue&type=script&lang=ts&\"\nexport * from \"./GoToProduct.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./GoToProduct.vue?vue&type=style&index=0&id=20c5a084&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/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","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!../../../node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!../../../node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!../../../node_modules/@vue/cli-service/lib/config/vue-loader-v15-resolve-compat/vue-loader.js??vue-loader-options!./GoToProduct.vue?vue&type=style&index=0&id=20c5a084&prod&lang=scss&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"46731eb1\", content, true, {\"sourceMap\":false,\"shadowMode\":false});"],"names":["___CSS_LOADER_EXPORT___","push","module","id","render","_vm","this","_c","_self","_setupProxy","display","staticClass","class","attrs","directives","name","rawName","value","productId","expression","ref","$t","domProps","on","handleKeyDown","$event","target","composing","close","noProductFound","_v","_s","_e","staticRenderFns","GoToProduct","Vue","constructor","args","_defineProperty","ProductService","created","document","addEventListener","e","code","ctrlKey","$nextTick","input","$refs","focus","async","length","key","productReponse","ps","getProductsById","window","location","href","CbxVariablesModule","VARIABLES","homepage","encodeURIComponent","__decorate","Component","component","content","__esModule","default","locals","exports","add"],"sourceRoot":""}