PageSourceSearch

https://controle-technique.autosur.fr/build/2071.06a9772cbb0415984a7d.js

js autosur.fr collected 2026-09-25 23:51:13 UTC 2,363 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkmerevo=globalThis.webpackChunkmerevo||[]).push([[2071],{2071:(t,e,i)=>{i.r(e),i.d(e,{default:()=>r});var s=i(4535);class a extends s.A{init(t,e,i,s){this.notification=i,this.geolocationService=t,this.geocodingService=e,this.emitter=s,this.searchForm=this.el.closest("[data-lf-search-form]"),this.searchForm&&(this.inputQuery=this.searchForm.querySelector("[data-lf-search-query]"),this.inputLat=this.searchForm.querySelector("[data-lf-search-latitude]"),this.inputLon=this.searchForm.querySelector("[data-lf-search-longitude]"),this.inputGeo=this.searchForm.querySelector("[data-lf-search-geo]"),this.inputGeoStatus=this.searchForm.querySelector("[data-lf-search-geolocation-status]"),this.hasAllInputs()&&this.bindEvents())}hasAllInputs(){return this.inputQuery&&this.inputLat&&this.inputLon&&this.inputGeoStatus&&this.inputGeo}bindEvents(){this.el.addEventListener("click",this.triggerGeolocationSearch.bind(this))}triggerGeolocationSearch(t){t.preventDefault(),this.el.classList.add("loading"),this.geolocationService.getCurrentPosition().then(t=>{this.attr.useGeocoding?this.geocodingService.getGeocoding(t).then(e=>{const i=JSON.parse(e);if(Object.keys(i).length&&void 0!==i.address){const e=i.address.village||i.address.town||i.address.city;this.inputQuery.value=e,this.setSearchParameters(t)}}).catch(()=>{this.inputQuery.value="",this.setSearchParameters(t)}):(this.inputQuery.value="",this.setSearchParameters(t))}).catch(t=>{this.el.classList.remove("loading"),this.inputGeoStatus.setAttribute("data-lf-search-geolocation-status",!1);const e=this.el.getAttribute("data-lf-msg-title");let i="";switch(t.code){case 1:i=this.el.getAttribute("data-lf-msg-warning"),this.notification.display(e,i,"warning",this.el);break;case 2:i=this.el.getAttribute("data-lf-msg-error"),this.notification.display(e,i,"error",this.el);break;case 3:i=this.el.getAttribute("data-lf-msg-timeout"),this.notification.display(e,i,"error",this.el)}})}setSearchParameters(t){this.emitter.emit("partials.forms.countrySelector.resetCountry"),this.inputLon.value=t.coords.longitude,this.inputLat.value=t.coords.latitude,this.inputGeoStatus.setAttribute("data-lf-search-geolocation-status",!0),this.inputGeo.value=1,this.searchForm.submit()}}a.deps=["geolocationService","geocodingService","notificationService","eventEmitterService"];const r=a}}]);

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.