text: function MapInputWidgetManager(){const b=".kolyunya-map-input-widget";var a=this;var c=Array();var e=function(f){if(!$(f).data("initialized")){var g=new MapInputWidget(f);g.initialize();return g}return null};var d=function(g){var f=g.getId();c[f]=g};this.initializeWidgets=function(){$(b).each(function(f,g){var h=e(g);if(h){d(h)}})};this.getWidget=function(f){var g=c[f];return g}}function MapInputWidget(f){const p="input.kolyunya-map-input-widget-input";const b="input.kolyunya-map-input-widget-search-bar";const c="div.kolyunya-map-input-widget-canvas";var l=this;var j;var m;var d;var s;var r=function(){j=$(f).find(p).get(0);m=$(f).find(b).get(0);d=$(f).find(c).get(0)};var a=function(){s=new google.maps.Map(d,{mapTypeId:$(f).data("map-type"),center:q(),zoom:$(f).data("zoom"),styles:[{featureType:"poi",stylers:[{visibility:"off",},],},],mapTypeControlOptions:{mapTypeIds:[],},});google.maps.event.addListener(s,"click",function(u){l.setPosition({latitude:u.latLng.lat(),longitude:u.latLng.lng(),})})};var h=function(){var u=e();l.setPosition(u);$(f).data("initialized",true)};var t=function(){var u=$(f).data("enable-search-bar");var v=!u;$(m).prop("hidden",v);searchBarAutocomplete=new google.maps.places.Autocomplete(m);s.controls[google.maps.ControlPosition.TOP_LEFT].push(m);google.maps.event.addListener(searchBarAutocomplete,"place_changed",function(){var w=this.getPlace();var x=w.geometry;if(x){var y=x.location;l.setPosition(y)}})};var g=function(v){var w=i();var u=n(v);w=w.replace(/%latitude%/g,u.lat());w=w.replace(/%longitude%/g,u.lng());return w};var k=function(){var u=$(j).prop("value")!="";return u};var e=function(){var D;var z=i();var B=$(j).prop("value");if(B!==""){var x=z.indexOf("%latitude%");var A=z.indexOf("%longitude%");var v=x<A;var w=v?0:1;var y=v?1:0;var C=B.match(/-?\d+(\.\d+)?/g)[w];var u=B.match(/-?\d+(\.\d+)?/g)[y];D=new google.maps.LatLng(C,u)}else{D=null}return D};var o=function(){var w=$(f).data("latitude");var v=$(f).data("longitude");var u=new google.maps.LatLng(w,v);return u};var q=function(){var u;if(k()){u=e()}else{u=o()}return u};var i=function(){var u=$(f).data("pattern");return u};var n=function(v){var u;if(v.latitude!==undefined&&v.longitude!==undefined){var x=v.latitude;var w=v.longitude;u=new google.maps.LatLng(x,w)}else{u=v}return u};this.initialize=function(){r();a();h();t()};this.getId=function(){var u=$(f).prop("id");return u};this.setPosition=function(v){if(s.marker){s.marker.setMap(null)}if(v===null){$(j).prop("disabled",true);return}else{$(j).prop("disabled",false)}var u=n(v);if($(f).data("align-map-center")===1){s.panTo(u)}var x=null;if($(f).data("animate-marker")===1){x=google.maps.Animation.DROP}s.marker=new google.maps.Marker({map:s,position:u,draggable:true,animation:x,});google.maps.event.addListener(s.marker,"dragend",function(){l.setPosition(this.getPosition())});var w=$(f).data("pattern");var y=g(u);$(j).prop("value",y)};this.panTo=function(v){var u=n(v);s.panTo(u)};this.setZoom=function(u){s.setZoom(u)}}var mapInputWidgetManager;$(window).on('load',function(){mapInputWidgetManager=new MapInputWidgetManager();mapInputWidgetManager.initializeWidgets()});
  