\r\n new file here or Browse`\"\r\n :allow-multiple=\"false\"\r\n :instant-upload=\"true\"\r\n :allow-image-preview=\"false\"\r\n @addfilestart=\"beforeUpload\"\r\n @processfilestart=\"startUpload\"\r\n @processfileprogress=\"uploadProgress\"\r\n @processfile=\"docTempUploadComplete\"\r\n />\r\n
\r\n\r\n\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--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Guard.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!./Guard.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Guard.vue?vue&type=template&id=6a2b8904\"\nimport script from \"./Guard.vue?vue&type=script&lang=js\"\nexport * from \"./Guard.vue?vue&type=script&lang=js\"\nimport style0 from \"./Guard.vue?vue&type=style&index=0&id=6a2b8904&prod&lang=scss\"\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","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Guard.vue?vue&type=style&index=0&id=6a2b8904&prod&lang=scss\"","const defaultControls = {\n selectionUp: [38],\n selectionDown: [40],\n select: [13],\n hideList: [27],\n showList: [40],\n autocomplete: [32, 13]\n};\n\nconst modes = {\n input: String,\n select: Object\n};\n\nfunction fromPath(obj, path) {\n return path.split('.').reduce((o, i) => o === Object(o) ? o[i] : o, obj);\n}\n\nfunction hasKeyCode(arr, event) {\n return hasKeyCodeByCode(arr, event.keyCode);\n}\n\nfunction hasKeyCodeByCode(arr, keyCode) {\n if (arr.length <= 0) return false;\n\n const has = arr => arr.some(code => code === keyCode);\n if (Array.isArray(arr[0])) {\n return arr.some(array => has(array));\n } else {\n return has(arr);\n }\n}\n\nfunction _await(value, then, direct) {\n if (direct) {\n return then ? then(value) : value;\n }if (!value || !value.then) {\n value = Promise.resolve(value);\n }return then ? value.then(then) : value;\n}function _async(f) {\n return function () {\n for (var args = [], i = 0; i < arguments.length; i++) {\n args[i] = arguments[i];\n }try {\n return Promise.resolve(f.apply(this, args));\n } catch (e) {\n return Promise.reject(e);\n }\n };\n}function _empty() {}function _awaitIgnored(value, direct) {\n if (!direct) {\n return value && value.then ? value.then(_empty) : Promise.resolve();\n }\n}function _invoke(body, then) {\n var result = body();if (result && result.then) {\n return result.then(then);\n }return then(result);\n}function _invokeIgnored(body) {\n var result = body();if (result && result.then) {\n return result.then(_empty);\n }\n}\nfunction _catch(body, recover) {\n try {\n var result = body();\n } catch (e) {\n return recover(e);\n }if (result && result.then) {\n return result.then(void 0, recover);\n }return result;\n}function _finally(body, finalizer) {\n try {\n var result = body();\n } catch (e) {\n return finalizer();\n }if (result && result.then) {\n return result.then(finalizer, finalizer);\n }return finalizer();\n}var VueSimpleSuggest = {\n render: function () {\n var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: \"vue-simple-suggest\", class: [_vm.styles.vueSimpleSuggest, { designed: !_vm.destyled, focus: _vm.isInFocus }], on: { \"keydown\": function ($event) {\n if (!$event.type.indexOf('key') && _vm._k($event.keyCode, \"tab\", 9, $event.key, \"Tab\")) {\n return null;\n }_vm.isTabbed = true;\n } } }, [_c('div', { ref: \"inputSlot\", staticClass: \"input-wrapper\", class: _vm.styles.inputWrapper, attrs: { \"role\": \"combobox\", \"aria-haspopup\": \"listbox\", \"aria-owns\": _vm.listId, \"aria-expanded\": !!_vm.listShown && !_vm.removeList ? 'true' : 'false' } }, [_vm._t(\"default\", [_c('input', _vm._b({ staticClass: \"default-input\", class: _vm.styles.defaultInput, domProps: { \"value\": _vm.text || '' } }, 'input', _vm.$attrs, false))])], 2), _vm._v(\" \"), _c('transition', { attrs: { \"name\": \"vue-simple-suggest\" } }, [!!_vm.listShown && !_vm.removeList ? _c('ul', { staticClass: \"suggestions\", class: _vm.styles.suggestions, attrs: { \"id\": _vm.listId, \"role\": \"listbox\", \"aria-labelledby\": _vm.listId } }, [!!this.$scopedSlots['misc-item-above'] ? _c('li', { class: _vm.styles.miscItemAbove }, [_vm._t(\"misc-item-above\", null, { \"suggestions\": _vm.suggestions, \"query\": _vm.text })], 2) : _vm._e(), _vm._v(\" \"), _vm._l(_vm.suggestions, function (suggestion, index) {\n return _c('li', { key: _vm.getId(suggestion, index), staticClass: \"suggest-item\", class: [_vm.styles.suggestItem, {\n selected: _vm.isSelected(suggestion),\n hover: _vm.isHovered(suggestion)\n }], attrs: { \"role\": \"option\", \"aria-selected\": _vm.isHovered(suggestion) || _vm.isSelected(suggestion) ? 'true' : 'false', \"id\": _vm.getId(suggestion, index) }, on: { \"mouseenter\": function ($event) {\n return _vm.hover(suggestion, $event.target);\n }, \"mouseleave\": function ($event) {\n return _vm.hover(undefined);\n }, \"click\": function ($event) {\n return _vm.suggestionClick(suggestion, $event);\n } } }, [_vm._t(\"suggestion-item\", [_c('span', [_vm._v(_vm._s(_vm.displayProperty(suggestion)))])], { \"autocomplete\": function () {\n return _vm.autocompleteText(suggestion);\n }, \"suggestion\": suggestion, \"query\": _vm.text })], 2);\n }), _vm._v(\" \"), !!this.$scopedSlots['misc-item-below'] ? _c('li', { class: _vm.styles.miscItemBelow }, [_vm._t(\"misc-item-below\", null, { \"suggestions\": _vm.suggestions, \"query\": _vm.text })], 2) : _vm._e()], 2) : _vm._e()])], 1);\n },\n staticRenderFns: [],\n name: 'vue-simple-suggest',\n inheritAttrs: false,\n model: {\n prop: 'value',\n event: 'input'\n },\n props: {\n styles: {\n type: Object,\n default: () => ({})\n },\n controls: {\n type: Object,\n default: () => defaultControls\n },\n minLength: {\n type: Number,\n default: 1\n },\n maxSuggestions: {\n type: Number,\n default: 10\n },\n displayAttribute: {\n type: String,\n default: 'title'\n },\n valueAttribute: {\n type: String,\n default: 'id'\n },\n list: {\n type: [Function, Array],\n default: () => []\n },\n removeList: {\n type: Boolean,\n default: false\n },\n destyled: {\n type: Boolean,\n default: false\n },\n filterByQuery: {\n type: Boolean,\n default: false\n },\n filter: {\n type: Function,\n default(el, value) {\n return value ? ~this.displayProperty(el).toLowerCase().indexOf(value.toLowerCase()) : true;\n }\n },\n debounce: {\n type: Number,\n default: 0\n },\n nullableSelect: {\n type: Boolean,\n default: false\n },\n value: {},\n mode: {\n type: String,\n default: 'input',\n validator: value => !!~Object.keys(modes).indexOf(value.toLowerCase())\n },\n preventHide: {\n type: Boolean,\n default: false\n }\n },\n // Handle run-time mode changes (now working):\n watch: {\n mode: {\n handler(current, old) {\n this.constructor.options.model.event = current;\n\n // Can be null if the component is root\n this.$parent && this.$parent.$forceUpdate();\n\n this.$nextTick(() => {\n if (current === 'input') {\n this.$emit('input', this.text);\n } else {\n this.$emit('select', this.selected);\n }\n });\n },\n immediate: true\n },\n value: {\n handler(current) {\n if (typeof current !== 'string') {\n current = this.displayProperty(current);\n }\n this.updateTextOutside(current);\n },\n immediate: true\n }\n },\n //\n data() {\n return {\n selected: null,\n hovered: null,\n suggestions: [],\n listShown: false,\n inputElement: null,\n canSend: true,\n timeoutInstance: null,\n text: this.value,\n isPlainSuggestion: false,\n isClicking: false,\n isInFocus: false,\n isFalseFocus: false,\n isTabbed: false,\n controlScheme: {},\n listId: `${this._uid}-suggestions`\n };\n },\n computed: {\n listIsRequest() {\n return typeof this.list === 'function';\n },\n inputIsComponent() {\n return this.$slots.default && this.$slots.default.length > 0 && !!this.$slots.default[0].componentInstance;\n },\n input() {\n return this.inputIsComponent ? this.$slots.default[0].componentInstance : this.inputElement;\n },\n on() {\n return this.inputIsComponent ? '$on' : 'addEventListener';\n },\n off() {\n return this.inputIsComponent ? '$off' : 'removeEventListener';\n },\n hoveredIndex() {\n for (let i = 0; i < this.suggestions.length; i++) {\n const el = this.suggestions[i];\n if (this.hovered && this.valueProperty(this.hovered) == this.valueProperty(el)) {\n return i;\n }\n }\n return -1;\n },\n textLength() {\n return this.text && this.text.length || this.inputElement.value.length || 0;\n },\n isSelectedUpToDate() {\n return !!this.selected && this.displayProperty(this.selected) === this.text;\n }\n },\n created() {\n this.controlScheme = Object.assign({}, defaultControls, this.controls);\n },\n mounted: _async(function () {\n const _this = this;\n\n return _await(_this.$slots.default, function () {\n\n _this.$nextTick(() => {\n _this.inputElement = _this.$refs['inputSlot'].querySelector('input');\n\n if (_this.inputElement) {\n _this.setInputAriaAttributes();\n _this.prepareEventHandlers(true);\n } else {\n console.error('No input element found');\n }\n });\n });\n }),\n\n beforeDestroy() {\n this.prepareEventHandlers(false);\n },\n methods: {\n isEqual(suggestion, item) {\n return item && this.valueProperty(suggestion) == this.valueProperty(item);\n },\n isSelected(suggestion) {\n return this.isEqual(suggestion, this.selected);\n },\n isHovered(suggestion) {\n return this.isEqual(suggestion, this.hovered);\n },\n setInputAriaAttributes() {\n this.inputElement.setAttribute('aria-activedescendant', '');\n this.inputElement.setAttribute('aria-autocomplete', 'list');\n this.inputElement.setAttribute('aria-controls', this.listId);\n },\n prepareEventHandlers(enable) {\n const binder = this[enable ? 'on' : 'off'];\n const keyEventsList = {\n click: this.showSuggestions,\n keydown: this.onKeyDown,\n keyup: this.onListKeyUp\n };\n const eventsList = Object.assign({\n blur: this.onBlur,\n focus: this.onFocus,\n input: this.onInput\n }, keyEventsList);\n\n for (const event in eventsList) {\n this.input[binder](event, eventsList[event]);\n }\n\n const listenerBinder = enable ? 'addEventListener' : 'removeEventListener';\n\n for (const event in keyEventsList) {\n this.inputElement[listenerBinder](event, keyEventsList[event]);\n }\n },\n isScopedSlotEmpty(slot) {\n if (slot) {\n const vNode = slot(this);\n return !(Array.isArray(vNode) || vNode && (vNode.tag || vNode.context || vNode.text || vNode.children));\n }\n\n return true;\n },\n miscSlotsAreEmpty() {\n const slots = ['misc-item-above', 'misc-item-below'].map(s => this.$scopedSlots[s]);\n\n if (slots.every(s => !!s)) {\n return slots.every(this.isScopedSlotEmpty.bind(this));\n }\n\n const slot = slots.find(s => !!s);\n\n return this.isScopedSlotEmpty.call(this, slot);\n },\n getPropertyByAttribute(obj, attr) {\n return this.isPlainSuggestion ? obj : typeof obj !== undefined ? fromPath(obj, attr) : obj;\n },\n displayProperty(obj) {\n if (this.isPlainSuggestion) {\n return obj;\n }\n\n let display = this.getPropertyByAttribute(obj, this.displayAttribute);\n\n if (typeof display === 'undefined') {\n display = JSON.stringify(obj);\n\n if (process && ~process.env.NODE_ENV.indexOf('dev')) {\n console.warn('[vue-simple-suggest]: Please, provide `display-attribute` as a key or a dotted path for a property from your object.');\n }\n }\n\n return String(display || '');\n },\n valueProperty(obj) {\n if (this.isPlainSuggestion) {\n return obj;\n }\n\n const value = this.getPropertyByAttribute(obj, this.valueAttribute);\n\n if (typeof value === 'undefined') {\n console.error(`[vue-simple-suggest]: Please, check if you passed 'value-attribute' (default is 'id') and 'display-attribute' (default is 'title') props correctly.\n Your list objects should always contain a unique identifier.`);\n }\n\n return value;\n },\n\n autocompleteText(suggestion) {\n this.setText(this.displayProperty(suggestion));\n },\n setText(text) {\n this.$nextTick(() => {\n this.inputElement.value = text;\n this.text = text;\n this.$emit('input', text);\n });\n },\n select(item) {\n if (this.selected !== item || this.nullableSelect && !item) {\n this.selected = item;\n this.$emit('select', item);\n\n if (item) {\n this.autocompleteText(item);\n }\n }\n\n this.hover(null);\n },\n hover(item, elem) {\n const elemId = !!item ? this.getId(item, this.hoveredIndex) : '';\n\n this.inputElement.setAttribute('aria-activedescendant', elemId);\n\n if (item && item !== this.hovered) {\n this.$emit('hover', item, elem);\n }\n\n this.hovered = item;\n },\n hideList() {\n if (this.listShown) {\n this.listShown = false;\n this.hover(null);\n this.$emit('hide-list');\n }\n },\n showList() {\n if (!this.listShown) {\n if (this.textLength >= this.minLength && (this.suggestions.length > 0 || !this.miscSlotsAreEmpty())) {\n this.listShown = true;\n this.$emit('show-list');\n }\n }\n },\n showSuggestions: _async(function () {\n const _this2 = this;\n\n return _invoke(function () {\n if (_this2.suggestions.length === 0 && _this2.minLength <= _this2.textLength) {\n // try show misc slots while researching\n _this2.showList();\n return _awaitIgnored(_this2.research());\n }\n }, function () {\n\n _this2.showList();\n });\n }),\n\n onShowList(e) {\n if (hasKeyCode(this.controlScheme.showList, e)) {\n this.showSuggestions();\n }\n },\n moveSelection(e) {\n if (!this.listShown || !this.suggestions.length) return;\n if (hasKeyCode([this.controlScheme.selectionUp, this.controlScheme.selectionDown], e)) {\n e.preventDefault();\n\n const isMovingDown = hasKeyCode(this.controlScheme.selectionDown, e);\n const direction = isMovingDown * 2 - 1;\n const listEdge = isMovingDown ? 0 : this.suggestions.length - 1;\n const hoversBetweenEdges = isMovingDown ? this.hoveredIndex < this.suggestions.length - 1 : this.hoveredIndex > 0;\n\n let item = null;\n\n if (!this.hovered) {\n item = this.selected || this.suggestions[listEdge];\n } else if (hoversBetweenEdges) {\n item = this.suggestions[this.hoveredIndex + direction];\n } else /* if hovers on edge */{\n item = this.suggestions[listEdge];\n }\n this.hover(item);\n }\n },\n onKeyDown(e) {\n const select = this.controlScheme.select,\n hideList = this.controlScheme.hideList;\n\n // prevent form submit on keydown if Enter key registered in the keyup list\n if (e.key === 'Enter' && this.listShown && hasKeyCodeByCode([select, hideList], 13)) {\n e.preventDefault();\n }\n\n if (e.key === 'Tab' && this.hovered) {\n this.select(this.hovered);\n }\n\n this.onShowList(e);\n this.moveSelection(e);\n this.onAutocomplete(e);\n },\n onListKeyUp(e) {\n const select = this.controlScheme.select,\n hideList = this.controlScheme.hideList;\n\n if (this.listShown && hasKeyCode([select, hideList], e)) {\n e.preventDefault();\n if (hasKeyCode(select, e)) {\n this.select(this.hovered);\n }\n\n this.hideList();\n }\n },\n onAutocomplete(e) {\n if (hasKeyCode(this.controlScheme.autocomplete, e) && (e.ctrlKey || e.shiftKey) && this.suggestions.length > 0 && this.suggestions[0] && this.listShown) {\n e.preventDefault();\n this.hover(this.suggestions[0]);\n this.autocompleteText(this.suggestions[0]);\n }\n },\n suggestionClick(suggestion, e) {\n this.$emit('suggestion-click', suggestion, e);\n this.select(suggestion);\n\n if (!this.preventHide) this.hideList();\n\n if (this.isClicking) {\n setTimeout(() => {\n this.inputElement.focus();\n\n /// Ensure, that all needed flags are off before finishing the click.\n this.isClicking = false;\n }, 0);\n }\n },\n onBlur(e) {\n if (this.isInFocus) {\n\n /// Clicking starts here, because input's blur occurs before the suggestionClick\n /// and exactly when the user clicks the mouse button or taps the screen.\n this.isClicking = this.hovered && !this.isTabbed;\n\n if (!this.isClicking) {\n this.isInFocus = false;\n this.hideList();\n\n this.$emit('blur', e);\n } else if (e && e.isTrusted && !this.isTabbed) {\n this.isFalseFocus = true;\n }\n } else {\n this.inputElement.blur();\n console.error(`This should never happen!\n If you encountered this error, please make sure that your input component emits 'focus' events properly.\n For more info see https://github.com/KazanExpress/vue-simple-suggest#custom-input.\n\n If your 'vue-simple-suggest' setup does not include a custom input component - please,\n report to https://github.com/KazanExpress/vue-simple-suggest/issues/new`);\n }\n\n this.isTabbed = false;\n },\n onFocus(e) {\n this.isInFocus = true;\n\n // Only emit, if it was a native input focus\n if (e && !this.isFalseFocus) {\n this.$emit('focus', e);\n }\n\n // Show list only if the item has not been clicked (isFalseFocus indicates that click was made earlier)\n if (!this.isClicking && !this.isFalseFocus) {\n this.showSuggestions();\n }\n\n this.isFalseFocus = false;\n },\n onInput(inputEvent) {\n const value = !inputEvent.target ? inputEvent : inputEvent.target.value;\n\n this.updateTextOutside(value);\n this.$emit('input', value);\n },\n updateTextOutside(value) {\n if (this.text === value) {\n return;\n }\n\n this.text = value;\n if (this.hovered) this.hover(null);\n\n if (this.text.length < this.minLength) {\n this.hideList();\n return;\n }\n\n if (this.debounce) {\n clearTimeout(this.timeoutInstance);\n this.timeoutInstance = setTimeout(this.research, this.debounce);\n } else {\n this.research();\n }\n },\n research: _async(function () {\n const _this3 = this;\n\n return _finally(function () {\n return _catch(function () {\n return _invokeIgnored(function () {\n if (_this3.canSend) {\n _this3.canSend = false;\n // @TODO: fix when promises will be cancelable (never :D)\n let textBeforeRequest = _this3.text;\n return _await(_this3.getSuggestions(_this3.text), function (newList) {\n if (textBeforeRequest === _this3.text) {\n _this3.$set(_this3, 'suggestions', newList);\n }\n });\n }\n });\n }, function (e) {\n _this3.clearSuggestions();\n throw e;\n });\n }, function () {\n _this3.canSend = true;\n\n if (_this3.suggestions.length === 0 && _this3.miscSlotsAreEmpty()) {\n _this3.hideList();\n } else if (_this3.isInFocus) {\n _this3.showList();\n }\n\n return _this3.suggestions;\n });\n }),\n getSuggestions: _async(function (value) {\n const _this4 = this;\n\n value = value || '';\n\n if (value.length < _this4.minLength) {\n return [];\n }\n\n _this4.selected = null;\n\n // Start request if can\n if (_this4.listIsRequest) {\n _this4.$emit('request-start', value);\n }\n\n let nextIsPlainSuggestion = false;\n let result = [];\n return _finally(function () {\n return _catch(function () {\n return _invoke(function () {\n if (_this4.listIsRequest) {\n return _await(_this4.list(value), function (_this4$list) {\n result = _this4$list || [];\n });\n } else {\n result = _this4.list;\n }\n }, function () {\n\n // IFF the result is not an array (just in case!) - make it an array\n if (!Array.isArray(result)) {\n result = [result];\n }\n\n nextIsPlainSuggestion = typeof result[0] !== 'object' && typeof result[0] !== 'undefined' || Array.isArray(result[0]);\n\n if (_this4.filterByQuery) {\n result = result.filter(el => _this4.filter(el, value));\n }\n\n if (_this4.listIsRequest) {\n _this4.$emit('request-done', result);\n }\n });\n }, function (e) {\n if (_this4.listIsRequest) {\n _this4.$emit('request-failed', e);\n } else {\n throw e;\n }\n });\n }, function () {\n if (_this4.maxSuggestions) {\n result.splice(_this4.maxSuggestions);\n }\n\n _this4.isPlainSuggestion = nextIsPlainSuggestion;\n return result;\n });\n }),\n\n clearSuggestions() {\n this.suggestions.splice(0);\n },\n getId(value, i) {\n return `${this.listId}-suggestion-${this.isPlainSuggestion ? i : this.valueProperty(value) || i}`;\n }\n }\n};\n\nexport default VueSimpleSuggest;\n"],"sourceRoot":""}