text: var LL=LL||{};LL.msg={drag:'<p class="title" style="text-align:center;">You can drag this marker to<br>adjust its position...</p>',error_coord:"Sorry, something went wrong with the coordinates you entered. Please review them, or take a look to the supported formats below."},LL.maps={getBoundsZoomLevel:function(t,e){var o={height:256,width:256},a=21,n=t.getNorthEast(),i=t.getSouthWest(),g=(LL.maps.latRad(n.lat())-LL.maps.latRad(i.lat()))/Math.PI,l=n.lng()-i.lng(),r=(0>l?l+360:l)/360,d=LL.maps.zoom(e.height,o.height,g),s=LL.maps.zoom(e.width,o.width,r);return Math.min(d,s,a)},latRad:function(t){var e=Math.sin(t*Math.PI/180),o=Math.log((1+e)/(1-e))/2;return Math.max(Math.min(o,Math.PI),-Math.PI)/2},zoom:function(t,e,o){return Math.floor(Math.log(t/e/o)/Math.LN2)}},LL.ui={$geoB:$(".b-gps-coordinates"),updateGeoBox:function(t,e){if(t.isValid()){var o=roundFloat(t.getLat().toDec(),5),a=roundFloat(t.getLng().toDec(),5),n=o+" "+a;this.$geoB.find("#DD").val(n),$(".home-DD").val(n),this.$geoB.find("#DMS").val(t.getLat().toDMSString()+" "+t.getLng().toDMSString()),this.$geoB.find("#UTM").val(t.toUTMString()),this.$geoB.find("#GEOHASH").val(t.geohash),this.$geoB.find("input:text,textarea").addClass("blink"),setTimeout(function(){LL.ui.$geoB.find("input:text,textarea").removeClass("blink")},1e3),"undefined"==typeof e?(this.$geoB.find(".title b").text(" custom point"),this.updateURL(o,a)):(this.$geoB.find(".title b").text(decodeURIComponent(e)),this.updateURL(o,a,e))}else console.log("Invalid coordinates!")},updateURL:function(t,e,o){var a="/lat/"+t+"/lng/"+e,n="GPS Coordinates for ";"undefined"==typeof o?n=n+"latitude: "+t+", longitude: "+e:(n=n+decodeURIComponent(o)+". Latitude: "+t+", longitude: "+e,a=a+"/place/"+o),document.title=n,window.history.replaceState(null,o,a)},getJSON:function(){var t=this.$geoB.find("#DD").val(),e={};return c=new GPS(t),c.isValid()?(e.DD={},e.DMS={},e.DD.lat=roundFloat(c.getLat().toDec(),5),e.DD.lng=roundFloat(c.getLng().toDec(),5),e.DMS.lat=c.getLat().toDMSString(),e.DMS.lng=c.getLng().toDMSString(),e.geohash=c.geohash,e.UTM=c.toUTMString(),JSON.stringify(e)):"ERROR! Coordinates are invalid!."},updateHomeMarker:function(){var t={};t.latlng={pin:"coo",lat:c.lat.toDec(),lng:c.lon.toDec(),draggable:!0,iw:LL.msg.drag},gmz.deleteAllMarkers().addLocations(t),gmz.iws.latlng.open(gmz.map,gmz.markers.latlng),gmz.map.panTo(gmz.markers.latlng.getPosition()),LL.ui.updateGeoBox(c)}};