1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[530],{2530:(t,e,o)=>{o.d(e,{hz:()=>a,CK:()=>l,hv:()=>r});const s={emptyInfoWindowHtml:'<div class="info-window"><div class="loading"></div></div>'},n={editmode:!1,notify:null},i={invalidClass:"iframe-invalid",loadedClass:"iframe-loaded",onLoad:t=>{},onLoaded:t=>{}};class a{constructor(t,e={}){this.map=t,this.options=Object.assign(s,e),this.setupGoogleMaps()}setupGoogleMaps(){let t,e,o=JSON.parse(this.map.dataset.locations)||[],s=this.map.dataset.mapstyleurl,n=this.map.dataset.markericon,i="1"===this.map.dataset.showInfoWindowOnLoad,a={center:new google.maps.LatLng(0,0)};Object.entries(this.map.dataset).forEach((([t,e])=>{var o;"mapoption"===t.substring(0,9)&&(t=(t=t.replace("mapoption","")).charAt(0).toLowerCase()+t.slice(1),a[t]=(o=e,parseFloat(o).toString()===o.toString()?parseInt(e):e))})),this.mapInstance=new google.maps.Map(this.map,a),t=new google.maps.LatLngBounds,"string"==typeof s&&fetch(s).then((t=>t.json())).then((t=>this.mapInstance.set("styles",t))),o.length>0&&(o.forEach((e=>{this.isValidLocation(e)&&(t.extend(new google.maps.LatLng(e.lat,e.lng)),this.addMarker(e,n,i))})),this.mapInstance.fitBounds(t),e=google.maps.event.addListener(this.mapInstance,"idle",(()=>{let t="number"==typeof a.zoom&&a.zoom%1==0?a.zoom:17;this.mapInstance.setZoom(t),google.maps.event.removeListener(e)})))}isValidLocation(t){return t.hasOwnProperty("lat")&&t.hasOwnProperty("lng")&&!isNaN(t.lat)&&!isNaN(t.lng)}addMarker(t,e,o){let s,n;this.isValidLocation(t)&&(s=new google.maps.Marker({position:{lat:t.lat,lng:t.lng},map:this.mapInstance,title:t.title,icon:e,contentLoaded:!1}),!0!==t.hideInfoWindow&&(n=new google.maps.InfoWindow({content:this.options.emptyInfoWindowHtml}),s.addListener("click",(()=>{n.open(this.mapInstance,s);const e=new URLSearchParams;let o=document.documentElement.lang;e.append("language",o),Object.entries(t).forEach((([t,o])=>{e.append(`mapParams[${t}]`,String(o))})),!1===s.contentLoaded&&fetch("/toolbox/ajax/gm-info-window",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}).catch((t=>{console.error("toolbox error: fetching info window")})).then((t=>t.text())).then((t=>{s.contentLoaded=!0,n.setContent(t),this.mapInstance.setCenter(s.getPosition())}))})),!0===o&&google.maps.event.trigger(s,"click")))}resize(){const t=this.mapInstance.getZoom(),e=this.mapInstance.getCenter();google.maps.event.trigger(this.mapInstance,"resize"),this.mapInstance.setZoom(t),this.mapInstance.setCenter(e)}}class l{constructor(t,e={}){this.translations=window.toolboxJsFrontend?window.toolboxJsFrontend.translations:{},this.options=Object.assign(n,e),this.editMode=this.options.editmode,this.editMode||(null!==this.readCookie("tb-google-opt-out-link")&&t.classList.add("disabled"),t.addEventListener("click",(e=>{e.preventDefault(),null!==this.readCookie("tb-google-opt-out-link")?this.notify(this.translations["toolbox.goptout_already_opt_out"]):(this.createCookie("tb-google-opt-out-link",t.getAttribute("name"),999),this.notify(this.translations["toolbox.goptout_successfully_opt_out"]),t.classList.add("disabled"))})))}notify(t){"function"==typeof this.options.notify?this.options.notify(t):alert(t)}readCookie(t){const e=t+"=",o=document.cookie.split(";");for(let t=0;t<o.length;t++){let s=o[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(e))return s.substring(e.length,s.length)}return null}createCookie(t,e,o){let s="";if(o){const t=new Date;t.setTime(t.getTime()+24*o*60*60*1e3),s="; expires="+t.toGMTString()}document.cookie=t+"="+e+s+"; path=/"}}class r{constructor(t,e={}){this.options=Object.assign(i,e),this.tbElement=t,this.iframe=this.tbElement.querySelector("iframe"),this.init()}init(){this.iframe?(this.options.onLoad(this.iframe),this.iframe.addEventListener("load",(()=>{this.tbElement.classList.add(this.options.loadedClass),this.options.onLoaded(this.iframe)}))):this.tbElement.classList.add(this.options.invalidClass)}}}}]);
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.