/** * Minified by jsDelivr using UglifyJS v3.4.4. * Original file: /npm/leaflet.fullscreen@1.4.5/Control.FullScreen.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ !function(){L.Control.FullScreen=L.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},onAdd:function(e){var n,t="leaflet-control-zoom-fullscreen",l="";return n=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:t+=" fullscreen-icon",this._createButton(this.options.title,t,l,n,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),n},_createButton:function(e,n,t,l,r,i){return this.link=L.DomUtil.create("a",n,l),this.link.href="#",this.link.title=e,this.link.innerHTML=t,L.DomEvent.addListener(this.link,"click",L.DomEvent.stopPropagation).addListener(this.link,"click",L.DomEvent.preventDefault).addListener(this.link,"click",r,i),L.DomEvent.addListener(l,s.fullScreenEventName,L.DomEvent.stopPropagation).addListener(l,s.fullScreenEventName,L.DomEvent.preventDefault).addListener(l,s.fullScreenEventName,this._handleFullscreenChange,i),L.DomEvent.addListener(document,s.fullScreenEventName,L.DomEvent.stopPropagation).addListener(document,s.fullScreenEventName,L.DomEvent.preventDefault).addListener(document,s.fullScreenEventName,this._handleFullscreenChange,i),this.link},toggleFullScreen:function(){var e=this._map;e._exitFired=!1,e._isFullscreen?(s.supportsFullScreen&&!this.options.forcePseudoFullscreen?s.cancelFullScreen():L.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:e._container,"leaflet-pseudo-fullscreen"),e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1):(s.supportsFullScreen&&!this.options.forcePseudoFullscreen?s.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:e._container):L.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:e._container,"leaflet-pseudo-fullscreen"),e.fire("enterFullscreen"),e._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleFullscreenChange:function(){var e=this._map;e.invalidateSize(),s.isFullScreen()||e._exitFired||(e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1)}}),L.Map.addInitHook(function(){this.options.fullscreenControl&&(this.fullscreenControl=L.control.fullscreen(this.options.fullscreenControlOptions),this.addControl(this.fullscreenControl))});var s={supportsFullScreen:!(L.control.fullscreen=function(e){return new L.Control.FullScreen(e)}),isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},e="webkit moz o ms khtml".split(" ");if(void 0!==document.exitFullscreen)s.supportsFullScreen=!0;else{for(var n=0,t=e.length;n