File manager - Edit - /home/opticamezl/www/newok/templates/yootheme/packages/builder/elements/map/app/map-google.min.js
Back
/*! YOOtheme Pro v4.5.33 | https://yootheme.com */ (function(z,I){"use strict";function W(e,n){e.src=n}const J=e=>{var n,t,i,s="The Google Maps JavaScript API",y="google",w="importLibrary",M="__ib__",l=document,T=window,u=T[y]||(T[y]={}),a=u.maps||(u.maps={}),b=new Set,m=new URLSearchParams,p=()=>n||(n=new Promise(async(f,v)=>{var S;await(t=l.createElement("script")),m.set("libraries",[...b]+"");for(i in e)m.set(i.replace(/[A-Z]/g,L=>"_"+L[0].toLowerCase()),e[i]);m.set("callback",y+".maps."+M),W(t,"https://maps.googleapis.com/maps/api/js?"+m),a[M]=f,t.onerror=()=>n=v(Error(s+" could not load.")),t.nonce=((S=l.querySelector("script[nonce]"))==null?void 0:S.nonce)||"",l.head.append(t)}));a[w]?console.warn(s+" only loads once. Ignoring:",e):a[w]=(f,...v)=>b.add(f)&&p().then(()=>a[w](f,...v))},U=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,Z=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,X=()=>{},j=()=>{};let P=!1;function H(e){if(P){X(U(e));return}Y(e),P=!0}async function K(e){var n,t;if(!((t=(n=window==null?void 0:window.google)==null?void 0:n.maps)!=null&&t.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(e)}function Y(e){var t,i;const n=!!((i=(t=window.google)==null?void 0:t.maps)!=null&&i.importLibrary);n&&j(Z(e)),n||J(e)}async function C(e,{apiKey:n,type:t,center:i,zoom:s,fit_bounds:y,min_zoom:w,max_zoom:M,zooming:l,dragging:T,clustering:u,cluster_icons:a,controls:b,poi:m,markers:p,styler_invert_lightness:f,styler_hue:v,styler_saturation:S,styler_lightness:L,styler_gamma:q,popup_max_width:N,clustererUrl:F}){H({key:n,version:"weekly"});const[{event:Q,LatLng:E,LatLngBounds:V,Size:x,Point:k},{Map:ee,MapTypeId:te,InfoWindow:ne,StyledMapType:ie},{Marker:_},{MarkerClusterer:ae}]=await Promise.all(["core","maps","marker"].map(o=>K(o)).concat(u?import(F).then(o=>o.default):{})),c=new ee(e,{zoom:Number(s),minZoom:Number(l?w:s),maxZoom:Number(l?M:s),zoomControl:l&&b?null:!1,scrollwheel:l?null:!1,center:new E(i.lat,i.lng),mapTypeId:te[t.toUpperCase()],disableDefaultUI:!b,gestureHandling:T||l?"auto":"none",mapTypeControlOptions:{mapTypeIds:["styled_map","satellite"]}});c.getMapCapabilities=()=>({...c.mapCapabilities,isAdvancedMarkersAvailable:!1});let $;const O=new ne({maxWidth:N?parseInt(N,10):300});let A;if(u){const o={map:c};Array.isArray(a)&&(o.renderer={render({count:d,position:h}){let r;return d<10?r=a[0]:d<100?r=a[1]||a[0]:r=a[2]||a[1]||a[0],new _({position:h,icon:{url:r.url,scaledSize:r.size?new x(...r.size):null},label:{text:String(d),color:r.textColor?r.textColor:null,fontSize:"11px",fontWeight:"bold"},zIndex:Number(_.MAX_ZINDEX)+d})}}),A=new ae(o)}p==null||p.forEach(({lat:o,lng:d,content:h,show_popup:r,icon:R,iconSize:D,iconAnchor:B,title:se})=>{const g=new _({map:c,title:se,position:new E(o,d)});if(R&&g.setIcon({url:R,scaledSize:D?new x(...D):null,anchor:B?new k(...B):null}),A&&A.addMarker(g),h){const G=()=>{if(O.getMap()&&$===g){O.close();return}O.setContent(h),O.open(c,g),$=g};Q.addListener(g,"click",G),r&&G()}});const oe=new ie([{featureType:"all",elementType:"all",stylers:[{invert_lightness:f},{hue:v},{saturation:S},{lightness:L},{gamma:q}]},{featureType:"poi",stylers:[{visibility:m?"on":"off"}]}],{name:"Map"});if(c.mapTypes.set("styled_map",oe),t.toUpperCase()==="ROADMAP"&&c.setMapTypeId("styled_map"),y&&(p!=null&&p.length)){const o=new V;for(const{lat:d,lng:h}of p)o.extend(new E(d,h));c.fitBounds(o)}}z.component("Map",{connected(){var e,n,t;this.script||(this.script=I.$("script",this.$el)),this.script&&((e=this.map)!=null||(this.map=JSON.parse(this.script.textContent)),(n=this.templates)!=null||(this.templates=I.$$("template",this.$el)),(t=this.map.markers)==null||t.forEach((i,s)=>{i.content=I.html(this.templates[s]).trim(),!i.icon&&this.map.icon&&(i.icon=this.map.icon,i.iconSize=this.map.iconSize,i.iconAnchor=this.map.iconAnchor)}),this.map.lazyload&&"IntersectionObserver"in window?I.observeIntersection(this.$el,(i,s)=>{C(this.$el,this.map),s.disconnect()},{rootMargin:`${window.innerHeight/2}px 0px`}):C(this.$el,this.map))}})})(UIkit,UIkit.util);
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings