!function(){vara=window.console||{error:function(){},warn:function(){}};functiont(i){i.Control.Loading=i.Control.extend({options:{delayIndicator:null,position:"topleft",separate:!1,zoomControl:null,spinjs:!1,spin:{lines:7,length:3,width:3,radius:5,rotate:13,top:"83%"}},initialize:function(o){i.setOptions(this,o),this._dataLoaders={},null!==this.options.zoomControl&&(this.zoomControl=this.options.zoomControl)},onAdd:function(o){if(this.options.spinjs&&"function"!=typeofSpinner)returna.error("Leaflet.loading cannot load because you didn't load spin.js (http://fgnass.github.io/spin.js/), even though you set it in options.");this._addLayerListeners(o),this._addMapListeners(o),this.options.separate||this.zoomControl||(o.zoomControl?this.zoomControl=o.zoomControl:o.zoomsliderControl&&(this.zoomControl=o.zoomsliderControl));vart,n="leaflet-control-loading";returnthis.zoomControl&&!this.options.separate?(t=this.zoomControl._container,n+=" leaflet-bar-part-bottom leaflet-bar-part last",i.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom")):t=i.DomUtil.create("div","leaflet-control-zoom leaflet-control-layer-container leaflet-bar"),this._indicatorContainer=t,this._indicator=i.DomUtil.create("a",n,t),this.options.spinjs&&(this._spinner=newSpinner(this.options.spin).spin(),this._indicator.appendChild(this._spinner.el)),t},onRemove:function(o){this._removeLayerListeners(o),this._removeMapListeners(o)},removeFrom:function(o){returnthis.zoomControl&&!this.options.separate?(this._container.removeChild(this._indicator),this._map=null,this.onRemove(o),this):i.Control.prototype.removeFrom.call(this,o)},addLoader:function(o){if(this._dataLoaders[o]=!0,this.options.delayIndicator&&!this.delayIndicatorTimeout){vart=this;this.delayIndicatorTimeout=setTimeout(function(){t.updateIndicator(),t.delayIndicatorTimeout=null},this.options.delayIndicator)}elsethis.updateIndicator()},removeLoader:function(o){deletethis._dataLoaders[o],this.updateIndicator(),this.options.delayIndicator&&this.delayIndicatorTimeout&&!this.isLoading()&&(clearTimeout(this.delayIndicatorTimeout),this.delayIndicatorTimeout=null)},updateIndicator:function(){this.isLoading()?this._showIndicator():this._hideIndicator()},isLoading:function(){return0<this._countLoaders()},_countLoaders:function(){varo,t=0;for(ointhis._dataLoaders)this._dataLoaders.hasOwnProperty(o)&&t++;returnt},_showIndicator:function(){i.DomUtil.addClass(this._indicator,"is-loading"),i.DomUtil.addClass(this._indicatorContainer,"is-loading"),this.options.separate||(this.zoomControlinstanceofi.Control.Zoom?i.DomUtil.removeClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeofi.Control.Zoomslider&&this.zoomControlinstanceofi.Control.Zoomslider&&i.DomUtil.removeClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_hideIndicator:function(){i.DomUtil.removeClass(this._indicator,"is-loading"),i.DomUtil.removeClass(this._indicatorContainer,"is-loading"),this.options.separate||(this.zoomControlinstanceofi.Control.Zoom?i.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeofi.Control.Zoomslider&&this.zoomControlinstanceofi.Control.Zoomslider&&i.DomUtil.addClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_getLastControlButton:function(){for(varo=this.zoomControl._container,t=o.children.length-1;0<t;){varn=o.children[t];if(this._indicator!==n&&0!==n.offsetWidth&&0!==n.offsetHeight)break;t--}returno.children[t]},_handleLoading:function(o){this.addLoader(this.getEventId(o))},_handleBaseLayerChange:function(o){vart=this;o.layer&&o.layer.eachLayer&&"function"==typeofo.layer.eachLayer?o.layer.eachLayer(function(o){t._handleBaseLayerChange({layer:o})}):i.TileLayer.Canvas&&o.layerinstanceofi.TileLayer.Canvas||t._handleLoading(o)},_handleLoad:function(o){this.removeLoader(this.getEventId(o))},getEventId:function(o){returno.id?o.id:o.layer?o.layer._leaflet_id:o.target._leaflet_id},_layerAdd:function(t){if(t.layer&&t.layer.on)try{t.layer.on({loading:this._handleLoading,load:this._handleLoad},