{"version":3,"sources":["webpack:///./src/mixins/getData.js","webpack:///./src/components/forms/autocompletes/AutocompleteDataEstados.vue?a986","webpack:///src/components/forms/autocompletes/AutocompleteDataEstados.vue","webpack:///./src/components/forms/autocompletes/AutocompleteDataEstados.vue?698d","webpack:///./src/components/forms/autocompletes/AutocompleteDataEstados.vue","webpack:///../../../src/components/VAutocomplete/VAutocomplete.ts"],"names":["data","cargando","estados","municipios","methods","_handleError","err","this","$emit","_getAll","whatToGet","params","$http","get","$headers","status","body","res","_getEdos","then","_getMpios","a","render","_vm","_h","$createElement","_c","_self","staticClass","isSelect","attrs","error","label","Math","random","on","_searchAndSendEstado","model","value","callback","$$v","expression","scopedSlots","_u","key","fn","domProps","_s","item","estado","staticRenderFns","component","VAutocomplete","VListItemContent","VList","VListItemTitle","VSelect","defaultMenuProps","offsetY","offsetOverflow","transition","name","props","allowOverflow","type","default","autoSelectFirst","filter","itemText","queryText","hideNoData","menuProps","noFilter","searchInput","String","lazySearch","computed","classes","selectedIndex","computedItems","selectedValues","selectedItems","map","hasDisplayedItems","hideSelected","filteredItems","some","length","currentRange","selectedItem","getText","internalSearch","allItems","text","set","val","isAnyValueAllowed","isDirty","searchIsDirty","isSearching","multiple","menuCanShow","$_menuProps","find","i","listData","items","watch","internalValue","isFocused","document","$refs","input","blur","updateSelf","isMenuActive","oldVal","activateMenu","created","setSearch","destroyed","onFilteredItemsChanged","preSelectedItem","menu","setMenuIndex","$nextTick","onInternalSearchChanged","updateMenuDimensions","changeSelectedIndex","keyCode","deleteCurrentItem","curIndex","curItem","getDisabled","lastIndex","nextIndex","nextItem","selectItem","setValue","clearableCallback","genInput","autocomplete","genInputSlot","slot","genSelections","hasSlot","onClick","isAppendInner","e","onInput","target","badInput","onKeyDown","onSpaceDown","onTabDown","onUpDown","setSelectedItems","valueComparator","getValue","hasItem","indexOf","onCopy","currentItem","currentItemText","event"],"mappings":"4IAAe,QACXA,KADW,WAEP,MAAO,CACHC,UAAU,EACVC,QAAS,GACTC,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wB,YAzKO,SAyKI,KACXC,UA1KO,SA0KE,GACP,8CACAnJ,KAAK2G,cAEPyC,SA9KO,SA8KC,GAENP,EAFgB,iBAOhB7I,KAAK8G,gBAEPoB,WAvLO,SAuLG,GACR,+CACAlI,KAAKgH,aAEPqC,iBA3LO,WA4LL,6CADc,MAKTrJ,KAAL,WAAqBA,KAAKgH,aAE5BA,UAlMO,WAkME,WAGPhH,KAAKsH,WAAU,WAEV,EAAD,UACC,EADD,gBAEC,EAHH,eAKE,kBACG,gBAAD,QACA,EADA,UAEA,EAHoB,aAMlB,UAAa,EANjB,mBAUNX,WArNO,YAuNF3G,KAAD,eACCA,KAFH,iBAMGA,KAAD,UACCA,KAAKsJ,gBACJtJ,KADD,eAECA,KAAKuJ,SAASvJ,KAJlB,iBAOEA,KAAKgH,cAGTwC,QArOO,SAqOA,GACL,OAAOxJ,KAAKyE,eAAegF,QAAQzJ,KAAKuJ,SAAjC,KAAP,GAEFG,OAxOO,SAwOD,G,QACJ,QAAI1J,KAAKuE,cAAT,CAEA,IAAMoF,EAAc3J,KAAK0E,cAAc1E,KAAvC,eACM4J,EAAkB5J,KAAKmF,QAA7B,GACA,UAAA0E,EAAA,qBAAmB,8BAAnB,GACA,UAAAA,EAAA,qBAAmB,4DAAnB,GACAA,EAAA","file":"js/chunk-a505a86a.fbf42f4f.js","sourcesContent":["export default {\n data() {\n return {\n cargando: false,\n estados: [],\n municipios: []\n }\n },\n methods: {\n _handleError(err) {\n this.$emit(\"httpError\", err);\n this.cargando = false;\n },\n async _getAll(whatToGet = null, params = '') {\n if (whatToGet) {\n this.cargando = true;\n try {\n const { status, body } = await this.$http.get(\n whatToGet + params,\n this.$headers\n );\n if (status === 200 && whatToGet in body) {\n this[whatToGet] = body[whatToGet];\n } else {\n this.$emit(\"httpError\", res);\n }\n this.cargando = false;\n } catch (err) {\n this._handleError(err);\n }\n }\n },\n _getEdos() {\n this.cargando = true;\n this.$http.get(\"data/estados\").then(\n res => {\n this.cargando = false;\n if (res.status === 200 && \"estados\" in res.body) {\n this.estados = res.body.estados;\n } else {\n this.$emit(\"httpError\", res);\n }\n },\n err => {\n this.cargando = false;\n this.$emit(\"httpError\", err);\n }\n );\n },\n _getMpios(a = '') {\n this.cargando = true;\n this.$http.get(\"data/municipios\" + a, this.$headers).then(\n res => {\n this.cargando = false;\n if (res.status === 200 && \"municipios\" in res.body) {\n this.municipios = res.body.municipios;\n } else {\n this.$emit(\"httpError\", res);\n }\n },\n err => {\n this.cargando = false;\n this.$emit(\"httpError\", err);\n }\n );\n }\n }\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"AutocompleteDataEstados\"},[(!_vm.isSelect)?_c('v-autocomplete',{attrs:{\"append-icon\":\"search\",\"error-messages\":_vm.error,\"item-text\":\"estado\",\"item-value\":\"id\",\"items\":_vm.estados,\"label\":_vm.label ? _vm.label : 'Buscar estado',\"filled\":\"\",\"autocomplete\":false,\"name\":Math.random()},on:{\"change\":_vm._searchAndSendEstado},scopedSlots:_vm._u([{key:\"item\",fn:function(data){return [_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s(data.item.estado)}})],1)]}}],null,false,3542193426),model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}}):_c('v-select',{attrs:{\"error-messages\":_vm.error,\"item-text\":\"estado\",\"item-value\":\"id\",\"items\":_vm.estados,\"label\":_vm.label ? _vm.label : 'Seleccionar estado',\"filled\":\"\",\"autocomplete\":false,\"name\":Math.random()},on:{\"change\":_vm._searchAndSendEstado},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\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!./AutocompleteDataEstados.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!./AutocompleteDataEstados.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AutocompleteDataEstados.vue?vue&type=template&id=8b1bdd42&\"\nimport script from \"./AutocompleteDataEstados.vue?vue&type=script&lang=js&\"\nexport * from \"./AutocompleteDataEstados.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 { VAutocomplete } from 'vuetify/lib/components/VAutocomplete';\nimport { VListItemContent } from 'vuetify/lib/components/VList';\nimport { VListItemTitle } from 'vuetify/lib/components/VList';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\ninstallComponents(component, {VAutocomplete,VListItemContent,VListItemTitle,VSelect})\n","// Styles\nimport './VAutocomplete.sass'\n\n// Extensions\nimport VSelect, { defaultMenuProps as VSelectMenuProps } from '../VSelect/VSelect'\nimport VTextField from '../VTextField/VTextField'\n\n// Utilities\nimport mergeData from '../../util/mergeData'\nimport {\n getObjectValueByPath,\n getPropertyFromItem,\n keyCodes,\n} from '../../util/helpers'\n\n// Types\nimport { PropType, VNode } from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\nconst defaultMenuProps = {\n ...VSelectMenuProps,\n offsetY: true,\n offsetOverflow: true,\n transition: false,\n}\n\n/* @vue/component */\nexport default VSelect.extend({\n name: 'v-autocomplete',\n\n props: {\n allowOverflow: {\n type: Boolean,\n default: true,\n },\n autoSelectFirst: {\n type: Boolean,\n default: false,\n },\n filter: {\n type: Function,\n default: (item: any, queryText: string, itemText: string) => {\n return itemText.toLocaleLowerCase().indexOf(queryText.toLocaleLowerCase()) > -1\n },\n } as PropValidator<(item: any, queryText: string, itemText: string) => boolean>,\n hideNoData: Boolean,\n menuProps: {\n type: VSelect.options.props.menuProps.type,\n default: () => defaultMenuProps,\n },\n noFilter: Boolean,\n searchInput: {\n type: String as PropType,\n },\n },\n\n data () {\n return {\n lazySearch: this.searchInput,\n }\n },\n\n computed: {\n classes (): object {\n return {\n ...VSelect.options.computed.classes.call(this),\n 'v-autocomplete': true,\n 'v-autocomplete--is-selecting-index': this.selectedIndex > -1,\n }\n },\n computedItems (): object[] {\n return this.filteredItems\n },\n selectedValues (): object[] {\n return this.selectedItems.map(item => this.getValue(item))\n },\n hasDisplayedItems (): boolean {\n return this.hideSelected\n ? this.filteredItems.some(item => !this.hasItem(item))\n : this.filteredItems.length > 0\n },\n currentRange (): number {\n if (this.selectedItem == null) return 0\n\n return String(this.getText(this.selectedItem)).length\n },\n filteredItems (): object[] {\n if (!this.isSearching || this.noFilter || this.internalSearch == null) return this.allItems\n\n return this.allItems.filter(item => {\n const value = getPropertyFromItem(item, this.itemText)\n const text = value != null ? String(value) : ''\n\n return this.filter(item, String(this.internalSearch), text)\n })\n },\n internalSearch: {\n get (): string | null {\n return this.lazySearch\n },\n set (val: any) { // TODO: this should be `string | null` but it breaks lots of other types\n // emit update event only when the new\n // search value is different from previous\n if (this.lazySearch !== val) {\n this.lazySearch = val\n this.$emit('update:search-input', val)\n }\n },\n },\n isAnyValueAllowed (): boolean {\n return false\n },\n isDirty (): boolean {\n return this.searchIsDirty || this.selectedItems.length > 0\n },\n isSearching (): boolean {\n return (\n this.multiple &&\n this.searchIsDirty\n ) || (\n this.searchIsDirty &&\n this.internalSearch !== this.getText(this.selectedItem)\n )\n },\n menuCanShow (): boolean {\n if (!this.isFocused) return false\n\n return this.hasDisplayedItems || !this.hideNoData\n },\n $_menuProps (): object {\n const props = VSelect.options.computed.$_menuProps.call(this);\n (props as any).contentClass = `v-autocomplete__content ${(props as any).contentClass || ''}`.trim()\n return {\n ...defaultMenuProps,\n ...props,\n }\n },\n searchIsDirty (): boolean {\n return this.internalSearch != null &&\n this.internalSearch !== ''\n },\n selectedItem (): any {\n if (this.multiple) return null\n\n return this.selectedItems.find(i => {\n return this.valueComparator(this.getValue(i), this.getValue(this.internalValue))\n })\n },\n listData () {\n const data = VSelect.options.computed.listData.call(this) as any\n\n data.props = {\n ...data.props,\n items: this.virtualizedItems,\n noFilter: (\n this.noFilter ||\n !this.isSearching ||\n !this.filteredItems.length\n ),\n searchInput: this.internalSearch,\n }\n\n return data\n },\n },\n\n watch: {\n filteredItems: 'onFilteredItemsChanged',\n internalValue: 'setSearch',\n isFocused (val) {\n if (val) {\n document.addEventListener('copy', this.onCopy)\n this.$refs.input && this.$refs.input.select()\n } else {\n document.removeEventListener('copy', this.onCopy)\n this.blur()\n this.updateSelf()\n }\n },\n isMenuActive (val) {\n if (val || !this.hasSlot) return\n\n this.lazySearch = null\n },\n items (val, oldVal) {\n // If we are focused, the menu\n // is not active, hide no data is enabled,\n // and items change\n // User is probably async loading\n // items, try to activate the menu\n if (\n !(oldVal && oldVal.length) &&\n this.hideNoData &&\n this.isFocused &&\n !this.isMenuActive &&\n val.length\n ) this.activateMenu()\n },\n searchInput (val: string) {\n this.lazySearch = val\n },\n internalSearch: 'onInternalSearchChanged',\n itemText: 'updateSelf',\n },\n\n created () {\n this.setSearch()\n },\n\n destroyed () {\n document.removeEventListener('copy', this.onCopy)\n },\n\n methods: {\n onFilteredItemsChanged (val: never[], oldVal: never[]) {\n // TODO: How is the watcher triggered\n // for duplicate items? no idea\n if (val === oldVal) return\n\n if (!this.autoSelectFirst) {\n const preSelectedItem = oldVal[this.$refs.menu.listIndex]\n\n if (preSelectedItem) {\n this.setMenuIndex(val.findIndex(i => i === preSelectedItem))\n } else {\n this.setMenuIndex(-1)\n }\n this.$emit('update:list-index', this.$refs.menu.listIndex)\n }\n\n this.$nextTick(() => {\n if (\n !this.internalSearch ||\n (val.length !== 1 &&\n !this.autoSelectFirst)\n ) return\n\n this.$refs.menu.getTiles()\n\n if (this.autoSelectFirst && val.length) {\n this.setMenuIndex(0)\n this.$emit('update:list-index', this.$refs.menu.listIndex)\n }\n })\n },\n onInternalSearchChanged () {\n this.updateMenuDimensions()\n },\n updateMenuDimensions () {\n // Type from menuable is not making it through\n this.isMenuActive && this.$refs.menu && this.$refs.menu.updateDimensions()\n },\n changeSelectedIndex (keyCode: number) {\n // Do not allow changing of selectedIndex\n // when search is dirty\n if (this.searchIsDirty) return\n\n if (this.multiple && keyCode === keyCodes.left) {\n if (this.selectedIndex === -1) {\n this.selectedIndex = this.selectedItems.length - 1\n } else {\n this.selectedIndex--\n }\n } else if (this.multiple && keyCode === keyCodes.right) {\n if (this.selectedIndex >= this.selectedItems.length - 1) {\n this.selectedIndex = -1\n } else {\n this.selectedIndex++\n }\n } else if (keyCode === keyCodes.backspace || keyCode === keyCodes.delete) {\n this.deleteCurrentItem()\n }\n },\n deleteCurrentItem () {\n const curIndex = this.selectedIndex\n const curItem = this.selectedItems[curIndex]\n\n // Do nothing if input or item is disabled\n if (\n !this.isInteractive ||\n this.getDisabled(curItem)\n ) return\n\n const lastIndex = this.selectedItems.length - 1\n\n // Select the last item if\n // there is no selection\n if (\n this.selectedIndex === -1 &&\n lastIndex !== 0\n ) {\n this.selectedIndex = lastIndex\n\n return\n }\n\n const length = this.selectedItems.length\n const nextIndex = curIndex !== length - 1\n ? curIndex\n : curIndex - 1\n const nextItem = this.selectedItems[nextIndex]\n\n if (!nextItem) {\n this.setValue(this.multiple ? [] : null)\n } else {\n this.selectItem(curItem)\n }\n\n this.selectedIndex = nextIndex\n },\n clearableCallback () {\n this.internalSearch = null\n\n VSelect.options.methods.clearableCallback.call(this)\n },\n genInput () {\n const input = VTextField.options.methods.genInput.call(this)\n\n input.data = mergeData(input.data!, {\n attrs: {\n 'aria-activedescendant': getObjectValueByPath(this.$refs.menu, 'activeTile.id'),\n autocomplete: getObjectValueByPath(input.data!, 'attrs.autocomplete', 'off'),\n },\n domProps: { value: this.internalSearch },\n })\n\n return input\n },\n genInputSlot () {\n const slot = VSelect.options.methods.genInputSlot.call(this)\n\n slot.data!.attrs!.role = 'combobox'\n\n return slot\n },\n genSelections (): VNode | never[] {\n return this.hasSlot || this.multiple\n ? VSelect.options.methods.genSelections.call(this)\n : []\n },\n onClick (e: MouseEvent) {\n if (!this.isInteractive) return\n\n this.selectedIndex > -1\n ? (this.selectedIndex = -1)\n : this.onFocus()\n\n if (!this.isAppendInner(e.target)) this.activateMenu()\n },\n onInput (e: Event) {\n if (\n this.selectedIndex > -1 ||\n !e.target\n ) return\n\n const target = e.target as HTMLInputElement\n const value = target.value\n\n // If typing and menu is not currently active\n if (target.value) this.activateMenu()\n\n if (!this.multiple && value === '') this.deleteCurrentItem()\n\n this.internalSearch = value\n this.badInput = target.validity && target.validity.badInput\n },\n onKeyDown (e: KeyboardEvent) {\n const keyCode = e.keyCode\n\n if (\n e.ctrlKey ||\n ![keyCodes.home, keyCodes.end].includes(keyCode)\n ) {\n VSelect.options.methods.onKeyDown.call(this, e)\n }\n\n // The ordering is important here\n // allows new value to be updated\n // and then moves the index to the\n // proper location\n this.changeSelectedIndex(keyCode)\n },\n onSpaceDown (e: KeyboardEvent) { /* noop */ },\n onTabDown (e: KeyboardEvent) {\n VSelect.options.methods.onTabDown.call(this, e)\n this.updateSelf()\n },\n onUpDown (e: Event) {\n // Prevent screen from scrolling\n e.preventDefault()\n\n // For autocomplete / combobox, cycling\n // interfers with native up/down behavior\n // instead activate the menu\n this.activateMenu()\n },\n selectItem (item: object) {\n VSelect.options.methods.selectItem.call(this, item)\n this.setSearch()\n },\n setSelectedItems () {\n VSelect.options.methods.setSelectedItems.call(this)\n\n // #4273 Don't replace if searching\n // #4403 Don't replace if focused\n if (!this.isFocused) this.setSearch()\n },\n setSearch () {\n // Wait for nextTick so selectedItem\n // has had time to update\n this.$nextTick(() => {\n if (\n !this.multiple ||\n !this.internalSearch ||\n !this.isMenuActive\n ) {\n this.internalSearch = (\n !this.selectedItems.length ||\n this.multiple ||\n this.hasSlot\n )\n ? null\n : this.getText(this.selectedItem)\n }\n })\n },\n updateSelf () {\n if (\n !this.searchIsDirty &&\n !this.internalValue\n ) return\n\n if (\n !this.multiple &&\n !this.valueComparator(\n this.internalSearch,\n this.getValue(this.internalValue)\n )\n ) {\n this.setSearch()\n }\n },\n hasItem (item: any): boolean {\n return this.selectedValues.indexOf(this.getValue(item)) > -1\n },\n onCopy (event: ClipboardEvent) {\n if (this.selectedIndex === -1) return\n\n const currentItem = this.selectedItems[this.selectedIndex]\n const currentItemText = this.getText(currentItem)\n event.clipboardData?.setData('text/plain', currentItemText)\n event.clipboardData?.setData('text/vnd.vuetify.autocomplete.item+plain', currentItemText)\n event.preventDefault()\n },\n },\n})\n"],"sourceRoot":""}