HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/location-field.min.js.tar
httpdocs/wp-content/plugins/so-widgets-bundle/widgets/google-map/fields/js/location-field.min.js000064400000013026151552241110035336 0ustar00var/www/vhosts/uyarreklam.com.trfunction sowbAdminGoogleMapInit(){jQuery(window.sowb).trigger("sow-google-map-loaded")}window.sowbForms=window.sowbForms||{},window.sowb=window.sowb||{},sowbForms.LocationField=function(){return{init:function(e){if(void 0!==window.google.maps.places){var o=e.querySelector(".siteorigin-widget-location-input"),i=e.querySelector(".siteorigin-widget-input"),t=new window.google.maps.places.Autocomplete(o),n=function(){var e=JSON.parse(i.value),t="";e.hasOwnProperty("address")&&(t=e.address),e.hasOwnProperty("name")&&0!==t.indexOf(e.name)&&(t=e.name+", "+t),o.removeEventListener("change",a),o.value=t,o.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),o.addEventListener("change",a)};i.addEventListener("change",n);var s=function(e){i.value=JSON.stringify(e),i.removeEventListener("change",n),i.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),i.addEventListener("change",n)};t.addListener("place_changed",(function(){var e=t.getPlace();sowbForms.LocationField().getSimplePlace(e).then((function(e){s(e)})).catch((function(o){console.warn('SiteOrigin Google Maps Widget: Geocoding failed for "'+e.name+'" with status: '+o)}))}));var a=function(){s({name:o.value})};if(o.addEventListener("change",a),i.value){var r={};try{var l=JSON.parse(i.value);l.hasOwnProperty("location")||l.hasOwnProperty("address")&&(r.name=l.address)}catch(e){r.name=i.value}if(r.hasOwnProperty("name")&&"null"!==r.name){sowbForms.mapsMigrationLogged||(console.info("SiteOrigin Google Maps Widget: Starting automatic migration of location. Please wait a moment..."),sowbForms.mapsMigrationLogged=!0);var d=100;sowbForms._geocodeQueue.push({place:r,field:i}),1===sowbForms._geocodeQueue.length&&setTimeout((function(){!function e(o,t){sowbForms.LocationField().getSimplePlace(o).then((function(o){if(t.value=JSON.stringify(o),i.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),sowbForms._geocodeQueue.shift(),sowbForms._geocodeQueue.length>0){var n=sowbForms._geocodeQueue[0];setTimeout((function(){e(n.place,n.field)}),d)}else console.info("SiteOrigin Google Maps Widget: Location fields updated. Please save the post to complete the migration.")})).catch((function(o){if(o===window.google.maps.GeocoderStatus.OVER_QUERY_LIMIT)if(sowbForms.hasOwnProperty("overQueryLimitCount")?sowbForms.overQueryLimitCount++:sowbForms.overQueryLimitCount=1,sowbForms.overQueryLimitCount<3){var i=sowbForms._geocodeQueue[0];d*=10,setTimeout((function(){e(i.place,i.field)}),d)}else console.warn("SiteOrigin Google Maps Widget: Automatic migration of old address failed with status: "+o),console.info("SiteOrigin Google Maps Widget: Please save this post and open the form to try again.")}))}(r,i)}),d)}else n()}}else console.error("SiteOrigin Google Maps Widget: Failed to load the places library.")},getSimplePlace:function(e){return new Promise((function(o,i){var t={name:e.name};if(t.address=e.hasOwnProperty("formatted_address")?e.formatted_address:"",e.hasOwnProperty("geometry"))t.location=e.geometry.location.toString(),o(t);else{var n={address:e.hasOwnProperty("formatted_address")?e.formatted_address:e.name};(new window.google.maps.Geocoder).geocode(n,(function(e,n){n===window.google.maps.GeocoderStatus.OK?(t.location=e[0].geometry.location.toString(),o(t)):i(n)}))}}))}}},sowbForms.setupLocationFields=function(){window.google&&window.google.maps&&window.google.maps.places&&document.querySelectorAll(".siteorigin-widget-field-type-location").forEach((function(e){!(0===e.offsetWidth||0===e.offsetHeight)&&"true"!==e.getAttribute("data-initialized")&&((new sowbForms.LocationField).init(e),e.setAttribute("data-initialized","true"))}))},jQuery(window.sowb).on("sow-google-map-loaded",(function(){sowbForms.mapsInitializing=!1,sowbForms.mapsInitialized=!0,sowbForms.setupLocationFields()})),window.addEventListener("DOMContentLoaded",(function(){var e=e||jQuery;e&&e(document).on("sowsetupformfield",".siteorigin-widget-field-type-location",(function(){sowbForms._geocodeQueue=sowbForms._geocodeQueue||[];var o=e(this);if(!sowbForms.mapsInitializing)if(sowbForms.mapsInitialized)sowbForms.setupLocationFields();else{sowbForms.mapsInitializing=!0;var i=o.find(".location-field-data").data("apiKey");if(i||(sowbForms.displayNotice(e(this).closest(".siteorigin-widget-form"),soLocationField.missingApiKey,"",[{label:soLocationField.globalSettingsButtonLabel,url:soLocationField.globalSettingsButtonUrl}],o),console.warn("SiteOrigin Google Maps Widget: Could not find API key. Google Maps API key is required."),i=""),window.console&&window.console.error){var t=window.console.error;sowbForms.checkMapsApiInvalidKeyError=function(i){var n;if("string"==typeof i&&(null===(n=i.match(/^Google Maps.*API (error|warning): (.*)/))&&(n=i.match(/^This API project is not authorized to use this API/)),n&&(3===n.length?n=n[2]:1===n.length&&(n="ApiNotActivatedMapError"))),n)switch(n){case"InvalidKeyMapError":sowbForms.displayNotice(e(this).closest(".siteorigin-widget-form"),soLocationField.invalidApiKey,"",[{label:soLocationField.globalSettingsButtonLabel,url:soLocationField.globalSettingsButtonUrl}],o);break;case"ApiNotActivatedMapError":sowbForms.displayNotice(e(this).closest(".siteorigin-widget-form"),soLocationField.apiNotEnabled,"",[],o)}t.apply(window.console,arguments)}.bind(this),window.console.error=sowbForms.checkMapsApiInvalidKeyError}if(e("#sow-google-maps-js").length)jQuery(window.sowb).trigger("sow-google-map-loaded");else{var n="https://maps.googleapis.com/maps/api/js?key="+i+"&libraries=places&callback=sowbAdminGoogleMapInit";e("body").append('<script async type="text/javascript" id="sow-google-maps-js" src="'+n+'">')}}}))}));