text: /*! leaflet-layer-manager v0.0.1 | yonda-yonda | license: MIT */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){e.exports=n(2).extend},function(e){e.exports=JSON.parse('{"a":"0.0.1"}')},function(e,t){
  /*!
   * (extracted from)
   * jQuery JavaScript Library v2.0.3
   * http://jquery.com/
   *
   * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2013-07-03T13:30Z
   */
  var n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object","[object Error]":"error"},r=n.toString,a=n.hasOwnProperty,o=e.exports={};o.isFunction=function(e){return"function"===o.type(e)},o.isArray=Array.isArray,o.isWindow=function(e){return null!=e&&e===e.window},o.type=function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?n[r.call(e)]||"object":typeof e},o.isPlainObject=function(e){if("object"!==o.type(e)||e.nodeType||o.isWindow(e))return!1;try{if(e.constructor&&!a.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}return!0},o.extend=function(){var e,t,n,r,a,i,u=arguments[0]||{},s=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},s=2),"object"==typeof u||o.isFunction(u)||(u={}),c===s&&(u=this,--s);s<c;s++)if(null!=(e=arguments[s]))for(t in e)n=u[t],u!==(r=e[t])&&(f&&r&&(o.isPlainObject(r)||(a=o.isArray(r)))?(a?(a=!1,i=n&&o.isArray(n)?n:[]):i=n&&o.isPlainObject(n)?n:{},u[t]=o.extend(f,i,r)):void 0!==r&&(u[t]=r));return u}},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),o=n(1);function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&y(a,n.prototype),a}).apply(null,arguments)}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}var d=function(e,t){return("number"!=typeof t||t>e.length||t<0)&&(t=e.length),t},_=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n=d(t,n),t.splice(n,0,e)},m=function(e,t){if(t.includes(e))return t.splice(t.indexOf(e),1)},g=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(p(this,e),"string"!=typeof t||0===t.length)throw new Error("The provided name must be string (at least one character).");if(t.includes("."))throw new Error('The provided name must not contain ".", it is a separator.');this.name=t,this.layer=n,this.props=r}return h(e,[{key:"_setPane",value:function(e,t){!function e(t,n,r){n.options&&n.options.pane!==r&&(n.options.pane=r,n.removeFrom(t)),void 0!==n._layers&&Object.keys(n._layers).forEach((function(a){e(t,n._layers[a],r)}))}(e,this.layer,t)}},{key:"_addTo",value:function(e){this.layer.addTo(e)}},{key:"_removeFrom",value:function(e){this.layer.removeFrom(e)}},{key:"_bringToFront",value:function(){!function e(t){void 0!==t.bringToFront?t.bringToFront():void 0!==t._layers&&Object.keys(t._layers).forEach((function(n){e(t._layers[n])}))}(this.layer)}},{key:"_setStyle",value:function(e){!function e(t,n){void 0!==t.setStyle&&t.setStyle(n),void 0!==t._layers&&Object.keys(t._layers).forEach((function(r){e(t._layers[r],n)}))}(this.layer,e)}},{key:"_setOpacity",value:function(e){!function e(t,n){void 0!==t.setOpacity&&t.setOpacity(n),void 0!==t._layers&&Object.keys(t._layers).forEach((function(r){e(t._layers[r],n)}))}(this.layer,e)}},{key:"_setZIndex",value:function(e){return function e(t,n){void 0!==t.setZIndex?t.setZIndex(n):"_layers"in t&&Object.keys(t._layers).forEach((function(r){e(t._layers[r],n)}))}(this.layer,e),++e}}]),e}(),b=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(p(this,e),"string"!=typeof t||0===t.length)throw new Error("The provided name must be String (at least one character).");if(t.includes("."))throw new Error('The provided name must not contain ".", it is a separator.');if(Array.isArray(n)&&!n.every((function(t){return t instanceof e||t instanceof g})))throw new Error("The provided array must be Array of LyrObj or GrpObj.");this.name=t,this._lyrs=n,this.props=r}return h(e,[{key:"getIndexByName",value:function(e){for(var t=0;t<this._lyrs.length;t++)if(this._lyrs[t].name===e)return t;return-1}},{key:"findByName",value:function(e){var t=this.getIndexByName(e);if(t>=0)return this._lyrs[t]}},{key:"hasLayer",value:function(e){return this.getIndexByName(e)>=0}},{key:"_setPane",value:function(e,t){this._lyrs.forEach((function(n){n._setPane(e,t)}))}},{key:"_bringToFront",value:function(e){this._lyrs.forEach((function(t){t._bringToFront(e)}))}},{key:"_setStyle",value:function(e){this._lyrs.forEach((function(t){t._setStyle(e)}))}},{key:"_setOpacity",value:function(e){this._lyrs.forEach((function(t){t._setOpacity(e)}))}},{key:"_setZIndex",value:function(e){return this._lyrs.forEach((function(t){e=t._setZIndex(e)})),e}},{key:"_addTo",value:function(e){this._lyrs.forEach((function(t){t._addTo(e)}))}},{key:"_removeFrom",value:function(e){this._lyrs.forEach((function(t){t._removeFrom(e)}))}}]),e}(),N=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return p(this,e),this._map=t,this._lyrs=[],this._pane="string"==typeof n?n:"overlayPane",void 0===this._map.getPane(this._pane)&&this._map.createPane(this._pane),this}return h(e,[{key:"_createChild",value:function(e,t,n){var r=this;if(Array.isArray(t)){var a=t.map((function(e){var t=e.name,n=e.layer,a=e.props;return r._createChild(t,n,a)})),o=new b(e,a,n);return o._setPane(this._map,this._pane),o._addTo(this._map),o}var i=new g(e,t,n);return i._setPane(this._map,this._pane),i._addTo(this._map),i}},{key:"_getParent",value:function(e){if(""===e)return this;for(var t=function(e){return e.split(".")}(e),n=this,r=0;r<t.length;r++){for(var a=t[r],o=void 0,i=0;i<n._lyrs.length;i++)if(n._lyrs[i].name===a){o=n._lyrs[i];break}if(!(o instanceof b))return;n=o}return n}},{key:"getIndexByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:""},t);var n=this._getParent(t.parentName);if(void 0===n)return-1;for(var r=0;r<n._lyrs.length;r++)if(n._lyrs[r].name===e)return r;return-1}},{key:"findByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:""},t);var n=this._getParent(t.parentName);if(void 0!==n){var r=n.getIndexByName(e);return r>=0?n._lyrs[r]:void 0}}},{key:"hasLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:""},t);var n=this._getParent(t.parentName);if(void 0!==n){var r=n.getIndexByName(e);return r>=0}}},{key:"add",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:"",index:-1},t);var n=this._getParent(t.parentName);if(void 0!==n&&!n.hasLayer(e.name)){var r=this._createChild(e.name,e.layer,e.props);_(r,n._lyrs,t.index),this._update()}}},{key:"remove",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:""},t);var n=this._getParent(t.parentName);if(void 0!==n){var r=n.findByName(e);r&&(r._removeFrom(this._map),m(r,n._lyrs))}}},{key:"reset",value:function(e){var t=this;e=a()(!0,{parentName:""},e);var n=this._getParent(e.parentName);void 0!==n&&(n._lyrs.forEach((function(e){e._removeFrom(t._map)})),n._lyrs=[])}},{key:"replaceLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:""},t);var n=this._getParent(t.parentName);if(void 0!==n){var r=n.getIndexByName(e.name);if(r>=0){var o=this._createChild(e.name,e.layer,e.props);n._lyrs[r]._removeFrom(this._map),n._lyrs[r]=o,this._update()}}}},{key:"setLayers",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=a()(!0,{parentName:"",forse:!1},n);var r=this._getParent(n.parentName);if(void 0!==r){var o=[];e.forEach((function(e){var i;e=a()(!0,{name:"",layer:void 0,props:{}},e),!0===n.force?i=t._createChild(e.name,e.layer,e.props):(i=r.findByName(e.name))?m(i,r._lyrs):i=t._createChild(e.name,e.layer,e.props),o.push(i)})),r._lyrs.forEach((function(e){e._removeFrom(t._map)})),r._lyrs=o,this._update()}}},{key:"sort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=a()(!0,{parentName:""},t),"function"==typeof e){var n=this._getParent(t.parentName);if(void 0===n)return;n._lyrs.sort(e),this._update()}}},{key:"move",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=a()(!0,{parentName:""},n);var r=this._getParent(n.parentName);if(void 0!==r&&(e=d(r._lyrs,e),(t=d(r._lyrs,t))===r._lyrs.length&&(t-=1),e!==t&&e<r._lyrs.length&&t<r._lyrs.length)){var o=r._lyrs.splice(e,1)[0];r._lyrs.splice(t,0,o),this._update()}}},{key:"bringToFront",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:""},t);var n=this._getParent(t.parentName);if(void 0!==n){var r=n.getIndexByName(e);this.move(r,-1,{parentName:t.parentName})}}},{key:"bringToBack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=a()(!0,{parentName:""},t);var n=this._getParent(t.parentName);if(void 0!==n){var r=n.getIndexByName(e);this.move(r,0,{parentName:t.parentName})}}}]),e}(),k=function(e){function t(){return p(this,t),c(this,f(t).apply(this,arguments))}return l(t,e),h(t,[{key:"_update",value:function(){var e=0;this._lyrs.forEach((function(t){e=t._setZIndex(e)})),[].slice.call(this._map.getPane(this._pane).querySelectorAll("svg, canvas")).forEach((function(t){t.style.zIndex=e}))}},{key:"setOpacity",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=a()(!0,{parentName:""},n);var r=this._getParent(n.parentName);if(void 0!==r){var o=r.findByName(e);o&&o._setOpacity(t)}}}]),t}(N),O=function(e){function t(){return p(this,t),c(this,f(t).apply(this,arguments))}return l(t,e),h(t,[{key:"_update",value:function(){this._lyrs.forEach((function(e){e._bringToFront()}))}},{key:"setStyle",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=a()(!0,{parentName:""},n);var r=this._getParent(n.parentName);if(void 0!==r){var o=r.findByName(e);o&&o._setStyle(t)}}},{key:"setOpacity",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setStyle(e,{opacity:t,fillOpacity:t},n)}}]),t}(N),P={version:o.a,raster:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(k,t)},vector:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(O,t)}};"undefined"!=typeof window&&(window.LeafletLayerManager=P);t.default=P}]);