PageSourceSearch

https://www.meteored.cl/js/bundle/1105/4064145faff778e592d7.js

js meteored.cl collected 2026-10-02 04:16:17 UTC 13,483 bytes, 1 lines download raw bytes

1(self.webpackChunktiempo=self.webpackChunktiempo||[]).push([[1105],{1517:function(e,t,s){"use strict";s.d(t,{l:function(){return a}});var o=s(4678),i=s(9404),n=s(2573);class a extends i.I{constructor(){super(),this.mySites=document.getElementById("mySites"),this.buttonBackSites=document.getElementById("buttonBackSites"),this.buttonBackSites.addEventListener("touchstart",e=>{e.preventDefault(),this.mySites.classList.contains("open")&&this.ocultarMisSitios()})}mostrarMisSitios(e=!1){e&&a.capaVisibleFuera(new Map([["mis_sitios",!0]])),this.mySites.classList.add("open"),e||(this.inputSearch.click(),this.inputSearch.focus()),this.padre.style.position="fixed",this.padre.style.width="100%",o.A.show_carrusel&&(this.padre.style.marginTop="57px"),this.footer&&(this.footer.style.display="none")}ocultarMisSitios(){a.capaVisibleFuera(new Map([["mis_sitios",!1]])),this.mySites.classList.remove("open"),this.inputSearch.value="",document.getElementById("resultados").style.display="none",this.isMobile()&&document.getElementById("closeSearch").classList.remove("open"),this.padre.style.position="",this.padre.style.width="",this.padre.style.marginTop="",this.footer&&(this.footer.style.display="")}static capaVisibleFuera(e){const t={buscador_entrando:()=>{n.v.sendSecondaryView(!1)},buscador_saliendo:()=>{},mis_sitios_entrando:()=>{a.sendSecondaryView(!1)},mis_sitios_saliendo:()=>{var e,t;const s=null===(t=null===(e=document.getElementById("menu_header"))||void 0===e?void 0:e.classList)||void 0===t?void 0:t.contains("hidden");a.resetDimensions(!s)}};e.forEach((e,s)=>{const o=`${s}_${e?"entrando":"saliendo"}`;t[o]&&t[o]()})}}a.name_view="my_locations"},2573:function(e,t,s){"use strict";s.d(t,{v:function(){return p}});var o=s(3676),i=s(4678),n=s(1149);class a{static determineIcon(e){if(e.spec.esqui)return i.A.ski?"ski":"loc";switch(e.subtype){case 4:return"loc";case 3:return"reg";default:return"pais"}}static buildHierarchy(e){return e.description}}var l=s(8130);class r{constructor(){this._blocked=!1,this._checked=!1,this._result=!1;const e=r.getCookie();if(e){const t=e.split(r.SEPARATOR);if(1==t.length)this._blocked=!0;else{const e=parseFloat(t[0]),s=parseFloat(t[1]);this._geoData={coords:{longitude:e,latitude:s}},this._result=!0}this._checked=!0}}static getCookie(){return sessionStorage.getItem(r.NAME)}save(){const e=`${this._geoData.coords.longitude}${r.SEPARATOR}${this._geoData.coords.latitude}`;return sessionStorage.setItem(r.NAME,e),e}get geoData(){return this._geoData}static block(){sessionStorage.setItem(r.NAME,"blocked")}checkGeolocation(){return new Promise(e=>{this._checked?e(this._result):navigator.geolocation?navigator.geolocation.getCurrentPosition(t=>{this._geoData=t,this.save(),this._checked=!0,this._result=!0,e(this._result)},()=>{this._checked=!0,r.block(),this._result=!1,e(this._result)}):(this._checked=!0,this._result=!1,e(this._result))})}isGeolocationEnabled(){return this._checked&&this._result}}r.SEPARATOR="%",r.NAME="meteored_geodata";var d=new r,c=s(8367),h=s(9404),u=s(1517),m=s(8050);class p extends h.I{static init(){return!0}constructor(e,t){super(),this.cfg=e,this.temporizador=null,this.entrada=null,this.resultados=document.createElement("div"),this.resultados.id="resultados",this.resultado=null,this.translate=null,this.focoInput=!1,this.focusedLI=-1,this.buttonSearchGeo=document.getElementById("buttonSearchGeo");const s=document.getElementById(this.formId());s&&(s.onsubmit=()=>!1),t?this.delayed():(this.initBody(),this.initSearchBox())}hideResultadosSugeridos(e){this.loadTranslate(()=>{this.hideResultadosSugeridosExec(e)})}showResultadosSugeridos(){this.loadTranslate(()=>{this.showResultadosSugeridosExec()})}showMasResultados(e){this.resultado.texto&&this.loadTranslate(()=>{this.showMasResultadosExec(e)})}loadTranslate(e){null==this.translate?s(2115)(`./${c.A.lang}.json`).then(t=>{this.translate=t.search,e()}):e()}initBody(){const e=document.getElementsByTagName("body");e.length>0?e[0].addEventListener("click",e=>{const t=e.target||e.srcElement;this.isMobile()?"mySites"==t.id&&this.ocultarResultados():t.id!=this.entradaName()&&this.ocultarResultados()}):setTimeout(()=>{this.initBody()},10)}initSearchBox(){this.entrada=document.getElementById(this.entradaName()),null!=this.entrada?(window.location.href.match(/#.+$/)||this.entrada.focus(),this.entrada.onkeyup=e=>{let t=!1;
1if(l.s.isKey(l.s.ENTER_KEY,e))t=!0;else if(l.s.isKey(l.s.DOWN_KEY,e)){const e=document.getElementById("resultados");if(e){const t=e.firstChild;if(t){const e=t.firstChild;e&&(e.focus(),this.focusedLI=0)}}}this.changeTexto(!1,t)},this.entrada.onclick=()=>{var e;const t=this.isMobile()&&(null===(e=document.getElementById("buttonBackSites"))||void 0===e?void 0:e.classList.contains("rfv"))&&(document.getElementById("buttonBackSites").classList.remove("rfv"),!0);(i.A.rfv&&!this.focoInput||i.A.rfv&&this.isMobile()&&t)&&(this.focoInput=!0),this.changeTexto(!0)},this.buttonSearchGeo&&(this.buttonSearchGeo.onclick=()=>{this.changeTexto(!0,!1,!0)}),this.anadirCajaResultados()):setTimeout(()=>{this.initSearchBox()},10)}changeTexto(e=!1,t=!1,s=!1){const o=this.entrada.value;null!=this.temporizador&&(clearTimeout(this.temporizador),this.temporizador=null),e?this.changeTextoEjecutar(o,t,s):this.temporizador=setTimeout(()=>{this.temporizador=null,this.changeTextoEjecutar(o,t,s)},300)}changeTextoEjecutar(e,t=!1,s=!1){if(!(e.length>0&&e.length<3))return null==this.resultado||this.resultado.texto!=e||t||s?void(e.length>0?o.Ay.search(e).then(e=>{null!=e&&(this.resultado=e,this.desplegarResultados(),t&&p.pulsadoEnter())}).catch(e=>{this.ocultarResultados(),console.log(e)}):s?d.checkGeolocation().then(e=>{e?this.searchByGeolocation(t):this.searchByTop(t)}):this.searchByTop(t)):(this.resultados.style.display="block",void(this.isMobile()&&document.getElementById("closeSearch").classList.add("open")))}ocultarResultados(){"block"==this.resultados.style.display&&(this.resultados.style.display="none",this.hideResultadosSugeridos(!0),this.entrada.value="",this.entrada.blur(),this.isMobile()?document.getElementById("closeSearch").classList.remove("open"):(this.focoInput=!1,u.l.capaVisibleFuera(new Map([["buscador",!1],["pagina",!0]])),p.resetDimensions()))}desplegarResultados(){var e;this.resultado.hits.length;let t=this.obtenerNodoResultados();t.classList.add("resultado-busqueda"),0==this.resultado.hits.length&&this.loadTranslate(()=>{d.checkGeolocation().then(()=>{this.printForm(t)})}),this.pintarHits(t,this.resultado,!0),"block"!=this.resultados.style.display&&u.l.capaVisibleFuera(new Map([["buscador",!0]])),this.resultados.style.display="block",this.isMobile()&&(document.getElementById("closeSearch").classList.add("open"),["0.0","15.0.0"].includes(null===(e=null===i.A||void 0===i.A?void 0:i.A.site)||void 0===e?void 0:e.section)&&m.Y.sendEventGA4("searcher_view"))}printForm(e){s.e(225).then(s.t.bind(s,7063,23)).then(t=>{e.innerHTML=t.default({not_found_1:this.translate.not_found_1,not_found_2:this.translate.not_found_2,not_found_3:this.translate.not_found_3,location:this.translate.location,email:this.translate.email,send:this.translate.send,button_value:this.translate.button_value,geoEnabled:d.isGeolocationEnabled()});const s=e.getElementsByTagName("input");document.getElementById("noEncn").onclick=e=>{e.stopPropagation()};const o=document.getElementById("newSend");o&&(o.onclick=()=>{this.enviarSugerencia(s.item(0).value,s.item(1).value)}),this.searchLoc=document.getElementById("searchLoc"),this.searchLoc&&(this.searchLoc.onclick=()=>{this.searchByGeolocation()})})}obtenerNodoResultados(e=!0){let t=null;if(!e){let e=this.resultados.getElementsByTagName("ul");e.length>0&&(t=e.item(0))}return null==t&&(this.limpiarNodoResultados(),t=document.createElement("ul"),this.resultados.appendChild(t)),t}pintarHits(e,t,s){let o=t.hits;for(let t of o)e.appendChild(this.generarHit(t))}generarHit(e){const t=document.createElement("li");t.tabIndex=2;const s=document.createElement("a");s.classList.add("row");const o=document.createElement("img"),i=document.createElement("span"),n=document.createElement("span"),r=document.createElement("span"),d=document.createElement("span"),h=document.createElement("span"),u=document.createElement("img");return t.onclick=()=>{Promise.resolve().then(()=>{e.click()})},t.onkeyup=e=>{if(l.s.isKey(l.s.DOWN_KEY,e)){const e=document.getElementById("resultados");if(e){const t=e.firstChild;if(t&&this.focusedLI+1<t.children.length){this.focusedLI++;const e=t.childNodes.item(this.focusedLI);e&&e.focus()}}}else if(l.s.isKey(l.s.UP_KEY,e)){const e=document.getElementById("resultados");if(e){const t=e.firstChild;if(t)if(this.focusedLI>0){this.focusedLI--;const e=t.childNodes.item(this.focusedLI);e&&e.focus()}else{const e=document.getElementById(this.entradaName());e&&e.focus()}}}
1else if(l.s.isKey(l.s.ENTER_KEY,e)){const e=document.getElementById("resultados");if(e){const t=e.firstChild;if(t){const e=t.childNodes.item(this.focusedLI);e&&e.click()}}}},t.onmouseover=()=>{const e=document.getElementById("resultados");if(e){const s=e.firstChild;s&&(this.focusedLI=Array.prototype.slice.call(s.children).indexOf(t),t.focus())}},o.classList.add("searchresult-icon"),o.classList.add(a.determineIcon(e)),o.src=`${c.A.www}/css/v3/svgs/search/${a.determineIcon(e)}.svg`,n.classList.add("localidad"),r.classList.add("bnom-txt"),r.textContent=e.name,n.appendChild(r),h.classList.add("provincia"),h.textContent=a.buildHierarchy(e),n.appendChild(d),i.classList.add("bizq"),i.appendChild(n),i.appendChild(h),u.classList.add("bandera"),u.setAttribute("src",p.getURLBandera(e)),s.appendChild(o),s.appendChild(i),s.appendChild(u),t.appendChild(s),t}limpiarNodoResultados(){const e=this.resultados.getElementsByTagName("ul");e.length>0&&this.resultados.removeChild(e[0]);const t=this.resultados.getElementsByTagName("div");t.length>0&&this.resultados.removeChild(t[0]),this.hideResultadosSugeridos(this.resultado.texto&&this.resultado.texto.length>0)}enviarSugerencia(e,t){0==e.length||0==t.length?this.loadTranslate(()=>{alert(this.translate.mandatory)}):n.A.get(`${c.A.www}/peticiones/peticionMovil.php?tipo=14&localidad=${e}&email=${t}&pais=${c.A.country}&idioma=${c.A.lang}`).then(()=>{this.enviarSugerenciaOK()}).catch(()=>{this.enviarSugerenciaOK()})}enviarSugerenciaOK(){this.limpiarNodoResultados(),this.loadTranslate(()=>{const e=document.createElement("div");e.id="petEnv",e.textContent=this.translate.sended,this.resultados.appendChild(e)})}static pulsadoEnter(){const e=document.getElementById("resultados");if(e){const t=e.getElementsByClassName("resultado-busqueda")[0];if(t){const e=t.firstChild;e&&e.click()}}}searchByGeolocation(e=!1){o.Ay.start(d.geoData.coords).then(t=>{this.resultado=t,this.desplegarResultados(),e&&p.pulsadoEnter()}).catch(t=>{this.ocultarResultados(),console.log(t),this.searchByTop(e)})}searchByTop(e=!1){o.Ay.top().then(t=>{null!=t&&(this.resultado=t,this.desplegarResultados(),e&&p.pulsadoEnter())}).catch(e=>{this.ocultarResultados(),console.log(e)})}static getIconFolderName(){return"banderas18"}static getFlagId(e){let t="0";if(e.spec.pais.id)t=e.spec.pais.id.toString();else{const s=e.type;if(1==s)switch(e.subtype){case 1:t="EU";break;case 2:t="COC";break;case 3:t="CNA";break;case 4:t="0";break;case 5:t="CAF";break;case 6:t="CSA";break;case 7:t="CAS";break;case 8:t="208"}else 0==s&&(t="WW")}return t}static getURLBandera(e){return`${c.A.www}/css/v3/svgs/${p.getIconFolderName()}/${p.getFlagId(e)}.svg`}}p.name_view="searcher"},9404:function(e,t,s){"use strict";s.d(t,{I:function(){return n}});var o=s(7623),i=s(8023);class n{static sendSecondaryView(e=!0,t=!0){e&&i.i.setPopUpBlock(!0),t&&o.q.sendSecondaryView(this.name_view)}static resetDimensions(e=!0){e&&i.i.setPopUpBlock(!1),o.q.resetSecondaryView()}}n.name_view="default"},8130:function(e,t,s){"use strict";s.d(t,{s:function(){return o}});class o{static isKey(e,t){let s=!1;return(t.key&&t.key==e.key||t.code&&(t.code==e.code||t.code==e.alternateCode)||t.keyCode&&(t.keyCode==e.keyCode||t.which==e.keyCode))&&(s=!0),s}}o.ENTER_KEY={key:"Enter",code:"Enter",alternateCode:"NumpadEnter",keyCode:13},o.DOWN_KEY={key:"ArrowDown",code:"ArrowDown",alternateCode:"ArrowDown",keyCode:40},o.UP_KEY={key:"ArrowUp",code:"ArrowUp",alternateCode:"ArrowUp",keyCode:38}},2115:function(e,t,s){var o={"./ca-ES.json":[5385,[5385]],"./da-DK.json":[7605,[7605]],"./de-AT.json":[6153,[6153]],"./de-DE.json":[4635,[4635]],"./en-CA.json":[940,[940]],"./en-GB.json":[3029,[3029]],"./en-US.json":[3520,[3520]],"./es-AR.json":[342,[342]],"./es-BO.json":[3242,[3242]],"./es-CL.json":[2398,[2398]],"./es-CR.json":[1544,[1544]],"./es-DO.json":[5780,[5780]],"./es-EC.json":[3277,[3277]],"./es-ES.json":[2109,[2109]],"./es-HN.json":[7323,[7323]],"./es-MX.json":[5504,[5504]],"./es-PA.json":[3110,[3110]],"./es-PE.json":[9658,[9658]],"./es-PY.json":[2206,[2206]],"./es-UY.json":[2859,[2859]],"./es-VE.json":[9940,[9940]],"./eu-ES.json":[647,[647]],"./fr-FR.json":[9229,[9229]],"./hi-IN.json":[1119,[1119]],"./it-IT.json":[1043,[1043]],"./nl-NL.json":[7569,[7569]],"./pt-BR.json":[5749,[5749]],"./pt-PT.json":[6745,[6745]],"./ro-RO.json":[947,[947]],"./ru-RU.json":[7091,[7091]]};function i(e){try{if(!s.o(o,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=o[e],i=t[0];return s.e(t[1][0]).then(function(){return s.t(i,19)})}i.keys=function(){return Object.keys(o)},i.id=2115,e.exports=i}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.