{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/components/input.js","webpack:///./src/scss/components/input.entry.scss","webpack:///./src/pug/views/components/input.pug","webpack:///./src/js/components/input.entry.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qCAAqC;AAC3E;AACA,2DAA2D,KAAK;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACe,gEAAO;;;;;;;;AC1ZtB,uC;;;;;;;;;;;;ACAe,+DAAuB,0BAA0B,E;;;;;;;;ACAvB;AACE;AAC3B","file":"./js/components/input.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 73);\n","class BRInput {\n constructor (name, component) {\n this.name = name\n this.component = component\n this._currentFocus = -1\n this._setBehavior()\n }\n\n _setBehavior () {\n this._setPasswordViewBehavior()\n this._setAutocompleteBehavior()\n }\n\n _setPasswordViewBehavior () {\n for (const inputPassword of this.component.querySelectorAll(\"input[type='password']\")) {\n if (!inputPassword.disabled) {\n for (const buttonIcon of inputPassword.parentNode.querySelectorAll('button.icon')) {\n buttonIcon.addEventListener(\n 'click',\n (event) => {\n this._toggleShowPassword(event)\n },\n false\n )\n }\n }\n }\n }\n\n _toggleShowPassword (event) {\n for (const icon of event.currentTarget.querySelectorAll('.svg-inline--fa')) {\n if (icon.classList.contains('fa-eye')) {\n icon.classList.remove('fa-eye')\n icon.classList.add('fa-eye-slash')\n for (const input of this.component.querySelectorAll(\"input[type='password']\")) {\n input.setAttribute('type', 'text')\n }\n } else if (icon.classList.contains('fa-eye-slash')) {\n icon.classList.remove('fa-eye-slash')\n icon.classList.add('fa-eye')\n for (const input of this.component.querySelectorAll(\"input[type='text']\")) {\n input.setAttribute('type', 'password')\n }\n }\n }\n }\n\n _setAutocompleteBehavior () {\n for (const inputAutocomplete of this.component.querySelectorAll('input.search-autocomplete')) {\n inputAutocomplete.addEventListener(\n 'input',\n (event) => {\n this._clearSearchItems()\n this._buildSearchItems(event.currentTarget)\n },\n false\n )\n inputAutocomplete.addEventListener(\n 'keydown',\n (event) => {\n this._handleArrowKeys(event)\n },\n false\n )\n }\n }\n\n _buildSearchItems (element) {\n const searchList = window.document.createElement('div')\n searchList.setAttribute('class', 'search-items')\n this.component.appendChild(searchList)\n if (element.value !== '') {\n for (const data of this.dataList) {\n if (data.substr(0, element.value.length).toUpperCase() === element.value.toUpperCase()) {\n const item = window.document.createElement('div')\n item.innerHTML = `${data.substr(0, element.value.length)}`\n item.innerHTML += data.substr(element.value.length)\n item.innerHTML += ``\n item.addEventListener(\n 'click',\n (event) => {\n for (const input of event.currentTarget.querySelectorAll(\"input[type='hidden']\")) {\n element.value = input.value\n }\n this._clearSearchItems()\n },\n false\n )\n searchList.appendChild(item)\n }\n }\n } else {\n this._clearSearchItems()\n }\n }\n\n _clearSearchItems () {\n for (const searchItems of this.component.querySelectorAll('.search-items')) {\n for (const item of searchItems.querySelectorAll('div')) {\n searchItems.removeChild(item)\n }\n this.component.removeChild(searchItems)\n }\n }\n\n _handleArrowKeys (event) {\n switch (event.keyCode) {\n case 13:\n if (this._currentFocus > -1) {\n event.preventDefault()\n for (const searchItems of this.component.querySelectorAll('.search-items')) {\n for (const itemActive of searchItems.querySelectorAll('div.is-active')) {\n itemActive.click()\n }\n }\n this._currentFocus = -1\n }\n break\n case 38:\n if (this._currentFocus > 0) {\n this._currentFocus -= 1\n }\n this._switchFocus()\n break\n case 40:\n for (const searchItems of this.component.querySelectorAll('.search-items')) {\n if (this._currentFocus < searchItems.querySelectorAll('div').length - 1) {\n this._currentFocus += 1\n }\n }\n this._switchFocus()\n break\n // skip default case\n }\n }\n\n _switchFocus () {\n for (const searchItems of this.component.querySelectorAll('.search-items')) {\n for (const [index, item] of searchItems.querySelectorAll('div').entries()) {\n if (index === this._currentFocus) {\n item.classList.add('is-active')\n }\n if (index !== this._currentFocus) {\n item.classList.remove('is-active')\n }\n }\n }\n }\n\n setAutocompleteData (dataList) {\n this.dataList = dataList\n }\n}\nconst countries = [\n 'Afeganistão',\n 'África do Sul',\n 'Albânia',\n 'Alemanha',\n 'Andorra',\n 'Angola',\n 'Anguilla',\n 'Antártida',\n 'Antígua e Barbuda',\n 'Antilhas Holandesas',\n 'Arábia Saudita',\n 'Argélia',\n 'Argentina',\n 'Armênia',\n 'Aruba',\n 'Austrália',\n 'Áustria',\n 'Azerbaijão',\n 'Bahamas',\n 'Bahrein',\n 'Bangladesh',\n 'Barbados',\n 'Belarus',\n 'Bélgica',\n 'Belize',\n 'Benin',\n 'Bermudas',\n 'Bolívia',\n 'Bósnia-Herzegóvina',\n 'Botsuana',\n 'Brasil',\n 'Brunei',\n 'Bulgária',\n 'Burkina Fasso',\n 'Burundi',\n 'Butão',\n 'Cabo Verde',\n 'Camarões',\n 'Camboja',\n 'Canadá',\n 'Cazaquistão',\n 'Chade',\n 'Chile',\n 'China',\n 'Chipre',\n 'Cingapura',\n 'Colômbia',\n 'Congo',\n 'Coréia do Norte',\n 'Coréia do Sul',\n 'Costa do Marfim',\n 'Costa Rica',\n 'Croácia (Hrvatska)',\n 'Cuba',\n 'Dinamarca',\n 'Djibuti',\n 'Dominica',\n 'Egito',\n 'El Salvador',\n 'Emirados Árabes Unidos',\n 'Equador',\n 'Eritréia',\n 'Eslováquia',\n 'Eslovênia',\n 'Espanha',\n 'Estados Unidos',\n 'Estônia',\n 'Etiópia',\n 'Fiji',\n 'Filipinas',\n 'Finlândia',\n 'França',\n 'Gabão',\n 'Gâmbia',\n 'Gana',\n 'Geórgia',\n 'Gibraltar',\n 'Grã-Bretanha (Reino Unido, UK)',\n 'Granada',\n 'Grécia',\n 'Groelândia',\n 'Guadalupe',\n 'Guam (Território dos Estados Unidos)',\n 'Guatemala',\n 'Guernsey',\n 'Guiana',\n 'Guiana Francesa',\n 'Guiné',\n 'Guiné Equatorial',\n 'Guiné-Bissau',\n 'Haiti',\n 'Holanda',\n 'Honduras',\n 'Hong Kong',\n 'Hungria',\n 'Iêmen',\n 'Ilha Bouvet (Território da Noruega)',\n 'Ilha do Homem',\n 'Ilha Natal',\n 'Ilha Pitcairn',\n 'Ilha Reunião',\n 'Ilhas Aland',\n 'Ilhas Cayman',\n 'Ilhas Cocos',\n 'Ilhas Comores',\n 'Ilhas Cook',\n 'Ilhas Faroes',\n 'Ilhas Falkland (Malvinas)',\n 'Ilhas Geórgia do Sul e Sandwich do Sul',\n 'Ilhas Heard e McDonald (Território da Austrália)',\n 'Ilhas Marianas do Norte',\n 'Ilhas Marshall',\n 'Ilhas Menores dos Estados Unidos',\n 'Ilhas Norfolk',\n 'Ilhas Seychelles',\n 'Ilhas Solomão',\n 'Ilhas Svalbard e Jan Mayen',\n 'Ilhas Tokelau',\n 'Ilhas Turks e Caicos',\n 'Ilhas Virgens (Estados Unidos)',\n 'Ilhas Virgens (Inglaterra)',\n 'Ilhas Wallis e Futuna',\n 'índia',\n 'Indonésia',\n 'Irã',\n 'Iraque',\n 'Irlanda',\n 'Islândia',\n 'Israel',\n 'Itália',\n 'Jamaica',\n 'Japão',\n 'Jersey',\n 'Jordânia',\n 'Kênia',\n 'Kiribati',\n 'Kuait',\n 'Laos',\n 'Látvia',\n 'Lesoto',\n 'Líbano',\n 'Libéria',\n 'Líbia',\n 'Liechtenstein',\n 'Lituânia',\n 'Luxemburgo',\n 'Macau',\n 'Macedônia (República Yugoslava)',\n 'Madagascar',\n 'Malásia',\n 'Malaui',\n 'Maldivas',\n 'Mali',\n 'Malta',\n 'Marrocos',\n 'Martinica',\n 'Maurício',\n 'Mauritânia',\n 'Mayotte',\n 'México',\n 'Micronésia',\n 'Moçambique',\n 'Moldova',\n 'Mônaco',\n 'Mongólia',\n 'Montenegro',\n 'Montserrat',\n 'Myanma',\n 'Namíbia',\n 'Nauru',\n 'Nepal',\n 'Nicarágua',\n 'Níger',\n 'Nigéria',\n 'Niue',\n 'Noruega',\n 'Nova Caledônia',\n 'Nova Zelândia',\n 'Omã',\n 'Palau',\n 'Panamá',\n 'Papua-Nova Guiné',\n 'Paquistão',\n 'Paraguai',\n 'Peru',\n 'Polinésia Francesa',\n 'Polônia',\n 'Porto Rico',\n 'Portugal',\n 'Qatar',\n 'Quirguistão',\n 'República Centro-Africana',\n 'República Democrática do Congo',\n 'República Dominicana',\n 'República Tcheca',\n 'Romênia',\n 'Ruanda',\n 'Rússia (antiga URSS) - Federação Russa',\n 'Saara Ocidental',\n 'Saint Vincente e Granadinas',\n 'Samoa Americana',\n 'Samoa Ocidental',\n 'San Marino',\n 'Santa Helena',\n 'Santa Lúcia',\n 'São Bartolomeu',\n 'São Cristóvão e Névis',\n 'São Martim',\n 'São Tomé e Príncipe',\n 'Senegal',\n 'Serra Leoa',\n 'Sérvia',\n 'Síria',\n 'Somália',\n 'Sri Lanka',\n 'St. Pierre and Miquelon',\n 'Suazilândia',\n 'Sudão',\n 'Suécia',\n 'Suíça',\n 'Suriname',\n 'Tadjiquistão',\n 'Tailândia',\n 'Taiwan',\n 'Tanzânia',\n 'Território Britânico do Oceano índico',\n 'Territórios do Sul da França',\n 'Territórios Palestinos Ocupados',\n 'Timor Leste',\n 'Togo',\n 'Tonga',\n 'Trinidad and Tobago',\n 'Tunísia',\n 'Turcomenistão',\n 'Turquia',\n 'Tuvalu',\n 'Ucrânia',\n 'Uganda',\n 'Uruguai',\n 'Uzbequistão',\n 'Vanuatu',\n 'Vaticano',\n 'Venezuela',\n 'Vietnã',\n 'Zâmbia',\n 'Zimbábue'\n]\nconst inputList = []\nfor (const brInput of window.document.querySelectorAll('.br-input')) {\n inputList.push(new BRInput('br-input', brInput))\n}\nfor (const brInput of inputList) {\n brInput.component.querySelectorAll('input.search-autocomplete').forEach(() => {\n brInput.setAutocompleteData(countries)\n })\n}\nexport default BRInput\n","// extracted by mini-css-extract-plugin","export default __webpack_public_path__ + \"components/input.html\";","import '@/pug/views/components/input.pug'\nimport '@/scss/components/input.entry.scss'\nimport './input'\n"],"sourceRoot":""}