芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/fluentformpro/public/js/ff_gmap.js
(()=>{function e(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return n(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==a.return||a.return()}finally{if(l)throw i}}}}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t
",{class:"ff_g_map",id:"ff_map_elm_"+n(e).attr("id"),style:"height:300px"}).appendTo(r),$mapDom=r.find(".ff_g_map")),document.getElementById($mapDom.attr("id"))){var i=new google.maps.Map(document.getElementById($mapDom.attr("id")),{center:{lat:50.064192,lng:-130.605469},zoom:3}),s=new google.maps.Marker({map:i,draggable:!0,anchorPoint:new google.maps.Point(0,-29)});if(s.setVisible(!1),!a.geometry||!a.geometry.location)return;google.maps.event.addListener(s,"dragend",(function(e){(new google.maps.Geocoder).geocode({latLng:e.latLng},(function(n,a){a==google.maps.GeocoderStatus.OK&&n[0]&&(n[0].latLng=e.latLng,t(n[0],o))}))})),a.geometry.viewport?i.fitBounds(a.geometry.viewport):(i.setCenter(a.geometry.location),i.setZoom(17)),s.setPosition(a.geometry.location),s.setVisible(!0)}}}function o(e,o){navigator.geolocation?navigator.geolocation.getCurrentPosition((function(n){var r={lat:n.coords.latitude,lng:n.coords.longitude};(new google.maps.Geocoder).geocode({latLng:r},(function(n,i){i==google.maps.GeocoderStatus.OK&&n[0]&&(n[0].latLng=r,t(n[0],o),a(e,n[0],o))}))}),(function(){n(e).val("")})):n(e).val("")}function r(e,n){return e&&e.includes(n)}n(document).on("elementor/popup/show",(function(e,n,t){window.fluentform_gmap_callback()})),window.fluentform_gmap_callback=function(){n(".ff_map_autocomplete").each((function(e,r){var i=n(r),s=i.find("input[data-key_name='address_line_1']").attr("id"),l=i.find("#"+s)[0],c=void 0!==i.data("ff_with_auto_locate")&&i.data("ff_with_auto_locate"),d=new google.maps.places.Autocomplete(l,{fields:["formatted_address","name","address_components","geometry","icon"]});if($country=i.find("select[data-key_name='country']"),$country.length){var _=$country.data("autocomplete_restrictions"),m=[];for(var u in _)m.push(_[u]);m.length>0&&d.setComponentRestrictions({country:m})}c&&"no"!=c&&("on_load"==c&&o(l,i),n(l).parent().find(".ff_input-group-append").on("click",(function(){n(l).val("Please wait .."),o(l,i)})));d.addListener("place_changed",(function(){var e=d.getPlace();e.latLng=e.geometry.location,a(l,e,i),t(e,i)}))}))}}(jQuery))})();