@nextgis/ngw-leaflet 1.18.11 → 1.18.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ngw-leaflet.esm-browser.js +35 -35
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +2 -2
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.global.js +36 -36
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +2 -2
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var NgwLeaflet=function(){"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return n=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function i(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}function o(t,e,n,i){return new(n||(n=Promise))((function(o,r){function s(t){try{u(i.next(t))}catch(e){r(e)}}function a(t){try{u(i.throw(t))}catch(e){r(e)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))}function r(t,e){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(u){a=[6,u],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}function u(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=s(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,o){(function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)})(i,o,(e=t[n](e)).done,e.value)}))}}}function h(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}"function"==typeof SuppressedError&&SuppressedError;h('.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid rgba(0,0,0,.2)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}');h(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}");"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var l={exports:{}};(function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)},r}function u(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function h(){return!1}function l(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function d(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function f(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var g="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var P=window.requestAnimationFrame||b("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||P!==x)return P.call(window,o(t,e));t.call(e)}function k(t){t&&M.call(window,t)}var A={extend:n,create:i,bind:o,lastId:r,stamp:s,throttle:a,wrapNum:u,falseFn:h,formatNum:l,trim:c,splitWords:p,setOptions:d,getParamString:f,template:_,isArray:y,indexOf:v,emptyImageUrl:g,requestFn:P,cancelFn:M,requestAnimFrame:C,cancelAnimFrame:k};function T(){}function O(t){if("undefined"!=typeof L&&L&&L.Mixin){t=y(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}T.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(O(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},T.include=function(t){return n(this.prototype,t),this},T.mergeOptions=function(t){return n(this.prototype.options,t),this},T.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var E={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(this._events[t]=i=[]),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=h,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=h;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var u=r[s];u.fn.call(u.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};E.addEventListener=E.on,E.removeEventListener=E.clearAllEventListeners=E.off,E.addOneTimeEventListener=E.once,E.fireEvent=E.fire,E.hasEventListeners=E.listens;var I=T.extend(E);function S(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function B(t,e,n){return t instanceof S?t:y(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,n)}function Z(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function N(t,e){return!t||t instanceof Z?t:new Z(t,e)}function R(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function j(t,e){return t instanceof R?t:new R(t,e)}function D(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function F(t,e,n){return t instanceof D?t:y(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new D(t,e,n)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(B(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(B(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=B(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=B(t)).x===this.x&&t.y===this.y},contains:function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},Z.prototype={extend:function(t){return t=B(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof S?B(t):N(t))instanceof Z?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max;return o.x>=e.x&&i.x<=n.x&&o.y>=e.y&&i.y<=n.y},overlaps:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max;return o.x>e.x&&i.x<n.x&&o.y>e.y&&i.y<n.y},isValid:function(){return!(!this.min||!this.max)}},R.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof D)e=t,n=t;else{if(!(t instanceof R))return t?this.extend(F(t)||j(t)):this;if(n=t._northEast,!(e=t._southWest)||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new D(e.lat,e.lng),this._northEast=new D(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new R(new D(e.lat-i,e.lng-o),new D(n.lat+i,n.lng+o))},getCenter:function(){return new D((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof D||"lat"in t?F(t):j(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof R?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=j(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast();return o.lat>=e.lat&&i.lat<=n.lat&&o.lng>=e.lng&&i.lng<=n.lng},overlaps:function(t){t=j(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast();return o.lat>e.lat&&i.lat<n.lat&&o.lng>e.lng&&i.lng<n.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},D.prototype={equals:function(t,e){return!!t&&(t=F(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,F(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new D(this.lat,this.lng,this.alt)}};var U,W={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new Z(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?u(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?u(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new R(new D(r.lat-i,r.lng-o),new D(s.lat-i,s.lng-o))}},H=n({},W,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,u=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*u}}),V=6378137,q={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new S(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=V*Math.PI,new Z([-U,-U],[U,U]))};function G(t,e,n,i){if(y(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function J(t,e,n,i){return new G(t,e,n,i)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new S((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},H,{code:"EPSG:3857",projection:q,transformation:function(){var t=.5/(Math.PI*q.R);return J(t,.5,-t,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function Q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var n,i,o,r,s,a,u="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)u+=(i?"L":"M")+(a=s[i]).x+" "+a.y;u+=e?Ot?"z":"x":""}return u||"M0 0"}var $=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=It("webkit"),ot=It("android"),rt=It("android 2")||It("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&It("Google")&&st<537&&!("AudioNode"in window),ut=!!window.opera,ht=!nt&&It("chrome"),lt=It("gecko")&&!it&&!ut&&!tt,ct=!ht&&It("safari"),pt=It("phantom"),dt="OTransition"in $,ft=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in $,_t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,yt="MozPerspective"in $,vt=!window.L_DISABLE_3D&&(mt||_t||yt)&&!dt&&!pt,gt="undefined"!=typeof orientation||It("mobile"),bt=gt&&it,wt=gt&&_t,xt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!xt),Pt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Mt=gt&&ut,Ct=gt&<,kt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,At=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(n){}return t}(),Tt=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!Q("svg").createSVGRect),Et=!Ot&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(n){return!1}}();function It(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var St={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:at,opera:ut,chrome:ht,gecko:lt,safari:ct,phantom:pt,opera12:dt,win:ft,ie3d:mt,webkit3d:_t,gecko3d:yt,any3d:vt,mobile:gt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:Lt,touch:Pt,mobileOpera:Mt,mobileGecko:Ct,retina:kt,passiveEvents:At,canvas:Tt,svg:Ot,vml:Et},zt=xt?"MSPointerDown":"pointerdown",Bt=xt?"MSPointerMove":"pointermove",Zt=xt?"MSPointerUp":"pointerup",Nt=xt?"MSPointerCancel":"pointercancel",Rt={},jt=!1;function Dt(t,e,n,i){return"touchstart"===e?Ut(t,n,i):"touchmove"===e?Gt(t,n,i):"touchend"===e&&Jt(t,n,i),this}function Ft(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(zt,i,!1):"touchmove"===e?t.removeEventListener(Bt,i,!1):"touchend"===e&&(t.removeEventListener(Zt,i,!1),t.removeEventListener(Nt,i,!1)),this}function Ut(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&He(t),qt(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(zt,i,!1),jt||(document.addEventListener(zt,Wt,!0),document.addEventListener(Bt,Ht,!0),document.addEventListener(Zt,Vt,!0),document.addEventListener(Nt,Vt,!0),jt=!0)}function Wt(t){Rt[t.pointerId]=t}function Ht(t){Rt[t.pointerId]&&(Rt[t.pointerId]=t)}function Vt(t){delete Rt[t.pointerId]}function qt(t,e){for(var n in t.touches=[],Rt)t.touches.push(Rt[n]);t.changedTouches=[t],e(t)}function Gt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||qt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(Bt,i,!1)}function Jt(t,e,n){var i=function(t){qt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Zt,i,!1),t.addEventListener(Nt,i,!1)}var Kt=xt?"MSPointerDown":Lt?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":Lt?"pointerup":"touchend",Qt="_leaflet_";function Xt(t,e,n){var i,o,r=!1,s=250;function a(t){if(Lt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=s,i=e}function u(t){if(r&&!o.cancelBubble){if(Lt){if("mouse"===t.pointerType)return;var n,s,a={};for(s in o)a[s]=(n=o[s])&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Qt+Kt+n]=a,t[Qt+Yt+n]=u,t[Qt+"dblclick"+n]=e,t.addEventListener(Kt,a,!!At&&{passive:!1}),t.addEventListener(Yt,u,!!At&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function $t(t,e){var n=t[Qt+Yt+e],i=t[Qt+"dblclick"+e];return t.removeEventListener(Kt,t[Qt+Kt+e],!!At&&{passive:!1}),t.removeEventListener(Yt,n,!!At&&{passive:!1}),t.removeEventListener("dblclick",i,!1),this}var te,ee,ne,ie,oe,re=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function ue(t){return"string"==typeof t?document.getElementById(t):t}function he(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function le(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ce(t){var e=t.parentNode;e&&e.removeChild(t)}function pe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function de(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function fe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ge(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function _e(t,e){if(void 0!==t.classList)for(var n=p(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!me(t,e)){var r=ge(t);ve(t,(r?r+" ":"")+e)}}function ye(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,c((" "+ge(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ge(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(o){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function xe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Le(t,e,n){var i=e||new S(0,0);t.style[re]=(mt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Pe(t,e){t._leaflet_pos=e,vt?Le(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Me(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)te=function(){ze(window,"selectstart",He)},ee=function(){Ze(window,"selectstart",He)};else{var Ce=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Ce){var t=document.documentElement.style;ne=t[Ce],t[Ce]="none"}},ee=function(){Ce&&(document.documentElement.style[Ce]=ne,ne=void 0)}}function ke(){ze(window,"dragstart",He)}function Ae(){Ze(window,"dragstart",He)}function Te(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Oe(),ie=t,oe=t.style.outline,t.style.outline="none",ze(window,"keydown",Oe))}function Oe(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Ze(window,"keydown",Oe))}function Ee(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ie(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Se={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:ue,getStyle:he,create:le,remove:ce,empty:pe,toFront:de,toBack:fe,hasClass:me,addClass:_e,removeClass:ye,setClass:ve,getClass:ge,setOpacity:be,testProp:xe,setTransform:Le,setPosition:Pe,getPosition:Me,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:ke,enableImageDrag:Ae,preventOutline:Te,restoreOutline:Oe,getSizedParentNode:Ee,getScale:Ie};function ze(t,e,n,i){if("object"==typeof e)for(var o in e)je(t,o,e[o],n);else for(var r=0,s=(e=p(e)).length;r<s;r++)je(t,e[r],n,i);return this}var Be="_leaflet_events";function Ze(t,e,n,i){if("object"==typeof e)for(var o in e)De(t,o,e[o],n);else if(e)for(var r=0,s=(e=p(e)).length;r<s;r++)De(t,e[r],n,i);else{for(var a in t[Be])De(t,a,t[Be][a]);delete t[Be]}return this}function Ne(){if(Lt)return!(nt||ct)}var Re={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function je(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[Be]&&t[Be][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;Lt&&0===e.indexOf("touch")?Dt(t,e,r,o):Pt&&"dblclick"===e&&!Ne()?Xt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Re[e]||e,r,!!At&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(Re[e],r=function(e){e=e||window.event,Xe(t,e)&&a(e)},!1):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[Be]=t[Be]||{},t[Be][o]=r}function De(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):""),r=t[Be]&&t[Be][o];if(!r)return this;Lt&&0===e.indexOf("touch")?Ft(t,e,o):Pt&&"dblclick"===e&&!Ne()?$t(t,o):"removeEventListener"in t?t.removeEventListener(Re[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[Be][o]=null}function Fe(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Qe(t),this}function Ue(t){return je(t,"wheel",Fe),this}function We(t){return ze(t,"mousedown touchstart dblclick",Fe),je(t,"click",Ye),this}function He(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ve(t){return He(t),Fe(t),this}function qe(t,e){if(!e)return new S(t.clientX,t.clientY);var n=Ie(e),i=n.boundingClientRect;return new S((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ge=ft&&ht?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Je(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ge:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ke={};function Ye(t){Ke[t.type]=!0}function Qe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Xe(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(i){return!1}return n!==t}var $e={on:ze,off:Ze,stopPropagation:Fe,disableScrollPropagation:Ue,disableClickPropagation:We,preventDefault:He,stop:Ve,getMousePosition:qe,getWheelDelta:Je,fakeStop:Ye,skipped:Qe,isExternalTarget:Xe,addListener:ze,removeListener:Ze},tn=I.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Me(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Pe(this._el,n),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=I.extend({options:{crs:K,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(F(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&vt&&!Mt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ze(this._proxy,ae,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(F(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t=t||(vt?this.options.zoomDelta:1)),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t=t||(vt?this.options.zoomDelta:1)),e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof S?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var n=B(e.paddingTopLeft||e.padding||[0,0]),i=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=B(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){_e(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=F(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),u=a*this.getZoomScale(s,e),h=o.distanceTo(i)||1,l=1.42,c=l*l;function p(t){var e=(u*u-a*a+(t?-1:1)*c*c*h*h)/(2*(t?u:a)*c*h),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/f(t)}var _=p(0);function y(t){return a*(f(_)/f(_+l*t))}function v(t){return a*(f(_)*m(_+l*t)-d(_))/c}function g(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(p(1)-_)/l,x=n.duration?1e3*n.duration:1e3*w*.8;function L(){var n=(Date.now()-b)/x,r=g(n)*w;n<=1?(this._flyToFrame=C(L,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(r)/h)),s),this.getScaleZoom(a/y(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),L.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=j(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,j(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=B((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),u=a.getSize().divideBy(2),h=N([a.min.add(n),a.max.subtract(i)]);if(!h.contains(s)){this._enforcingBounds=!0;var l=r.subtract(s),c=B(s.x+l.x,s.y+l.y);(s.x<h.min.x||s.x>h.max.x)&&(c.x=r.x-l.x,l.x>0?c.x+=u.x-n.x:c.x-=u.x-i.x),(s.y<h.min.y||s.y>h.max.y)&&(c.y=r.y-l.y,l.y>0?c.y+=u.y-n.y:c.y-=u.y-i.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new D(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ce(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ce(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=le("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=j(t),n=B(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),u=this.getSize().subtract(n),h=N(this.project(a,i),this.project(s,i)).getSize(),l=vt?this.options.zoomSnap:1,c=u.x/h.x,p=u.y/h.y,d=e?Math.max(c,p):Math.min(c,p);return i=this.getScaleZoom(d,i),l&&(i=Math.round(i/(l/100))*(l/100),i=e?Math.ceil(i/l)*l:Math.floor(i/l)*l),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new Z(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs,i=n.zoom(t*n.scale(e=void 0===e?this._zoom:e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},layerPointToLatLng:function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return B(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return B(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return qe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ue(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ze(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,_e(t,"leaflet-container"+(Pt?" leaflet-touch":"")+(kt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Pe(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Pe(this._mapPane,new S(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Pe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var e=t?Ze:ze;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Xe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!Xe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Qe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Te(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&He(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var u=0;u<i.length;u++)if(i[u].fire(e,s,!0),s.originalEvent._stopped||!1===i[u].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Me(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new Z(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new Z(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new S(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=vt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ye(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=le("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];Le(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ce(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Le(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ye(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=T.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return _e(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ce(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),rn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=le("div",e+"control-container",this._container);function i(i,o){t[i+o]=le("div",e+i+" "+e+o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ce(this._controlCorners[t]);ce(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in d(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return on.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){_e(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(_e(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ye(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ye(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=le("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),We(e),Ue(e);var i=this._section=le("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||ze(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=le("a",t+"-toggle",e);o.href="#",o.title="Layers",Pt?(ze(o,"click",Ve),ze(o,"click",this.expand,this)):ze(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=le("div",t+"-base",i),this._separator=le("div",t+"-separator",i),this._overlaysList=le("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;pe(this._baseLayersList),pe(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)this._addItem(i=this._layers[n]),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&o>1)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),ze(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)e=this._getLayer((t=n[r]).layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)e=this._getLayer((t=n[o]).layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new sn(t,e,n)},un=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=le("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=le("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),We(r),ze(r,"click",Ve),ze(r,"click",o,this),ze(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ye(this._zoomInButton,e),ye(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&_e(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new un,this.addControl(this.zoomControl))}));var hn=function(t){return new un(t)},ln=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=le("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=le("div",e,n)),t.imperial&&(this._iScale=le("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(n=this._getRoundNum(e=o/5280),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),cn=function(t){return new ln(t)},pn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=le("div","leaflet-control-attribution"),We(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new pn).addTo(this)}));var dn=function(t){return new pn(t)};on.Layers=sn,on.Zoom=un,on.Scale=ln,on.Attribution=pn,rn.layers=an,rn.zoom=hn,rn.scale=cn,rn.attribution=dn;var fn=T.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});fn.addTo=function(t,e){return t.addHandler(e,this),this};var mn,_n={Events:E},yn=Pt?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},gn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=I.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){d(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(ze(this._dragStartTarget,yn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Ze(this._dragStartTarget,yn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Te(this._element),ke(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ee(this._element);this._startPoint=new S(e.clientX,e.clientY),this._parentScale=Ie(n),ze(document,gn[t.type],this._onMove,this),ze(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new S(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,He(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Me(this._element).subtract(n),_e(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),_e(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,k(this._animRequest),this._lastEvent=t,this._animRequest=C(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Pe(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ye(document.body,"leaflet-dragging"),this._lastTarget&&(ye(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),gn)Ze(document,gn[t],this._onMove,this),Ze(document,vn[t],this._onUp,this);Ae(),ee(),this._moved&&this._moving&&(k(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function wn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Pn(t=Cn(t,n),n)}function xn(t,e,n){return Math.sqrt(En(t,e,n,!0))}function Ln(t,e,n){return En(t,e,n)}function Pn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Mn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function Mn(t,e,n,i,o){var r,s,a,u=0;for(s=i+1;s<=o-1;s++)(a=En(t[s],t[i],t[o],!0))>u&&(r=s,u=a);u>n&&(e[r]=1,Mn(t,e,n,i,r),Mn(t,e,n,r,o))}function Cn(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)On(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function kn(t,e,n,i,o){var r,s,a,u=i?mn:Tn(t,n),h=Tn(e,n);for(mn=h;;){if(!(u|h))return[t,e];if(u&h)return!1;a=Tn(s=An(t,e,r=u||h,n,o),n),r===u?(t=s,u=a):(e=s,h=a)}}function An(t,e,n,i,o){var r,s,a=e.x-t.x,u=e.y-t.y,h=i.min,l=i.max;return 8&n?(r=t.x+a*(l.y-t.y)/u,s=l.y):4&n?(r=t.x+a*(h.y-t.y)/u,s=h.y):2&n?(r=l.x,s=t.y+u*(l.x-t.x)/a):1&n&&(r=h.x,s=t.y+u*(h.x-t.x)/a),new S(r,s,o)}function Tn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function On(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function En(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,u=n.y-s,h=a*a+u*u;return h>0&&((o=((t.x-r)*a+(t.y-s)*u)/h)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=u*o)),a=t.x-r,u=t.y-s,i?a*a+u*u:new S(r,s)}function In(t){return!y(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Sn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),In(t)}var zn={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:Ln,clipSegment:kn,_getEdgeIntersection:An,_getBitCode:Tn,_sqClosestPointOnSegment:En,isFlat:In,_flat:Sn};function Bn(t,e,n){var i,o,r,s,a,u,h,l,c,p=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=Tn(t[o],e);for(s=0;s<4;s++){for(l=p[s],i=[],o=0,r=(h=t.length)-1;o<h;r=o++)u=t[r],(a=t[o])._code&l?u._code&l||((c=An(u,a,l,e,n))._code=Tn(c,e),i.push(c)):(u._code&l&&((c=An(u,a,l,e,n))._code=Tn(c,e),i.push(c)),i.push(a));t=i}return t}var Zn={clipPolygon:Bn},Nn={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new Z([-180,-90],[180,90])},Rn={R:6378137,R_MINOR:6356752.314245179,bounds:new Z([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new S(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),u=0,h=.1;u<15&&Math.abs(h)>1e-7;u++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=h=Math.PI/2-2*Math.atan(s*e)-a;return new D(a*n,t.x*n/i)}},jn={LonLat:Nn,Mercator:Rn,SphericalMercator:q},Dn=n({},H,{code:"EPSG:3395",projection:Rn,transformation:function(){var t=.5/(Math.PI*Rn.R);return J(t,.5,-t,.5)}()}),Fn=n({},H,{code:"EPSG:4326",projection:Nn,transformation:J(1/180,1,-1/180,.5)}),Un=n({},W,{projection:Nn,transformation:J(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=H,W.EPSG3395=Dn,W.EPSG3857=K,W.EPSG900913=Y,W.EPSG4326=Fn,W.Simple=Un;var Wn=I.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?y(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Hn=Wn.extend({initialize:function(t,e){var n,i;if(d(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s(t)}}),Vn=function(t,e){return new Hn(t,e)},qn=Hn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Hn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Hn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Gn=function(t,e){return new qn(t,e)},Jn=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=B(i),r=B("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return kt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Jn(t)}var Yn=Jn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Jn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=le("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Qn=fn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),_e(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ye(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=Me(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),u=N(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!u.contains(r)){var h=B((Math.max(u.max.x,r.x)-u.max.x)/(s.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(s.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(s.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(s.min.y-u.min.y)).multiplyBy(i);n.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Pe(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Me(e._icon),o=e._map.layerPointToLatLng(i);n&&Pe(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Xn=Wn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=F(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),_e(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(_e(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ce(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ce(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(_e(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Qn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Qn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function $n(t,e){return new Xn(t,e)}var ti=Wn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=F(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ti.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new Z(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),d(this,e),this._latlng=F(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===H.distance){var o=Math.PI/180,r=this._mRadius/H.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),u=s.add(a).divideBy(2),h=n.unproject(u).lat,l=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(l)||0===l)&&(l=r/Math.cos(Math.PI/180*e)),this._point=u.subtract(n.getPixelOrigin()),this._radius=isNaN(l)?0:u.x-n.project([h,t-l]).x,this._radiusY=u.y-s.y}else{var c=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(c).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=En,s=0,a=this._parts.length;s<a;s++)for(var u=this._parts[s],h=1,l=u.length;h<l;h++){var c=r(t,e=u[h-1],n=u[h],!0);c<i&&(i=c,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a=this._rings[0],u=a.length;if(!u)return null;for(t=0,e=0;t<u-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<u-1;t++)if((i+=n=(o=a[t]).distanceTo(r=a[t+1]))>e)return this._map.layerPointToLatLng([r.x-(s=(i-e)/n)*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=F(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return In(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=In(t),i=0,o=t.length;i<o;i++)n?(e[i]=F(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new Z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._pxBounds=new Z([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t.length;if(t[0]instanceof D){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,u=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=kn(a[n],a[n+1],t,n,!0))&&(u[i]=u[i]||[],u[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(u[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=wn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&xn(t,a[o],a[i])<=u)return!0;return!1}});function si(t,e){return new ri(t,e)}ri._flat=Sn;var ai=ri.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a,u=this._rings[0],h=u.length;if(!h)return null;for(r=s=a=0,t=0,e=h-1;t<h;e=t++)s+=((n=u[t]).x+(i=u[e]).x)*(o=n.y*i.x-i.y*n.x),a+=(n.y+i.y)*o,r+=3*o;return this._map.layerPointToLatLng(0===r?u[0]:[s/r,a/r])},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof D&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.prototype._setLatLngs.call(this,t),In(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return In(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new S(e,e);if(t=new Z(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=Bn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,u,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(u=(e=this._parts[o]).length)-1;r<u;s=r++)(n=e[r]).y>t.y!=(i=e[s]).y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(h=!h);return h||ri.prototype._containsPoint.call(this,t,!0)}});function ui(t,e){return new ai(t,e)}var hi=qn.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=y(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=li(t,r);return s?(s.feature=yi(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function li(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,u=[],h=e&&e.pointToLayer,l=e&&e.coordsToLatLng||pi;if(!a&&!s)return null;switch(s.type){case"Point":return ci(h,t,n=l(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=l(a[o]),u.push(ci(h,t,n,e));return new qn(u);case"LineString":case"MultiLineString":return i=di(a,"LineString"===s.type?0:1,l),new ri(i,e);case"Polygon":case"MultiPolygon":return i=di(a,"Polygon"===s.type?1:2,l),new ai(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var c=li({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);c&&u.push(c)}return new qn(u);default:throw new Error("Invalid GeoJSON object.")}}function ci(t,e,n,i){return t?t(e,n):new Xn(n,i&&i.markersInheritOptions&&i)}function pi(t){return new D(t[1],t[0],t[2])}function di(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?di(t[r],e-1,n):(n||pi)(t[r]),o.push(i);return o}function fi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function mi(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?mi(t[r],e-1,n,i):fi(t[r],i));return!e&&n&&o.push(o[0]),o}function _i(t,e){return t.feature?n({},t.feature,{geometry:e}):yi(e)}function yi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return _i(this,{type:"Point",coordinates:fi(this.getLatLng(),t)})}};function gi(t,e){return new hi(t,e)}Xn.include(vi),ii.include(vi),ei.include(vi),ri.include({toGeoJSON:function(t){var e=!In(this._latlngs);return _i(this,{type:(e?"Multi":"")+"LineString",coordinates:mi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!In(this._latlngs),n=e&&!In(this._latlngs[0]),i=mi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),_i(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Hn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),_i(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=yi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?_i(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=gi,wi=Wn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=j(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(_e(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ce(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&de(this._image),this},bringToBack:function(){return this._map&&fe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:le("img");_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Le(this._image,n,e)},_reset:function(){var t=this._image,e=new Z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Pe(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){be(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),xi=function(t,e,n){return new wi(t,e,n)},Li=wi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:le("video");if(_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var a=le("source");a.src=this._url[s],e.appendChild(a)}}}});function Pi(t,e,n){return new Li(t,e,n)}var Mi=wi.extend({_initImage:function(){var t=this._image=this._url;_e(t,"leaflet-image-layer"),this._zoomAnimated&&_e(t,"leaflet-zoom-animated"),this.options.className&&_e(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Ci(t,e,n){return new Mi(t,e,n)}var ki=Wn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(ce,void 0,this._container),200)):ce(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=F(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&de(this._container),this},bringToBack:function(){return this._map&&fe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Wn||(n=e,e=t),e instanceof qn)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=B(this.options.offset),n=this._getAnchor();this._zoomAnimated?Pe(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Ai=ki.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){ki.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",Fe))},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",Fe))},getEvents:function(){var t=ki.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=le("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=le("div",t+"-content-wrapper",e);if(this._contentNode=le("div",t+"-content",n),We(e),Ue(this._contentNode),ze(e,"contextmenu",Fe),this._tipContainer=le("div",t+"-tip-container",e),this._tip=le("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=le("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",ze(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=this.options.maxHeight,o="leaflet-popup-scrolled";i&&t.offsetHeight>i?(e.height=i+"px",_e(t,o)):ye(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Pe(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new S(this._containerLeft,-n-this._containerBottom);o._add(Me(this._container));var r=t.layerPointToContainerPoint(o),s=B(this.options.autoPanPadding),a=B(this.options.autoPanPaddingTopLeft||s),u=B(this.options.autoPanPaddingBottomRight||s),h=t.getSize(),l=0,c=0;r.x+i+u.x>h.x&&(l=r.x+i-h.x+u.x),r.x-l-a.x<0&&(l=r.x-a.x),r.y+n+u.y>h.y&&(c=r.y+n-h.y+u.y),r.y-c-a.y<0&&(c=r.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),Ve(t)},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ti=function(t,e){return new Ai(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof Ai||(t=new Ai(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Wn.include({bindPopup:function(t,e){return t instanceof Ai?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Ai(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Ve(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Oi=ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ki.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ki.prototype.getEvents.call(this);return Pt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){this._contentNode=this._container=le("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,u=o.offsetWidth,h=o.offsetHeight,l=B(this.options.offset),c=this._getAnchor();"top"===a?(e=u/2,n=h):"bottom"===a?(e=u/2,n=0):"center"===a?(e=u/2,n=h/2):"right"===a?(e=0,n=h/2):"left"===a?(e=u,n=h/2):s.x<r.x?(a="right",e=0,n=h/2):(a="left",e=u+2*(l.x+c.x),n=h/2),t=t.subtract(B(e,n,!0)).add(l).add(c),ye(o,"leaflet-tooltip-right"),ye(o,"leaflet-tooltip-left"),ye(o,"leaflet-tooltip-top"),ye(o,"leaflet-tooltip-bottom"),_e(o,"leaflet-tooltip-"+a),Pe(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ei=function(t,e){return new Oi(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Oi||(t=new Oi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Wn.include({bindTooltip:function(t,e){return t instanceof Oi?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Oi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Pt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(_e(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ye(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){this._tooltip&&this._map&&this.openTooltip(t.layer||t.target,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ii=Jn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(pe(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=B(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Si(t){return new Ii(t)}Jn.Default=Yn;var zi=Wn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ce(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(de(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){be(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=le("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ce(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=le("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),h(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ce(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new S(+o,+r);a.z=+s;var u=this._tileCoordsToKey(a),h=this._tiles[u];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new S(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),u=this._tiles[a];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),i&&!(this.options.updateWhenZooming&&o!==this._tileZoom)||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();vt?Le(t.el,o,i):Pe(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new Z(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,u=new Z(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var l=this._tiles[h].coords;l.z===this._tileZoom&&u.contains(new S(l.x,l.y))||(this._tiles[h].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var c=o.min.y;c<=o.max.y;c++)for(var p=o.min.x;p<=o.max.x;p++){var d=new S(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:s.push(d)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<s.length;p++)this._addTile(s[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new R(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new S(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ce(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&C(o(this._tileReady,this,t,null,r)),Pe(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),k(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(_e(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?u(t.x,this._wrapX):t.x,this._wrapY?u(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Bi(t){return new zi(t)}var Zi=zi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&kt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ze(n,"load",o(this._tileOnLoad,this,e,n)),ze(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:kt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=g,ce(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",g),zi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==g))return zi.prototype._tileReady.call(this,t,e,n)}});function Ni(t,e){return new Zi(t,e)}var Ri=Zi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=d(this,e)).detectRetina&&kt?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,Zi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=N(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===Fn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Zi.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function ji(t,e){return new Ri(t,e)}Zi.WMS=Ri,Ni.wms=ji;var Di=Wn.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=Me(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);vt?Le(this._container,a,n):Pe(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Z(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Fi=Di.extend({getEvents:function(){var t=Di.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Di.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ze(t,"mousemove",this._onMouseMove,this),ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ze(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,ce(this._container),Ze(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Di.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=kt?2:1;Pe(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",kt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Di.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Z,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,u=this._ctx;if(a){for(u.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)u[i?"lineTo":"moveTo"]((r=s[n][i]).x,r.y);e&&u.closePath()}this._fillStroke(u,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(n=e);n&&(Ye(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ye(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(_e(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Ui(t){return Tt?new Fi(t):null}var Wi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Hi={_initContainer:function(){this._container=le("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Di.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wi("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ce(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Wi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,e.dashStyle=i.dashArray?y(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Wi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){de(t._container)},_bringToBack:function(t){fe(t._container)}},Vi=Et?Wi:Q,qi=Di.extend({getEvents:function(){var t=Di.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Vi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Vi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ce(this._container),Ze(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Di.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Pe(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Vi("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ce(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){de(t._path)},_bringToBack:function(t){fe(t._path)}});function Gi(t){return Ot||Et?new qi(t):null}Et&&qi.include(Hi),en.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Gi(t)}});var Ji=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Ji(t,e)}qi.create=Vi,qi.pointsToPath=X,hi.geometryToLayer=li,hi.coordsToLatLng=pi,hi.coordsToLatLngs=di,hi.latLngToCoords=fi,hi.latLngsToCoords=mi,hi.getFeature=_i,hi.asFeature=yi,en.mergeOptions({boxZoom:!0});var Yi=fn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ce(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),ke(),this._startPoint=this._map.mouseEventToContainerPoint(t),ze(document,{contextmenu:Ve,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=le("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Z(this._point,this._startPoint),n=e.getSize();Pe(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ce(this._box),ye(this._container,"leaflet-crosshair")),ee(),Ae(),Ze(document,{contextmenu:Ve,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Qi=fn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Qi),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Xi=fn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ye(this._map._container,"leaflet-grab"),ye(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=j(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=n.easeLinearity,s=o.multiplyBy(r/((this._lastTime-this._times[0])/1e3)),a=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,a),h=s.multiplyBy(u/a),l=u/(n.inertiaDeceleration*r),c=h.multiplyBy(-l/2).round();c.x||c.y?(c=e._limitOffset(c,e.options.maxBounds),C((function(){e.panBy(c,{duration:l,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Xi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var $i=fn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ze(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ze(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=B(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ve(t)}}});en.addInitHook("addHandler","keyboard",$i),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=fn.extend({addHooks:function(){ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Je(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),Ve(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,r=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=fn.extend({addHooks:function(){ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(He(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new S(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),ze(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ze(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ye(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Pt||Lt&&!ct||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Pt&&!rt,bounceAtZoomLimits:!0});var no=fn.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ye(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ze(document,"touchmove",this._onTouchMove,this),ze(document,"touchend",this._onTouchEnd,this),He(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(a,this,!0),He(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Qi,en.Drag=Xi,en.Keyboard=$i,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=St,t.Evented=I,t.Mixin=_n,t.Util=A,t.Class=T,t.Handler=fn,t.extend=n,t.bind=o,t.stamp=s,t.setOptions=d,t.DomEvent=$e,t.DomUtil=Se,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=zn,t.PolyUtil=Zn,t.Point=S,t.point=B,t.Bounds=Z,t.bounds=N,t.Transformation=G,t.transformation=J,t.Projection=jn,t.LatLng=D,t.latLng=F,t.LatLngBounds=R,t.latLngBounds=j,t.CRS=W,t.GeoJSON=hi,t.geoJSON=gi,t.geoJson=bi,t.Layer=Wn,t.LayerGroup=Hn,t.layerGroup=Vn,t.FeatureGroup=qn,t.featureGroup=Gn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=Li,t.videoOverlay=Pi,t.SVGOverlay=Mi,t.svgOverlay=Ci,t.DivOverlay=ki,t.Popup=Ai,t.popup=Ti,t.Tooltip=Oi,t.tooltip=Ei,t.Icon=Jn,t.icon=Kn,t.DivIcon=Ii,t.divIcon=Si,t.Marker=Xn,t.marker=$n,t.TileLayer=Zi,t.tileLayer=Ni,t.GridLayer=zi,t.gridLayer=Bi,t.SVG=qi,t.svg=Gi,t.Renderer=Di,t.Canvas=Fi,t.canvas=Ui,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=si,t.Polygon=ai,t.polygon=ui,t.Rectangle=Ji,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t})(l.exports);var c,p={exports:{}},d="object"==typeof Reflect?Reflect:null,f=d&&"function"==typeof d.apply?d.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};c=d&&"function"==typeof d.ownKeys?d.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var m=Number.isNaN||function(t){return t!=t};function _(){_.init.call(this)}p.exports=_,p.exports.once=function(t,e){return new Promise((function(n,i){function o(n){t.removeListener(e,r),i(n)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}k(t,e,r,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&k(t,"error",e,n)}(t,o,{once:!0})}))},_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var y=10;function v(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function g(t){return void 0===t._maxListeners?_.defaultMaxListeners:t._maxListeners}function b(t,e,n,i){var o,r,s,a;if(v(n),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),s=r[e]),void 0===s)s=r[e]=n,++t._eventsCount;else if("function"==typeof s?s=r[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(o=g(t))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function w(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function x(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=w.bind(i);return o.listener=n,i.wrapFn=o,o}function P(t,e,n){var i=t._events;if(void 0===i)return[];var o=i[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):C(o,o.length)}function M(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function C(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}function k(t,e,n,i){if("function"==typeof t.on)i.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(r){i.once&&t.removeEventListener(e,o),n(r)}))}}Object.defineProperty(_,"defaultMaxListeners",{enumerable:!0,get:function(){return y},set:function(t){if("number"!=typeof t||t<0||m(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");y=t}}),_.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||m(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},_.prototype.getMaxListeners=function(){return g(this)},_.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var r;if(e.length>0&&(r=e[0]),r instanceof Error)throw r;var s=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw s.context=r,s}var a=o[t];if(void 0===a)return!1;if("function"==typeof a)f(a,this,e);else{var u=a.length,h=C(a,u);for(n=0;n<u;++n)f(h[n],this,e)}return!0},_.prototype.on=_.prototype.addListener=function(t,e){return b(this,t,e,!1)},_.prototype.prependListener=function(t,e){return b(this,t,e,!0)},_.prototype.once=function(t,e){return v(e),this.on(t,x(this,t,e)),this},_.prototype.prependOnceListener=function(t,e){return v(e),this.prependListener(t,x(this,t,e)),this},_.prototype.removeListener=function(t,e){var n,i,o,r,s;if(v(e),void 0===(i=this._events))return this;if(void 0===(n=i[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,r=n.length-1;r>=0;r--)if(n[r]===e||n[r].listener===e){s=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(i[t]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",t,s||e)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(t){var e,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(o=r[i])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},_.prototype.listeners=function(t){return P(this,t,!0)},_.prototype.rawListeners=function(t){return P(this,t,!1)},_.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):M.call(t,e)},_.prototype.listenerCount=M,_.prototype.eventNames=function(){return this._eventsCount>0?c(this._events):[]};var A=function(t){function n(){var e=t.call(this)||this;return e.name="CancelError",Object.setPrototypeOf(e,n.prototype),e}return e(n,t),n}(Error),T=function(){function t(t){void 0===t&&(t={}),this.options=t,this._promises=new Map}return Object.defineProperty(t.prototype,"isLoaded",{get:function(){return this._promises.size>0},enumerable:!1,configurable:!0}),t.prototype.remove=function(t){this._promises.has(t)&&(this._promises.delete(t),this._onStop())},t.prototype.get=function(t){return this._promises.get(t)},t.prototype.add=function(t,e){var n=this,i=e||t,o=this._promises.get(i);return this.options.onStart&&!this.isLoaded&&this.options.onStart(),o||(this._promises.set(i,t),t.finally((function(){n.remove(i)})),t)},t.prototype.abort=function(){this.isLoaded&&(this._promises.forEach((function(t){t.cancel&&t.cancel()})),this._promises.clear(),this._onStop())},t.prototype.waitFunc=function(t,e){void 0===e&&(e="");var n=this.get(e=e||t.name);return n||this.add(t(),e)},t.prototype.WaitForMe=function(t){void 0===t&&(t="");var e=this.get.bind(this),n=this.add.bind(this);return function(i,o,r){var s=r.value;return t=t||o,r.value=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=e(t);return r||n(s.apply(this,i),t)},r}},t.prototype.GetOrCreateDecorator=function(t){return void 0===t&&(t=""),this.WaitForMe(t)},t.prototype._onStop=function(){this.options.onStop&&!this.isLoaded&&this.options.onStop()},t}(),O=function(t){function n(){var e=t.call(this)||this;return e.name="TimeoutError",Object.setPrototypeOf(e,n.prototype),e}return e(n,t),n}(Error),E=function(t,e,n,i){try{t(n(i))}catch(o){e(o)}},I=0,S=function(){function t(e,n){var i=this;this.id=I++,this._isCanceled=!1,this._isPending=!0,this._cancelHandlers=[],this._children=[],this._cancelPromise=new Promise((function(t,e){i._setCanceledCallback=function(e){return t(e||new A)}}));var o=[this._cancelPromise,new Promise((function(n,o){return e((function(e){e instanceof t?i.attach(e):i._isPending=!1,n(e)}),(function(t){i._isPending=!1,o(t)}),(function(t){if(!i._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");i._cancelHandlers.push(t)}))}))];n&&o.push(new Promise((function(t,e){setTimeout((function(){if(i._isPending)try{i.cancel()}finally{e(new O)}}),n)}))),this._promise=Promise.race(o)}return t.createControl=function(t){return new T(t)},t.resolve=function(e){return new t((function(t){return t(e)}))},t.reject=function(e){return new t((function(t,n){return n(e)}))},t.all=function(e){var n=this;return new t((function(t,n){Promise.all(e).then(t).catch(n)})).catch((function(t){if(t instanceof n.CancelError)for(var i=0,o=e;i<o.length;i++){var r=o[i];"cancel"in r&&r.cancel()}throw t}))},t.prototype.attach=function(t){this._isCanceled?t.cancel():this._children.push(t)},t.prototype.then=function(e,n){var i=this,o=new t((function(t,o){if(i._promise){var r=function(e){n?E(t,o,n,e):o(e)};i._promise.then((function(n){i._isCanceled?r(n):e?E(t,o,e,n):t(n)}),r)}}));return o._parentPromise=this,this._children.push(o),o},t.prototype.catch=function(t){return this._isCanceled&&t&&t(new A),this.then(void 0,t)},t.prototype.finally=function(t){return this._promise?this._promise.finally(t):Promise.reject(this._isCanceled?new A:t)},t.prototype.cancel=function(){if(this._isCanceled||!this._isPending)return this;this._isCanceled=!0;var t=this._getTopParent();if(t&&t.cancel(),this._children&&this._children.forEach((function(t){return t.cancel()})),this._isPending){if(this._cancelHandlers.length)try{for(var e=0,n=this._cancelHandlers;e<n.length;e++){(0,n[e])()}}catch(i){}this._setCanceledCallback&&this._setCanceledCallback()}return this._destroy(),this},t.prototype._getTopParent=function(){for(var t=this._parentPromise,e=!!t;e;)e=!(!t||!t._parentPromise)&&!!(t=t._parentPromise);return t},t.prototype._destroy=function(){this._setCanceledCallback=void 0,this._cancelPromise=void 0,this._promise=void 0},t.CancelError=A,t.TimeoutError=O,t.PromiseControl=T,t}();function z(t,e,n){void 0===n&&(n={});var i=function(t,e){for(void 0===e&&(e=[]);null!==t;t=Object.getPrototypeOf(t))for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++)-1==e.indexOf(n[i])&&e.push(n[i]);return e}(t.prototype),o=void 0===n.replace||n.replace;e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){var r=-1!==i.indexOf(n);if(!o&&!r||o){var s=Object.getOwnPropertyDescriptor(e.prototype,n);s&&Object.defineProperty(t.prototype,n,s)}}))}))}function B(t){return null!=t}function Z(t){return"string"==typeof t?!!t:B(t)}function N(t,e,n){void 0===n&&(n=!1);var i=t,o=e,r=Array.isArray(o),s=r&&[]||{};return r&&Array.isArray(o)?n?(s=s.concat(i=i||[]),o.forEach((function(t,e){void 0===s[e]?s[e]=t:"object"==typeof t?s[e]=N(i[e],t,n):-1===i.indexOf(t)&&s.push(t)}))):s=o:(i&&"object"==typeof i&&Object.keys(i).forEach((function(t){s[t]=i[t]})),Object.keys(o).forEach((function(t){s[t]="object"==typeof o[t]&&o[t]&&"object"==typeof i[t]&&"object"==typeof o[t]?N(i[t],o[t],n):o[t]}))),s}function R(t){!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]);return t}function j(t,e){var n;function i(){for(var o=this,r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];i.clear(),n=setTimeout((function(){n=null,t.apply(o,r)}),e)}return void 0===e&&(e=10),i.clear=function(){n&&(clearTimeout(n),n=null)},i}Object.setPrototypeOf(S.prototype,Promise.prototype);var D=6371;function F(t){return{type:"Polygon",coordinates:[U(t)]}}function U(t){var e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}var W=Math.PI/180,H=180/Math.PI;function V(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;var n=20037508.34*t/180,i=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return[n,i=20037508.34*i/180]}function q(t,e,n,i){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===i:G(t,e));return t===e}function G(t,e){var n=Object.keys(t).sort(),i=Object.keys(e).sort();if(n.length!==i.length)return!1;if(n.join("")!==i.join(""))return!1;for(var o=0;o<n.length;o++){if(!q(t[n[o]],e[i[o]],t,e))return!1}return!0}function J(t){var e={};return Object.keys(t).forEach((function(n){t[n]instanceof Array||t[n]!==Object(t[n])?void 0!==t[n]&&(e[n]=t[n]):e[n]=J(t[n])})),e}function K(t){return"[object Object]"===Object.prototype.toString.call(t)}function Y(t){return t.replace(/([^:]\/)\/+/g,"$1")}function Q(t){return"[object Object]"===Object.prototype.toString.call(t)}function X(t){return"function"==typeof t}var $=function(t,e,n){try{var i=t(e,n);if(void 0!==i)return i}catch(o){}};function tt(t){return function(e,n){for(var i=0,o=e;i<o.length;i++){var r=$(t,o[i],n);if(void 0!==r)return r}throw new Error("Received a mismatched type")}}function et(t){return function(e,n){var i=e.map((function(t){return t()}));return t(i,n)}}var nt={array:et((function(t){var e,n=t[0],i=t[1],o=t[2],r=void 0,s=void 0;if("string"==typeof n&&["string","number","boolean"].includes(n)?(r=n,"number"==typeof i?(s=i,e=o):e=i):Array.isArray(n)&&(e=n),!Array.isArray(e))throw new Error("Expected an array");if(r&&!e.every((function(t){return typeof t===r})))throw new Error("Expected all items in array to be of type ".concat(r));if(s&&e.length!==s)throw new Error("Expected array of length ".concat(s));return e})),boolean:et(tt((function(t){return"boolean"==typeof t?t:void 0}))),literal:et((function(t){return t[0]})),number:et(tt((function(t){return"number"==typeof t?t:void 0}))),object:et(tt((function(t){return null===t||"object"!=typeof t||Array.isArray(t)?void 0:t}))),string:et(tt((function(t){return"string"==typeof t?t:void 0}))),"to-boolean":et(tt(Boolean)),"to-number":et(tt(Number)),"to-string":et(tt(String)),typeof:et((function(t){return function(t){if(null===t)return"null";switch(typeof t){case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"object":if(Array.isArray(t)){var e="value";return t.every((function(t){return"number"==typeof t}))?e="number":t.every((function(t){return"string"==typeof t}))?e="string":t.every((function(t){return"boolean"==typeof t}))&&(e="boolean"),"array<".concat(e,", ").concat(t.length,">")}return"object";default:return"undefined"}}(t[0])}))},it={"+":et((function(t){return t.reduce((function(t,e){return t+e}),0)})),"-":et((function(t){return t.reduce((function(t,e){return t-e}))})),"*":et((function(t){return t.reduce((function(t,e){return t*e}),1)})),"/":et((function(t){return t.reduce((function(t,e){return t/e}))})),"%":et((function(t){return t[0]%t[1]})),"^":et((function(t){return Math.pow(t[0],t[1])})),abs:et((function(t){return Math.abs(t[0])})),acos:et((function(t){return Math.acos(t[0])})),asin:et((function(t){return Math.asin(t[0])})),atan:et((function(t){return Math.atan(t[0])})),ceil:et((function(t){return Math.ceil(t[0])})),cos:et((function(t){return Math.cos(t[0])})),e:function(){return Math.E},floor:et((function(t){return Math.floor(t[0])})),ln:et((function(t){return Math.log(t[0])})),ln2:function(){return Math.LN2},log10:et((function(t){return Math.log10(t[0])})),log2:et((function(t){return Math.log2(t[0])})),max:et((function(t){return Math.max.apply(Math,t)})),min:et((function(t){return Math.min.apply(Math,t)})),pi:function(){return Math.PI},round:et((function(t){return Math.round(t[0])})),sin:et((function(t){return Math.sin(t[0])})),sqrt:et((function(t){return Math.sqrt(t[0])})),tan:et((function(t){return Math.tan(t[0])}))};var ot={get:et((function(t,e){var n=t[0],i=t[1]||e;return i&&"object"==typeof i&&n in i?i[n]:null})),length:et((function(t){var e=t[0];if("string"==typeof e||Array.isArray(e))return e.length})),at:et((function(t){return t[1][t[0]]})),has:et((function(t,e){var n=t[1]||e;return!(!n||"object"!=typeof n||!(t[0]in n))})),in:et((function(t){var e=t[0],n=t[1];if("string"==typeof n)return n.includes(String(e));if(Array.isArray(n))return n.includes(e);throw new Error("Invalid input type for 'in'. Expected string or array, got ".concat(typeof n,"."))})),"index-of":et((function(t){var e=t[0],n=t[1],i=t[2];if("string"==typeof n)return n.indexOf(String(e),i);if(Array.isArray(n))return n.indexOf(e,i);throw new Error("Invalid input type for 'index-of'. Expected string or array, got ".concat(typeof n,"."))})),slice:et((function(t){var e=t[0],n=t[1],i=t[2];if("string"==typeof e)return e.slice(n,i);if(Array.isArray(e))return e.slice(n,i);throw new Error("Invalid input type for 'slice'. Expected string or array, got ".concat(typeof e,"."))}))},rt={concat:et((function(t){return t.reduce((function(t,e){return String(t)+String(e)}),"")})),downcase:et((function(t){return String(t[0]).toLowerCase()})),upcase:et((function(t){return String(t[0]).toUpperCase()}))};var st={"!":et((function(t){return!t[0]})),"!=":et((function(t){return t[0]!==t[1]})),"<":et((function(t){return t[0]<t[1]})),"<=":et((function(t){return t[0]<=t[1]})),"==":et((function(t){return t[0]===t[1]})),">":et((function(t){return t[0]>t[1]})),">=":et((function(t){return t[0]>=t[1]})),coalesce:function(t){for(var e=0;e<t.length;e++){var n=t[e]();if(null!=n)return n}return null},all:function(t){for(var e=0;e<t.length;e++){if(!t[e]())return!1}return!0},any:function(t){for(var e=0;e<t.length;e++){if(t[e]())return!0}return!1},case:function(t){if(t.length<2)throw new Error('The "case" function requires at least a condition and a corresponding output.');if(t.length%2==0)throw new Error("Missing a fallback value or unmatched condition-output pair.");for(var e=0;e<t.length-1;e+=2){var n=t[e](),i=t[e+1]();if(n)return i}return(0,t[t.length-1])()},match:function(t){for(var e=t[0],n=t.slice(1),i=e(),o=n.splice(-1,n.length%2)[0],r=0;r<n.length-1;r+=2){if(n[r]()===i)return n[r+1]()}return o()}},at={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ut(t){if("string"==typeof(i=t)&&/^#([A-Fa-f0-9]{3}){1,2}$/.test(i))return ht(t);if("string"==typeof(n=t)&&n in at)return function(t){return ht(at[t])}(t);if(function(t){return"string"==typeof t&&/^rgb(a?)\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)(?:\s*,\s*([01](?:\.\d+)?))?\s*\)$/.test(t)}(t))return function(t){var e,n=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/;if(e=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)];if(e=t.match(n))return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4])];throw new Error("The '".concat(t,"' Is not valid rgb"))}(t);if("object"==typeof(e=t)&&null!==e&&"r"in e&&"g"in e&&"b"in e&&(!("a"in e)||"number"==typeof e.a&&e.a>=0&&e.a<=1))return function(t){var e=t.a;return a([t.r,t.g,t.b],void 0!==e?[e]:[],!0)}(t);var e,n,i;throw new Error("The '".concat(t,"' cannot be converted to color"))}function ht(t){var e;if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)];if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),parseInt(e[4]+e[4],16)/255];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16)/255];throw new Error("The '".concat(t,"' Is not valid hex"))}function lt(t,e,n,i,o){if("number"==typeof n&&"number"==typeof o)return n+(t-e)/(i-e)*(o-n);try{var r=ut(n),s=ut(o);return function(t){return"rgb(".concat(t.join(","),")")}(r.map((function(n,o){return Math.ceil(lt(t,e,n,i,s[o]))})))}catch(a){console.log(a)}throw new Error("Unsupported output type for linear interpolation.")}var ct={step:function(t){var e=t[0],n=t[1],i=t.slice(2),o=e();if("number"!=typeof o)return n();for(var r=0;r<i.length-2;r+=2){var s=i[r](),a=i[r+1](),u=i[r+2]();if(o>=s&&o<u)return a}return o>=i[i.length-2]()?i[i.length-1]():n()},interpolate:function(t){var e=t[0],n=t[1],i=t.slice(2);if(i.length<2)throw new Error("At least two stops are required");if(i.length<2||i.length%2!=0)throw new Error("Invalid stops provided.");var o=n();if("number"!=typeof o)throw new Error("Input must be a number.");for(var r=e(),s=0;s<i.length-2;s+=2){var a=i[s](),u=i[s+1](),h=i[s+2](),l=i[s+3]();if(o>=a&&o<=h&&"linear"===r[0])return lt(o,a,u,h,l)}throw new Error("Invalid interpolation type.")}};function pt(t){if(Array.isArray(t)){var e=t[0],n=t.slice(1);return"string"==typeof e&&"literal"!==e&&e in dt&&n.length>0}return!1}var dt=n(n(n(n(n(n({},it),nt),rt),ot),st),ct);function ft(t,e){void 0===e&&(e={});var n=t[0],i=t.slice(1),o=dt[n];if(o)return o(i.map((function(t){return function(){return pt(t)?ft(t,e):t}})),e);throw new Error('Expression "'.concat(n,'" is not supported.'))}function mt(t){return function(e){var n=e.properties;return!!n&&ft(t,n)}}var _t=["iconSize","iconAnchor"];function yt(t,e,n){if((e=String(e))===(t=String(t)))return!0;if(n&&e.toUpperCase()===t.toUpperCase())return!0;var i,o="^".concat((i=e,i.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")),"$").replace(/%/g,".*").replace("_",".");return null!==new RegExp(o,n?"i":"").exec(t)}var vt={gt:function(t,e){return t>e},lt:function(t,e){return t<e},ge:function(t,e){return t>=e},le:function(t,e){return t<=e},eq:function(t,e){return t===e},ne:function(t,e){return t!==e},in:function(t,e){return-1!==e.indexOf(t)},notin:function(t,e){return-1===e.indexOf(t)},like:function(t,e){return yt(t,e)},ilike:function(t,e){return yt(t,e,!0)}};function gt(t){return 3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]}function bt(t,e){var n="string"==typeof e[0]?e[0]:"all",i=function(e){if(gt(e)){var n=e[0],i=e[1],o=e[2],r=vt[i];if(r){if(("like"===i||"ilike"===i)&&"string"==typeof n){var s="",a=n.replace(/^%?(\w+)%?$/,(function(e,i){return s=t[i],n.replace(i,o)}));return r(s,a)}return r(t[n],o)}return!1}return bt(t,e)},o=e.filter((function(t){return Array.isArray(t)}));return"any"===n?o.some(i):o.every(i)}function wt(t){for(var e={},i=[],o=0,r=t;o<r.length;o++){var s=r[o];s&&(Array.isArray(s)?i.push(s):e=s)}return function(t){var o=i.find((function(e){return function(t,e){var i=n({},t.properties);return!!i&&(i.$id=t.id,bt(i,e))}(t,e[0])}));return o?n(n({},e),o[1]):e}}function xt(t){var e=t.paint,i=t.defaultPaint,o=function(t){var e=!1,i={};for(var o in t)if(-1===_t.indexOf(o)){var r=o,s=t[r];pt(s)&&(e=!0,i[r]=mt(s))}if(e)return function(e){var o={};for(var r in i)o[r]=i[r](e);return n(n({},t),o)}}(e);if(o){var r=function(t){return Pt({paint:o(t),defaultPaint:i})};return r.paint=Lt({paint:e,defaultPaint:i}),r}return Lt({paint:e,defaultPaint:i})}function Lt(t){var e,i=t.paint,o=n({},t.defaultPaint);return(o=n(n({},o),i)).fill=null===(e=o.fill)||void 0===e||e,o.stroke=void 0!==o.stroke?o.stroke:!o.fill||!(!o.strokeColor&&!o.strokeOpacity),o}function Pt(t){var e=t.paint,i=t.defaultPaint,o=t.getPaintFunctions;if(!e)throw new Error("paint is empty");var r=n({},i);if(X(e)){var s=function(t){var n=Pt({paint:e(t),defaultPaint:i,getPaintFunctions:o});return n.type=e.type,n};return s.type=e.type,s}if(function(t){return!!Array.isArray(t)}(e))return function(t){return Pt({paint:wt(e)(t),defaultPaint:i,getPaintFunctions:o})};if("get-paint"===e.type){var a=function(t,e){if("function"==typeof t.from)return t.from(t.options);if("string"==typeof t.from&&e){var n=e[t.from];if(n)return n(t.options)}}(e,o);a&&(r=Pt({paint:a,defaultPaint:i,getPaintFunctions:o}))}else{if("icon"===e.type)return e;r=xt({paint:e,defaultPaint:i})}return X(r)||("color"in r&&(r.strokeColor||(r.strokeColor=r.color),r.fillColor||(r.fillColor=r.color)),"opacity"in r&&(void 0===r.strokeOpacity&&(r.strokeOpacity=r.opacity),void 0===r.fillOpacity&&(r.fillOpacity=r.opacity))),r}function Mt(t){for(var e,n={},i=0;i<t.length;i++)n[t[i]]=1+(n[t[i]]||0);for(var o in n){n[o]>((void 0!==e?n[e]:0)||0)&&(e=o)}return e}var Ct={polygon:"path",line:"path",point:"circle"},kt={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon"};function At(t){if(t.data){var e=kt[function(t){var e;e="FeatureCollection"===t.type?Mt(t.features.map((function(t){return t.geometry.type}))):"GeometryCollection"===t.type?Mt(t.geometries.map((function(t){return t.type}))):"Feature"===t.type?t.geometry.type:t.type;return e}(t.data)],n=t.paint;n&&Q(n)&&(n.type=n.type?n.type:"polygon"===e||"line"===e?"path":"html"in n||"className"in n?"icon":Ct[e]),t.type=t.type||e}return t}var Tt=function(){this.backspace=8,this.tab=9,this.enter=13,this.shift=16,this.ctrl=17,this.alt=18,this["pause/break"]=19,this.caps_lock=20,this.escape=27,this.page_up=33,this.page_down=34,this.end=35,this.home=36,this.left_arrow=37,this.up_arrow=38,this.right_arrow=39,this.down_arrow=40,this.insert=45,this.delete=46,this.left_window_key=91,this.right_window_key=92,this.select_key=93,this.numpad_0=96,this.numpad_1=97,this.numpad_2=98,this.numpad_3=99,this.numpad_4=100,this.numpad_5=101,this.numpad_6=102,this.numpad_7=103,this.numpad_8=104,this.numpad_9=105,this.multiply=106,this.add=107,this.subtract=109,this.decimal_point=110,this.divide=111,this.f1=112,this.f2=113,this.f3=114,this.f4=115,this.f5=116,this.f6=117,this.f7=118,this.f8=119,this.f9=120,this.f10=121,this.f11=122,this.f12=123,this.num_lock=144,this.scroll_lock=145,this["semi-colon"]=186,this.equal_sign=187,this[","]=188,this["-"]=189,this["."]=190,this["/"]=191,this["`"]=192,this["["]=219,this["\\"]=220,this["]"]=221,this["'"]=222},Ot=function(){function t(){this.keyCodeAlias=new Tt,this.keys={},this._windowOnFocus=this.windowOnFocus.bind(this),this._keysPressed=this.keysPressed.bind(this),this._keysReleased=this.keysReleased.bind(this),this.addKeyboardEventsListener()}return t.prototype.pressed=function(t){var e=this.keyCodeAlias[t];return!!e&&this.keys[e]},t.prototype.addKeyboardEventsListener=function(){"undefined"!=typeof window&&(window.addEventListener("focus",this._windowOnFocus,!1),window.addEventListener("keydown",this._keysPressed,!1),window.addEventListener("keyup",this._keysReleased,!1))},t.prototype.removeKeyboardEventsListener=function(){"undefined"!=typeof window&&(window.removeEventListener("focus",this._windowOnFocus,!1),window.removeEventListener("keydown",this._keysPressed,!1),window.removeEventListener("keyup",this._keysReleased,!1))},t.prototype.keysPressed=function(t){t.stopPropagation(),this.keys[t.keyCode]||(this.keys[t.keyCode]=!0)},t.prototype.keysReleased=function(t){t.stopPropagation(),this.keys[t.keyCode]=!1},t.prototype.windowOnFocus=function(){this.keys={}},t}(),Et=function(){function t(t,e){this.webMap=t,e&&(e.value&&this.setValue(e.value),e.name&&(this.name=e.name),e.event&&(this.event=e.event))}return t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(t){this.value=t},t}(),It=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="center",e.event="moveend",e}return e(n,t),n.prototype.getValue=function(){return this.webMap.getCenter()},n.prototype.setValue=function(t){this.webMap.setCenter(t)},n.prototype.toString=function(t){var e=t.map((function(t){return t.toFixed(5)}));return e[0]+"_"+e[1]},n.prototype.parse=function(t){return t.split("_").map(Number)},n}(Et),St=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="zoom",e.event="zoomend",e}return e(n,t),n.prototype.getValue=function(){var t=this.webMap.getZoom();return void 0!==t?Math.round(t):void 0},n.prototype.setValue=function(t){this.webMap.setZoom(t)},n.prototype.toString=function(t){return String(t)},n.prototype.parse=function(t){return Number(t)},n}(Et);var zt=0,Bt={minZoom:0,maxZoom:22,paint:{color:"#0000ff",opacity:.4,strokeOpacity:1,stroke:!0,radius:8,weight:1},selectedPaint:{color:"#00008b",opacity:.4,strokeOpacity:1,stroke:!0,radius:12,weight:1},create:!0},Zt=function(t){function i(e){var n=t.call(this,e)||this;n._layersIdCounter=1,n._layersOrderCounter=1,n._baselayers=[],n._layers={},n._selectedLayers=[];var i=n.options.tileJson;return i&&n.emitter.once("build-map",(function(){return n.addTileJsonLayer(i)})),n}return e(i,t),i.prototype.fitLayer=function(t,e){return o(this,void 0,void 0,(function(){var n,i,o;return r(this,(function(r){switch(r.label){case 0:return n=this.getLayer(t),(i=n&&(n.getBounds||n.getExtent))?[4,i.call(n)]:[3,2];case 1:(o=r.sent())&&this.fitBounds(o,e),r.label=2;case 2:return[2]}}))}))},i.prototype.isBaseLayer=function(t){var e=this.getLayer(t);if(e&&e.id)return-1!==this._baselayers.indexOf(e.id)},i.prototype.getBaseLayers=function(){var t=this,e=[];return this._baselayers.forEach((function(n){var i=t._layers[n];i&&e.push(i)})),e},i.prototype.getBaseLayersIds=function(){return this._baselayers},i.prototype.getLayer=function(t){return"string"==typeof t?this._layers[t]:t},i.prototype.getLayerId=function(t){var e=this.getLayer(t);if(e){if(e.id)return null==e?void 0:e.id;if(e&&e.options)return e.options.id}throw new Error("No id for layer")},i.prototype.getLayers=function(){return Object.keys(this._layers)},i.prototype.allLayers=function(){return this._layers},i.prototype.orderedLayers=function(){return Object.values(this._layers).sort((function(t,e){return t.order&&e.order?t.order-e.order:0}))},i.prototype.findLayer=function(t){for(var e in this._layers){var n=this._layers[e];if(t(n))return n}},i.prototype.isLayerVisible=function(t){var e=this.getLayer(t);return!(!e||void 0===e.options.visibility)&&e.options.visibility},i.prototype.addBaseLayer=function(t,e){return o(this,void 0,void 0,(function(){return r(this,(function(i){switch(i.label){case 0:return[4,this.addLayer(t,n(n({},e),{baselayer:!0}),void 0)];case 1:return[2,i.sent()]}}))}))},i.prototype.addLayer=function(t,e,i){var s,a;return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,u,h,l,c,p,d,f,m,_,y,v;return r(this,(function(r){switch(r.label){case 0:return o=this._layersIdCounter++,u=B(i)?i:void 0!==e.order?e.order:this.reserveOrder(),"string"!=typeof t?[3,1]:(h=this.getLayerAdapter(t),[3,4]);case 1:return"function"!=typeof t?[3,2]:(h=t,[3,4]);case 2:return"then"in t?[4,t]:[3,4];case 3:h=r.sent(),r.label=4;case 4:return this._updateGeoJsonOptions(l=e),e=n({id:String(o),order:u},e),c=null===(s=e.visibility)||void 0===s||s,e.visibility=!1,e.baselayer&&(e.order=0),this.options.onBeforeAddLayer&&(p=this.options.onBeforeAddLayer({options:e,adapter:h}))&&(p.options&&(e=p.options),p.adapter&&(h=p.adapter)),void 0===h?[3,12]:((d=new h(this.mapAdapter.map,e)).options=n(n({},e),d.options),d.options.baselayer&&(e.baselayer=!0,e.order=0,d.options.order=0),f=void 0,d.options.id&&(f=String(d.options.id),this._layers[f]=d),this._emitLayerEvent("layer:preadd",f||"",d),[4,this.onMapLoad()]);case 5:return r.sent(),d.map=this.mapAdapter.map,[4,d.addLayer(d.options)];case 6:if(m=r.sent(),d.layer=m,d.id=d.options.id||String(o),d.options.id=d.id,e.baselayer&&(d.options.order=0),d.order=null!==(a=d.options.order)&&void 0!==a?a:u,f&&delete this._layers[f],f=String(d.id),this._layers[f])throw Error("layer with id '".concat(f,"' already exist"));return f?(this._layers[f]=d,l.filter&&this.filterLayer(d,l.filter),e.baselayer&&this._baselayers.push(f),c?[4,this.showLayer(f)]:[3,8]):[3,8];case 7:r.sent(),r.label=8;case 8:return void 0!==(_=e.opacity)&&_<=1&&this.setLayerOpacity(d,_),y=m&&(d.getBounds||d.getExtent),e.fit&&y?[4,y.call(d)]:[3,11];case 9:return(v=r.sent())?[4,this.fitBounds(v)]:[3,11];case 10:r.sent(),r.label=11;case 11:return e.onAdded&&e.onAdded(d),this._emitLayerEvent("layer:add",f,d),[2,d];case 12:return[2,Promise.reject("No adapter")]}}))}))},i.prototype.addLayerFromAsyncAdapter=function(t,e,n){return o(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){switch(r.label){case 0:return i=n||void 0!==e.order?e.order:this.reserveOrder(),[4,t()];case 1:return(o=r.sent())?[2,this.addLayer(o,e,i)]:[2,Promise.reject("No adapter")]}}))}))},i.prototype.removeLayers=function(t){for(var e in this._layers){var n=!0;t&&(n=t(e,this._layers[e])),n&&(this.removeLayer(e),delete this._layers[e])}},i.prototype.reserveOrder=function(){return this._layersOrderCounter++},i.prototype.removeOverlays=function(){this.removeLayers((function(t,e){return!(e&&e.options&&e.options.baselayer)}))},i.prototype.removeLayer=function(t){var e=this.getLayer(t),n=e&&this.getLayerId(e);if(e&&n){if(this.emitter.emit("layer:preremove",e),e.beforeRemove&&e.beforeRemove(),e.removeLayer?e.removeLayer():this.mapAdapter.removeLayer(e.layer),e.options&&e.options.baselayer){var i=this._baselayers.indexOf(n);i&&this._baselayers.splice(i,1)}delete this._layers[n],this.emitter.emit("layer:remove",e)}},i.prototype.addGeoJsonLayer=function(t,e){return void 0===t&&(t={}),(t=t||{}).multiselect=void 0!==t.multiselect&&t.multiselect,t.unselectOnSecondClick=void 0===t.unselectOnSecondClick||t.unselectOnSecondClick,e||(t=At(t)),t.paint=t.paint||{},this.addLayer(e||"GEOJSON",t)},i.prototype.addFeatureLayer=function(t){return void 0===t&&(t={}),this.addGeoJsonLayer(t)},i.prototype.addTileLayer=function(t,e){return void 0===e&&(e={}),this.addLayer("TILE",n(n({},e),{url:t}))},i.prototype.addImageLayer=function(t,e){var i;return"string"==typeof t?i=t:(i=t.url,e=t),this.addLayer("IMAGE",n(n({},e),{url:i}))},i.prototype.showLayer=function(t,e){return void 0===e&&(e={}),this.toggleLayer(t,!0,e)},i.prototype.hideLayer=function(t,e){return void 0===e&&(e={}),this.toggleLayer(t,!1,e)},i.prototype.toggleLayer=function(t,e,n){var i=this;void 0===n&&(n={});var s=this.getLayer(t),a=void 0!==e?e:!(s&&s.options.visibility),u=void 0!==n.silent&&n.silent;return s?this.onMapLoad().then((function(){return t=s,o(i,void 0,void 0,(function(){var e,n,i,o,s,h,l,c=this;return r(this,(function(r){switch(r.label){case 0:if(e=String(t.id),n=a?"layer:preshow":"layer:prehide",i=a?"layer:show":"layer:hide",u||(this._emitLayerEvent(n,e,t),this._emitLayerEvent("layer:pretoggle",e,t)),!a||!this.mapAdapter)return[3,9];if(o=t.options.baselayer?0:t.options.order,!t.options.baselayer||!this._baselayers.length)return[3,4];s=this._baselayers.filter((function(e){return e!==t.id&&c.isLayerVisible(e)})),h=0,l=s,r.label=1;case 1:return h<l.length?[4,this.hideLayer(l[h])]:[3,4];case 2:r.sent(),r.label=3;case 3:return h++,[3,1];case 4:return t.showLayer?[4,t.showLayer.call(t,t.layer)]:[3,6];case 5:return r.sent(),[3,8];case 6:return void 0===t.layer?[3,8]:[4,this.mapAdapter.showLayer(t.layer)];case 7:r.sent(),r.label=8;case 8:return void 0!==o&&this.mapAdapter.setLayerOrder(t.layer,o,this._layers),[3,13];case 9:return t.hideLayer?[4,t.hideLayer.call(t,t.layer)]:[3,11];case 10:return r.sent(),[3,13];case 11:return void 0===t.layer?[3,13]:[4,this.mapAdapter.hideLayer(t.layer)];case 12:r.sent(),r.label=13;case 13:return t.options.visibility=a,u||(this._emitLayerEvent(i,e,t),this._emitLayerEvent("layer:toggle",e,t)),[2]}}))}));var t})):Promise.resolve()},i.prototype.updateLayer=function(t){var e=this,n=this.getLayer(t);if(n){if(n.updateLayer)return Promise.resolve(n.updateLayer());if(this.isLayerVisible(n))return this.hideLayer(n,{silent:!0}).then((function(){return e.showLayer(n,{silent:!0})}))}return Promise.resolve()},i.prototype.setLayerOpacity=function(t,e){var n=this.getLayer(t);n&&(n.setOpacity?n.setOpacity(e):this.mapAdapter.setLayerOpacity&&this.mapAdapter.setLayerOpacity(n.layer,e))},i.prototype.isLayerLabelVisible=function(t){var e,n=this.getLayer(t);return n.isLabelVisible?n.isLabelVisible():null===(e=n.options.labelVisibility)||void 0===e||e},i.prototype.showLayerLabel=function(t){this.toggleLayerLabel(t,!0)},i.prototype.hideLayerLabel=function(t){this.toggleLayerLabel(t,!1)},i.prototype.toggleLayerLabel=function(t,e){var n=this.getLayer(t);return e=null!=e?e:!this.isLayerLabelVisible(t),n&&(e?n.showLabel&&(n.options.labelVisibility=!0,n.showLabel()):n.hideLabel&&(n.options.labelVisibility=!1,n.hideLabel()),n.id&&this._emitLayerEvent("layer:label:toggle",n.id,n)),e},i.prototype.selectLayer=function(t,e){var n=this.getLayer(t);if(n){n&&n.select&&n.select(e);var i=this.getLayerId(n);i&&this._selectedLayers.push(i)}},i.prototype.unSelectLayer=function(t,e){var n=this.getLayer(t);if(n){var i=n&&n;i.unselect&&i.unselect(e);var o=this.getLayerId(n);if(o){var r=this._selectedLayers.indexOf(o);-1!==r&&this._selectedLayers.splice(r,1)}}},i.prototype.unSelectLayers=function(){for(var t,e=0,n=Object.values(this.allLayers());e<n.length;e++)(t=n[e]).unselect&&t.unselect()},i.prototype.filterLayer=function(t,e){var n=this.getLayer(t);return n.filter?n.filter(e):[]},i.prototype.propertiesFilter=function(t,e,n){var i=this.getLayer(t);if(i){var o=i;if(o.propertiesFilter)return o.propertiesFilter(e,n);o.filter&&this.filterLayer(o,(function(t){return!t.feature||!t.feature.properties||bt(t.feature.properties,e)}))}return Promise.resolve()},i.prototype.removeLayerFilter=function(t){var e=this.getLayer(t);e.removeFilter?e.removeFilter():e.filter&&e.filter((function(){return!0}))},i.prototype.setLayerData=function(t,e){var n=this.getLayer(t);if(n){if(n.setData)return n.setData(e);if(n.clearLayer&&n.addData)return n.clearLayer(),n.addData(e)}return Promise.resolve()},i.prototype.addLayerData=function(t,e){var n=this.getLayer(t);n.addData&&n.addData(e)},i.prototype.clearLayerData=function(t,e){var n=this.getLayer(t);n&&n.clearLayer&&n.clearLayer(e)},i.prototype.setLayerPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.setPaint&&n.setPaint(e)},i.prototype.setLayerSelectedPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.setSelectedPaint&&n.setSelectedPaint(e)},i.prototype.updateLayerPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.updatePaint&&n.updatePaint(e)},i.prototype.updateLayerSelectedPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.updateSelectedPaint&&n.updateSelectedPaint(e)},i.prototype.getAttributions=function(t){var e=[];for(var n in this._layers){var i=this._layers[n],o=!(void 0===t.onlyVisible||t.onlyVisible)||i.options.visibility;if(o&&t.onlyBaselayer&&(o=this._baselayers.includes(n)),o){var r=i.options&&i.options.attribution;r&&e.push(r)}}return e},i.prototype.getActiveBaseLayer=function(){var t=this,e=this.getBaseLayers().find((function(e){return t.isLayerVisible(e)}));if(e)return this.getLayer(e)},i.prototype.addTileJsonLayer=function(t){return this.addLayer("TILE",{url:t.tiles[0],maxZoom:t.maxzoom,minZoom:t.minzoom,subdomains:t.scheme,attribution:t.attribution})},i.prototype._emitLayerEvent=function(t,e,n){var i=String(t);if(B(e)&&i.startsWith("layer:")){var o=i.replace("layer:","layer-"+e+":");this.emitter.emit(o,n)}this.emitter.emit(t,n)},i.prototype._onLayerClick=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this._emitLayerEvent("layer:click",t.layer.id||"",t),[2,Promise.resolve(t)]}))}))},i.prototype._onLayerSelect=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this._emitLayerEvent("layer:select",t.layer.id||"",t),[2,Promise.resolve(t)]}))}))},i.prototype._updateGeoJsonOptions=function(t){var e=this,n=t.onSelect,i=t.onLayerSelect,o=t.onMouseOut,r=t.onMouseOver,s=t.onClick||t.onLayerClick;t.onClick=function(t){return s&&s(t),e._onLayerClick(t)},t.onMouseOut=function(t){var n=t.layer.id;o&&o(t),B(n)&&e._emitLayerEvent("layer:mouseout",n,t)},t.onMouseOver=function(t){var n=t.layer.id;r&&r(t),B(n)&&e._emitLayerEvent("layer:mouseover",n,t)};var a=n||i;t.onSelect=function(t){return a&&a(t),e._onLayerSelect(t)},t.nativePaint||(this.options.paint&&(t.paint=Pt({paint:t.paint||{},defaultPaint:this.options.paint,getPaintFunctions:this.getPaintFunctions})),t.selectedPaint&&this.options.selectedPaint&&(t.selectedPaint=Pt({paint:t.selectedPaint,defaultPaint:this.options.selectedPaint,getPaintFunctions:this.getPaintFunctions})))},i}(function(){function t(e){this.options=Bt,this.emitter=new p.exports.EventEmitter,this.keys=t.keys,this.runtimeParams=[],this.getPaintFunctions=t.getPaintFunctions,this.mapState=[It,St],this.id=zt++,this._initMapState={},this._mapState=[],this._eventsStatus={},this._mapEvents={},this.mapAdapter=e.mapAdapter,this._starterKits=e.starterKits||[],e&&(this.options=N(Bt||{},e)),this.options.runtimeParams&&(this.runtimeParams=this.options.runtimeParams),this._addEventsListeners(),this.options.tileJson&&this._setTileJsonOptions(this.options.tileJson),this.options.create&&this.create()}return t.prototype.getId=function(){return this.id},t.prototype.create=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return this.getEventStatus("create")?[3,3]:[4,this._setInitMapState(this.mapState)];case 1:return t.sent(),[4,this._setupMap()];case 2:t.sent(),this._emitStatusEvent("create",this),t.label=3;case 3:return[2,this]}}))}))},t.prototype.setRuntimeParams=function(t){this.runtimeParams.push(t)},t.prototype.destroy=function(){this._removeEventListeners(),function(t){for(var e in t)delete t[e]}(this._emitStatusEvent),this.mapAdapter.destroy&&this.mapAdapter.destroy()},t.prototype.getState=function(){var t={};return this._mapState.forEach((function(e){t[e.name]=e.getValue()})),t},t.prototype.getRuntimeParams=function(){var t=this,e={};return this._mapState.forEach((function(n){for(var i=0,o=t.runtimeParams;i<o.length;i++){var r=o[i].get(n.name);if(void 0!==r){e[n.name]=n.parse(r);break}}})),e},t.prototype.getContainer=function(){if(this.mapAdapter.getContainer)return this.mapAdapter.getContainer();if(this.options.target){if(this.options.target instanceof HTMLElement)return this.options.target;if("string"==typeof this.options.target){var t=document.getElementById(this.options.target);if(t)return t}}},t.prototype.setCursor=function(t){this.mapAdapter.setCursor&&this.mapAdapter.setCursor(t)},t.prototype.getCursor=function(){if(this.mapAdapter.getCursor)return this.mapAdapter.getCursor();var t=this.getContainer();return t?t.style.cursor:void 0},t.prototype.setCenter=function(t){return this.mapAdapter.setCenter(t),this},t.prototype.getCenter=function(){return this.mapAdapter.getCenter()},t.prototype.getBounds=function(){if(this.mapAdapter.getBounds)return this.mapAdapter.getBounds()},t.prototype.getBoundsPolygon=function(){var t=this.getBounds();if(t)return{type:"Feature",properties:{},geometry:F(t)}},t.prototype.setZoom=function(t){return this.mapAdapter.setZoom(t),this},t.prototype.getZoom=function(){var t=this.mapAdapter.getZoom();if("number"==typeof t)return t},t.prototype.zoomIn=function(){if(this.mapAdapter.zoomIn)this.mapAdapter.zoomIn();else{var t=this.getZoom();if(void 0!==t)this.setZoom(t+1)}},t.prototype.zoomOut=function(){if(this.mapAdapter.zoomOut)this.mapAdapter.zoomOut();else{var t=this.getZoom();if(void 0!==t)this.setZoom(t-1)}},t.prototype.setView=function(t,e){if(Array.isArray(t)){var n=t;this.mapAdapter.setView&&n&&B(e)?this.mapAdapter.setView(n,e):(n&&this.mapAdapter.setCenter(n),B(e)&&this.mapAdapter.setZoom(e))}else{this.mapAdapter.setView&&this.mapAdapter.setView(t)}},t.prototype.fitBounds=function(t,e){return t.every((function(t){return B(t)}))&&(t[1]<-85.06&&(t[1]=-85.06),t[3]>85.06&&(t[3]=85.06),this.mapAdapter.fitBounds(t,e)),this},t.prototype.getEventStatus=function(t){var e=this._eventsStatus[t];return null!=e&&e},t.prototype.onLoad=function(t){var e=this;return void 0===t&&(t="create"),new Promise((function(n){e.getEventStatus(t)?n(e):e.emitter.once(t,(function(){n(e)}))}))},t.prototype.onMapLoad=function(t){var e=this;return new Promise((function(n){var i,o=function(){var i=e.mapAdapter;t&&t(i),i&&n(i)},r=null===(i=e.mapAdapter.isLoaded)||void 0===i||i;e.mapAdapter.map&&r?o():e.mapAdapter.emitter.once("create",(function(){o()}))}))},t.prototype.getLayerAdapters=function(){return this.mapAdapter.layerAdapters},t.prototype.getLayerAdapter=function(t){return this.mapAdapter.layerAdapters[t]},t.prototype.locate=function(t,e){if(this.mapAdapter&&this.mapAdapter.locate)return this.mapAdapter.locate(t,e);return{stop:function(){return{}}}},t.prototype.stopGetCoordFromMapClick=function(){this._coordFromMapClickPromise&&this._coordFromMapClickPromise.cancel()},t.prototype.getCoordFromMapClick=function(){var t=this;return this._coordFromMapClickPromise?this.getCoordFromMapClick():(this._coordFromMapClickPromise=new S((function(e,n,i){var o=t.getCursor()||"grab";t._removeEventListeners({include:["click"]}),t.setCursor("crosshair");var r=function(){t.setCursor(o),t._addEventsListeners({include:["click"]}),t.mapAdapter.emitter.off("click",s),t._coordFromMapClickPromise=void 0},s=function(t){r(),R(t),e(t.lngLat)};t.mapAdapter.emitter.once("click",s),i(r)})),this._coordFromMapClickPromise)},t.prototype._emitStatusEvent=function(t,e){var n=t;this._eventsStatus[n]=!0,this.emitter.emit(n,e)},t.prototype._addLayerProviders=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2]}))}))},t.prototype._onLoadSync=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2]}))}))},t.prototype._setupMap=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:if(!this.mapAdapter)throw new Error("WebMap `mapAdapter` option is not set");return[4,this.mapAdapter.create(this.options)];case 1:return t.sent(),this._zoomToInitialExtent(),[4,this._addLayerProviders()];case 2:return t.sent(),[4,this._onLoadSync()];case 3:return t.sent(),this._emitStatusEvent("build-map",this.mapAdapter),[2,this]}}))}))},t.prototype._setTileJsonOptions=function(t){t.center&&(this.options.center=t.center),t.bounds&&(this.options.bounds=t.bounds),B(t.maxzoom)&&(this.options.zoom=t.maxzoom),B(t.minzoom)&&(this.options.zoom=t.minzoom),B(t.maxzoom)&&B(t.minzoom)&&(this.options.zoom=(t.maxzoom+t.minzoom)/2)},t.prototype._zoomToInitialExtent=function(){var t,e=(t=this.options).center,n=t.zoom,i=t.bounds;this._extent?this.fitBounds(this._extent):e&&n?this.setView(e,n):i&&this.fitBounds(i)},t.prototype._setInitMapState=function(t){for(var e=0,n=t;e<n.length;e++){var i=new(0,n[e])(this);this._mapState.push(i);for(var o=0,r=this.runtimeParams;o<r.length;o++){var s=r[o].get(i.name);if(void 0!==s){var a=i.parse(s);this._initMapState[i.name]=a,Object.defineProperty(this.options,i.name,{value:a,configurable:!0,enumerable:!0});break}}}},t.prototype._addEventsListeners=function(t){var e=this,n=["preclick","click","zoomstart","zoom","zoomend","movestart","move","moveend","mousemove","mouseout","mouseover"];t&&t.include&&(n=n.filter((function(e){return t.include.includes(e)}))),n.forEach((function(t){e._mapEvents[t]=function(n){if(e.runtimeParams.length){var i=e._mapState.find((function(e){return e.event===t}));if(i){var o=i.toString(i.getValue());e.runtimeParams.forEach((function(t){t.set(i.name,o)}))}}e._eventsStatus&&e.emitter.emit(t,n)};var n=e._mapEvents[t];n&&e.mapAdapter.emitter.on(t,n)}))},t.prototype._removeEventListeners=function(t){var e=this,n=Object.entries(this._mapEvents);t&&t.include&&(n=n.filter((function(e){return t.include.includes(e[0])}))),n.forEach((function(t){var n=t[1];n&&e.mapAdapter.emitter.removeListener(t[0],n)}))},t.keys=new Ot,t}());function Nt(t,e){var n=document.createElement("div"),i=!1;e.getStatus?i=e.getStatus():e.status&&(i=e.status);var o=e.title||"",r=e.html;function s(){o&&(n.title="string"==typeof o?o:i?o.on:o.off,n.setAttribute("aria-label",n.title))}function a(t){t instanceof HTMLElement?(n.innerHTML="",n.appendChild(t)):"string"==typeof t&&(n.innerHTML=t)}function u(){r&&("string"==typeof r||r instanceof HTMLElement?a(r):a(i?r.on:r.off),n.setAttribute("aria-label",n.title))}function h(t,e){t.split(" ").forEach((function(t){e?n.classList.add(t):n.classList.remove(t)}))}function l(){e.addClassOn&&h(e.addClassOn,i),e.addClassOff&&h(e.addClassOff,!i)}s(),u(),e.addClass&&h(e.addClass,!0),l();var c=function(t){void 0!==t&&(i=t),u(),s(),l()},p=function(t){if(i=void 0!==t?t:!i,e.onClick){var n=e.onClick(i);Promise.resolve(n).then((function(){return c()})).catch((function(){return i=!i}))}else c()},d=t({html:n,onClick:p});return d.onClick=p,d.changeStatus=c,d}var Rt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._loadControlQueue={"top-right":[],"bottom-right":[],"top-left":[],"bottom-left":[]},e._isControlLoading={"top-right":!1,"bottom-right":!1,"top-left":!1,"bottom-left":!1},e}return e(n,t),n.prototype.addControl=function(t,e,n){return o(this,void 0,void 0,(function(){var i,s=this;return r(this,(function(a){return e=null!=e?e:"top-left",(i="string"==typeof t?this.getControl(t,n):t)?[2,new Promise((function(t){s._setControlQueue(e,(function(){return o(s,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:return[4,i];case 1:return n=r.sent(),o=this.mapAdapter.addControl(n,e),t(o),[2]}}))}))}))}))]:[2]}))}))},n.prototype.createControl=function(t,e){return o(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,this.onLoad("build-map")];case 1:return n.sent(),this.mapAdapter.createControl?[2,this.mapAdapter.createControl(t,e)]:[2]}}))}))},n.prototype.createButtonControl=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.onLoad("build-map")];case 1:return e.sent(),this.mapAdapter.createButtonControl?[2,this.mapAdapter.createButtonControl(t)]:[2]}}))}))},n.prototype.createToggleControl=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.onLoad("build-map")];case 1:return e.sent(),this.mapAdapter.createToggleControl?[2,this.mapAdapter.createToggleControl(t)]:this.mapAdapter.createButtonControl?[2,Nt(this.mapAdapter.createButtonControl,t)]:[2]}}))}))},n.prototype.removeControl=function(t){var e=this;"remove"in t?t.remove():this.mapAdapter.removeControl&&Promise.resolve(t).then((function(t){e.mapAdapter.removeControl(t)}))},n.prototype.getControl=function(t,e){var i=this.mapAdapter.controlAdapters[t];if(i)return new i(e);var o=n.controls[t];return o?o(this,e):void 0},n.prototype.getControlContainer=function(){if(this.mapAdapter.getControlContainer)return this.mapAdapter.getControlContainer()},n.prototype._setControlQueue=function(t,e){this._loadControlQueue[t].push(e),this._isControlLoading[t]||this._applyControls(t)},n.prototype._applyControls=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return this._loadControlQueue[t].length?(this._isControlLoading[t]=!0,[4,(0,this._loadControlQueue[t][0])()]):[3,2];case 1:return e.sent(),this._loadControlQueue[t].splice(0,1),this._applyControls(t),[3,3];case 2:this._isControlLoading[t]=!1,e.label=3;case 3:return[2]}}))}))},n.controls={CONTROL:function(t,e){return t.createControl(e.control,e.options)},BUTTON:function(t,e){return t.createButtonControl(e)},TOGGLE:function(t,e){return t.createToggleControl(e)}},n}(Zt),jt={};var Dt=function(t){function n(e){var n=t.call(this,e)||this;return n._addControls(),jt[n.id]=n,n}return e(n,t),n.get=function(t){return function(t){return jt[t]}(t)},n.prototype._addLayerProviders=function(){var t,e,n,i,s,a;return o(this,void 0,void 0,(function(){var o,h,l,c,p,d,f,m,_,y,v,g;return r(this,(function(r){switch(r.label){case 0:r.trys.push([0,18,19,24]),o=!0,h=u(this._starterKits),r.label=1;case 1:return[4,h.next()];case 2:return l=r.sent(),(t=l.done)?[3,17]:(o=!1,(c=l.value).getLayerAdapters?[4,c.getLayerAdapters.call(c)]:[3,16]);case 3:if(!(p=r.sent()))return[3,16];r.label=4;case 4:r.trys.push([4,10,11,16]),d=!0,s=void 0,f=u(p),r.label=5;case 5:return[4,f.next()];case 6:return m=r.sent(),(i=m.done)?[3,9]:(d=!1,[4,(_=m.value).createAdapter(this)]);case 7:(y=r.sent())&&(this.mapAdapter.layerAdapters[_.name]=y),r.label=8;case 8:return d=!0,[3,5];case 9:return[3,16];case 10:return v=r.sent(),s={error:v},[3,16];case 11:return r.trys.push([11,,14,15]),d||i||!(a=f.return)?[3,13]:[4,a.call(f)];case 12:r.sent(),r.label=13;case 13:return[3,15];case 14:if(s)throw s.error;return[7];case 15:return[7];case 16:return o=!0,[3,1];case 17:return[3,24];case 18:return g=r.sent(),e={error:g},[3,24];case 19:return r.trys.push([19,,22,23]),o||t||!(n=h.return)?[3,21]:[4,n.call(h)];case 20:r.sent(),r.label=21;case 21:return[3,23];case 22:if(e)throw e.error;return[7];case 23:return[7];case 24:return[2]}}))}))},n.prototype._onLoadSync=function(){var t,e,n;return o(this,void 0,void 0,(function(){var i,o,s,a,h,l;return r(this,(function(r){switch(r.label){case 0:r.trys.push([0,8,9,14]),i=!0,o=u(this._starterKits),r.label=1;case 1:return[4,o.next()];case 2:if(s=r.sent(),t=s.done)return[3,7];if(i=!1,!(a=s.value).onLoadSync)return[3,6];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,a.onLoadSync.call(a,this)];case 4:return r.sent(),[3,6];case 5:return h=r.sent(),console.error(h),[3,6];case 6:return i=!0,[3,1];case 7:return[3,14];case 8:return l=r.sent(),e={error:l},[3,14];case 9:return r.trys.push([9,,12,13]),i||t||!(n=o.return)?[3,11]:[4,n.call(o)];case 10:r.sent(),r.label=11;case 11:return[3,13];case 12:if(e)throw e.error;return[7];case 13:return[7];case 14:return[2]}}))}))},n.prototype._addControls=function(){var t=this;this.options.controls&&this.options.controls.forEach((function(e){var n=e,o={};"string"==typeof e&&t.options.controlsOptions&&t.options.controlsOptions[e]&&void 0!==(o=t.options.controlsOptions[e]).control&&(n=o.control);var r=o.position,s=i(o,["position"]);t.addControl(n,r||"top-left",s)})),this._emitStatusEvent("controls:create")},n}(Rt);var Ft,Ut=function(){function t(e){var n;void 0===e&&(e={}),this.cache=[];var i=null!==(n=e.namespace)&&void 0!==n?n:"default";return t.instance[i]?t.instance[i]:(t.instance[i]=this,this)}return t.prototype.clean=function(){this.cache.length=0},t.prototype.all=function(){return this.cache},t.prototype.addFull=function(t,e,n){return this.add(t,e,n,!0)},t.prototype.add=function(t,e,n,i){var o=this,r=this._find(t,n);if(r)return r.value;var s=void 0;s=e instanceof Function?e():e;var a=n&&JSON.parse(JSON.stringify(J(n))),u={key:t,value:s,props:a,options:a};return i&&!Z(s)?s:(this.cache.push(u),s instanceof Promise?(s.catch((function(e){throw o.delete(t,n),e})),i&&s.then((function(e){return Z(e)||o.delete(t,n),e})),s):s)},t.prototype.match=function(t,e){var n=this._find(t,e);if(n)return n.value},t.prototype.matchAll=function(t,e){var n=this;return t?this.cache.filter((function(i){return n._filter(i,t,e)})).map((function(t){return t.value})):this.cache.map((function(t){return t.value}))},t.prototype.delete=function(t,e){var n=this,i=[];"string"==typeof t?i=this.cache.filter((function(i){return n._filter(i,t,e)})):i.push(t);for(var o=0,r=i;o<r.length;o++){var s=this.cache.indexOf(r[o]);this.cache.splice(s,1)}},t.prototype._find=function(t,e){var n=this;return this.cache.find((function(i){return n._filter(i,t,e)}))},t.prototype._filter=function(t,e,n){return t.key===e&&(!n||G(t.props||t.options||{},J(n)))},t.instance={},t}(),Wt=function(t){function n(e){var i=t.call(this)||this;return i.name="NetworkError",Object.setPrototypeOf(i,n.prototype),i.message="Unable to request ".concat(e,".\n Possibly invalid NGW URL entered or CORS not configured to get request from ").concat(location.origin),i}return e(n,t),n}(Error),Ht=function(t){function n(e){var i=t.call(this)||this;return i.name="NgwError",Object.assign(i,e),Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Error);function Vt(t){return"[object Object]"===Object.prototype.toString.call(t)}Ft=function(t,e,n,i,o){void 0===n&&(n={}),n.method=n.method||"GET";var r=new XMLHttpRequest;r.open(n.method||"GET",t,!0),"blob"===n.responseType&&(r.responseType=n.responseType);var s=function(){try{return JSON.parse(r.responseText)}catch(t){return r.responseText}};r.onload=function(){-1!==[401,403,404,422,500].indexOf(r.status)&&i(new Ht(s())),function(t){void 0===t&&(t=!1);var o=t?i:e;"blob"===n.responseType?o(r.response):r.responseText?o(s()):i({message:""})}()},r.onerror=function(e){i(0===r.status?new Wt(t):e)},r.upload.onprogress=function(t){t.lengthComputable&&(n.onProgress&&n.onProgress(t.loaded/t.total*100,t))};var a,u=n.headers;if(u)for(var h in u){var l=u[h];"string"==typeof l&&r.setRequestHeader(h,l)}if(void 0!==n.withCredentials&&(r.withCredentials=n.withCredentials),n.file){if((a=new FormData).append("file",n.file),n.data)for(var c in n.data)a.append(c,a[c])}else a=n.data?"string"==typeof n.data?n.data:JSON.stringify(n.data):null;o&&o((function(){r.abort()})),r.send(a)};var qt=/\{ *([\w_-]+) *\}/g;function Gt(t,e){return t.replace(qt,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for letiable "+t);return"function"==typeof i&&(i=i(e)),i}))}var Jt=function(t){function n(e){var i=t.call(this,e)||this;return i.name="ResourceNotFoundError",i.exception="nextgisweb.resource.exception.ResourceNotFound",Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Ht),Kt=function(t){function n(e){var i=t.call(this,e)||this;return i.name="InsufficientPermissionsError",i.exception="nextgisweb.core.exception.InsufficientPermissions",Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Ht),Yt=[];function Qt(t){Yt.push(t)}var Xt=["description"];function $t(t,e){void 0===e&&(e=""),e=e?e+"__":"";for(var n={},i=0,o=Object.entries(t);i<o.length;i++){var r=o[i],s=r[0],a=r[1];if(-1===Xt.indexOf(s))if(Vt(a))if("owner_user"===s){var u=$t(a,s);Object.assign(n,u)}else"parent"===s&&"id"in a&&(n.parent_id=a.id);else B(a)&&(n[e+s]=a)}return n}var te=function(){function t(t){this.connector=t,this.cache=new Ut}return t.prototype.getOne=function(t,e){var i=this,o=new Ut,r={},s=n(n({},e),{cache:!1});"string"==typeof t?r.keyname=t:"number"==typeof t?r.id=t:Vt(t)&&(void 0!==t.id?r.id=t.id:t.keyname&&(r.keyname=t.keyname));return o.addFull("resource",(function(){return"string"==typeof t?i._fetchResourceBy({keyname:t},s):"number"==typeof t?i._fetchResourceById(t,s):Vt(t)?i._fetchResourceBy(t,s):S.resolve(void 0)}),r)},t.prototype.getOneOrFail=function(t,e){return this.getOne(t,e).then((function(t){if(t)return t;throw new Jt}))},t.prototype.getId=function(t,e){return"number"==typeof t?S.resolve(t):"string"==typeof t||Vt(t)?this.getOne(t,e).then((function(t){if(t)return t.resource.id})):S.resolve(void 0)},t.prototype.getIdOrFail=function(t,e){return this.getId(t,e).then((function(t){if(void 0===t)throw new Error;return t}))},t.prototype.getMany=function(t,e){var i=this;return this._resourceCacheFilter(t).then((function(o){if(!o.length){var r={};return t.keyname?r.keyname=t.keyname:Object.assign(r,$t(t)),i.connector.get("resource.search",e,n({serialization:"full"},r)).then((function(t){if(t)for(var e=0,n=t;e<n.length;e++){var o=n[e];i.cache.add("resource.item",S.resolve(o),{id:o.resource.id})}return t}))}return o}))},t.prototype.getParent=function(t,e){var n=this;return this.getOne(t,e).then((function(t){return t?n.getOne(t.resource.parent.id,e):S.resolve(void 0)}))},t.prototype.getChildrenOf=function(t,e){var n=this;return this.getIdOrFail(t).then((function(t){return n._getChildrenOf(t,e)}))},t.prototype.update=function(t,e){var n=this;return this.getId(t).then((function(t){if(void 0!==t)return n.connector.put("resource.item",{data:e},{id:t})}))},t.prototype.delete=function(t){var e=this;return this.getId(t).then((function(t){if(void 0!==t)return e.connector.delete("resource.item",null,{id:t}).then((function(){e._cleanResourceItemCache(t)}))}))},t.prototype._getChildrenOf=function(t,e,i){var o=this;return void 0===i&&(i=[]),this.connector.get("resource.collection",n({cache:!0},e),{parent:t}).then((function(t){for(var n=[],r=0,s=t;r<s.length;r++){var a=s[r];o.cache.add("resource.item",S.resolve(a),{id:a.resource.id}),i.push(a),(null==e?void 0:e.recursive)&&a.resource.children&&n.push(o._getChildrenOf(a.resource.id,e,i))}return n.length?S.all(n).then((function(){return i})):i}))},t.prototype._cleanResourceItemCache=function(t){return o(this,void 0,void 0,(function(){var e,n,i,o,s,a,u,h;return r(this,(function(r){switch(r.label){case 0:e=this.cache.all(),n=[],i=0,o=e,r.label=1;case 1:return i<o.length?(a=(s=o[i]).options&&s.options.id,["resource.item","resource"].includes(s.key)&&void 0!==a?"number"!=typeof a?[3,2]:(a===t&&n.push(s),[3,4]):[3,4]):[3,5];case 2:return[4,this.getId(a)];case 3:r.sent()===t&&n.push(s),r.label=4;case 4:return i++,[3,1];case 5:for(u=0,h=n;u<h.length;u++)this.cache.delete(h[u]);return[2]}}))}))},t.prototype._fetchResourceById=function(t,e){var n=this;return this.cache.add("resource.item",(function(){return n.connector.get("resource.item",e,{id:t})}),{id:t}).catch((function(t){if(!(t instanceof Jt))throw t}))},t.prototype._fetchResourceBy=function(t,e){return this.getMany(t,e).then((function(t){return t[0]}))},t.prototype._resourceCacheFilter=function(t){return S.all(this.cache.matchAll("resource.item")).then((function(e){return e.filter((function(e){if(e)return t.keyname&&e.resource.keyname?t.keyname===e.resource.keyname:B(t.id)&&B(e.resource.id)?t.id===e.resource.id:G(t,e.resource)})),[]}))},t}(),ee=0,ne=function(){function t(t){this.options=t,this.id=ee++,this.emitter=new p.exports.EventEmitter,this.routeStr="/api/component/pyramid/route",this.activeRequests=[];var e=function(t){return Yt.find((function(e){if(e.options.baseUrl===t.baseUrl){if(!t.auth)return!0;if(e.options.auth)return G(e.options.auth,t.auth)}}))}(t);if(e)return e;this.options.route&&(this.routeStr=this.options.route),this.options.requestTransform&&(this.requestTransform=this.options.requestTransform),this.resources=new te(this),Qt(this)}return t.create=function(t){return new this(t)},t.prototype.setRequestTransform=function(t){this.requestTransform=t},t.prototype.setNgw=function(t){this.logout(),this.options.baseUrl=t,Qt(this)},t.prototype.connect=function(){var t=this,e=new Ut,n=this.options.auth;return e.add("route",(function(){return new S((function(e,i){var o=function(){return t.makeQuery(t.routeStr,{},{}).then((function(t){e(t)})).catch((function(t){i(t)}))};if(n){var r=n.login,s=n.password;if(r&&s)return t._login({login:r,password:s}).then((function(){return o()})).catch((function(t){return i(t)}))}return o()}))}),{id:this.id,auth:n,baseUrl:this.options.baseUrl})},t.prototype.login=function(t,e){return this.logout(),Qt(this),this._login(t,e)},t.prototype.logout=function(){var t;this.abort(),-1!==(t=Yt.indexOf(this))&&Yt.splice(t,1),this.options.auth=void 0,this.user=void 0,this.emitter.emit("logout"),this.resources.cache.clean()},t.prototype.getUserInfo=function(t,e){if(this.user&&this.user.id)return S.resolve(this.user);t&&(this.options.auth=t);var i=n({headers:this.getAuthorizationHeaders(t)},e);return this.makeQuery("/api/component/auth/current_user",{},i)},t.prototype.getAuthorizationHeaders=function(t){var e=this.makeClientId(t);if(e)return{Authorization:"Basic "+e}},t.prototype.makeClientId=function(t){if(t=t||this.options.auth){var e=t.password,n=unescape(encodeURIComponent("".concat(t.login,":").concat(e)));return window.btoa(n)}},t.prototype.abort=function(){for(var t=0,e=this.activeRequests;t<e.length;t++){e[t].cancel()}this.activeRequests=[]},t.prototype.getActiveApiRequests=function(){return a([],this.activeRequests,!0)},t.prototype.apiRequest=function(t,e,i){var o,r,s=this;void 0===e&&(e={}),void 0===i&&(i={});var u=i.method,h=i.headers,l=i.withCredentials,c=i.responseType,p=J(e=null!==(o=i.params)&&void 0!==o?o:e),d=function(){return function(t){var e=t.params;return new S((function(n,i){t.connector.connect().then((function(o){var r=o&&o[t.name];if(r){var s=(r=a([],r,!0)).shift();if(r.length){for(var u={},h=0;h<r.length;h++){var l=r[h];if(u[h]="{"+l+"}",void 0===e[l])throw new Error("`"+l+"` url api argument is not specified")}s&&(s=Gt(s,u))}if(e){var c=[],p=e.paramList;for(var d in Array.isArray(p)&&(delete e.paramList,p.forEach((function(t){c.push("".concat(t[0],"=").concat(t[1]))}))),e)-1===r.indexOf(d)&&c.push("".concat(d,"=").concat(e[d]));c.length&&(s=s+"?"+c.join("&"))}s?n(t.connector.makeQuery(s,e,t.requestOptions)):i(new Error("request url is not set"))}else n(void 0)})).catch((function(t){i(t)}))}))}({name:t,params:p,requestOptions:i,connector:s})};return i.cache&&"GET"===u?(new Ut).add(t,d,n({params:p},J({headers:h,withCredentials:l,responseType:c,baseUrl:this.options.baseUrl,userId:null===(r=this.user)||void 0===r?void 0:r.id}))):d()},t.prototype.post=function(t,e,n){return(e=e||{}).method="POST",this.apiRequest(t,n,e)},t.prototype.get=function(t,e,n){return(e=e||{}).method="GET",this.apiRequest(t,n,e)},t.prototype.patch=function(t,e,n){return(e=e||{}).method="PATCH",this.apiRequest(t,n,e)},t.prototype.put=function(t,e,n){return(e=e||{}).method="PUT",this.apiRequest(t,n,e)},t.prototype.delete=function(t,e,n){return(e=e||{}).method="DELETE",this.apiRequest(t,n,e)},t.prototype.makeQuery=function(t,e,n){if(void 0===n&&(n={}),t=(this.options.baseUrl?this.options.baseUrl:"")+t)return e&&(t=Gt(t,e)),t=encodeURI(Y(t)),this._loadData(t,n);throw new Error("Empty `url` not allowed")},t.prototype.getResource=function(t,e){return this.resources.getOne(t,e)},t.prototype.getResourceOrFail=function(t,e){return this.resources.getOneOrFail(t,e)},t.prototype.getResourceBy=function(t){return this.resources.getOne(t)},t.prototype.getResourceByKeyname=function(t){return this.resources.getOne(t)},t.prototype.getResourceById=function(t){return this.resources.getOne(t)},t.prototype.getResourceId=function(t,e){return this.resources.getId(t,e)},t.prototype.getResourceIdOrFail=function(t,e){return this.resources.getIdOrFail(t,e)},t.prototype.getResourcesBy=function(t,e){return this.resources.getMany(t,e)},t.prototype.getResourceParent=function(t,e){return this.resources.getParent(t,e)},t.prototype.getResourceChildren=function(t,e){return this.resources.getChildrenOf(t,e)},t.prototype.updateResource=function(t,e){return this.resources.update(t,e)},t.prototype.deleteResource=function(t){return this.resources.delete(t)},t.prototype._loadData=function(t,e){var i=this;e.responseType=e.responseType||"json";var o=new S((function(o,r,s){if(i.user&&((e=e||{}).headers=n(n({},i.getAuthorizationHeaders()),e.headers)),i.requestTransform){var a=i.requestTransform(t,e);t=a[0],e=a[1]}Ft(t,o,e,r,s)})).then((function(t){return i._cleanActiveRequests(o),t})).catch((function(t){if(i._cleanActiveRequests(o),t instanceof S.CancelError);else{var e=i._handleHttpError(t);if(e)throw e}}));return e.signal&&"function"==typeof e.signal.addEventListener&&e.signal.addEventListener("abort",(function(){o.cancel(),i._cleanActiveRequests(o)})),this.activeRequests.push(o),o},t.prototype._login=function(t,e){var n=this;return this.getUserInfo(t,e).then((function(t){return n.user=t,n.emitter.emit("login",t),t})).catch((function(t){throw n.emitter.emit("login:error",t),t}))},t.prototype._cleanActiveRequests=function(t){var e=this.activeRequests.indexOf(t);-1!==e&&this.activeRequests.splice(e,1)},t.prototype._handleHttpError=function(t){if(t&&t instanceof Ht){if("nextgisweb.resource.exception.ResourceNotFound"===t.exception)throw new Jt(t);if("nextgisweb.core.exception.InsufficientPermissions"===t.exception)throw new Kt(t)}return t},t.errors={NgwError:Ht,ResourceNotFoundError:Jt},t}();function ie(t){var e=t.extent_bottom,n=t.extent_left,i=t.extent_top,o=t.extent_right;if(e&&n&&i&&o){var r=[n,e,o,i];return r[3]>82&&(r[3]=82),r[1]<-82&&(r[1]=-82),r}}function oe(t){var e=t.cache;return t.connector.get("layer.extent",{cache:void 0===e||e},{id:t.resourceId}).then((function(t){if(t){var e=t.extent;return[e.minLon,e.minLat,e.maxLon,e.maxLat]}}))}function re(t){return t.connector.getResource(t.resourceId).then((function(e){if(e)return se(e,t.connector,t)}))}function se(t,e,i){if(t.webmap)return S.resolve(ie(t.webmap));var o=t.resource;return o.cls&&-1!==o.cls.indexOf("style")?e.getResource(o.parent.id).then((function(t){if(t)return oe(n(n({},i),{resourceId:t.resource.id,connector:e}))})):oe(n(n({},i),{resourceId:o.id,connector:e}))}var ae=function(){function t(){}return t.prototype.getExtent=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.getBounds()]}))}))},t.prototype.getBounds=function(t){return o(this,void 0,void 0,(function(){var e;return r(this,(function(n){switch(n.label){case 0:return this._extent?[2,this._extent]:this.item?(e=this,[4,se(this.item,this.connector,t)]):[3,2];case 1:return e._extent=n.sent(),[2,this._extent];case 2:return[2]}}))}))},t}();var ue=["fields","intersects","limit","orderBy","strategy"];function he(t){var e={};return ue.forEach((function(n){var i=t[n];void 0!==i&&(e[n]=i)})),e}function le(t,e){return o(this,void 0,void 0,(function(){var n,i,o,s,a;return r(this,(function(r){switch(r.label){case 0:return i=n=t.resource,o=t.keyname,s=t.resourceId,n?"string"!=typeof n?[3,1]:(o=n,[3,5]):[3,5];case 1:return"number"!=typeof n?[3,2]:(s=n,[3,5]);case 2:return i.resource&&void 0!==i.resource&&"resource"in i?(s=n.resource.id,[3,5]):[3,3];case 3:return[4,le(n,e)];case 4:s=r.sent(),r.label=5;case 5:return s||!o?[3,7]:[4,e.getResource(o)];case 6:(a=r.sent())&&(s=a.resource.id),r.label=7;case 7:return[2,s]}}))}))}var ce={srs:4326,geom_format:"geojson"};function pe(t){return{geometry:t.geom,id:t.id,type:"Feature",properties:t.fields}}function de(t,e){var n=e.extensions,i=e.geom,o=e.fields,r=e.srs,s=e.ilike,a=e.like,u=n?n.join(","):"";"*"!==u&&(t.extensions=u),void 0!==o&&(t.fields=Array.isArray(o)?o.join(","):""),void 0!==i&&(t.geom=i?"yes":"no",i||(delete t.srs,delete t.geom_format)),B(s)?t.ilike=s:B(a)&&(t.like=a),B(r)&&(t.srs=r)}function fe(t){var e=_e(t);return S.all(e).then((function(e){for(var n=[],i=[],o=0,r=e;o<r.length;o++)for(var s=0,a=r[o];s<a.length;s++){var u=a[s];n.includes(u.id)||(i.push(u),n.push(u.id))}return t.offset||t.limit?i.splice(void 0!==t.offset?t.offset:0,void 0!==t.limit?t.limit:i.length):i}))}function me(t){var e=t[0],n=t[1],i=t[2],o="id"!==e?"fld_":"",r="",s="",a=String(e).trim().replace(/^(%?)(.+?)(%?)$/,(function(t,e,n,i){return r=e,s=i,n})),u=r+i+s;return["".concat(o).concat(a,"__").concat(n),u]}function _e(t,e,i){void 0===e&&(e=[]),void 0===i&&(i=[]);var o=t.filters,r="string"==typeof o[0]?o[0]:"all",s=o.filter((function(t){return Array.isArray(t)}));if("any"===r)for(var u=0,h=s;u<h.length;u++){gt(f=h[u])?e.push(ve(n(n({},t),{paramList:a(a([],i,!0),[me(f)],!1)}))):_e(n(n({},t),{filters:f}),e,a([],i,!0))}else if("all"===r){for(var l=[],c=[],p=0,d=s;p<d.length;p++){var f;gt(f=d[p])?l.push(me(f)):c.push(f)}if(c.length)for(var m=0,_=c;m<_.length;m++){var y=_[m];_e(n(n({},t),{filters:y}),e,a(a([],i,!0),l,!0))}else e.push(ve(n(n({},t),{paramList:a(a([],i,!0),l,!0)})))}return e}function ye(t){var e=t.map((function(t){var e=V(t[0],t[1]).map((function(t){return e=t,i=n?Number("1e+"+n):1,Math.round((e+Number.EPSILON)*i)/i;var e,n,i}));return e[0]+" "+e[1]}));return"POLYGON((".concat(e.join(", "),"))")}function ve(t){var e=n({},ce),i=t.limit,o=t.cache,r=t.signal,s=t.offset,a=t.orderBy,u=t.paramList,h=t.connector,l=t.geomFormat,c=t.intersects,p=t.resourceId;if(i?i!==Number.POSITIVE_INFINITY&&(e.limit=i):e.limit=7e3,s&&(e.offset=s),l&&(e.geom_format=l),de(e,t),a&&(e.order_by=a.join(",")),Array.isArray(c)){var d=function(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))}(c)?U(c):c;e.intersects=ye(d)}else"string"==typeof c&&(e.intersects=c);u&&(e.paramList=u);var f=n({id:p},e);return h.get("feature_layer.feature.collection",{cache:o,signal:r},f)}function ge(t){var e,n=function(){var n=t[e];if(K(n)){var i=n;if(B(i.year)&&B(i.month)&&B(i.day)){var o=[i.year,i.month-1,i.day];"hour"in i&&[i.hour,i.minute,i.second].forEach((function(t){o.push(t)})),t[e]=(new(Date.bind.apply(Date,a([void 0],o,!1)))).toISOString()}}else"id"===e&&"string"==typeof n&&(t[e]=n.split(",").map(Number))};for(e in t)n();return t}function be(t){var e=t.filters;return e?fe(n(n({},t),{filters:e})).then((function(i){var o;return(null!==(o=t.clientFilterValidate)&&void 0!==o?o:we(e))&&(i=i.filter((function(t){return bt(ge(n(n({},t.fields),{id:t.id})),e)}))),i})):ve(t)}function we(t){if("any"===t[0])return!0;for(var e=1;e<t.length;e++){var n=t[e];if("[object Array]"===Object.prototype.toString.call(n))if(we(n))return!0}return!1}function xe(t){return function(t){return be(t).then((function(t){var e=[];return t.forEach((function(t){e.push(pe(t))})),e}))}(t).then((function(t){return{type:"FeatureCollection",features:t}}))}function Le(t){var i,s;return o(this,void 0,void 0,(function(){var a,u,h,l,c,d,f,m,_,y,v,g,b,w,x,L,P=this;return r(this,(function(M){switch(M.label){case 0:return a=t.item,u=t.webMap,c=null==(l=t.addLayerOptionsPriority)||l,f=t.Adapter||u.mapAdapter.layerAdapters.GEOJSON,m=[],_=!1,[4,le(d=t.layerOptions,h=t.connector)];case 1:return g=M.sent(),(null===(s=null===(i=d.adapterOptions)||void 0===i?void 0:i.popupOptions)||void 0===s?void 0:s.fromProperties)&&(d.adapterOptions.popupOptions.createPopupContent=function(t){var e=t.feature;return e&&function(t,e){var n=document.createElement("div");if(e&&e.feature_layer)e.feature_layer.fields.forEach((function(e){if(e.grid_visibility){var i=t.properties&&t.properties[e.keyname];if(i){var o=document.createElement("div");n.appendChild(o),o.innerHTML="<span>".concat(e.display_name,"</span>: ").concat(i,"<span></span>")}}}));else if(t.properties)for(var i in t.properties){var o=document.createElement("div");n.appendChild(o),o.innerHTML="<span>".concat(i,"</span>: ").concat(t.properties[i],"<span></span>")}return n}(e,a)}),b=function(t,e){return o(P,void 0,void 0,(function(){return r(this,(function(i){switch(i.label){case 0:return x(),y={filters:t,options:e},[4,v=xe(n({resourceId:g,filters:t,connector:h,cache:!0},e))];case 1:return[2,i.sent()]}}))}))},w=!1,x=function(){v&&(v.cancel(),v=void 0)},L=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.emitter=new p.exports.EventEmitter,e}return e(i,t),i.prototype.addLayer=function(e){return o(this,void 0,void 0,(function(){var i,o,s,u,h;return r(this,(function(r){switch(r.label){case 0:return i=!e.data,o=void 0===e.waitFullLoad||e.waitFullLoad,void 0!==d.id&&(e.id=d.id),a&&a.vector_layer&&(e.type=en[a.vector_layer.geometry_type]),d.adapterOptions&&(e=c?n(n({},d.adapterOptions),e):n(n({},e),d.adapterOptions)),e.data&&0===Object.keys(e.data).length&&(e.data=void 0,i=!1),this.options.strategy=s=e.strategy||void 0,u=t.prototype.addLayer.call(this,e),y={filters:e.propertiesFilter,options:he(e)},i&&(h=this.updateLayer()),o&&h?[4,h]:[3,2];case 1:r.sent(),r.label=2;case 2:return s&&s.startsWith("BBOX")&&!_&&this._addBboxEventListener(),[2,u]}}))}))},i.prototype.getExtent=function(){return this.getBounds()},i.prototype.getBounds=function(){return o(this,void 0,void 0,(function(){var e,n;return r(this,(function(i){return e=this.getLayers&&this.getLayers().length,(null==(n=this.options.strategy)?void 0:n.startsWith("BBOX"))||e?[2,re({connector:h,resourceId:a.resource.id})]:t.prototype.getBounds?[2,t.prototype.getBounds.call(this)]:[2]}))}))},i.prototype.beforeRemove=function(){w=!0,this._removeMoveEventListener(),this._removeBboxEventListener(),this.__disableMapMoveListener=void 0,this.__enableMapMoveListener=void 0,this.__onMapMove=void 0,this.__onMapMoveStart=void 0,x()},i.prototype.getCount=function(){return function(t){var e=t.cache;return t.connector.get("feature_layer.feature.count",{cache:void 0===e||e},{id:t.resourceId}).then((function(t){return t.total_count}))}({connector:h,resourceId:g,cache:!0})},i.prototype.updateLayer=function(e){var i;return o(this,void 0,void 0,(function(){var o,s,a,h,l,c,p,f,v,g,x;return r(this,(function(r){switch(r.label){case 0:return e=e||y||{},(null===(i=this.options.strategy)||void 0===i?void 0:i.startsWith("BBOX"))?[4,u.onLoad("create")]:[3,2];case 1:if(r.sent(),e.options=e.options||{},e.options.intersects=u.getBounds(),s=(o=this.options).minZoom,a=o.maxZoom,void 0!==(h=u.getZoom())){if(void 0!==s&&h<s)return[2];if(void 0!==a&&h>a)return[2];if(_)return[2]}r.label=2;case 2:if(w)return[2];r.label=3;case 3:return r.trys.push([3,10,,11]),this.emitter.emit("preupdate",e),u._emitLayerEvent("layer:preupdate",d.id||"",e),[4,b(e.filters,n(n({},e.options),{srs:this.options.srs}))];case 4:return l=r.sent(),c=l,[4,this.getCount()];case 5:if(p=r.sent(),"BBOX+"!==this.options.strategy)return[3,7];for(c={type:"FeatureCollection",features:[]},f=0,v=l.features;f<v.length;f++)g=v[f],-1===m.indexOf(String(g.id))&&(m.push(String(g.id)),c.features.push(g));return _=void 0!==p&&m.length>=p,[4,u.addLayerData(this,c)];case 6:return r.sent(),[3,9];case 7:return _=void 0!==p&&l.features.length>=p,[4,u.setLayerData(this,l)];case 8:r.sent(),r.label=9;case 9:return this.emitter.emit("updated",l),u._emitLayerEvent("layer:updated",d.id||"",{data:l,newData:c,isFull:_}),[3,11];case 10:if((x=r.sent())instanceof Error&&"CancelError"!==x.name)throw x;return[3,11];case 11:return t.prototype.updateLayer&&t.prototype.updateLayer.call(this),[2]}}))}))},i.prototype.propertiesFilter=function(t,e){return o(this,void 0,void 0,(function(){var i;return r(this,(function(o){switch(o.label){case 0:return x(),this.filter&&_?(this.filter((function(e){var i=e.feature&&e.feature.properties&&ge(n({},e.feature.properties));return!i||bt(i,t)})),[3,3]):[3,1];case 1:return this.setData?(this.clearLayer&&this.clearLayer(),[4,b(t,n(n({},e),{srs:this.options.srs}))]):[3,3];case 2:i=o.sent(),this.setData(i),o.label=3;case 3:return[2]}}))}))},i.prototype.removeFilter=function(){y=void 0,this.propertiesFilter([]),this.filter&&this.filter((function(){return!0}))},i.prototype._addBboxEventListener=function(){var t=this;this.__enableMapMoveListener=function(e){e===t&&(t._removeMoveEventListener(),t.updateLayer(),t._addMoveEventListener())},this.__disableMapMoveListener=function(e){e===t&&t._removeMoveEventListener()},u.emitter.on("layer:show",this.__enableMapMoveListener),u.emitter.on("layer:hide",this.__disableMapMoveListener),this.__enableMapMoveListener(this)},i.prototype._removeBboxEventListener=function(){this.__enableMapMoveListener&&u.emitter.on("layer:show",this.__enableMapMoveListener),this.__disableMapMoveListener&&u.emitter.on("layer:hide",this.__disableMapMoveListener)},i.prototype._addMoveEventListener=function(){var t=this;this.__onMapMove=j((function(){return t.updateLayer()})),this.__onMapMoveStart=x,u.emitter.on("movestart",this.__onMapMoveStart),u.emitter.on("moveend",this.__onMapMove)},i.prototype._removeMoveEventListener=function(){this.__onMapMove&&u.emitter.removeListener("moveend",this.__onMapMove),this.__onMapMoveStart&&u.emitter.removeListener("movestart",this.__onMapMoveStart)},i}(f),[2,L]}}))}))}function Pe(t){var e,n,i=t.options,o=t.webMap,r=t.baseUrl,s=i.adapter||"IMAGE",a=o&&o.getLayerAdapters(),u=i.resource,h=i.tileNoData?i.tileNoData:200;if("number"==typeof u){if("IMAGE"===s){if(!a||a.IMAGE)return function(t){var e=t.resourceId,n=t.nd,i=t.headers,o=t.baseUrl+"/api/component/render/image",r={resource:e};return n&&(r.nd=n),{url:o,resourceId:e,headers:i,params:r,updateWmsParams:function(t){return n&&(t.nd=n),$e(t,e)}}}({resourceId:u,headers:i.headers,nd:h,baseUrl:r});s="TILE"}if("WMS"===s){n="".concat(r,"/api/resource/").concat(u,"/wms");var l=i.adapterOptions;return{url:n,format:"image/png",version:"1.1.1",layers:l&&l.layers,headers:i.headers}}if("MVT"===s)return{url:n=r+"/api/component/feature_layer/mvt?x={x}&y={y}&z={z}&resource="+u+"&simplification="+(null!==(e=i.simplification)&&void 0!==e?e:6),sourceLayer:"ngw:"+u,featureIdName:"$id"};if("TERRAIN"===s)return{url:n=r+"/api/resource/".concat(u,"/terrain_provider"),adapter:s};if("MODEL_3D"===s)return{url:n=r+"/api/component/model_3d/".concat(u,"/data.glb")};if("TILE"===s)return{url:n=r+"/api/component/render/tile?z={z}&x={x}&y={y}&resource="+u+"&nd="+h,adapter:s}}else{if(void 0!==u)throw new Error("Option `resource` must be number, not "+typeof u);console.log("Option `resource` not set")}}function Me(t){var i=t.layerOptions,s=t.webMap,a=t.connector,u=t.item;return o(this,void 0,void 0,(function(){var t,h,l,c,p,d;return r(this,(function(f){switch(f.label){case 0:return t=u.resource.cls,h={wmsserver_service:"WMS",tmsclient_layer:"IMAGE"},void 0!==(l=i.adapter||t&&h[t]||"IMAGE")&&(i.adapter=l),"IMAGE"===l&&(c=s.getLayerAdapters(),!c||c.IMAGE||(l="TILE")),(p=s.mapAdapter.layerAdapters[l])?[4,le(i,a)]:[3,2];case 1:return d=f.sent(),[2,function(t){function h(e,o){var r=t.call(this,e,o)||this;r.map=e,r.item=u,r.resourceId=d;var h=Pe({options:i,webMap:s,baseUrl:a.options.baseUrl||""});if(h){var l=n(n(n({},h),i.adapterOptions),{params:{resource:d},layers:h.layers||String(d),resourceId:d});i.adapterOptions&&B(i.adapterOptions.setViewDelay)&&(l.setViewDelay=i.adapterOptions.setViewDelay),r.options=n(n({},r.options),l)}return r}return e(h,t),h.prototype.addLayer=function(e){return t.prototype.addLayer.call(this,n(n({},this.options),e))},h.prototype.getIdentificationIds=function(){return o(this,void 0,void 0,(function(){var t;return r(this,(function(e){if(this.item){if("MVT"===l)return[2,[this.item.resource.id]];if(B(t=this.item.resource.parent.id))return[2,[t]]}return[2,[]]}))}))},h}(p)];case 2:throw new Error(l+" not supported yet. Only TILE")}}))}))}function Ce(t,e,n,i){return!!Te(t,e,n,Oe,i)}function ke(t,e,n,i){return Te(t,e,n,Ee,i)}function Ae(t,e){void 0===e&&(e="children");var n=[],i=("function"==typeof e?e:function(t){return t[e]})(t);return i&&(Array.isArray(i)?n=i:n.push(i)),i?n:void 0}function Te(t,e,n,i,o){void 0===e&&(e=function(t){return!!t}),void 0===n&&(n="children");var r="function"==typeof e?e:function(t){return bt(t,e)};return i(t,o?function(t){return r(o(t))}:r,n)}function Oe(t,e,n,i){void 0===e&&(e=function(t){return!!t});var o=[];if(Array.isArray(t))o=t;else{if(e(t))return t;var r=Ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++)if(o[s]){var a=Oe(o[s],e,n);if(a)return a}}function Ee(t,e,n,i){void 0===e&&(e=function(t){return!!t}),void 0===i&&(i=[]);var o=[];if(Array.isArray(t))o=t;else{e(t)&&i.push(t);var r=Ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++)o[s]&&Ee(o[s],e,n,i);return i}function Ie(t,e,n,i){void 0===e&&(e=function(t){return!!t});var o=[];if(Array.isArray(t))o=t;else{if(!e(t))return!1;var r=Ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++){if(o[s])if(!Ie(o[s],e,n))return!1}return!0}var Se=function(){function t(t){this._children=[],this.item=t}return t.prototype.setParent=function(t){this._parent=t},t.prototype.addChild=function(t){this._children.push(t)},t.prototype.getParent=function(){return this._parent},t.prototype.getParents=function(t){var e=this.getParent();return e?ke(e,t,(function(t){return t.tree.getParent()})):[]},t.prototype.getRoot=function(){for(var t=this.getParent(),e=t;t;)(t=t.tree.getParent())&&(e=t);return e},t.prototype.find=function(t){return Te(this._children,t,(function(t){return t.tree.getChildren()}),Oe,e);var e},t.prototype.every=function(t){return!!Te(this._children,t,(function(t){return t.tree.getChildren()}),Ie,e);var e},t.prototype.some=function(t){return Ce(this._children,t,(function(t){return t.tree.getChildren()}))},t.prototype.all=function(t){return this.getDescendants(t)},t.prototype.getDescendants=function(t){return ke(this._children,t,(function(t){return t.tree.getChildren()}))},t.prototype.getChildren=function(){return a([],this._children,!0)},t}(),ze=function(){function t(t,e,n){this.emitter=new p.exports.EventEmitter,this._blocked=!1,this.item=e,this.options=Object.assign({},n),this.name=t,this._value=this.getProperty()}return t.prototype.getProperty=function(){return"function"==typeof this.options.getProperty?this.options.getProperty.call(this,this.item):this.options.value},t.prototype.getParents=function(){return this.item.tree.getParents()||[]},t.prototype.getParent=function(){return this.item.tree.getParent()},t.prototype.getChildren=function(){return this.item.tree.getChildren()},t.prototype.isGroup=function(){return this.item.tree.getDescendants().length},t.prototype.isBlocked=function(){if(void 0!==this._blocked)return this._blocked;var t=this.item.tree.getParents();return this._blocked=this._calculateBlockedStatus(t),this._blocked},t.prototype.set=function(t,e){this._value=this._prepareValue(t),this.update(this._value,e),this._fireChangeEvent(this._value,e)},t.prototype.get=function(){return this.getValue()},t.prototype.update=function(t,e){this._callOnSet(t,e)},t.prototype.getContainer=function(){return this._container},t.prototype.destroy=function(){if(this._container){var t=this._container.parentNode;t&&t.removeChild(this._container)}this._removeEventsListener&&this._removeEventsListener()},t.prototype.getValue=function(){return void 0!==this._value?this._value:this.getProperty()},t.prototype._prepareValue=function(t){return t},t.prototype._callOnSet=function(t,e){this.options.onSet&&this.options.onSet.call(this,t,e,this.item)},t.prototype._fireChangeEvent=function(t,e){var n=this;this.emitter&&(t=void 0!==t?t:this.getValue(),this.emitter.emit("change",{value:t,options:e}),this.item.tree.getParents().forEach((function(i){var o=i.properties&&i.properties.property(n.name);o&&o.emitter.emit("change-tree",{value:t,options:e,item:n.item})})))},t.prototype._calculateBlockedStatus=function(t){var e=this;return t.some((function(t){var n,i=null===(n=t.properties)||void 0===n?void 0:n.property(e.name);return!!i&&!i.get()}))},t}(),Be=function(t){function i(e,o,r){var s=t.call(this,e,o,n(n({},i.options),r))||this;return s.set(s.get()),s}return e(i,t),i.prototype.update=function(t,e){if(t){if(e&&e.bubble||this.options.bubble){this.unBlock(e);var n=this.getParent(),i=n&&n.properties&&n.properties.property(this.name);i&&i.set(t,Object.assign({},e,{bubble:!0,propagation:!1}))}this.isBlocked()||this._turnOn(e)}else this._turnOff(e);(e&&e.propagation||this.options.propagation)&&this._propagation(t,e)},i.prototype.getHierarchyValue=function(){var t=this;return this.get()&&this.getParents().every((function(e){var n=e.properties&&e.properties.get(t.name);return n&&n.get()}))},i.prototype.block=function(t){this._blocked=!0,this._block(t)},i.prototype.unBlock=function(t){this._blocked=!1,this.getValue()&&this._unBlock(t)},i.prototype.blockChild=function(t){var e=this;this.item.tree.getDescendants().forEach((function(n){return e._blockChild(n,t)}))},i.prototype.unblockChild=function(t){var e=this;this.item.tree.getChildren().forEach((function(n){return e._unBlockChild(n,t)}))},i.prototype._prepareValue=function(t){return t},i.prototype._turnOff=function(t){this.options.turnOff&&this.options.turnOff.call(this,t),this._callOnSet(!1,t),this.options.hierarchy&&this.isGroup()&&this.blockChild(t)},i.prototype._turnOn=function(t){this.options.turnOn&&this.options.turnOn.call(this,t),this._callOnSet(!0,t),this.options.hierarchy&&this.isGroup()&&this.unblockChild(t)},i.prototype._block=function(t){this._turnOff(t)},i.prototype._unBlock=function(t){this._turnOn(t)},i.prototype._blockChild=function(t,e){var n=t.properties&&t.properties.property(this.name);n&&n.block&&n.block(e)},i.prototype._unBlockChild=function(t,e){var n=t.properties&&t.properties.property(this.name);n&&n.unBlock&&n.unBlock(e)},i.prototype._propagation=function(t,e){if(this.isGroup())for(var i=this.item.tree.getChildren(),o=0;o<i.length;o++){var r=i[o],s=r.properties&&r.properties.property(this.name);s&&s.set(t,n(n({},e),{propagation:!0,bubble:!1}))}},i.options={hierarchy:!0,bubble:!1,propagation:!1,label:"Toggle"},i}(ze),Ze=function(){function t(t,e){this.item=t,this.options={},this._properties={},this._propertiesList=[],e&&e.forEach(this._setPropertyHandler.bind(this))}return t.prototype.add=function(t){this._setPropertyHandler(t)},t.prototype.update=function(){this.list().forEach((function(t){return t.update()}))},t.prototype.get=function(t){var e=this.property(t);return e?e.get():void 0},t.prototype.set=function(t,e,n){var i=this.property(t);i&&i.getValue()!==e&&i.set(e,n)},t.prototype.property=function(t){return this._properties[t]},t.prototype.list=function(){var t=this;return this._propertiesList.map((function(e){return t._properties[e]}))},t.prototype.destroy=function(){for(var t in this._properties){var e=this.property(t);e&&e.destroy&&e.destroy()}this._properties={},this._propertiesList=[]},t.prototype._setPropertyHandler=function(t){var e=this._getHandler(t);if(e&&t.name){var i=n({},t);this._properties[t.name]=new e(t.name,this.item,i),this._propertiesList.push(t.name)}},t.prototype._getHandler=function(e){var n=e.handler;return!n&&e.type?"boolean"===e.type?t.handlers.CheckProperty:t.handlers.BaseProperty:n},t.handlers={CheckProperty:Be},t}(),Ne=0,Re=function(){function t(t){this.options={},this.id=Ne,Ne+=1,this.options=n({},t),this.tree=new Se(this)}return t.prototype.initProperties=function(){this.properties=new Ze(this,this.options.properties)},t}(),je=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getProperty=function(){var t=this.item.layer;return t&&t&&t.options&&void 0!==t.options.opacity?t.options.opacity:1},n.prototype.update=function(t,e){var n=this;if(e=e||{},this.isGroup()){this._value=this._prepareValue(t,e);for(var i=0,o=this.getChildren();i<o.length;i++){var r=o[i].properties.property(this.name);r&&(e.propagation?r.set(t,e):r.update(r.get(),e))}}var s=this.item.layer;if(s){var a=this.getParents().reduce((function(t,e){var i=e.properties.property(n.name);return t*(i?i.getValue():1)}),1);this.item.webMap.setLayerOpacity(s,this._prepareValue(t*a))}},n.prototype._prepareValue=function(t,e){return e&&e.propagation&&this.isGroup()?1:Number(t)},n}(ze),De=function(t){function i(e,o,r,s,a,u){var h=t.call(this,n(n({},i.options),r))||this;if(h.webMap=e,h.emitter=new p.exports.EventEmitter,h._rootDescendantsCount=0,s&&(h.connector=s),a&&h.tree.setParent(a),h.item=o,"root"===h.item.item_type)h._rootDescendantsCount=h._sumUp(h.item.children);else{var l=h.tree.getRoot();l&&(h._rootDescendantsCount=l._rootDescendantsCount)}return h.initProperties(),u||h._init(o),h}return e(i,t),i.create=function(t,e,n,s,a){return o(this,void 0,void 0,(function(){var o;return r(this,(function(r){switch(r.label){case 0:return[4,(o=new i(t,e,n,s,a,!0))._init(e)];case 1:return r.sent(),[2,o]}}))}))},i.prototype.initItem=function(t){var e=this,n=t,o=this.getItemOptions(t),r=function(t){n._layer=t,e.layer=t,e.properties.get("visibility")&&e.properties.set("visibility",!0),void 0!==o.opacity&&e.webMap.setLayerOpacity(t,o.opacity)};if("group"===t.item_type||"root"===t.item_type){if(t.children&&t.children.length)for(var s=0,a=this.getChildren(t);s<a.length;s++){var u=new this.constructor(this.webMap,a[s],this.options,this.connector,this);this.tree.addChild(u)}return Promise.resolve()}var h=void 0;if("layer"===t.item_type)h=t.adapter||t.layer_adapter.toUpperCase();else if(i.GetAdapterFromLayerType[t.item_type]){h=(0,i.GetAdapterFromLayerType[t.item_type])(t,o,this.webMap,this.connector)}return h?this.webMap.addLayer(h,o).then((function(t){r(t)})):t._layer?Promise.resolve(r(t._layer)):Promise.reject("No layer added")},i.prototype.bringToFront=function(){},i.prototype.fit=function(){},i.prototype.getLayer=function(){return this.layer},i.prototype.getItemOptions=function(t){var e,n="layer"===t.item_type&&t.layer_transparency,i="number"==typeof n?(100-n)/100:void 0,o={visibility:!1,headers:this.options.headers,crossOrigin:this.options.crossOrigin,setViewDelay:this.options.setViewDelay,params:{resource:this.item.resourceId,item:this.item}};if(this.options.order){var r=String(this.options.drawOrderEnabled&&"draw_order_position"in t?this._rootDescendantsCount-t.draw_order_position:this.id).padStart(4,"0");o.order=Number((0|this.options.order)+"."+r)}if(this.options.popupOptions&&(o.popupOptions=this.options.popupOptions),"layer"===t.item_type){var s=(e=this._getZoomRange(t)).maxZoom;!function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var i=0,o=e;i<o.length;i++)for(var r=o[i],s=0,a=Object.getOwnPropertyNames(r);s<a.length;s++){var u=a[s];t[u]=r[u]}}(o,{updateWmsParams:t.updateWmsParams,url:t.url,headers:this.options.headers,ratio:this.options.ratio,maxZoom:s,minZoom:e.minZoom,minScale:t.layer_min_scale_denom,maxScale:t.layer_max_scale_denom})}return void 0!==i&&(o.opacity=i),o},i.prototype.getChildren=function(t){return a([],t.children,!0).reverse()},i.prototype._mapScaleToZoomLevel=function(t){return function(t,e){void 0===e&&(e=0);var n=e,i=function(){if(void 0===tn){var t=document.createElement("div");t.style.cssText="position: absolute; left: -100%; top: -100%; width: 100cm;",document.body.appendChild(t);var e=t.offsetWidth;document.body.removeChild(t),tn=e}return tn}()*function(t){return 12756274*Math.PI*Math.cos(t*Math.PI/180)}(n)/t;return function(t){return Math.log(t/256)/Math.LN2}(i)}(t)},i.prototype._getZoomRange=function(t){var e=this.options.minZoom,n=this.options.maxZoom,i=t.layer_min_scale_denom?this._mapScaleToZoomLevel(t.layer_min_scale_denom):void 0,o=t.layer_max_scale_denom?this._mapScaleToZoomLevel(t.layer_max_scale_denom):void 0,r=[e,i].filter(Boolean),s=[n,o].filter(Boolean);return{minZoom:r.length?Math.max.apply(Math,r):void 0,maxZoom:s.length?Math.min.apply(Math,s):void 0}},i.prototype._init=function(t){var e=this;this.initItem(t).then((function(){e.emitter.emit("init")}))},i.prototype._sumUp=function(t,e){void 0===e&&(e=0);for(var n=0,i=t;n<i.length;n++){var o=i[n];"layer"===o.item_type?(e+=1,o.draw_order_position=o.draw_order_position||e):"group"===o.item_type&&(e=this._sumUp(o.children,e))}return e},i.GetAdapterFromLayerType={},i.options={properties:[{type:"boolean",name:"visibility",getProperty:function(t){if(t){if("group"===t.item.item_type||"root"===t.item.item_type)return Ce(t.item,(function(t){return"layer_enabled"in t&&t.layer_enabled}),(function(t){return t.children}));if("layer"===t.item.item_type)return t.item.layer_enabled}return!1},onSet:function(t,e,n){n&&"layer"===n.item.item_type&&(n.layer&&(t?n.webMap.showLayer(n.layer):n.webMap.hideLayer(n.layer)),n.item.layer_enabled=t)}},{name:"opacity",handler:je}]},i}(Re);function Fe(t){var e=t.webMap,i=t.connector,s=t.item,a=t.adapterOptions,u=void 0===a?{}:a,h=t.idPrefix,l=void 0===h?"first-show-adapter":h;return o(this,void 0,void 0,(function(){var t;return r(this,(function(a){return t=function(t){var e=t.webMap,i=t.adapterOptions,s=void 0===i?{}:i,a=t.onLayerAdded,u=t.createAdapter;return o(this,void 0,void 0,(function(){var t;return r(this,(function(i){return t=function(){function t(){this.options={},this.layer=[],this._removed=!1,this._creatingInProgress=!1}return t.prototype.addLayer=function(){return this.layer},t.prototype.removeLayer=function(){this._removed=!0;for(var t=0,n=this.layer;t<n.length;t++)e.removeLayer(n[t])},t.prototype.destroyed=function(){return this._removed},t.prototype.showLayer=function(){return o(this,void 0,void 0,(function(){var t,n;return r(this,(function(i){switch(i.label){case 0:if(this.options.visibility=!0,!this.layer.length)return[3,5];t=0,n=this.layer,i.label=1;case 1:return t<n.length?[4,e.showLayer(n[t])]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[3,7];case 5:return[4,this.loadLayer()];case 6:i.sent(),i.label=7;case 7:return[2]}}))}))},t.prototype.hideLayer=function(){return o(this,void 0,void 0,(function(){var t,n;return r(this,(function(i){switch(i.label){case 0:if(this.options.visibility=!1,!this.layer)return[3,4];t=0,n=this.layer,i.label=1;case 1:return t<n.length?[4,e.hideLayer(n[t])]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))},t.prototype.loadLayer=function(){return o(this,void 0,void 0,(function(){var t,i,o;return r(this,(function(r){switch(r.label){case 0:return this.layer.length||this._creatingInProgress?[3,5]:(this._creatingInProgress=!0,[4,u(this)]);case 1:return(t=r.sent())?[4,(i=new t(e.mapAdapter.map,n({},s))).addLayer({order:this.options.order,headers:this.options.headers,baselayer:this.options.baselayer})]:[3,5];case 2:return o=r.sent(),a&&a(i),Object.assign(i.options,s),i.layer=o,this._removed&&e.removeLayer(i),this.layer.push(i),this.options.visibility?[4,e.showLayer(i)]:[3,4];case 3:r.sent(),r.label=4;case 4:this._creatingInProgress=!1,r.label=5;case 5:return[2,this.layer]}}))}))},t}(),[2,t]}))}))}({webMap:e,adapterOptions:u,onLayerAdded:function(t){t.options.baselayer=!1,t.id=l+"-"+s.resource_id},createAdapter:function(){return Xe({resource:s.resource_id,adapterOptions:{name:s.display_name,opacity:s.opacity}},e,i)}}),[2,t]}))}))}var Ue=function(){function t(t){this.options=t,this.resourceId=t.resourceId;var e=t.item;this.item=e,this.name=t.labelField&&e.fields?e.fields[t.labelField]:String(e.id)}return t.prototype.extent=function(){var t=this;return this._extent?S.resolve(this._extent):this.options.connector.get("feature_layer.feature.item_extent",null,{id:this.resourceId,fid:this.item.id}).then((function(e){var n=e.extent,i=[n.minLon,n.minLat,n.maxLon,n.maxLat];return t._extent=i,i}))},t.prototype.geoJson=function(){var t=this;return this.item.geom?S.resolve(pe(this.item)):sn({resourceId:this.resourceId,featureId:this.item.id,connector:this.options.connector,geom:!0,fields:null,extensions:null}).then((function(e){return t.item.geom=e.geom,pe(t.item)}))},t}(),We=function(){function t(t,e){this.map=t,this.options=e,this.NgwWebmapItem=De,this.pixelRadius=10,this.webmapClassName="webmap",this.emitter=new p.exports.EventEmitter,this._webmapBaselayersIds=[];var n=e.resourceId;if(Array.isArray(n)?(this.resourceId=n[0],this.options.id=n[1]):this.resourceId=n,!this.resourceId)throw new Error("NGW `resourceId` is not defined")}return t.prototype.addLayer=function(t){var e,i;return o(this,void 0,void 0,(function(){var o,s;return r(this,(function(r){switch(r.label){case 0:return this.options=n(n({},this.options),t),o=this,[4,this._getWebMapLayerItem()];case 1:return o.layer=r.sent(),s=null===(i=null===(e=this.response)||void 0===e?void 0:e.webmap)||void 0===i?void 0:i.extent_constrained,this.options.useExtentConstrained&&this._extent&&s&&this.options.webMap.setView({maxBounds:this._extent}),[2,this.layer]}}))}))},t.prototype.removeLayer=function(){var t=this.options.webMap.mapAdapter;if(this.getDependLayers().forEach((function(e){"layer"in e&&t.removeLayer(e.layer.layer)})),this._webmapBaselayersIds.length){for(var e=0,n=this._webmapBaselayersIds;e<n.length;e++){this.options.webMap.removeLayer(n[e])}this._lastActiveBaselayer&&this.options.webMap.showLayer(this._lastActiveBaselayer)}this.options.useExtentConstrained&&this._extent&&this.options.webMap.setView({maxBounds:null}),delete this.layer,delete this.response,delete this._webmapLayersIds},t.prototype.showLayer=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return this.layer&&this.layer.properties?[2,this.layer.properties.property("visibility").set(!0)]:[2]}))}))},t.prototype.hideLayer=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return this.layer&&this.layer.properties?[2,this.layer.properties.property("visibility").set(!1)]:[2]}))}))},t.prototype.setOpacity=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this.layer&&this.layer.properties?[2,this.layer.properties.property("opacity").set(t)]:[2]}))}))},t.prototype.getExtent=function(){return this.getBounds()},t.prototype.getBounds=function(){var t=this.response&&this.response.webmap;if(t)return ie(t)},t.prototype.getDependLayers=function(){return this.layer&&this.layer.tree.getDescendants()||[]},t.prototype.getBookmarksResourceId=function(){var t=this.response&&this.response.webmap;if(t)return t.bookmark_resource.id},t.prototype.fetchBookmarks=function(){var t=this.getBookmarksResourceId(),e=this.options.connector;if(t)return e.getResourceOrFail(t).then((function(n){var i,o=null===(i=n.feature_layer)||void 0===i?void 0:i.fields.find((function(t){return t.label_field})),r=o&&o.keyname;return be({connector:e,resourceId:t,geom:!1,fields:r?[r]:void 0}).then((function(n){for(var i=[],o=0,s=n;o<s.length;o++){var a=new Ue({item:s[o],resourceId:t,labelField:r,connector:e});i.push(a)}return i}))}));throw new Error("Webmap was not loaded correctly, it is impossible to extract bookmarks")},t.prototype.getIdentificationIds=function(){return o(this,void 0,void 0,(function(){var t,e,n;return r(this,(function(i){switch(i.label){case 0:return t=[],(e=this._webmapLayersIds)?[3,2]:[4,this._getWebMapIds()];case 1:e=i.sent(),this._webmapLayersIds=e,i.label=2;case 2:return e&&e.length&&(n=(n=this.getDependLayers()).sort((function(t,e){return e.id-t.id})),n.forEach((function(e){var n=e.item,i=n.parentId;if(void 0!==i&&"layer"===n.item_type){var o=e.properties.property("visibility");o.get()&&!o.isBlocked()&&t.push(i)}}))),[2,t]}}))}))},t.prototype._getWebMapLayerItem=function(){return o(this,void 0,void 0,(function(){var t,e=this;return r(this,(function(n){switch(n.label){case 0:return this.resourceId?[4,this.getWebMapConfig(this.resourceId)]:[3,2];case 1:if((t=n.sent())&&t.root_item)return[2,new Promise((function(n){var i={};if(e.options.connector&&e.options.connector.options.auth){var o=e.options.connector.getAuthorizationHeaders();o&&(i.headers=o)}i.setViewDelay=e.options.setViewDelay,i.order=e.options.order,i.ratio=e.options.ratio,i.crossOrigin=e.options.crossOrigin,i.minZoom=e.options.minZoom,i.maxZoom=e.options.maxZoom,i.drawOrderEnabled=t.draw_order_enabled,i.popupOptions=e.options.popupOptions;var r=new e.NgwWebmapItem(e.options.webMap,t.root_item,i,e.options.connector);r.emitter.on("init",(function(){return n(r)}))}))];n.label=2;case 2:return[2]}}))}))},t.prototype.getWebMapConfig=function(t){return o(this,void 0,void 0,(function(){var e,n;return r(this,(function(i){switch(i.label){case 0:return[4,this.options.connector.getResource(t)];case 1:return(e=i.sent())&&(this.response=e,n=e[this.webmapClassName],this._setupBaselayers(e),n)?(this._extent=[n.extent_left,n.extent_bottom,n.extent_right,n.extent_top],this._updateItemsParams(n.root_item,this.options.webMap,e),[2,n]):[2]}}))}))},t.prototype._setupBaselayers=function(t){var e,n=this.options.webMap;if(null===(e=this.options.useBasemap)||void 0===e||e)if(t.basemap_webmap&&t.basemap_webmap.basemaps.length){var i=n.getActiveBaseLayer();this._lastActiveBaselayer=i?i.id:void 0,this._setBasemaps(t.basemap_webmap)}else this.options.defaultBasemap&&n.addBaseLayer("OSM",{id:"webmap-default-baselayer",name:"OpenStreetMap"})},t.prototype._setBasemaps=function(t){for(var e=this,n=this.options.webMap,i=!1,o=function(t){Fe({webMap:n,connector:r.options.connector,item:t,adapterOptions:{crossOrigin:r.options.crossOrigin}}).then((function(o){var r=!i&&t.enabled;return t.enabled&&(i=!0),n.addBaseLayer(o,{id:rn+t.resource_id,name:t.display_name,opacity:t.opacity,visibility:r}).then((function(t){t.id&&e._webmapBaselayersIds.push(t.id)}))}))},r=this,s=0,a=t.basemaps;s<a.length;s++){o(a[s])}},t.prototype._updateItemsParams=function(t,e,i){var o=this;if(t)if("group"===t.item_type||"root"===t.item_type)t.children&&(t.children=t.children.map((function(t){return o._updateItemsParams(t,e,i)}))),"root"===t.item_type&&(t.display_name=i.resource.display_name);else if("layer"===t.item_type){var r=Y(this.options.connector.options.baseUrl+"/api/component/render/image"),s=t.layer_style_id;t.url=r,t.resourceId=s,t.updateWmsParams=function(t){return $e(t,s)};var a=Pe({options:{adapter:t.layer_adapter.toUpperCase(),resource:s},webMap:e,baseUrl:this.options.connector.options.baseUrl||""});t=n(n({},t),a)}return t},t.prototype._getWebMapIds=function(){return o(this,void 0,void 0,(function(){var t,e,n,i,o,s,a;return r(this,(function(r){switch(r.label){case 0:if(!(t=this.layer)||"root"!==t.item.item_type)return[3,2];for(e=t.tree.getDescendants(),n=[],i=function(t){var e=t.item;if("layer"===e.item_type){var i=o.options.connector.getResource(e.layer_style_id).then((function(t){if(t){var n=Number(t.resource.parent.id);return e.parentId=n,n}}));n.push(i)}},o=this,s=0,a=e;s<a.length;s++)i(a[s]);return[4,Promise.all(n)];case 1:return[2,r.sent().filter((function(t){return void 0!==t}))];case 2:return[2]}}))}))},t}();var He={tms:"TILE"};function Ve(t){return new Promise((function(e,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState&&200===i.status&&i.responseText)try{e(JSON.parse(i.responseText))}catch(t){n(t)}},i.open("GET",Y(t),!0),i.send()}))}var qe="https://qms.nextgis.com";function Ge(t,e,s){var a;if(void 0===e&&(e=qe),void 0===s&&(s={}),"webMap"in t){var u=t.webMap,h=t.url,l=i(t,["webMap","url"]);a=u,h&&(e=h),l&&(s=l)}else a=t;return e||(e=qe),function(){function t(t,e){this.map=t;var i=n(n({},s),e);this.options=i,this.options.baselayer=!0,i.qms&&(this.qms=i.qms)}return t.prototype.addLayer=function(i){return o(this,void 0,void 0,(function(){var o,s,u,h,l,c,p,d;return r(this,(function(r){switch(r.label){case 0:if(this.qms||!i.qmsId)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),o=this,[4,Ve(e+"/api/v1/geoservices/"+i.qmsId)];case 2:return o.qms=r.sent(),[3,4];case 3:return s=r.sent(),console.error(s),[3,4];case 4:return(u=this.qms)&&(l=a.mapAdapter.layerAdapters[h=He[u.type||"tms"]])&&(m=t,_=l,["showLayer","hideLayer"].forEach((function(t){var e=Object.getOwnPropertyDescriptor(_.prototype,t);e&&Object.defineProperty(m.prototype,t,e)})),"TILE"===h)?(i=n(n({order:0,maxZoom:a.options.maxZoom,minZoom:a.options.minZoom},this.options),function(t){var e=("https:"===location.protocol?"https":"http")+"://",n=t.url.replace(/^(https?|ftp):\/\//,e);return t.y_origin_top||(n=n.replace("{y}","{-y}")),{url:n,name:t.name,attribution:t.copyright_text,maxZoom:t.z_max,minZoom:t.z_min}}(u)),u.origin_url&&(f=[],c=[u.origin_url.replace(/{switch:(.*?)}/,(function(t,e){return"string"==typeof e&&e.split(",").forEach((function(t){return f.push(t)})),"{s}"})),f],p=c[0],(d=c[1]).length&&(i.subdomains=d,i.url=p)),this.options=i,[2,new l(this.map,i).addLayer(i)]):[2]}var f,m,_}))}))},t}()}var Je=function(){function t(t){this.options={url:"https://qms.nextgis.com"},this.options=n(n({},this.options),t),this.url=this.options.url}return t.prototype.getLayerAdapters=function(){var t=this;return Promise.resolve([{name:"QMS",createAdapter:function(e){return Promise.resolve(t._createAdapter(e))}}])},t.prototype._createAdapter=function(t){return Ge({webMap:t,url:this.url})},t.utils={createQmsAdapter:Ge},t}();var Ke={},Ye=["mapserver_style","qgis_vector_style","qgis_raster_style","wmsserver_service","raster_style","basemap_layer","vector_layer","raster_layer","postgis_layer","webmap","tmsclient_layer"];function Qe(t){var e=t.layerOptions,i=t.webMap,s=t.connector,a=t.item;return o(this,void 0,void 0,(function(){var t,o;return r(this,(function(r){switch(r.label){case 0:return[4,s.getResourceChildren(a.resource.id)];case 1:return t=r.sent(),(o=t&&t[0])?[2,Xe(n(n({},e),{resource:o.resource.id}),i,s)]:[2]}}))}))}function Xe(t,i,s){return o(this,void 0,void 0,(function(){var a,u,h,l,c,p,d,f,m,_,y,v,g,b;return r(this,(function(w){switch(w.label){case 0:return h=t.adapter,[4,le(t,s)];case 1:return(l=w.sent())?(c=t.resource)&&c.resource&&void 0!==c.resource.id?(u=c,[3,4]):[3,2]:[3,15];case 2:return[4,s.getResource(l)];case 3:u=w.sent(),w.label=4;case 4:return u?(p=u.resource.cls,d=n(n({},t),{resource:l}),f={layerOptions:d,webMap:i,connector:s,item:u},-1===Ye.indexOf(p)?[3,12]:"webmap"!==p?[3,5]:(a=function(t){var n=t.layerOptions,i=t.webMap,s=t.connector;return o(this,void 0,void 0,(function(){var t;return r(this,(function(o){switch(o.label){case 0:return[4,le(n,s)];case 1:return t=o.sent(),[2,function(n){function o(e){return n.call(this,e,{url:"",webMap:i,resourceId:t,connector:s})||this}return e(o,n),o}(We)]}}))}))}(f),[3,11])):[3,14];case 5:if("vector_layer"!==p&&"postgis_layer"!==p)return[3,6];if(m=u.vector_layer&&en[u.vector_layer.geometry_type],(_=f.layerOptions.adapterOptions||{}).type=_.type||m,f.layerOptions.adapterOptions=_,t.adapterOptions=f,void 0!==h&&"GEOJSON"!==h){if("MVT"!==h)return[2,Qe(f)];a=Me(f)}else a=Le(f);return[3,11];case 6:return"raster_layer"!==p?[3,7]:[2,Qe(f)];case 7:return"basemap_layer"!==p?[3,8]:(a=function(t){var i=t.webMap,s=t.item;return o(this,void 0,void 0,(function(){var t,a,u,h,l;return r(this,(function(c){if(s.basemap_layer){if(a=s.basemap_layer.url,t=s.basemap_layer.qms)return u=JSON.parse(t),[2,Promise.resolve(Je.utils.createQmsAdapter(i,void 0,{qms:u,baselayer:!0}))];if(a&&(h=i.mapAdapter.layerAdapters.TILE))return l=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(e){return o(this,void 0,void 0,(function(){return r(this,(function(i){return[2,t.prototype.addLayer.call(this,n(n({},e),{url:a}))]}))}))},i}(h),[2,l]}return[2]}))}))}(f),[3,11]);case 8:return"GEOJSON"!==h?[3,10]:[4,s.getResource(u.resource.parent.id)];case 9:return(y=w.sent())&&(v=n(n({},t),{resource:u.resource.parent.id}),a=Le(n(n({},f),{item:y,layerOptions:v}))),[3,11];case 10:a=Me(f),w.label=11;case 11:return[3,13];case 12:if(!Ke[p])throw"Resource class '".concat(p,"' not yet supported.");g=Ke[p],b=void 0,(b=h&&"function"!=typeof b?g[h]:g)&&(a=b(f)),w.label=13;case 13:return[3,15];case 14:throw"Resource item is not found";case 15:return a?[2,a.then((function(t){if(t){var e=t;return u&&(e.prototype.item=u,e.prototype.resourceId=u.resource.id,e.prototype.connector=s),z(e,[ae],{replace:!1}),e}}))]:[2]}}))}))}function $e(t,e){var n=t.bbox,i=t.width,o=t.height,r=t.nd;return{resource:Array.isArray(e)?e.join(","):e,extent:n,size:i+","+o,timestamp:Date.now(),nd:null!=r?r:200}}var tn,en={POINT:"point",LINESTRING:"line",POLYGON:"polygon",MULTIPOINT:"point",MULTILINESTRING:"line",MULTIPOLYGON:"polygon",POINTZ:"point",LINESTRINGZ:"line",POLYGONZ:"polygon",MULTIPOINTZ:"point",MULTILINESTRINGZ:"line",MULTIPOLYGONZ:"polygon"};var nn=function(){function t(t){if(this.options=t,this.options.connector)this.url=this.options.connector.options.baseUrl||"",this.connector=this.options.connector;else{if(!this.options.baseUrl)throw new Error("url is not defined");this.url=this.options.baseUrl,this.connector=new ne({baseUrl:this.url,auth:this.options.auth})}}return t.addClassAdapters=function(t,e){Ke[t]=e},t.prototype.onLoadSync=function(t){return o(this,void 0,void 0,(function(){var e,i,o;return r(this,(function(r){switch(r.label){case 0:if(!this.options.resourceId||!this.url)return[3,4];if(!(e=[this.options.resourceId]).length)return[3,4];i=0,o=e,r.label=1;case 1:return i<o.length?[4,t.addLayer(We,n({visibility:!0,fit:!0,pixelRadius:this.options.pixelRadius},{resourceId:o[i],connector:this.connector,webMap:t}))]:[3,4];case 2:return[2,r.sent()];case 3:return i++,[3,1];case 4:return[2]}}))}))},t.prototype.getLayerAdapters=function(){return Promise.resolve([this._getLayerAdapter()])},t.prototype._getLayerAdapter=function(){var t=this;return{name:"WEBMAP",createAdapter:function(e){return Promise.resolve(t._createAdapter(e))}}},t.prototype._createAdapter=function(t){var i;return i={webMap:t,connector:this.connector,baseUrl:this.url},function(t){function o(e,o){return o=n(n({},i),o),t.call(this,e,o)||this}return e(o,t),o}(We)},t}(),on=function(){function t(t){var e=t.feature;this.id=e.id,this.geom=e.geom,this.label=e.label,this.parent=e.parent,this.fields=e.fields,this.layerId=e.layerId,this.connector=t.connector}return t.prototype.identify=function(t){var e=this;return void 0===t&&(t={}),this._item?S.resolve(this._item):sn(n({connector:this.connector,featureId:this.id,resourceId:this.layerId,fields:null,extensions:["attachment","description"]},t)).then((function(t){return e._item=t,e.geom=t.geom,e.extensions=t.extensions,t}))},t.prototype.resource=function(){var t=this;return this._resource?S.resolve(this._resource.feature_layer):this.connector.getResource(this.layerId).then((function(e){return t._resource=e,t._resource.feature_layer}))},t.prototype.getBounds=function(){return this._extent?S.resolve(this._extent):(t={connector:this.connector,featureId:this.id,resourceId:this.layerId}).connector.get("feature_layer.feature.item_extent",{cache:void 0===(e=t.cache)||e},{id:t.resourceId,fid:t.featureId}).then((function(t){if(t){var e=t.extent;return[e.minLon,e.minLat,e.maxLon,e.maxLat]}}));var t,e},t.prototype.geojson=function(){var t=this;return this._geojson?S.resolve(this._geojson):this.identify().then((function(e){return e.toGeojson().then((function(e){return t._geojson=e,e}))}))},t}(),rn="webmap-baselayer";function sn(t){var e=n({},ce);de(e,t);var i=n({id:t.resourceId,fid:t.featureId},e);return t.connector.get("feature_layer.feature.item",{cache:t.cache||!0},i).then((function(e){return n(n({},e),{toGeojson:function(){return e.geom?S.resolve(pe(e)):sn(n(n({},t),{geom:!0,fields:null,extensions:null})).then((function(t){var i=t.geom;return pe(n(n({},e),{geom:i}))}))}})}))}function an(t){return sn(t).then((function(t){return pe(t)}))}function un(t,e){void 0===e&&(e=!1);var n=[],i=[];for(var o in t){var r=Number(o);isNaN(r)||n.push(r)}var s=t.resources;s&&n.sort((function(t,e){return s.indexOf(t)-s.indexOf(e)}));for(var a=0;a<n.length;a++){var u=t[o=n[a]];if("features"in u){var h=hn(u.features,Number(o),e);if(h.length&&(i.push.apply(i,h),!e))break}}return i}function hn(t,e,n){for(var i=[],o=0,r=t;o<r.length;o++){var s=r[o];if(i.push({featureId:s.id,resourceId:e,feature:s}),!n)break}return i}function ln(t,e){R(t);var i=t.lngLat,o=e.geom,r=e.signal,s=e.cache,a=null!=o?o:function(t,e,n,i){void 0===n&&(n=10),void 0===i&&(i=6);for(var o=n/D*H,r=o/Math.cos(e*W),s=[],a=0;a<i+1;a++){var u=Math.PI*(a/(i/2)),h=t+r*Math.cos(u),l=e+o*Math.sin(u);s.push([h,l])}return s}(i[0],i[1],e.radius);return function(t){var e=t.geom,n=t.signal,i=t.cache,o=[];if(Array.isArray(e))o=e;else{var r="Feature"===e.type?e.geometry:"Polygon"===e.type&&e;r&&(o=r.coordinates[0])}if(o){for(var s=[],a=0,u=o;a<u.length;a++){var h=u[a],l=V(h[0],h[1]);s.push(l[0]+" "+l[1])}var c="POLYGON((".concat(s.join(", "),"))");return t.connector.post("feature_layer.identify",{data:{geom:c,srs:3857,layers:t.layers},signal:n,cache:i})}throw new Error("Not valid geometry format to make intersection")}(n(n({},e),{geom:a,signal:r,cache:s}))}function cn(t,e){var n;return o(this,void 0,void 0,(function(){var i,o,s,a,u,h,l;return r(this,(function(r){switch(r.label){case 0:return[4,t.get("pyramid.settings",null,{component:"pyramid"})];case 1:if(!((i=r.sent())&&i.company_logo&&i.company_logo.enabled))return[3,6];(o=document.createElement("a")).style.position="absolute",o.style.bottom="0",o.style.right="0",o.style.padding=null!==(n=null==e?void 0:e.padding)&&void 0!==n?n:"10px",o.className="ngw-map-logo",e&&e.cssClass&&(o.className+=" "+e.cssClass),(s=new Image).style.maxHeight="100px",s.style.maxWidth="100px",s.src="",r.label=2;case 2:return r.trys.push([2,4,,5]),[4,t.get("pyramid.company_logo",{responseType:"blob"})];case 3:return a=r.sent(),u=window.URL||window.webkitURL,h=u.createObjectURL(a),s.src=h,[3,5];case 4:return l=r.sent(),console.warn(l),[3,5];case 5:return null!==i.company_logo.link&&""!==i.company_logo.link.trim()&&(o.href=i.company_logo.link,o.target="_blank",-1!==i.company_logo.link.search(/:\/\/nextgis/)&&(s.alt="Get your own Web GIS at nextgis.com")),o.appendChild(s),[2,o];case 6:return[2]}}))}))}var pn={brill:'<path d="m6 0-5 6 5 6 5-6z"/>',circle:'<circle cx="6" cy="6" r="6"/>',rect:'<rect width="12" height="12"/>',marker:'<path d="m6 0c-1.85 0-4 1.19-4 4.22 0 2.05 3.08 6.59 4 7.78 0.821-1.19 4-5.62 4-7.78 0-3.03-2.15-4.22-4-4.22z"/>',cross:'<path d="M 2.4,12 6,8.4 9.6,12 12,9.6 8.4,6 12,2.4 9.6,0 6,3.6 2.4,0 0,2.4 3.6,6 0,9.6 Z"/>',star:'<path d="m6 0.25 1.71 4.18 4.29-1.04e-4 -3.43 3.14 0.857 4.18-3.43-3.14-3.43 3.14 0.857-4.18-3.43-3.14 4.29-0.209z"/>',triangle:'<path d="m12 11.7h-12l6-11.2z"/>',plus:'<path d="m7.5 12v-4.5h4.5v-3h-4.5v-4.5h-3v4.5h-4.5v3h4.5v4.5z"/>',minus:'<path d="m12 7.5v-3h-12v3z"/>',asterisk:'<path d="m7.59 12v-3.27l2.83 1.64 1.58-2.74-2.85-1.64 2.83-1.64-1.56-2.74-2.83 1.64v-3.24h-3.17v3.24l-2.85-1.64-1.57 2.74 2.84 1.64-2.84 1.64 1.57 2.74 2.85-1.64v3.27z"/>'},dn=12;function fn(t){var e,n,i,o,r,s;void 0===t&&(t={});var a=null!==(e=t.shape)&&void 0!==e?e:"circle",u=null!==(n=t.color)&&void 0!==n?n:"blue",h=null!==(i=t.strokeColor)&&void 0!==i?i:"white",l=null!==(o=t.size)&&void 0!==o?o:dn,c=null!==(r=t.rotate)&&void 0!==r?r:0,p=null!==(s=t.anchor)&&void 0!==s?s:[l/2,l/2],d=void 0!==t.stroke?Number(t.stroke):.8,f=t.p||pn[a]||"circle",m="string"==typeof f?f:f(t),_=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}(t.svg||function(t){var e=t.height,n=t.stroke,i=void 0===n?0:n,o=t.content,r=i/2;return'<svg\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n width="'.concat(t.width,'"\n height="').concat(e,'"\n viewBox="-').concat(r," -").concat(r," ").concat(dn+i," ").concat(dn+i,'"\n >').concat(o,"</svg>")}({width:l,height:l,stroke:d,content:m}));return _.setAttribute("width",String(l)),_.setAttribute("height",String(l)),_.setAttribute("fill",u),d&&(_.setAttribute("stroke",h),_.setAttribute("stroke-width",String(d))),{type:"icon",iconSize:[l,l],iconAnchor:p,html:(new XMLSerializer).serializeToString(_),rotate:c,svg:_}}function mn(t,e,i,o){if("number"==typeof e||"string"==typeof e)e=Number(e),t.push(n(n({},i),{resource:e}));else if(Array.isArray(e)){var r=e[0],s=e[1];t.push(n(n(n({},i),{resource:r,id:s}),o))}else"object"==typeof e&&t.push(n(n(n({},i),e),o))}var _n={target:"map",baseUrl:"",whitlabel:!1,controls:["ZOOM","ATTRIBUTION"],controlsOptions:{ZOOM:{position:"top-left"},ATTRIBUTION:{position:"bottom-right",customAttribution:['<a href="https://nextgis.com" target="_blank">©NextGIS</a>']}},pixelRadius:10};var yn=function(t){function i(e){var i=t.call(this,function(t){var e=[new Je];return t.starterKits&&t.starterKits.forEach((function(t){e.push(t)})),t.connector?t.connector&&(t.baseUrl=t.connector.options.baseUrl):t.connector=new ne({baseUrl:t.baseUrl||"",auth:t.auth}),(t=N(_n,t)).center||t.bounds||(t.bounds=[-179,-90,180,90]),t.connector&&e.push(new nn({connector:t.connector,auth:t.auth})),n(n({},t),{starterKits:e,create:!1})}(e))||this;return i.emitter=new p.exports.EventEmitter,i._ngwLayers={},i._promises={select:[],identify:[]},e.connector&&(i.connector=e.connector),i._createWebMap().then((function(){var t=i.getContainer();t&&t.classList.add("ngw-map-container"),i.options.whitlabel&&i._whiteLabel()})),i}return e(i,t),i.prototype.addControl=function(e,n,i){return o(this,void 0,void 0,(function(){return r(this,(function(o){switch(o.label){case 0:return[4,this.onLoad("controls:create")];case 1:return o.sent(),[2,t.prototype.addControl.call(this,e,n,i)]}}))}))},i.prototype.addNgwLayer=function(t){return o(this,void 0,void 0,(function(){var e,i,o,s,a,u,h,l,c;return r(this,(function(r){switch(r.label){case 0:return[4,this.onMapLoad()];case 1:if(r.sent(),i=t.resourceId,((e=t.keyname)||void 0!==i)&&console.warn("DEPRECATED WARN: ".concat("set `resource` options instead of `keyname` or `resourceId`")),o=t.resource,!e&&!i&&!o)throw new Error("resource, resourceId or keyname is required parameter to add NGW layer");if(!B(this.options.baseUrl))return[3,5];r.label=2;case 2:return r.trys.push([2,4,,5]),B(this.options.setViewDelay)&&(t.adapterOptions=t.adapterOptions||{},B(t.adapterOptions.setViewDelay)||(t.adapterOptions.setViewDelay=this.options.setViewDelay)),s=function(t,e,n){var i=n.getAuthorizationHeaders();return i&&(t.headers=i),Xe(t,e,n)}(t,this,this.connector),a=n(n({visibility:!0},t),t.adapterOptions),[4,this.addLayer(s,a)];case 3:return u=r.sent(),h=u&&this.getLayerId(u),u&&h&&(this._ngwLayers[h]={layer:u,resourceId:u.resourceId},u.options.name=u.options.name||u.item&&u.item.resource.display_name,u.options.baselayer&&this.getActiveBaseLayer()),[2,u];case 4:return l=r.sent(),c=K(o)&&"id"in o?o.id:e||i||o,console.error("Can't add NGW layer ".concat(c,"."),l),[3,5];case 5:return[2]}}))}))},i.prototype.fit=function(){var t,e=(t=this.options).center,n=t.zoom,i=t.bounds;e?(this.setCenter(e),n&&this.setZoom(n)):i&&this.fitBounds(i)},i.prototype.fetchNgwLayerItem=function(t){return sn(n({connector:this.connector},t))},i.prototype.fetchNgwLayerItems=function(t){return be(n({connector:this.connector},t))},i.prototype.fetchNgwLayerFeature=function(t){return an(n({connector:this.connector},t))},i.prototype.fetchNgwLayerFeatures=function(t){return xe(n({connector:this.connector},t))},i.prototype.fetchIdentifyItem=function(t,e){var i,o,r,s=(o=(i={identify:t,connector:this.connector,requestOptions:e}).connector,(r=un(i.identify))&&r.length?sn(n(n({connector:o},i.requestOptions),r[0])):S.resolve(void 0));return this._addPromise("identify",s),s},i.prototype.fetchIdentifyGeoJson=function(t,e){void 0===e&&(e=!1);var i=function(t){var e=t.connector,i=t.identify,o=t.requestOptions;for(var r in i){var s=Number(r);if(!isNaN(s)){var a=i[r];if("features"in a){var u=a.features.find((function(t){return t.geom}));if(u&&u.geom){var h=u.geom;return S.resolve(pe(n(n({},u),{geom:h})))}}}}var l=un(i);return l&&l.length?an(n(n(n({},o),{connector:e}),l[0])):S.resolve(void 0)}({identify:t,connector:this.connector,multiple:e});return i&&"then"in i?(this._addPromise("identify",i),i):S.resolve(i)},i.prototype.getIdentifyGeoJson=function(t,e){return void 0===e&&(e=!1),this.fetchIdentifyGeoJson(t,e)},i.prototype.getNgwLayers=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.onLoad()];case 1:return t.sent(),[2,this._ngwLayers]}}))}))},i.prototype.getNgwLayerByResourceId=function(t){return o(this,void 0,void 0,(function(){var e,n,i,o,s,a,u,h;return r(this,(function(r){switch(r.label){case 0:for(i in n=[],e=this._ngwLayers)n.push(i);o=0,r.label=1;case 1:return o<n.length?(i=n[o])in e?(s=this._ngwLayers[i]).resourceId!==t?[3,2]:[2,s&&s.layer]:[3,5]:[3,6];case 2:return s.layer.getIdentificationIds?[4,s.layer.getIdentificationIds()]:[3,4];case 3:if((a=r.sent())&&a.some((function(e){return e===t})))return[2,s.layer];r.label=4;case 4:if(s.layer.getDependLayers&&(u=s.layer.getDependLayers(),h=u.find((function(e){return e.item&&e.item.parentId===t}))))return[2,h.layer];r.label=5;case 5:return o++,[3,1];case 6:return[2]}}))}))},i.prototype.fitLayer=function(e,n){return o(this,void 0,void 0,(function(){var i,o,s,a,u=this;return r(this,(function(r){switch(r.label){case 0:return i="string"==typeof e||"number"==typeof e?String(i):e.id,(o=i&&this._ngwLayers[i])?o.layer.getBounds?[4,o.layer.getBounds()]:[3,2]:[3,7];case 1:return(s=r.sent())&&this.fitBounds(s,n),[3,6];case 2:return a=void 0,o.layer.item?(a=o.layer.item,[3,5]):[3,3];case 3:return[4,this.connector.getResource(o.resourceId)];case 4:a=r.sent(),r.label=5;case 5:a&&re({resourceId:a.resource.id,connector:this.connector}).then((function(t){t&&u.fitBounds(t,n)})),r.label=6;case 6:return[3,8];case 7:t.prototype.fitLayer.call(this,"number"==typeof e?String(e):e,n),r.label=8;case 8:return[2]}}))}))},i.prototype.zoomToLayer=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return[2,this.fitLayer(t)]}))}))},i.prototype.onLoad=function(e){return void 0===e&&(e="ngw-map:create"),t.prototype.onLoad.call(this,e)},i.prototype.removeLayer=function(e){var n=this.getLayer(e);if(n){var i=this.getLayerId(n);i&&delete this._ngwLayers[i],t.prototype.removeLayer.call(this,n)}},i.prototype.enableSelection=function(){var t=this;this.$$selectFromNgwRaster||(this.$$selectFromNgwRaster=function(e){t._getSelectListenersCount()&&t.selectFromNgwRaster(e)},this.$$selectFromNgwVector=function(e){t._getSelectListenersCount()&&t._selectFromNgwVector(e)},this.emitter.on("click",this.$$selectFromNgwRaster),this.emitter.on("layer:click",this.$$selectFromNgwVector))},i.prototype.disableSelection=function(){this.$$selectFromNgwRaster&&(this.emitter.removeListener("click",this.$$selectFromNgwRaster),this.$$selectFromNgwRaster=void 0),this.$$selectFromNgwVector&&(this.emitter.removeListener("layer:click",this.$$selectFromNgwVector),this.$$selectFromNgwVector=void 0)},i.prototype.getNgwLayerItem=function(t){return this.fetchNgwLayerItem(t)},i.prototype.getNgwLayerItems=function(t){return this.fetchNgwLayerItems(t)},i.prototype.getNgwLayerFeature=function(t){return this.fetchNgwLayerFeature(t)},i.prototype.getNgwLayerFeatures=function(t){return this.fetchNgwLayerFeatures(t)},i.prototype.cancelPromise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.cancelPromises.apply(this,t)},i.prototype.cancelPromises=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.length||(e=Object.keys(this._promises)),e.forEach((function(e){var n=t._promises[e];n&&(n.forEach((function(t){return t.cancel()})),t._promises[e]=[])}))},i.prototype.selectFromNgwRaster=function(t){return o(this,void 0,void 0,(function(){var e,i,o,s,a,u,h,l,c,p,d,f,m,_,y,v,g=this;return r(this,(function(r){switch(r.label){case 0:for(this._emitStatusEvent("ngw:preselect"),e=[],(i=Object.values(this._ngwLayers)).sort((function(t,e){return t.layer.order&&e.layer.order?e.layer.order-t.layer.order:1})),o=0,s=i;o<s.length;o++)(u="function"==typeof(a=s[o].layer).getIdentificationIds&&a.getIdentificationIds)&&a.options.selectable&&this.isLayerVisible(a)&&e.push(u.call(a));return[4,Promise.all(e)];case 1:for(h=r.sent(),l=[],c=0,p=h;c<p.length;c++)(d=p[c])&&l.push.apply(l,d);return l.length?(f=this.options.pixelRadius||10,m=this.getCenter(),_=void 0!==(_=this.getZoom())?_:20,m&&_?(y=function(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4}(m,_,f),v=ln(t,{layers:l,connector:this.connector,radius:y}).then((function(e){var i=n(n({},e),{resources:l,sourceType:"raster",event:t}),o=g._prepareToIdentify(i);return g._emitStatusEvent("ngw:select",o),o})),this._addPromise("select",v),[2,v]):(this._emitStatusEvent("ngw:select",null),[2])):(this._emitStatusEvent("ngw:select",null),[2])}}))}))},i.prototype._addPromise=function(t,e){var n=this._promises[t];if(n&&-1===n.indexOf(e)){var i=function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)};e.then(i),e.catch(i),n.push(e)}},i.prototype._isFitFromResource=function(){var t=this._initMapState;return!t.zoom||!t.center},i.prototype._createWebMap=function(){return o(this,void 0,void 0,(function(){var t,e,n,i,o,s,a,u,h,l;return r(this,(function(r){switch(r.label){case 0:return[4,this.create()];case 1:if(r.sent(),this.options.qmsId&&this._addQmsBaseLayer(),this.options.osm&&this._addOsmBaseLayer(),t=[],e=this._isFitFromResource(),this.options.webmapId&&mn(t,this.options.webmapId,{fit:e}),this.options.resources&&Array.isArray(this.options.resources))for(n=0,i=this.options.resources;n<i.length;n++)o=i[n],s={},e||(s.fit=!1),mn(t,o,{},s);a=0,u=t,r.label=2;case 2:if(!(a<u.length))return[3,7];h=u[a],r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.addNgwLayer(h)];case 4:return r.sent(),[3,6];case 5:return l=r.sent(),console.warn(l),[3,6];case 6:return a++,[3,2];case 7:return this._emitStatusEvent("ngw-map:create",this),this.enableSelection(),[2]}}))}))},i.prototype._addOsmBaseLayer=function(){this.addBaseLayer("OSM")},i.prototype._addQmsBaseLayer=function(){var t,e;Array.isArray(this.options.qmsId)?(t=this.options.qmsId[0],e=this.options.qmsId[1]):t=Number(this.options.qmsId);var n={qmsId:t};e&&(n.id=e),this.addBaseLayer("QMS",n)},i.prototype._selectFromNgwVector=function(t){var e,i=t.layer;if(i.options.selectable&&this.isLayerVisible(i)){var o=i.item&&i.item.resource.id,r=t.feature;if(void 0!==o&&r){var s=r.id;if(s){var a={id:Number(s),fields:r.properties||{},label:"#".concat(o),layerId:Number(o),parent:"",geom:r.geometry},u=((e={featureCount:1})[o]={featureCount:1,features:[a]},e);return this._emitStatusEvent("ngw:select",this._prepareToIdentify(n(n({},u),{resources:[o],sourceType:"vector"}))),u}}}},i.prototype._prepareToIdentify=function(t){var e=this;return n(n({},t),{getIdentifyItems:function(){return un(t,!0).map((function(t){return new on({feature:t.feature,connector:e.connector})}))}})},i.prototype._getSelectListenersCount=function(){return this.emitter.listenerCount("ngw:select")},i.prototype._whiteLabel=function(){return o(this,void 0,void 0,(function(){var t,e;return r(this,(function(n){switch(n.label){case 0:return(t=this.getContainer())?[4,cn(this.connector,this.options.companyLogoOptions)]:[3,2];case 1:(e=n.sent())&&t.appendChild(e),n.label=2;case 2:return[2]}}))}))},i.getIcon=fn,i}(Dt);function vn(t){var e=t.containerPoint,n=t.latlng;return{latLng:n,lngLat:[n.lng,n.lat],pixel:{left:e.x,top:e.y},source:t}}function gn(t,e,n){return void 0===e&&(e={}),new(l.exports.Control.extend({onAdd:function(){var i=document.createElement("div"),o=t.onAdd(n);return i.classList.add("leaflet-control"),e.bar&&i.classList.add("leaflet-bar"),e.addClass&&i.classList.add(e.addClass),e.margin||e.bar||(i.style.marginBottom="0px",i.style.marginTop="0px",i.style.marginLeft="0px",i.style.marginRight="0px"),o&&i.appendChild(o),l.exports.DomEvent.disableClickPropagation(i),i},onRemove:function(){t.onRemove()}}))}var bn=function(t){function n(e){var n=t.call(this,e)||this,i=e&&e.customAttribution;if(i){var o=[];Array.isArray(i)?o=i:i&&(o=[i]),o.forEach((function(t){return n.addAttribution(t)}))}return n}return e(n,t),n}(l.exports.Control.Attribution);function wn(t){var e=t.getNorthEast(),n=t.getSouthWest();return[n.lng,n.lat,e.lng,e.lat]}var xn={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon",GeometryCollection:"polygon"},Ln={stroke:!1,opacity:1},Pn={};for(var Mn in xn){var Cn=xn[Mn],kn=Pn[Cn]||[];kn.push(Mn),Pn[Cn]=kn}function An(t,e){return-1!==(Pn[e]||[]).indexOf(t)}function Tn(t){var e=new l.exports.GeoJSON;return(Array.isArray(t)?t:[t]).forEach((function(t){return e.addData(t)})),e.getBounds()}function On(t){return{getBounds:function(){return function(t){return wn(Tn(t))}(t)},getCenter:function(){return function(t){var e=Tn(t).getCenter();return[e.lng,e.lat]}(t)}}}function En(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1+(e[t[n]]||0);var i="";for(var o in e){e[o]>(i?e[i]:0)&&(i=o)}return i}var In=function(){function t(t,e){if(this.map=t,this.options=e,this.pane="order-0",void 0!==e.order){var n="order-"+e.order,i=t.getPane(n);i||(i=t.createPane(n)),i.style.zIndex=String(Math.round(100*e.order)),this.pane=n}}return t.prototype.addLayer=function(t){Object.assign(this.options,t)},t}();var Sn=function(){function t(t){this.layer=t}return t.prototype.handleMouseEvents=function(t){var e=this,i=this.layer.options,o=i.onMouseOut,r=i.onMouseOver,s=i.onClick||i.onLayerClick;s&&(this._onclick=function(i){var o=!!e.layer._getSelected(t);s(n({selected:o},e._createMouseEvent(i)))},t.on("click",this._onclick,this)),o&&(this._mouseout=function(t){o(e._createMouseEvent(t))},t.on("mouseout",this._mouseout,this)),r&&(this._mouseover=function(t){r(e._createMouseEvent(t))},t.on("mouseover",this._mouseover,this))},t.prototype.stopMouseEvents=function(t){this._mouseover&&t.off("mouseover",this._mouseover,this),this._mouseout&&t.off("mouseout",this._mouseout,this),this._onclick&&t.off("click",this._onclick,this)},t.prototype._createMouseEvent=function(t){return function(t){var e=t.source,i=e.target.feature;return n({layer:t.layer,feature:i,event:vn(e),source:e},On(i))}({layer:this.layer,source:t})},t}(),zn=function(){function t(t){this.layer=t}return t.prototype.setPaintEachLayer=function(t){var e=this;this.layer._layers.forEach((function(n){e.setPaint(n,t)}))},t.prototype.setPaint=function(t,e){var n=void 0,i=t.layer,o=t.feature;if(i&&o&&(X(e)?n=e(o):Q(e)&&(n=e),n))if("point"===this.layer.type&&"icon"===n.type){var r=i,s=this._createDivIcon(n);setTimeout((function(){r.setIcon(s)}),10)}else"setStyle"in i&&i.setStyle(this.preparePaint(n))},t.prototype.preparePaint=function(t){if("get-paint"!==t.type){var e="line"===this.layer.type?[["color","strokeColor"],["opacity","strokeOpacity"],["weight","weight"]]:[["color","strokeColor"],["opacity","strokeOpacity"],["stroke","stroke"],["fillColor","fillColor"],["fillOpacity","fillOpacity"],["fill","fill"],["weight","weight"]],n={};"radius"in t&&"number"==typeof t.radius&&(n.radius=t.radius);for(var i=0,o=e;i<o.length;i++){var r=o[i],s=r[0],a=r[1],u=this.layer.options.opacity,h=t[a];B(u)&&-1!==a.toLowerCase().indexOf("opacity")&&(h=Number(h)*u),void 0!==h&&Object.defineProperty(n,s,{enumerable:!0,value:h})}return n}return Ln},t.prototype._createDivIcon=function(t){var e=t.html,o=t.rotate,r=t.className,s=i(t,["html","rotate","className"]),a=document.createElement("div");return r&&(a.className=r),o&&(a.style.transform="rotateZ(".concat(o,"deg)")),e&&(a.innerHTML=e),new l.exports.DivIcon(n(n({className:""},s),{html:a}))},t.prototype.createPaintToLayer=function(t){var e=this;if(t&&t.type)if("icon"===t.type){if(t.className||t.html)return function(n,i){var o=e._createDivIcon(t);return new l.exports.Marker(i,{icon:o})}}else if("pin"===t.type)return function(t,e){return new l.exports.Marker(e)};return function(i,o){return new l.exports.CircleMarker(o,e.preparePaint(n(n({},Ln),t)))}},t.prototype.createPaintOptions=function(t){var e={},n=this.preparePaint(t);return t&&(e.style=function(){return n}),"point"===this.layer.type?e.pointToLayer=this.createPaintToLayer(t):"line"===this.layer.type&&(n.stroke=!0),e},t}(),Bn=function(t){function i(e,n){var i=t.call(this,e,n)||this;return i.selected=!1,i._layers=[],i._selectedLayers=[],i._filteredLayers=[],i._openedPopup=[],i.$updateTooltip=j((function(){i.updateTooltip()}),300),i.$unselect=function(){i.unselect()},i._events=new Sn(i),i._paint=new zn(i),i}return e(i,t),i.prototype.addLayer=function(t){return Object.assign(this.options,t),this.paint=t.paint,this.layer=new l.exports.FeatureGroup([],n(n({},t.nativeOptions),{pane:this.pane})),this.selectedPaint=t.selectedPaint,t.paint=this.paint,t.data&&this.addData(t.data),this._addMapListener(),this.layer},i.prototype.beforeRemove=function(){this._removeMapListener()},i.prototype.select=function(t){if(this.unselect(),t)for(var e=0,n=this._layers.filter(t);e<n.length;e++){this._selectLayer(n[e],"api")}else this.selected||(this.selected=!0,this.selectedPaint&&this._paint.setPaintEachLayer(this.selectedPaint))},i.prototype.unselect=function(t){var e=this;if(t)this._layers.filter(t).forEach((function(t){e._unSelectLayer(t)}));else if(this.selected){for(var n=0,i=this._openedPopup;n<i.length;n++){this._removePopup(i[n][0])}this.paint&&this._paint.setPaintEachLayer(this.paint),this._selectedLayers.length=0,this.selected=!1}},i.prototype.getSelected=function(){var t=this;return this._selectedLayers.map((function(e){return n({target:t,feature:e.feature,layer:e},On(e.feature))}))},i.prototype.getFiltered=function(){return this._filteredLayers},i.prototype.filter=function(t){var e=this;this._filterFun=t;var i=this.layer,o=i&&i._map;if(i&&o){i.remove();var r=[];this._layers.forEach((function(o){var s=o.feature,a=o.layer;a&&(!t||t(n({target:e,feature:s,layer:a},On(s)))?(i.addLayer(a),r.push(n({target:e,feature:s,layer:a},On(s)))):i.removeLayer(a))})),this._filteredLayers=r,i.addTo(o)}return this._filteredLayers},i.prototype.cleanFilter=function(){this.filter()},i.prototype.getLayers=function(){var t=this;return this._layers.map((function(e){var i=e.layer,o=e.feature;return n({feature:o,layer:i,visible:i&&!!i._map,target:t},On(o))}))},i.prototype.clearLayer=function(t){this.unselect();var e=this.layer;if(e)if(t)for(var n=this._layers.length;n--;){var i=this._layers[n];if(i){var o=i.feature,r=i.layer;if(o&&r)t(o)&&(e.removeLayer(r),this._layers.splice(n,1))}}else e.clearLayers(),this._layers=[]},i.prototype.setData=function(t){this.clearLayer(),this.addData(t)},i.prototype.addData=function(t){var e,n=this.options;if(n){if(t){var i=void 0;if(n.type)i=n.type;else{var o=function(t){var e;e="FeatureCollection"===t.type?En(t.features.map((function(t){return t.geometry.type}))):"GeometryCollection"===t.type?En(t.geometries.map((function(t){return t.type}))):"Feature"===t.type?t.geometry.type:t.type;return e}(t);i=xn[o]}if(this.type&&this.type!==i)return void console.warn("no other data type than layer can be added");this.type=i,t=function(t,e){if("FeatureCollection"===t.type)(n=t).features=n.features.filter((function(t){return An(t.geometry.type,e)}));else if("Feature"===t.type){if(!An(t.geometry.type,e))return!1}else if("GeometryCollection"===t.type){var n;(n=t).geometries=n.geometries.filter((function(t){return An(t.type,e)}))}return t}(t,i),t&&(e=this._getGeoJsonOptions(n,i))}new l.exports.GeoJSON(t||void 0,e)}},i.prototype.openPopup=function(t,e){var n=this;t&&this._layers.filter(t).forEach((function(t){n._openPopup(t,e,"api")}))},i.prototype.closePopup=function(t){var e=this;(t?this._openedPopup.filter((function(e){return t(e[2])})):this._openedPopup).forEach((function(t){e._removePopup(t[0])}))},i.prototype.updateTooltip=function(t){var e=this;t?this._updateTooltip(t):this.getLayers().forEach((function(t){return e._updateTooltip({feature:t.feature,layer:t.layer})}))},i.prototype.getExtent=function(){return this.getBounds()},i.prototype.getBounds=function(){if(this.layer){var t=this.layer.getBounds();if(t.isValid())return wn(t)}},i.prototype.setOpacity=function(t){this.options.opacity=t,this.setPaint(this.paint),this.setSelectedPaint(this.selectedPaint)},i.prototype.setPaint=function(t){if(t){this.paint=t;for(var e=0,n=this._layers;e<n.length;e++){this._paint.setPaint(n[e],t)}}},i.prototype.setSelectedPaint=function(t){if(t){this.selectedPaint=t;for(var e=0,n=this._selectedLayers;e<n.length;e++){this._paint.setPaint(n[e],t)}}},i.prototype.updatePaint=function(t){this.paint=n(n({},this.paint),t);for(var e=0,i=this._layers;e<i.length;e++){this._paint.setPaint(i[e],this.paint)}},i.prototype.updateSelectedPaint=function(t){this.selectedPaint=n(n({},this.selectedPaint),t);for(var e=0,i=this._selectedLayers;e<i.length;e++){this._paint.setPaint(i[e],this.selectedPaint)}},i.prototype._getSelected=function(t){return this._selectedLayers.find((function(e){return e.layer===t}))},i.prototype._updateTooltip=function(t){var e=t.feature,n=t.layer;if(e&&n&&e.properties&&this.options.labelField){n.unbindTooltip();var i=e.properties[this.options.labelField];if(void 0!==i){var o=!this.options.labelOnHover;n.bindTooltip(String(i),{permanent:o,sticky:!1})}}},i.prototype._openPopup=function(t,e,i,s){var a,u;return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,h,l,c,p,d,f,m,_,y,v,g,b,w,x,L=this;return r(this,(function(r){switch(r.label){case 0:return o=t.feature,h=t.layer,l=n({minWidth:300},e),c=l.minWidth,p=l.autoPan,d=l.maxWidth,m=null!=(f=l.closeButton)?f:!this.options.selectOnHover,y=[],v=function(t){y.push(t)},g=function(){_&&L._removePopup(_)},e.createPopupContent?[4,e.createPopupContent(n({layer:h,feature:o,target:this,type:i,close:g,onClose:v},On(o)))]:[3,2];case 1:return b=r.sent(),[3,3];case 2:b=e.popupContent,r.label=3;case 3:return b&&h&&(w={minWidth:c,autoPan:p,closeButton:m,closeOnClick:!1,autoClose:!1},B(d)&&(w.maxWidth=d),_=h.bindPopup(b,w),(null===(u=null===(a=this.options.popupOptions)||void 0===a?void 0:a.unselectOnClose)||void 0===u||u)&&(x=h.getPopup())&&x.once("remove",(function(){g()}),this),this._openedPopup.push([_,y,t]),_.openPopup(s)),[2]}}))}))},i.prototype._removePopup=function(t){var e,n;if(this.map){t.closePopup().unbindPopup();var i=this._openedPopup.findIndex((function(e){return e[0]===t}));if(-1!==i){for(var o=null===(n=null===(e=this.options.popupOptions)||void 0===e?void 0:e.unselectOnClose)||void 0===n||n,r=this._openedPopup[i],s=r[1],a=r[2],u=0,h=s;u<h.length;u++){(0,h[u])(a)}s.length=0,o&&this._unSelectLayer(a),this._openedPopup.splice(i,1)}}},i.prototype._getGeoJsonOptions=function(t,e){var i=this,o=t.paint,r={};return"function"==typeof o?"point"===e?r.pointToLayer=function(t,e){var n=o(t);return i._paint.createPaintToLayer(n)(t,e)}:r={style:function(t){return i._paint.preparePaint(n(n({},Ln),t?o(t):{type:"path"}))}}:r=this._paint.createPaintOptions(o),r.onEachFeature=function(t,e){i._onEachFeature(t,e)},r},i.prototype._onEachFeature=function(t,e){var i=this,o=this.layer;if(o){var r=n({target:this,feature:t,layer:e},On(t));e.options.pane=this.pane,this._layers.push(r);var s=!0;if(this._filterFun&&(s=this._filterFun(r)),s){var a=this.options,u=a.popup,h=a.popupOptions,l=a.selectable,c=a.interactive,p=a.selectOnHover;e.options.interactive=!B(c)||c,o.addLayer(e),l&&(p?(e.on("mouseover",(function(){i._selectLayer(r,"hover")})),e.on("mouseout",(function(){i._unSelectLayer(r)}))):e.on("click",(function(t){return i._selectOnLayerClick(t)}),this)),this._events.handleMouseEvents(e),setTimeout((function(){u&&i._openPopup(n({target:i,layer:e,feature:t},On(t)),h,"api"),i._updateTooltip({layer:e,feature:t})}))}}},i.prototype._selectOnLayerClick=function(t){l.exports.DomEvent.stopPropagation(t);var e=t.target,i=e.feature,o=n({target:this,layer:e,feature:i},On(i)),r=this._getSelected(e);r?this.options&&this.options.unselectOnSecondClick&&this._unSelectLayer(r):this._selectLayer(o,"click",t.latlng)},i.prototype._selectLayer=function(t,e,i){var o=this;this.options.multiselect||(this.map._addUnselectCb((function(){o._unSelectLayer(t)})),this._selectedLayers.forEach((function(t){return o._unSelectLayer(t)}))),this._selectedLayers.push(t),this.selected=!0;var r=this.options,s=r.selectedPaint,a=r.popupOnSelect,u=r.popupOptions;if(s&&t.layer&&this._paint.setPaint(t,s),a&&this._openPopup(t,u,e,i),this.options.onSelect){var h=t.feature?[t.feature]:[];this.options.onSelect(n({type:e,layer:this,features:h},On(h)))}},i.prototype._unSelectLayer=function(t){var e=this._selectedLayers.indexOf(t);-1!==e&&(this._selectedLayers.splice(e,1),this.options&&(this.options.paint&&this._paint.setPaint(t,this.options.paint),this.options.popupOnSelect&&t.layer&&this._removePopup(t.layer))),this.selected=this._selectedLayers.length>0},i.prototype._addMapClickListener=function(){var t=this.map;if(t){var e=this.options.unselectOnClick;(null==e||e)&&t.on("click",this.$unselect)}},i.prototype._removeMapClickListener=function(){this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip),this.map.off("click",this.$unselect)},i.prototype._addMapListener=function(){var t=this.map;if(t){var e=this.options,n=e.labelField,i=e.labelOnHover;this._addMapClickListener(),n&&!i&&(t.on("zoomend",this.$updateTooltip),t.on("moveend",this.$updateTooltip))}},i.prototype._removeMapListener=function(){this._removeMapClickListener(),this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip)},i}(In);function Zn(t,e,n){var i=new XMLHttpRequest;for(var o in i.open("GET",t),i.responseType="arraybuffer",n)i.setRequestHeader(o,n[o]);return i.onload=function(){var t=new Uint8Array(this.response),n=new Blob([t],{type:"image/png"}),i=(window.URL||window.webkitURL).createObjectURL(n);e(i)},i.send(),function(){i.abort()}}var Nn=function(t){function n(e,n,i){var o=t.call(this,e,n,i)||this;return o._abort=[],o}return e(n,t),n.prototype.cancelLoad=function(){this._abort&&(this._abort.forEach((function(t){return t()})),this._abort=[])},n.prototype._initImage=function(){t.prototype._initImage.call(this);var e=this.options.headers;if(e){var n=this._image,i=n.src;n.src="",this._abort.push(Zn(i,(function(t){n.src=t}),e))}},n}(l.exports.ImageOverlay),Rn=function(t){function n(e,n){var i=t.call(this,n)||this;i.defaultWmsParams={service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},i.options={crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,pane:"tilePane",headers:null,viewPortBuffer:0,setViewDelay:100},i._url=e;var o,r={},s={};for(o in n)o in i.options?s[o]=n[o]:r[o]=n[o];return l.exports.Util.setOptions(i,s),i.wmsParams=l.exports.Util.extend({},i.defaultWmsParams,r),i}return e(n,t),n.prototype.setParams=function(t){l.exports.Util.extend(this.wmsParams,t),this.update()},n.prototype.getAttribution=function(){return this.options.attribution||""},n.prototype.onAdd=function(){return this.update(),this},n.prototype.onRemove=function(t){return this._currentOverlay&&(this._currentOverlay.cancelLoad(),t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl,this},n.prototype.getEvents=function(){return{moveend:j(this.update,this.options.setViewDelay)}},n.prototype.update=function(){var t=this;if(this._map){this.updateWmsParams();var e=this.getImageUrl();if(this._currentUrl!==e){this._currentUrl=e;var n=this.options.viewPortBuffer||0,i=this._map.getBounds().pad(n),o=new Nn(e,i,{opacity:0,pane:this.options.pane,headers:this.options.headers});o.addTo(this._map),this._currentOverlay&&this._currentOverlay.cancelLoad(),o.once("load",(function(){t._map&&(o._url===t._currentUrl?(t._currentOverlay&&t._map.removeLayer(t._currentOverlay),t._currentOverlay=o,o.setOpacity(void 0!==t.options.opacity?t.options.opacity:1),!0===t.options.isBack&&o.bringToBack(),!1===t.options.isBack&&o.bringToFront(),void 0!==t.options.zIndex&&o.setZIndex(t.options.zIndex)):t._map.removeLayer(o))}),this);var r=this.options,s=r.minZoom,a=r.maxZoom;(s&&this._map.getZoom()<s||a&&this._map.getZoom()>a)&&this._map.removeLayer(o)}}},n.prototype.setOpacity=function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},n.prototype.bringToBack=function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},n.prototype.bringToFront=function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},n.prototype.setZIndex=function(t){this.options.zIndex=t,this._currentOverlay&&this._currentOverlay.setZIndex(t)},n.prototype.updateWmsParams=function(t){t||(t=this._map);var e=this.options.viewPortBuffer||0,n=t.getBounds().pad(e),i=t.getSize();if(0!==this.options.viewPortBuffer){var o=e+1;i.x=Math.ceil(i.x*o),i.y=Math.ceil(i.y*o)}var r=parseFloat(this.wmsParams.version),s=this.options.crs||t.options.crs,a=r>=1.3?"crs":"srs";if(s){var u=s.project(n.getNorthWest()),h=s.project(n.getSouthEast()),c={width:i.x,height:i.y};c[a]=s.code,c.bbox=(r>=1.3&&s===l.exports.CRS.EPSG4326?[h.y,u.x,u.y,h.x]:[u.x,h.y,h.x,u.y]).join(","),l.exports.Util.extend(this.wmsParams,c)}},n.prototype.getImageUrl=function(){var t=l.exports.Util.getParamString(this.wmsParams,this._url,this.options.uppercase||!1);return this._url+t},n}(l.exports.Layer),jn=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(t){var e=t&&t.url;if(e){var i=(t=n({transparent:!0},t)).updateWmsParams;if(this.layer=new Rn(e,n(n(n({pane:this.pane,headers:t.headers,setViewDelay:t.setViewDelay},t),t.params),t.nativeOptions)),i){var o=this.layer.updateWmsParams;this.layer.updateWmsParams=function(t){o.call(this,t),this.wmsParams=i(this.wmsParams)}}return this.layer}},i}(In);
|
|
1
|
+
var NgwLeaflet=function(){"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return n=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function i(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}function o(t,e,n,i){return new(n||(n=Promise))((function(o,r){function s(t){try{u(i.next(t))}catch(e){r(e)}}function a(t){try{u(i.throw(t))}catch(e){r(e)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))}function r(t,e){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(u){a=[6,u],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}function u(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=s(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,o){(function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)})(i,o,(e=t[n](e)).done,e.value)}))}}}function h(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}"function"==typeof SuppressedError&&SuppressedError;h('.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid rgba(0,0,0,.2)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}');h(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}");"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var l={exports:{}};(function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)},r}function u(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function h(){return!1}function l(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function d(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function f(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var g="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var P=window.requestAnimationFrame||b("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||P!==x)return P.call(window,o(t,e));t.call(e)}function k(t){t&&M.call(window,t)}var A={extend:n,create:i,bind:o,lastId:r,stamp:s,throttle:a,wrapNum:u,falseFn:h,formatNum:l,trim:c,splitWords:p,setOptions:d,getParamString:f,template:_,isArray:y,indexOf:v,emptyImageUrl:g,requestFn:P,cancelFn:M,requestAnimFrame:C,cancelAnimFrame:k};function T(){}function O(t){if("undefined"!=typeof L&&L&&L.Mixin){t=y(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}T.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(O(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},T.include=function(t){return n(this.prototype,t),this},T.mergeOptions=function(t){return n(this.prototype.options,t),this},T.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var E={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(this._events[t]=i=[]),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=h,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=h;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var u=r[s];u.fn.call(u.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};E.addEventListener=E.on,E.removeEventListener=E.clearAllEventListeners=E.off,E.addOneTimeEventListener=E.once,E.fireEvent=E.fire,E.hasEventListeners=E.listens;var I=T.extend(E);function S(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function B(t,e,n){return t instanceof S?t:y(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,n)}function Z(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function N(t,e){return!t||t instanceof Z?t:new Z(t,e)}function R(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function j(t,e){return t instanceof R?t:new R(t,e)}function D(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function F(t,e,n){return t instanceof D?t:y(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new D(t,e,n)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(B(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(B(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=B(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=B(t)).x===this.x&&t.y===this.y},contains:function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},Z.prototype={extend:function(t){return t=B(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof S?B(t):N(t))instanceof Z?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max;return o.x>=e.x&&i.x<=n.x&&o.y>=e.y&&i.y<=n.y},overlaps:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max;return o.x>e.x&&i.x<n.x&&o.y>e.y&&i.y<n.y},isValid:function(){return!(!this.min||!this.max)}},R.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof D)e=t,n=t;else{if(!(t instanceof R))return t?this.extend(F(t)||j(t)):this;if(n=t._northEast,!(e=t._southWest)||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new D(e.lat,e.lng),this._northEast=new D(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new R(new D(e.lat-i,e.lng-o),new D(n.lat+i,n.lng+o))},getCenter:function(){return new D((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof D||"lat"in t?F(t):j(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof R?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=j(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast();return o.lat>=e.lat&&i.lat<=n.lat&&o.lng>=e.lng&&i.lng<=n.lng},overlaps:function(t){t=j(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast();return o.lat>e.lat&&i.lat<n.lat&&o.lng>e.lng&&i.lng<n.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},D.prototype={equals:function(t,e){return!!t&&(t=F(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,F(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new D(this.lat,this.lng,this.alt)}};var U,W={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new Z(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?u(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?u(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new R(new D(r.lat-i,r.lng-o),new D(s.lat-i,s.lng-o))}},H=n({},W,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,u=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*u}}),V=6378137,q={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new S(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=V*Math.PI,new Z([-U,-U],[U,U]))};function G(t,e,n,i){if(y(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function J(t,e,n,i){return new G(t,e,n,i)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new S((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},H,{code:"EPSG:3857",projection:q,transformation:function(){var t=.5/(Math.PI*q.R);return J(t,.5,-t,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function Q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var n,i,o,r,s,a,u="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)u+=(i?"L":"M")+(a=s[i]).x+" "+a.y;u+=e?Ot?"z":"x":""}return u||"M0 0"}var $=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=It("webkit"),ot=It("android"),rt=It("android 2")||It("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&It("Google")&&st<537&&!("AudioNode"in window),ut=!!window.opera,ht=!nt&&It("chrome"),lt=It("gecko")&&!it&&!ut&&!tt,ct=!ht&&It("safari"),pt=It("phantom"),dt="OTransition"in $,ft=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in $,_t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,yt="MozPerspective"in $,vt=!window.L_DISABLE_3D&&(mt||_t||yt)&&!dt&&!pt,gt="undefined"!=typeof orientation||It("mobile"),bt=gt&&it,wt=gt&&_t,xt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!xt),Pt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Mt=gt&&ut,Ct=gt&<,kt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,At=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(n){}return t}(),Tt=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!Q("svg").createSVGRect),Et=!Ot&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(n){return!1}}();function It(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var St={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:at,opera:ut,chrome:ht,gecko:lt,safari:ct,phantom:pt,opera12:dt,win:ft,ie3d:mt,webkit3d:_t,gecko3d:yt,any3d:vt,mobile:gt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:Lt,touch:Pt,mobileOpera:Mt,mobileGecko:Ct,retina:kt,passiveEvents:At,canvas:Tt,svg:Ot,vml:Et},zt=xt?"MSPointerDown":"pointerdown",Bt=xt?"MSPointerMove":"pointermove",Zt=xt?"MSPointerUp":"pointerup",Nt=xt?"MSPointerCancel":"pointercancel",Rt={},jt=!1;function Dt(t,e,n,i){return"touchstart"===e?Ut(t,n,i):"touchmove"===e?Gt(t,n,i):"touchend"===e&&Jt(t,n,i),this}function Ft(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(zt,i,!1):"touchmove"===e?t.removeEventListener(Bt,i,!1):"touchend"===e&&(t.removeEventListener(Zt,i,!1),t.removeEventListener(Nt,i,!1)),this}function Ut(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&He(t),qt(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(zt,i,!1),jt||(document.addEventListener(zt,Wt,!0),document.addEventListener(Bt,Ht,!0),document.addEventListener(Zt,Vt,!0),document.addEventListener(Nt,Vt,!0),jt=!0)}function Wt(t){Rt[t.pointerId]=t}function Ht(t){Rt[t.pointerId]&&(Rt[t.pointerId]=t)}function Vt(t){delete Rt[t.pointerId]}function qt(t,e){for(var n in t.touches=[],Rt)t.touches.push(Rt[n]);t.changedTouches=[t],e(t)}function Gt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||qt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(Bt,i,!1)}function Jt(t,e,n){var i=function(t){qt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Zt,i,!1),t.addEventListener(Nt,i,!1)}var Kt=xt?"MSPointerDown":Lt?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":Lt?"pointerup":"touchend",Qt="_leaflet_";function Xt(t,e,n){var i,o,r=!1,s=250;function a(t){if(Lt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=s,i=e}function u(t){if(r&&!o.cancelBubble){if(Lt){if("mouse"===t.pointerType)return;var n,s,a={};for(s in o)a[s]=(n=o[s])&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Qt+Kt+n]=a,t[Qt+Yt+n]=u,t[Qt+"dblclick"+n]=e,t.addEventListener(Kt,a,!!At&&{passive:!1}),t.addEventListener(Yt,u,!!At&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function $t(t,e){var n=t[Qt+Yt+e],i=t[Qt+"dblclick"+e];return t.removeEventListener(Kt,t[Qt+Kt+e],!!At&&{passive:!1}),t.removeEventListener(Yt,n,!!At&&{passive:!1}),t.removeEventListener("dblclick",i,!1),this}var te,ee,ne,ie,oe,re=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function ue(t){return"string"==typeof t?document.getElementById(t):t}function he(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function le(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ce(t){var e=t.parentNode;e&&e.removeChild(t)}function pe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function de(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function fe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ge(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function _e(t,e){if(void 0!==t.classList)for(var n=p(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!me(t,e)){var r=ge(t);ve(t,(r?r+" ":"")+e)}}function ye(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,c((" "+ge(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ge(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(o){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function xe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Le(t,e,n){var i=e||new S(0,0);t.style[re]=(mt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Pe(t,e){t._leaflet_pos=e,vt?Le(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Me(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)te=function(){ze(window,"selectstart",He)},ee=function(){Ze(window,"selectstart",He)};else{var Ce=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Ce){var t=document.documentElement.style;ne=t[Ce],t[Ce]="none"}},ee=function(){Ce&&(document.documentElement.style[Ce]=ne,ne=void 0)}}function ke(){ze(window,"dragstart",He)}function Ae(){Ze(window,"dragstart",He)}function Te(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Oe(),ie=t,oe=t.style.outline,t.style.outline="none",ze(window,"keydown",Oe))}function Oe(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Ze(window,"keydown",Oe))}function Ee(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ie(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Se={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:ue,getStyle:he,create:le,remove:ce,empty:pe,toFront:de,toBack:fe,hasClass:me,addClass:_e,removeClass:ye,setClass:ve,getClass:ge,setOpacity:be,testProp:xe,setTransform:Le,setPosition:Pe,getPosition:Me,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:ke,enableImageDrag:Ae,preventOutline:Te,restoreOutline:Oe,getSizedParentNode:Ee,getScale:Ie};function ze(t,e,n,i){if("object"==typeof e)for(var o in e)je(t,o,e[o],n);else for(var r=0,s=(e=p(e)).length;r<s;r++)je(t,e[r],n,i);return this}var Be="_leaflet_events";function Ze(t,e,n,i){if("object"==typeof e)for(var o in e)De(t,o,e[o],n);else if(e)for(var r=0,s=(e=p(e)).length;r<s;r++)De(t,e[r],n,i);else{for(var a in t[Be])De(t,a,t[Be][a]);delete t[Be]}return this}function Ne(){if(Lt)return!(nt||ct)}var Re={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function je(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[Be]&&t[Be][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;Lt&&0===e.indexOf("touch")?Dt(t,e,r,o):Pt&&"dblclick"===e&&!Ne()?Xt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Re[e]||e,r,!!At&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(Re[e],r=function(e){e=e||window.event,Xe(t,e)&&a(e)},!1):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[Be]=t[Be]||{},t[Be][o]=r}function De(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):""),r=t[Be]&&t[Be][o];if(!r)return this;Lt&&0===e.indexOf("touch")?Ft(t,e,o):Pt&&"dblclick"===e&&!Ne()?$t(t,o):"removeEventListener"in t?t.removeEventListener(Re[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[Be][o]=null}function Fe(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Qe(t),this}function Ue(t){return je(t,"wheel",Fe),this}function We(t){return ze(t,"mousedown touchstart dblclick",Fe),je(t,"click",Ye),this}function He(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ve(t){return He(t),Fe(t),this}function qe(t,e){if(!e)return new S(t.clientX,t.clientY);var n=Ie(e),i=n.boundingClientRect;return new S((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ge=ft&&ht?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Je(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ge:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ke={};function Ye(t){Ke[t.type]=!0}function Qe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Xe(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(i){return!1}return n!==t}var $e={on:ze,off:Ze,stopPropagation:Fe,disableScrollPropagation:Ue,disableClickPropagation:We,preventDefault:He,stop:Ve,getMousePosition:qe,getWheelDelta:Je,fakeStop:Ye,skipped:Qe,isExternalTarget:Xe,addListener:ze,removeListener:Ze},tn=I.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Me(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Pe(this._el,n),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=I.extend({options:{crs:K,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(F(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&vt&&!Mt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ze(this._proxy,ae,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(F(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t=t||(vt?this.options.zoomDelta:1)),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t=t||(vt?this.options.zoomDelta:1)),e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof S?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var n=B(e.paddingTopLeft||e.padding||[0,0]),i=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=B(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){_e(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=F(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),u=a*this.getZoomScale(s,e),h=o.distanceTo(i)||1,l=1.42,c=l*l;function p(t){var e=(u*u-a*a+(t?-1:1)*c*c*h*h)/(2*(t?u:a)*c*h),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/f(t)}var _=p(0);function y(t){return a*(f(_)/f(_+l*t))}function v(t){return a*(f(_)*m(_+l*t)-d(_))/c}function g(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(p(1)-_)/l,x=n.duration?1e3*n.duration:1e3*w*.8;function L(){var n=(Date.now()-b)/x,r=g(n)*w;n<=1?(this._flyToFrame=C(L,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(r)/h)),s),this.getScaleZoom(a/y(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),L.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=j(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,j(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=B((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),u=a.getSize().divideBy(2),h=N([a.min.add(n),a.max.subtract(i)]);if(!h.contains(s)){this._enforcingBounds=!0;var l=r.subtract(s),c=B(s.x+l.x,s.y+l.y);(s.x<h.min.x||s.x>h.max.x)&&(c.x=r.x-l.x,l.x>0?c.x+=u.x-n.x:c.x-=u.x-i.x),(s.y<h.min.y||s.y>h.max.y)&&(c.y=r.y-l.y,l.y>0?c.y+=u.y-n.y:c.y-=u.y-i.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new D(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ce(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ce(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=le("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=j(t),n=B(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),u=this.getSize().subtract(n),h=N(this.project(a,i),this.project(s,i)).getSize(),l=vt?this.options.zoomSnap:1,c=u.x/h.x,p=u.y/h.y,d=e?Math.max(c,p):Math.min(c,p);return i=this.getScaleZoom(d,i),l&&(i=Math.round(i/(l/100))*(l/100),i=e?Math.ceil(i/l)*l:Math.floor(i/l)*l),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new Z(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs,i=n.zoom(t*n.scale(e=void 0===e?this._zoom:e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},layerPointToLatLng:function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return B(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return B(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return qe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ue(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ze(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,_e(t,"leaflet-container"+(Pt?" leaflet-touch":"")+(kt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Pe(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Pe(this._mapPane,new S(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Pe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var e=t?Ze:ze;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Xe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!Xe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Qe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Te(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&He(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var u=0;u<i.length;u++)if(i[u].fire(e,s,!0),s.originalEvent._stopped||!1===i[u].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Me(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new Z(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new Z(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new S(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=vt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ye(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=le("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];Le(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ce(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Le(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ye(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=T.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return _e(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ce(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),rn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=le("div",e+"control-container",this._container);function i(i,o){t[i+o]=le("div",e+i+" "+e+o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ce(this._controlCorners[t]);ce(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in d(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return on.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){_e(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(_e(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ye(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ye(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=le("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),We(e),Ue(e);var i=this._section=le("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||ze(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=le("a",t+"-toggle",e);o.href="#",o.title="Layers",Pt?(ze(o,"click",Ve),ze(o,"click",this.expand,this)):ze(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=le("div",t+"-base",i),this._separator=le("div",t+"-separator",i),this._overlaysList=le("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;pe(this._baseLayersList),pe(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)this._addItem(i=this._layers[n]),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&o>1)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),ze(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)e=this._getLayer((t=n[r]).layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)e=this._getLayer((t=n[o]).layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new sn(t,e,n)},un=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=le("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=le("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),We(r),ze(r,"click",Ve),ze(r,"click",o,this),ze(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ye(this._zoomInButton,e),ye(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&_e(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new un,this.addControl(this.zoomControl))}));var hn=function(t){return new un(t)},ln=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=le("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=le("div",e,n)),t.imperial&&(this._iScale=le("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(n=this._getRoundNum(e=o/5280),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),cn=function(t){return new ln(t)},pn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=le("div","leaflet-control-attribution"),We(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new pn).addTo(this)}));var dn=function(t){return new pn(t)};on.Layers=sn,on.Zoom=un,on.Scale=ln,on.Attribution=pn,rn.layers=an,rn.zoom=hn,rn.scale=cn,rn.attribution=dn;var fn=T.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});fn.addTo=function(t,e){return t.addHandler(e,this),this};var mn,_n={Events:E},yn=Pt?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},gn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=I.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){d(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(ze(this._dragStartTarget,yn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Ze(this._dragStartTarget,yn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Te(this._element),ke(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ee(this._element);this._startPoint=new S(e.clientX,e.clientY),this._parentScale=Ie(n),ze(document,gn[t.type],this._onMove,this),ze(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new S(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,He(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Me(this._element).subtract(n),_e(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),_e(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,k(this._animRequest),this._lastEvent=t,this._animRequest=C(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Pe(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ye(document.body,"leaflet-dragging"),this._lastTarget&&(ye(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),gn)Ze(document,gn[t],this._onMove,this),Ze(document,vn[t],this._onUp,this);Ae(),ee(),this._moved&&this._moving&&(k(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function wn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Pn(t=Cn(t,n),n)}function xn(t,e,n){return Math.sqrt(En(t,e,n,!0))}function Ln(t,e,n){return En(t,e,n)}function Pn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Mn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function Mn(t,e,n,i,o){var r,s,a,u=0;for(s=i+1;s<=o-1;s++)(a=En(t[s],t[i],t[o],!0))>u&&(r=s,u=a);u>n&&(e[r]=1,Mn(t,e,n,i,r),Mn(t,e,n,r,o))}function Cn(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)On(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function kn(t,e,n,i,o){var r,s,a,u=i?mn:Tn(t,n),h=Tn(e,n);for(mn=h;;){if(!(u|h))return[t,e];if(u&h)return!1;a=Tn(s=An(t,e,r=u||h,n,o),n),r===u?(t=s,u=a):(e=s,h=a)}}function An(t,e,n,i,o){var r,s,a=e.x-t.x,u=e.y-t.y,h=i.min,l=i.max;return 8&n?(r=t.x+a*(l.y-t.y)/u,s=l.y):4&n?(r=t.x+a*(h.y-t.y)/u,s=h.y):2&n?(r=l.x,s=t.y+u*(l.x-t.x)/a):1&n&&(r=h.x,s=t.y+u*(h.x-t.x)/a),new S(r,s,o)}function Tn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function On(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function En(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,u=n.y-s,h=a*a+u*u;return h>0&&((o=((t.x-r)*a+(t.y-s)*u)/h)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=u*o)),a=t.x-r,u=t.y-s,i?a*a+u*u:new S(r,s)}function In(t){return!y(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Sn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),In(t)}var zn={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:Ln,clipSegment:kn,_getEdgeIntersection:An,_getBitCode:Tn,_sqClosestPointOnSegment:En,isFlat:In,_flat:Sn};function Bn(t,e,n){var i,o,r,s,a,u,h,l,c,p=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=Tn(t[o],e);for(s=0;s<4;s++){for(l=p[s],i=[],o=0,r=(h=t.length)-1;o<h;r=o++)u=t[r],(a=t[o])._code&l?u._code&l||((c=An(u,a,l,e,n))._code=Tn(c,e),i.push(c)):(u._code&l&&((c=An(u,a,l,e,n))._code=Tn(c,e),i.push(c)),i.push(a));t=i}return t}var Zn={clipPolygon:Bn},Nn={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new Z([-180,-90],[180,90])},Rn={R:6378137,R_MINOR:6356752.314245179,bounds:new Z([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new S(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),u=0,h=.1;u<15&&Math.abs(h)>1e-7;u++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=h=Math.PI/2-2*Math.atan(s*e)-a;return new D(a*n,t.x*n/i)}},jn={LonLat:Nn,Mercator:Rn,SphericalMercator:q},Dn=n({},H,{code:"EPSG:3395",projection:Rn,transformation:function(){var t=.5/(Math.PI*Rn.R);return J(t,.5,-t,.5)}()}),Fn=n({},H,{code:"EPSG:4326",projection:Nn,transformation:J(1/180,1,-1/180,.5)}),Un=n({},W,{projection:Nn,transformation:J(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=H,W.EPSG3395=Dn,W.EPSG3857=K,W.EPSG900913=Y,W.EPSG4326=Fn,W.Simple=Un;var Wn=I.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?y(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Hn=Wn.extend({initialize:function(t,e){var n,i;if(d(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s(t)}}),Vn=function(t,e){return new Hn(t,e)},qn=Hn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Hn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Hn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Gn=function(t,e){return new qn(t,e)},Jn=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=B(i),r=B("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return kt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Jn(t)}var Yn=Jn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Jn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=le("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Qn=fn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),_e(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ye(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=Me(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),u=N(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!u.contains(r)){var h=B((Math.max(u.max.x,r.x)-u.max.x)/(s.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(s.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(s.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(s.min.y-u.min.y)).multiplyBy(i);n.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Pe(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Me(e._icon),o=e._map.layerPointToLatLng(i);n&&Pe(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Xn=Wn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=F(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),_e(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(_e(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ce(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ce(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(_e(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Qn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Qn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function $n(t,e){return new Xn(t,e)}var ti=Wn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=F(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ti.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new Z(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),d(this,e),this._latlng=F(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===H.distance){var o=Math.PI/180,r=this._mRadius/H.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),u=s.add(a).divideBy(2),h=n.unproject(u).lat,l=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(l)||0===l)&&(l=r/Math.cos(Math.PI/180*e)),this._point=u.subtract(n.getPixelOrigin()),this._radius=isNaN(l)?0:u.x-n.project([h,t-l]).x,this._radiusY=u.y-s.y}else{var c=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(c).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=En,s=0,a=this._parts.length;s<a;s++)for(var u=this._parts[s],h=1,l=u.length;h<l;h++){var c=r(t,e=u[h-1],n=u[h],!0);c<i&&(i=c,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a=this._rings[0],u=a.length;if(!u)return null;for(t=0,e=0;t<u-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<u-1;t++)if((i+=n=(o=a[t]).distanceTo(r=a[t+1]))>e)return this._map.layerPointToLatLng([r.x-(s=(i-e)/n)*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=F(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return In(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=In(t),i=0,o=t.length;i<o;i++)n?(e[i]=F(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new Z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._pxBounds=new Z([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t.length;if(t[0]instanceof D){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,u=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=kn(a[n],a[n+1],t,n,!0))&&(u[i]=u[i]||[],u[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(u[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=wn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&xn(t,a[o],a[i])<=u)return!0;return!1}});function si(t,e){return new ri(t,e)}ri._flat=Sn;var ai=ri.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a,u=this._rings[0],h=u.length;if(!h)return null;for(r=s=a=0,t=0,e=h-1;t<h;e=t++)s+=((n=u[t]).x+(i=u[e]).x)*(o=n.y*i.x-i.y*n.x),a+=(n.y+i.y)*o,r+=3*o;return this._map.layerPointToLatLng(0===r?u[0]:[s/r,a/r])},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof D&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.prototype._setLatLngs.call(this,t),In(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return In(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new S(e,e);if(t=new Z(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=Bn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,u,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(u=(e=this._parts[o]).length)-1;r<u;s=r++)(n=e[r]).y>t.y!=(i=e[s]).y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(h=!h);return h||ri.prototype._containsPoint.call(this,t,!0)}});function ui(t,e){return new ai(t,e)}var hi=qn.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=y(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=li(t,r);return s?(s.feature=yi(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function li(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,u=[],h=e&&e.pointToLayer,l=e&&e.coordsToLatLng||pi;if(!a&&!s)return null;switch(s.type){case"Point":return ci(h,t,n=l(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=l(a[o]),u.push(ci(h,t,n,e));return new qn(u);case"LineString":case"MultiLineString":return i=di(a,"LineString"===s.type?0:1,l),new ri(i,e);case"Polygon":case"MultiPolygon":return i=di(a,"Polygon"===s.type?1:2,l),new ai(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var c=li({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);c&&u.push(c)}return new qn(u);default:throw new Error("Invalid GeoJSON object.")}}function ci(t,e,n,i){return t?t(e,n):new Xn(n,i&&i.markersInheritOptions&&i)}function pi(t){return new D(t[1],t[0],t[2])}function di(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?di(t[r],e-1,n):(n||pi)(t[r]),o.push(i);return o}function fi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function mi(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?mi(t[r],e-1,n,i):fi(t[r],i));return!e&&n&&o.push(o[0]),o}function _i(t,e){return t.feature?n({},t.feature,{geometry:e}):yi(e)}function yi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return _i(this,{type:"Point",coordinates:fi(this.getLatLng(),t)})}};function gi(t,e){return new hi(t,e)}Xn.include(vi),ii.include(vi),ei.include(vi),ri.include({toGeoJSON:function(t){var e=!In(this._latlngs);return _i(this,{type:(e?"Multi":"")+"LineString",coordinates:mi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!In(this._latlngs),n=e&&!In(this._latlngs[0]),i=mi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),_i(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Hn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),_i(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=yi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?_i(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=gi,wi=Wn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=j(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(_e(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ce(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&de(this._image),this},bringToBack:function(){return this._map&&fe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:le("img");_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Le(this._image,n,e)},_reset:function(){var t=this._image,e=new Z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Pe(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){be(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),xi=function(t,e,n){return new wi(t,e,n)},Li=wi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:le("video");if(_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var a=le("source");a.src=this._url[s],e.appendChild(a)}}}});function Pi(t,e,n){return new Li(t,e,n)}var Mi=wi.extend({_initImage:function(){var t=this._image=this._url;_e(t,"leaflet-image-layer"),this._zoomAnimated&&_e(t,"leaflet-zoom-animated"),this.options.className&&_e(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Ci(t,e,n){return new Mi(t,e,n)}var ki=Wn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(ce,void 0,this._container),200)):ce(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=F(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&de(this._container),this},bringToBack:function(){return this._map&&fe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Wn||(n=e,e=t),e instanceof qn)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=B(this.options.offset),n=this._getAnchor();this._zoomAnimated?Pe(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Ai=ki.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){ki.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",Fe))},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",Fe))},getEvents:function(){var t=ki.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=le("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=le("div",t+"-content-wrapper",e);if(this._contentNode=le("div",t+"-content",n),We(e),Ue(this._contentNode),ze(e,"contextmenu",Fe),this._tipContainer=le("div",t+"-tip-container",e),this._tip=le("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=le("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",ze(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=this.options.maxHeight,o="leaflet-popup-scrolled";i&&t.offsetHeight>i?(e.height=i+"px",_e(t,o)):ye(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Pe(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new S(this._containerLeft,-n-this._containerBottom);o._add(Me(this._container));var r=t.layerPointToContainerPoint(o),s=B(this.options.autoPanPadding),a=B(this.options.autoPanPaddingTopLeft||s),u=B(this.options.autoPanPaddingBottomRight||s),h=t.getSize(),l=0,c=0;r.x+i+u.x>h.x&&(l=r.x+i-h.x+u.x),r.x-l-a.x<0&&(l=r.x-a.x),r.y+n+u.y>h.y&&(c=r.y+n-h.y+u.y),r.y-c-a.y<0&&(c=r.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),Ve(t)},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ti=function(t,e){return new Ai(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof Ai||(t=new Ai(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Wn.include({bindPopup:function(t,e){return t instanceof Ai?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Ai(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Ve(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Oi=ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ki.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ki.prototype.getEvents.call(this);return Pt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){this._contentNode=this._container=le("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,u=o.offsetWidth,h=o.offsetHeight,l=B(this.options.offset),c=this._getAnchor();"top"===a?(e=u/2,n=h):"bottom"===a?(e=u/2,n=0):"center"===a?(e=u/2,n=h/2):"right"===a?(e=0,n=h/2):"left"===a?(e=u,n=h/2):s.x<r.x?(a="right",e=0,n=h/2):(a="left",e=u+2*(l.x+c.x),n=h/2),t=t.subtract(B(e,n,!0)).add(l).add(c),ye(o,"leaflet-tooltip-right"),ye(o,"leaflet-tooltip-left"),ye(o,"leaflet-tooltip-top"),ye(o,"leaflet-tooltip-bottom"),_e(o,"leaflet-tooltip-"+a),Pe(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ei=function(t,e){return new Oi(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Oi||(t=new Oi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Wn.include({bindTooltip:function(t,e){return t instanceof Oi?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Oi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Pt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(_e(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ye(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){this._tooltip&&this._map&&this.openTooltip(t.layer||t.target,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ii=Jn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(pe(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=B(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Si(t){return new Ii(t)}Jn.Default=Yn;var zi=Wn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ce(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(de(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){be(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=le("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ce(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=le("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),h(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ce(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new S(+o,+r);a.z=+s;var u=this._tileCoordsToKey(a),h=this._tiles[u];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new S(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),u=this._tiles[a];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),i&&!(this.options.updateWhenZooming&&o!==this._tileZoom)||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();vt?Le(t.el,o,i):Pe(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new Z(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,u=new Z(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var l=this._tiles[h].coords;l.z===this._tileZoom&&u.contains(new S(l.x,l.y))||(this._tiles[h].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var c=o.min.y;c<=o.max.y;c++)for(var p=o.min.x;p<=o.max.x;p++){var d=new S(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:s.push(d)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<s.length;p++)this._addTile(s[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new R(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new S(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ce(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&C(o(this._tileReady,this,t,null,r)),Pe(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),k(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(_e(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?u(t.x,this._wrapX):t.x,this._wrapY?u(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Bi(t){return new zi(t)}var Zi=zi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&kt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ze(n,"load",o(this._tileOnLoad,this,e,n)),ze(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:kt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=g,ce(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",g),zi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==g))return zi.prototype._tileReady.call(this,t,e,n)}});function Ni(t,e){return new Zi(t,e)}var Ri=Zi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=d(this,e)).detectRetina&&kt?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,Zi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=N(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===Fn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Zi.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function ji(t,e){return new Ri(t,e)}Zi.WMS=Ri,Ni.wms=ji;var Di=Wn.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=Me(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);vt?Le(this._container,a,n):Pe(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Z(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Fi=Di.extend({getEvents:function(){var t=Di.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Di.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ze(t,"mousemove",this._onMouseMove,this),ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ze(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,ce(this._container),Ze(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Di.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=kt?2:1;Pe(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",kt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Di.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Z,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,u=this._ctx;if(a){for(u.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)u[i?"lineTo":"moveTo"]((r=s[n][i]).x,r.y);e&&u.closePath()}this._fillStroke(u,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(n=e);n&&(Ye(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ye(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(_e(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Ui(t){return Tt?new Fi(t):null}var Wi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Hi={_initContainer:function(){this._container=le("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Di.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wi("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ce(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Wi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,e.dashStyle=i.dashArray?y(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Wi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){de(t._container)},_bringToBack:function(t){fe(t._container)}},Vi=Et?Wi:Q,qi=Di.extend({getEvents:function(){var t=Di.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Vi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Vi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ce(this._container),Ze(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Di.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Pe(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Vi("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ce(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){de(t._path)},_bringToBack:function(t){fe(t._path)}});function Gi(t){return Ot||Et?new qi(t):null}Et&&qi.include(Hi),en.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Gi(t)}});var Ji=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Ji(t,e)}qi.create=Vi,qi.pointsToPath=X,hi.geometryToLayer=li,hi.coordsToLatLng=pi,hi.coordsToLatLngs=di,hi.latLngToCoords=fi,hi.latLngsToCoords=mi,hi.getFeature=_i,hi.asFeature=yi,en.mergeOptions({boxZoom:!0});var Yi=fn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ce(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),ke(),this._startPoint=this._map.mouseEventToContainerPoint(t),ze(document,{contextmenu:Ve,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=le("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Z(this._point,this._startPoint),n=e.getSize();Pe(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ce(this._box),ye(this._container,"leaflet-crosshair")),ee(),Ae(),Ze(document,{contextmenu:Ve,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Qi=fn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Qi),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Xi=fn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ye(this._map._container,"leaflet-grab"),ye(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=j(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=n.easeLinearity,s=o.multiplyBy(r/((this._lastTime-this._times[0])/1e3)),a=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,a),h=s.multiplyBy(u/a),l=u/(n.inertiaDeceleration*r),c=h.multiplyBy(-l/2).round();c.x||c.y?(c=e._limitOffset(c,e.options.maxBounds),C((function(){e.panBy(c,{duration:l,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Xi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var $i=fn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ze(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ze(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=B(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ve(t)}}});en.addInitHook("addHandler","keyboard",$i),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=fn.extend({addHooks:function(){ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Je(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),Ve(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,r=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=fn.extend({addHooks:function(){ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(He(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new S(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),ze(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ze(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ye(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Pt||Lt&&!ct||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Pt&&!rt,bounceAtZoomLimits:!0});var no=fn.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ye(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ze(document,"touchmove",this._onTouchMove,this),ze(document,"touchend",this._onTouchEnd,this),He(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(a,this,!0),He(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Qi,en.Drag=Xi,en.Keyboard=$i,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=St,t.Evented=I,t.Mixin=_n,t.Util=A,t.Class=T,t.Handler=fn,t.extend=n,t.bind=o,t.stamp=s,t.setOptions=d,t.DomEvent=$e,t.DomUtil=Se,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=zn,t.PolyUtil=Zn,t.Point=S,t.point=B,t.Bounds=Z,t.bounds=N,t.Transformation=G,t.transformation=J,t.Projection=jn,t.LatLng=D,t.latLng=F,t.LatLngBounds=R,t.latLngBounds=j,t.CRS=W,t.GeoJSON=hi,t.geoJSON=gi,t.geoJson=bi,t.Layer=Wn,t.LayerGroup=Hn,t.layerGroup=Vn,t.FeatureGroup=qn,t.featureGroup=Gn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=Li,t.videoOverlay=Pi,t.SVGOverlay=Mi,t.svgOverlay=Ci,t.DivOverlay=ki,t.Popup=Ai,t.popup=Ti,t.Tooltip=Oi,t.tooltip=Ei,t.Icon=Jn,t.icon=Kn,t.DivIcon=Ii,t.divIcon=Si,t.Marker=Xn,t.marker=$n,t.TileLayer=Zi,t.tileLayer=Ni,t.GridLayer=zi,t.gridLayer=Bi,t.SVG=qi,t.svg=Gi,t.Renderer=Di,t.Canvas=Fi,t.canvas=Ui,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=si,t.Polygon=ai,t.polygon=ui,t.Rectangle=Ji,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t})(l.exports);var c,p={exports:{}},d="object"==typeof Reflect?Reflect:null,f=d&&"function"==typeof d.apply?d.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};c=d&&"function"==typeof d.ownKeys?d.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var m=Number.isNaN||function(t){return t!=t};function _(){_.init.call(this)}p.exports=_,p.exports.once=function(t,e){return new Promise((function(n,i){function o(n){t.removeListener(e,r),i(n)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}k(t,e,r,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&k(t,"error",e,n)}(t,o,{once:!0})}))},_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var y=10;function v(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function g(t){return void 0===t._maxListeners?_.defaultMaxListeners:t._maxListeners}function b(t,e,n,i){var o,r,s,a;if(v(n),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),s=r[e]),void 0===s)s=r[e]=n,++t._eventsCount;else if("function"==typeof s?s=r[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(o=g(t))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function w(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function x(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=w.bind(i);return o.listener=n,i.wrapFn=o,o}function P(t,e,n){var i=t._events;if(void 0===i)return[];var o=i[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):C(o,o.length)}function M(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function C(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}function k(t,e,n,i){if("function"==typeof t.on)i.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(r){i.once&&t.removeEventListener(e,o),n(r)}))}}Object.defineProperty(_,"defaultMaxListeners",{enumerable:!0,get:function(){return y},set:function(t){if("number"!=typeof t||t<0||m(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");y=t}}),_.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||m(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},_.prototype.getMaxListeners=function(){return g(this)},_.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var r;if(e.length>0&&(r=e[0]),r instanceof Error)throw r;var s=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw s.context=r,s}var a=o[t];if(void 0===a)return!1;if("function"==typeof a)f(a,this,e);else{var u=a.length,h=C(a,u);for(n=0;n<u;++n)f(h[n],this,e)}return!0},_.prototype.on=_.prototype.addListener=function(t,e){return b(this,t,e,!1)},_.prototype.prependListener=function(t,e){return b(this,t,e,!0)},_.prototype.once=function(t,e){return v(e),this.on(t,x(this,t,e)),this},_.prototype.prependOnceListener=function(t,e){return v(e),this.prependListener(t,x(this,t,e)),this},_.prototype.removeListener=function(t,e){var n,i,o,r,s;if(v(e),void 0===(i=this._events))return this;if(void 0===(n=i[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,r=n.length-1;r>=0;r--)if(n[r]===e||n[r].listener===e){s=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(i[t]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",t,s||e)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(t){var e,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(o=r[i])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},_.prototype.listeners=function(t){return P(this,t,!0)},_.prototype.rawListeners=function(t){return P(this,t,!1)},_.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):M.call(t,e)},_.prototype.listenerCount=M,_.prototype.eventNames=function(){return this._eventsCount>0?c(this._events):[]};var A=function(t){function n(){var e=t.call(this)||this;return e.name="CancelError",Object.setPrototypeOf(e,n.prototype),e}return e(n,t),n}(Error),T=function(){function t(t){void 0===t&&(t={}),this.options=t,this._promises=new Map}return Object.defineProperty(t.prototype,"isLoaded",{get:function(){return this._promises.size>0},enumerable:!1,configurable:!0}),t.prototype.remove=function(t){this._promises.has(t)&&(this._promises.delete(t),this._onStop())},t.prototype.get=function(t){return this._promises.get(t)},t.prototype.add=function(t,e){var n=this,i=e||t,o=this._promises.get(i);return this.options.onStart&&!this.isLoaded&&this.options.onStart(),o||(this._promises.set(i,t),t.finally((function(){n.remove(i)})),t)},t.prototype.abort=function(){this.isLoaded&&(this._promises.forEach((function(t){t.cancel&&t.cancel()})),this._promises.clear(),this._onStop())},t.prototype.waitFunc=function(t,e){void 0===e&&(e="");var n=this.get(e=e||t.name);return n||this.add(t(),e)},t.prototype.WaitForMe=function(t){void 0===t&&(t="");var e=this.get.bind(this),n=this.add.bind(this);return function(i,o,r){var s=r.value;return t=t||o,r.value=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=e(t);return r||n(s.apply(this,i),t)},r}},t.prototype.GetOrCreateDecorator=function(t){return void 0===t&&(t=""),this.WaitForMe(t)},t.prototype._onStop=function(){this.options.onStop&&!this.isLoaded&&this.options.onStop()},t}(),O=function(t){function n(){var e=t.call(this)||this;return e.name="TimeoutError",Object.setPrototypeOf(e,n.prototype),e}return e(n,t),n}(Error),E=function(t,e,n,i){try{t(n(i))}catch(o){e(o)}},I=0,S=function(){function t(e,n){var i=this;this.id=I++,this._isCanceled=!1,this._isPending=!0,this._cancelHandlers=[],this._children=[],this._cancelPromise=new Promise((function(t,e){i._setCanceledCallback=function(e){return t(e||new A)}}));var o=[this._cancelPromise,new Promise((function(n,o){return e((function(e){e instanceof t?i.attach(e):i._isPending=!1,n(e)}),(function(t){i._isPending=!1,o(t)}),(function(t){if(!i._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");i._cancelHandlers.push(t)}))}))];n&&o.push(new Promise((function(t,e){setTimeout((function(){if(i._isPending)try{i.cancel()}finally{e(new O)}}),n)}))),this._promise=Promise.race(o)}return t.createControl=function(t){return new T(t)},t.resolve=function(e){return new t((function(t){return t(e)}))},t.reject=function(e){return new t((function(t,n){return n(e)}))},t.all=function(e){var n=this;return new t((function(t,n){Promise.all(e).then(t).catch(n)})).catch((function(t){if(t instanceof n.CancelError)for(var i=0,o=e;i<o.length;i++){var r=o[i];"cancel"in r&&r.cancel()}throw t}))},t.prototype.attach=function(t){this._isCanceled?t.cancel():this._children.push(t)},t.prototype.then=function(e,n){var i=this,o=new t((function(t,o){if(i._promise){var r=function(e){n?E(t,o,n,e):o(e)};i._promise.then((function(n){i._isCanceled?r(n):e?E(t,o,e,n):t(n)}),r)}}));return o._parentPromise=this,this._children.push(o),o},t.prototype.catch=function(t){return this._isCanceled&&t&&t(new A),this.then(void 0,t)},t.prototype.finally=function(t){return this._promise?this._promise.finally(t):Promise.reject(this._isCanceled?new A:t)},t.prototype.cancel=function(){if(this._isCanceled||!this._isPending)return this;this._isCanceled=!0;var t=this._getTopParent();if(t&&t.cancel(),this._children&&this._children.forEach((function(t){return t.cancel()})),this._isPending){if(this._cancelHandlers.length)try{for(var e=0,n=this._cancelHandlers;e<n.length;e++){(0,n[e])()}}catch(i){}this._setCanceledCallback&&this._setCanceledCallback()}return this._destroy(),this},t.prototype._getTopParent=function(){for(var t=this._parentPromise,e=!!t;e;)e=!(!t||!t._parentPromise)&&!!(t=t._parentPromise);return t},t.prototype._destroy=function(){this._setCanceledCallback=void 0,this._cancelPromise=void 0,this._promise=void 0},t.CancelError=A,t.TimeoutError=O,t.PromiseControl=T,t}();function z(t,e,n){void 0===n&&(n={});var i=function(t,e){for(void 0===e&&(e=[]);null!==t;t=Object.getPrototypeOf(t))for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++)-1==e.indexOf(n[i])&&e.push(n[i]);return e}(t.prototype),o=void 0===n.replace||n.replace;e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){var r=-1!==i.indexOf(n);if(!o&&!r||o){var s=Object.getOwnPropertyDescriptor(e.prototype,n);s&&Object.defineProperty(t.prototype,n,s)}}))}))}function B(t){return null!=t}function Z(t){return"string"==typeof t?!!t:B(t)}function N(t,e,n){void 0===n&&(n=!1);var i=t,o=e,r=Array.isArray(o),s=r&&[]||{};return r&&Array.isArray(o)?n?(s=s.concat(i=i||[]),o.forEach((function(t,e){void 0===s[e]?s[e]=t:"object"==typeof t?s[e]=N(i[e],t,n):-1===i.indexOf(t)&&s.push(t)}))):s=o:(i&&"object"==typeof i&&Object.keys(i).forEach((function(t){s[t]=i[t]})),Object.keys(o).forEach((function(t){s[t]="object"==typeof o[t]&&o[t]&&"object"==typeof i[t]&&"object"==typeof o[t]?N(i[t],o[t],n):o[t]}))),s}function R(t){!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]);return t}function j(t,e){var n;function i(){for(var o=this,r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];i.clear(),n=setTimeout((function(){n=null,t.apply(o,r)}),e)}return void 0===e&&(e=10),i.clear=function(){n&&(clearTimeout(n),n=null)},i}Object.setPrototypeOf(S.prototype,Promise.prototype);var D=6371;function F(t){return{type:"Polygon",coordinates:[U(t)]}}function U(t){var e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}var W=Math.PI/180,H=180/Math.PI;function V(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;var n=20037508.34*t/180,i=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return[n,i=20037508.34*i/180]}function q(t,e,n,i){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===i:G(t,e));return t===e}function G(t,e){var n=Object.keys(t).sort(),i=Object.keys(e).sort();if(n.length!==i.length)return!1;if(n.join("")!==i.join(""))return!1;for(var o=0;o<n.length;o++){if(!q(t[n[o]],e[i[o]],t,e))return!1}return!0}function J(t){var e={};return Object.keys(t).forEach((function(n){t[n]instanceof Array||t[n]!==Object(t[n])?void 0!==t[n]&&(e[n]=t[n]):e[n]=J(t[n])})),e}function K(t){return"[object Object]"===Object.prototype.toString.call(t)}function Y(t){return t.replace(/([^:]\/)\/+/g,"$1")}function Q(t){return"[object Object]"===Object.prototype.toString.call(t)}function X(t){return"function"==typeof t}var $=function(t,e,n){try{var i=t(e,n);if(void 0!==i)return i}catch(o){}};function tt(t){return function(e,n){for(var i=0,o=e;i<o.length;i++){var r=$(t,o[i],n);if(void 0!==r)return r}throw new Error("Received a mismatched type")}}function et(t){return function(e,n){var i=e.map((function(t){return t()}));return t(i,n)}}var nt={array:et((function(t){var e,n=t[0],i=t[1],o=t[2],r=void 0,s=void 0;if("string"==typeof n&&["string","number","boolean"].includes(n)?(r=n,"number"==typeof i?(s=i,e=o):e=i):Array.isArray(n)&&(e=n),!Array.isArray(e))throw new Error("Expected an array");if(r&&!e.every((function(t){return typeof t===r})))throw new Error("Expected all items in array to be of type ".concat(r));if(s&&e.length!==s)throw new Error("Expected array of length ".concat(s));return e})),boolean:et(tt((function(t){return"boolean"==typeof t?t:void 0}))),literal:et((function(t){return t[0]})),number:et(tt((function(t){return"number"==typeof t?t:void 0}))),object:et(tt((function(t){return null===t||"object"!=typeof t||Array.isArray(t)?void 0:t}))),string:et(tt((function(t){return"string"==typeof t?t:void 0}))),"to-boolean":et(tt(Boolean)),"to-number":et(tt(Number)),"to-string":et(tt(String)),typeof:et((function(t){return function(t){if(null===t)return"null";switch(typeof t){case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"object":if(Array.isArray(t)){var e="value";return t.every((function(t){return"number"==typeof t}))?e="number":t.every((function(t){return"string"==typeof t}))?e="string":t.every((function(t){return"boolean"==typeof t}))&&(e="boolean"),"array<".concat(e,", ").concat(t.length,">")}return"object";default:return"undefined"}}(t[0])}))},it={"+":et((function(t){return t.reduce((function(t,e){return t+e}),0)})),"-":et((function(t){return t.reduce((function(t,e){return t-e}))})),"*":et((function(t){return t.reduce((function(t,e){return t*e}),1)})),"/":et((function(t){return t.reduce((function(t,e){return t/e}))})),"%":et((function(t){return t[0]%t[1]})),"^":et((function(t){return Math.pow(t[0],t[1])})),abs:et((function(t){return Math.abs(t[0])})),acos:et((function(t){return Math.acos(t[0])})),asin:et((function(t){return Math.asin(t[0])})),atan:et((function(t){return Math.atan(t[0])})),ceil:et((function(t){return Math.ceil(t[0])})),cos:et((function(t){return Math.cos(t[0])})),e:function(){return Math.E},floor:et((function(t){return Math.floor(t[0])})),ln:et((function(t){return Math.log(t[0])})),ln2:function(){return Math.LN2},log10:et((function(t){return Math.log10(t[0])})),log2:et((function(t){return Math.log2(t[0])})),max:et((function(t){return Math.max.apply(Math,t)})),min:et((function(t){return Math.min.apply(Math,t)})),pi:function(){return Math.PI},round:et((function(t){return Math.round(t[0])})),sin:et((function(t){return Math.sin(t[0])})),sqrt:et((function(t){return Math.sqrt(t[0])})),tan:et((function(t){return Math.tan(t[0])}))};var ot={get:et((function(t,e){var n=t[0],i=t[1]||e;return i&&"object"==typeof i&&n in i?i[n]:null})),length:et((function(t){var e=t[0];if("string"==typeof e||Array.isArray(e))return e.length})),at:et((function(t){return t[1][t[0]]})),has:et((function(t,e){var n=t[1]||e;return!(!n||"object"!=typeof n||!(t[0]in n))})),in:et((function(t){var e=t[0],n=t[1];if("string"==typeof n)return n.includes(String(e));if(Array.isArray(n))return n.includes(e);throw new Error("Invalid input type for 'in'. Expected string or array, got ".concat(typeof n,"."))})),"index-of":et((function(t){var e=t[0],n=t[1],i=t[2];if("string"==typeof n)return n.indexOf(String(e),i);if(Array.isArray(n))return n.indexOf(e,i);throw new Error("Invalid input type for 'index-of'. Expected string or array, got ".concat(typeof n,"."))})),slice:et((function(t){var e=t[0],n=t[1],i=t[2];if("string"==typeof e)return e.slice(n,i);if(Array.isArray(e))return e.slice(n,i);throw new Error("Invalid input type for 'slice'. Expected string or array, got ".concat(typeof e,"."))}))},rt={concat:et((function(t){return t.reduce((function(t,e){return String(t)+String(e)}),"")})),downcase:et((function(t){return String(t[0]).toLowerCase()})),upcase:et((function(t){return String(t[0]).toUpperCase()}))};var st={"!":et((function(t){return!t[0]})),"!=":et((function(t){return t[0]!==t[1]})),"<":et((function(t){return t[0]<t[1]})),"<=":et((function(t){return t[0]<=t[1]})),"==":et((function(t){return t[0]===t[1]})),">":et((function(t){return t[0]>t[1]})),">=":et((function(t){return t[0]>=t[1]})),coalesce:function(t){for(var e=0;e<t.length;e++){var n=t[e]();if(null!=n)return n}return null},all:function(t){for(var e=0;e<t.length;e++){if(!t[e]())return!1}return!0},any:function(t){for(var e=0;e<t.length;e++){if(t[e]())return!0}return!1},case:function(t){if(t.length<2)throw new Error('The "case" function requires at least a condition and a corresponding output.');if(t.length%2==0)throw new Error("Missing a fallback value or unmatched condition-output pair.");for(var e=0;e<t.length-1;e+=2){var n=t[e](),i=t[e+1]();if(n)return i}return(0,t[t.length-1])()},match:function(t){for(var e=t[0],n=t.slice(1),i=e(),o=n.splice(-1,n.length%2)[0],r=0;r<n.length-1;r+=2){if(n[r]()===i)return n[r+1]()}return o()}},at={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ut(t){if("string"==typeof(i=t)&&/^#([A-Fa-f0-9]{3}){1,2}$/.test(i))return ht(t);if("string"==typeof(n=t)&&n in at)return function(t){return ht(at[t])}(t);if(function(t){return"string"==typeof t&&/^rgb(a?)\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)(?:\s*,\s*([01](?:\.\d+)?))?\s*\)$/.test(t)}(t))return function(t){var e,n=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/;if(e=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)];if(e=t.match(n))return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4])];throw new Error("The '".concat(t,"' Is not valid rgb"))}(t);if("object"==typeof(e=t)&&null!==e&&"r"in e&&"g"in e&&"b"in e&&(!("a"in e)||"number"==typeof e.a&&e.a>=0&&e.a<=1))return function(t){var e=t.a;return a([t.r,t.g,t.b],void 0!==e?[e]:[],!0)}(t);var e,n,i;throw new Error("The '".concat(t,"' cannot be converted to color"))}function ht(t){var e;if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)];if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),parseInt(e[4]+e[4],16)/255];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16)/255];throw new Error("The '".concat(t,"' Is not valid hex"))}function lt(t,e,n,i,o){if("number"==typeof n&&"number"==typeof o)return n+(t-e)/(i-e)*(o-n);try{var r=ut(n),s=ut(o);return function(t){return"rgb(".concat(t.join(","),")")}(r.map((function(n,o){return Math.ceil(lt(t,e,n,i,s[o]))})))}catch(a){console.log(a)}throw new Error("Unsupported output type for linear interpolation.")}var ct={step:function(t){var e=t[0],n=t[1],i=t.slice(2),o=e();if("number"!=typeof o)return n();for(var r=0;r<i.length-2;r+=2){var s=i[r](),a=i[r+1](),u=i[r+2]();if(o>=s&&o<u)return a}return o>=i[i.length-2]()?i[i.length-1]():n()},interpolate:function(t){var e=t[0],n=t[1],i=t.slice(2);if(i.length<2)throw new Error("At least two stops are required");if(i.length<2||i.length%2!=0)throw new Error("Invalid stops provided.");var o=n();if("number"!=typeof o)throw new Error("Input must be a number.");for(var r=e(),s=0;s<i.length-2;s+=2){var a=i[s](),u=i[s+1](),h=i[s+2](),l=i[s+3]();if(o>=a&&o<=h&&"linear"===r[0])return lt(o,a,u,h,l)}throw new Error("Invalid interpolation type.")}};function pt(t){if(Array.isArray(t)){var e=t[0],n=t.slice(1);return"string"==typeof e&&"literal"!==e&&e in dt&&n.length>0}return!1}var dt=n(n(n(n(n(n({},it),nt),rt),ot),st),ct);function ft(t,e){void 0===e&&(e={});var n=t[0],i=t.slice(1),o=dt[n];if(o)return o(i.map((function(t){return function(){return pt(t)?ft(t,e):t}})),e);throw new Error('Expression "'.concat(n,'" is not supported.'))}function mt(t){return function(e){var n=e.properties;return!!n&&ft(t,n)}}var _t=["iconSize","iconAnchor"];function yt(t,e,n){if((e=String(e))===(t=String(t)))return!0;if(n&&e.toUpperCase()===t.toUpperCase())return!0;var i,o="^".concat((i=e,i.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")),"$").replace(/%/g,".*").replace("_",".");return null!==new RegExp(o,n?"i":"").exec(t)}var vt={gt:function(t,e){return t>e},lt:function(t,e){return t<e},ge:function(t,e){return t>=e},le:function(t,e){return t<=e},eq:function(t,e){return t===e},ne:function(t,e){return t!==e},in:function(t,e){return-1!==e.indexOf(t)},notin:function(t,e){return-1===e.indexOf(t)},like:function(t,e){return yt(t,e)},ilike:function(t,e){return yt(t,e,!0)}};function gt(t){return 3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]}function bt(t,e){var n="string"==typeof e[0]?e[0]:"all",i=function(e){if(gt(e)){var n=e[0],i=e[1],o=e[2],r=vt[i];if(r){if(("like"===i||"ilike"===i)&&"string"==typeof n){var s="",a=n.replace(/^%?(\w+)%?$/,(function(e,i){return s=t[i],n.replace(i,o)}));return r(s,a)}return r(t[n],o)}return!1}return bt(t,e)},o=e.filter((function(t){return Array.isArray(t)}));return"any"===n?o.some(i):o.every(i)}function wt(t){for(var e={},i=[],o=0,r=t;o<r.length;o++){var s=r[o];s&&(Array.isArray(s)?i.push(s):e=s)}return function(t){var o=i.find((function(e){return function(t,e){var i=n({},t.properties);return!!i&&(i.$id=t.id,bt(i,e))}(t,e[0])}));return o?n(n({},e),o[1]):e}}function xt(t){var e=t.paint,i=t.defaultPaint,o=function(t){var e=!1,i={};for(var o in t)if(-1===_t.indexOf(o)){var r=o,s=t[r];pt(s)&&(e=!0,i[r]=mt(s))}if(e)return function(e){var o={};for(var r in i)o[r]=i[r](e);return n(n({},t),o)}}(e);if(o){var r=function(t){return Pt({paint:o(t),defaultPaint:i})};return r.paint=Lt({paint:e,defaultPaint:i}),r}return Lt({paint:e,defaultPaint:i})}function Lt(t){var e,i=t.paint,o=n({},t.defaultPaint);return(o=n(n({},o),i)).fill=null===(e=o.fill)||void 0===e||e,o.stroke=void 0!==o.stroke?o.stroke:!o.fill||!(!o.strokeColor&&!o.strokeOpacity),o}function Pt(t){var e=t.paint,i=t.defaultPaint,o=t.getPaintFunctions;if(!e)throw new Error("paint is empty");var r=n({},i);if(X(e)){var s=function(t){var n=Pt({paint:e(t),defaultPaint:i,getPaintFunctions:o});return n.type=e.type,n};return s.type=e.type,s}if(function(t){return!!Array.isArray(t)}(e))return function(t){return Pt({paint:wt(e)(t),defaultPaint:i,getPaintFunctions:o})};if("get-paint"===e.type){var a=function(t,e){if("function"==typeof t.from)return t.from(t.options);if("string"==typeof t.from&&e){var n=e[t.from];if(n)return n(t.options)}}(e,o);a&&(r=Pt({paint:a,defaultPaint:i,getPaintFunctions:o}))}else{if("icon"===e.type)return e;r=xt({paint:e,defaultPaint:i})}return X(r)||("color"in r&&(r.strokeColor||(r.strokeColor=r.color),r.fillColor||(r.fillColor=r.color)),"opacity"in r&&(void 0===r.strokeOpacity&&(r.strokeOpacity=r.opacity),void 0===r.fillOpacity&&(r.fillOpacity=r.opacity))),r}function Mt(t){for(var e,n={},i=0;i<t.length;i++)n[t[i]]=1+(n[t[i]]||0);for(var o in n){n[o]>((void 0!==e?n[e]:0)||0)&&(e=o)}return e}var Ct={polygon:"path",line:"path",point:"circle"},kt={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon"};function At(t){if(t.data){var e=kt[function(t){var e;e="FeatureCollection"===t.type?Mt(t.features.map((function(t){return t.geometry.type}))):"GeometryCollection"===t.type?Mt(t.geometries.map((function(t){return t.type}))):"Feature"===t.type?t.geometry.type:t.type;return e}(t.data)],n=t.paint;n&&Q(n)&&(n.type=n.type?n.type:"polygon"===e||"line"===e?"path":"html"in n||"className"in n?"icon":Ct[e]),t.type=t.type||e}return t}var Tt=function(){this.backspace=8,this.tab=9,this.enter=13,this.shift=16,this.ctrl=17,this.alt=18,this["pause/break"]=19,this.caps_lock=20,this.escape=27,this.page_up=33,this.page_down=34,this.end=35,this.home=36,this.left_arrow=37,this.up_arrow=38,this.right_arrow=39,this.down_arrow=40,this.insert=45,this.delete=46,this.left_window_key=91,this.right_window_key=92,this.select_key=93,this.numpad_0=96,this.numpad_1=97,this.numpad_2=98,this.numpad_3=99,this.numpad_4=100,this.numpad_5=101,this.numpad_6=102,this.numpad_7=103,this.numpad_8=104,this.numpad_9=105,this.multiply=106,this.add=107,this.subtract=109,this.decimal_point=110,this.divide=111,this.f1=112,this.f2=113,this.f3=114,this.f4=115,this.f5=116,this.f6=117,this.f7=118,this.f8=119,this.f9=120,this.f10=121,this.f11=122,this.f12=123,this.num_lock=144,this.scroll_lock=145,this["semi-colon"]=186,this.equal_sign=187,this[","]=188,this["-"]=189,this["."]=190,this["/"]=191,this["`"]=192,this["["]=219,this["\\"]=220,this["]"]=221,this["'"]=222},Ot=function(){function t(){this.keyCodeAlias=new Tt,this.keys={},this._windowOnFocus=this.windowOnFocus.bind(this),this._keysPressed=this.keysPressed.bind(this),this._keysReleased=this.keysReleased.bind(this),this.addKeyboardEventsListener()}return t.prototype.pressed=function(t){var e=this.keyCodeAlias[t];return!!e&&this.keys[e]},t.prototype.addKeyboardEventsListener=function(){"undefined"!=typeof window&&(window.addEventListener("focus",this._windowOnFocus,!1),window.addEventListener("keydown",this._keysPressed,!1),window.addEventListener("keyup",this._keysReleased,!1))},t.prototype.removeKeyboardEventsListener=function(){"undefined"!=typeof window&&(window.removeEventListener("focus",this._windowOnFocus,!1),window.removeEventListener("keydown",this._keysPressed,!1),window.removeEventListener("keyup",this._keysReleased,!1))},t.prototype.keysPressed=function(t){t.stopPropagation(),this.keys[t.keyCode]||(this.keys[t.keyCode]=!0)},t.prototype.keysReleased=function(t){t.stopPropagation(),this.keys[t.keyCode]=!1},t.prototype.windowOnFocus=function(){this.keys={}},t}(),Et=function(){function t(t,e){this.webMap=t,e&&(e.value&&this.setValue(e.value),e.name&&(this.name=e.name),e.event&&(this.event=e.event))}return t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(t){this.value=t},t}(),It=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="center",e.event="moveend",e}return e(n,t),n.prototype.getValue=function(){return this.webMap.getCenter()},n.prototype.setValue=function(t){this.webMap.setCenter(t)},n.prototype.toString=function(t){var e=t.map((function(t){return t.toFixed(5)}));return e[0]+"_"+e[1]},n.prototype.parse=function(t){return t.split("_").map(Number)},n}(Et),St=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="zoom",e.event="zoomend",e}return e(n,t),n.prototype.getValue=function(){var t=this.webMap.getZoom();return void 0!==t?Math.round(t):void 0},n.prototype.setValue=function(t){this.webMap.setZoom(t)},n.prototype.toString=function(t){return String(t)},n.prototype.parse=function(t){return Number(t)},n}(Et);var zt=0,Bt={minZoom:0,maxZoom:22,paint:{color:"#0000ff",opacity:.4,strokeOpacity:1,stroke:!0,radius:8,weight:1},selectedPaint:{color:"#00008b",opacity:.4,strokeOpacity:1,stroke:!0,radius:12,weight:1},create:!0},Zt=function(t){function i(e){var n=t.call(this,e)||this;n._layersIdCounter=1,n._layersOrderCounter=1,n._baselayers=[],n._layers={},n._selectedLayers=[];var i=n.options.tileJson;return i&&n.emitter.once("build-map",(function(){return n.addTileJsonLayer(i)})),n}return e(i,t),i.prototype.fitLayer=function(t,e){return o(this,void 0,void 0,(function(){var n,i,o;return r(this,(function(r){switch(r.label){case 0:return n=this.getLayer(t),(i=n&&(n.getBounds||n.getExtent))?[4,i.call(n)]:[3,2];case 1:(o=r.sent())&&this.fitBounds(o,e),r.label=2;case 2:return[2]}}))}))},i.prototype.isBaseLayer=function(t){var e=this.getLayer(t);if(e&&e.id)return-1!==this._baselayers.indexOf(e.id)},i.prototype.getBaseLayers=function(){var t=this,e=[];return this._baselayers.forEach((function(n){var i=t._layers[n];i&&e.push(i)})),e},i.prototype.getBaseLayersIds=function(){return this._baselayers},i.prototype.getLayer=function(t){return"string"==typeof t?this._layers[t]:t},i.prototype.getLayerId=function(t){var e=this.getLayer(t);if(e){if(e.id)return null==e?void 0:e.id;if(e&&e.options)return e.options.id}throw new Error("No id for layer")},i.prototype.getLayers=function(){return Object.keys(this._layers)},i.prototype.allLayers=function(){return this._layers},i.prototype.orderedLayers=function(){return Object.values(this._layers).sort((function(t,e){return t.order&&e.order?t.order-e.order:0}))},i.prototype.findLayer=function(t){for(var e in this._layers){var n=this._layers[e];if(t(n))return n}},i.prototype.isLayerVisible=function(t){var e=this.getLayer(t);return!(!e||void 0===e.options.visibility)&&e.options.visibility},i.prototype.addBaseLayer=function(t,e){return o(this,void 0,void 0,(function(){return r(this,(function(i){switch(i.label){case 0:return[4,this.addLayer(t,n(n({},e),{baselayer:!0}),void 0)];case 1:return[2,i.sent()]}}))}))},i.prototype.addLayer=function(t,e,i){var s,a;return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,u,h,l,c,p,d,f,m,_,y,v;return r(this,(function(r){switch(r.label){case 0:return o=this._layersIdCounter++,u=B(i)?i:void 0!==e.order?e.order:this.reserveOrder(),"string"!=typeof t?[3,1]:(h=this.getLayerAdapter(t),[3,4]);case 1:return"function"!=typeof t?[3,2]:(h=t,[3,4]);case 2:return"then"in t?[4,t]:[3,4];case 3:h=r.sent(),r.label=4;case 4:return this._updateGeoJsonOptions(l=e),e=n({id:String(o),order:u},e),c=null===(s=e.visibility)||void 0===s||s,e.visibility=!1,e.baselayer&&(e.order=0),this.options.onBeforeAddLayer&&(p=this.options.onBeforeAddLayer({options:e,adapter:h}))&&(p.options&&(e=p.options),p.adapter&&(h=p.adapter)),void 0===h?[3,12]:((d=new h(this.mapAdapter.map,e)).options=n(n({},e),d.options),d.options.baselayer&&(e.baselayer=!0,e.order=0,d.options.order=0),f=void 0,d.options.id&&(f=String(d.options.id),this._layers[f]=d),this._emitLayerEvent("layer:preadd",f||"",d),[4,this.onMapLoad()]);case 5:return r.sent(),d.map=this.mapAdapter.map,[4,d.addLayer(d.options)];case 6:if(m=r.sent(),d.layer=m,d.id=d.options.id||String(o),d.options.id=d.id,e.baselayer&&(d.options.order=0),d.order=null!==(a=d.options.order)&&void 0!==a?a:u,f&&delete this._layers[f],f=String(d.id),this._layers[f])throw Error("layer with id '".concat(f,"' already exist"));return f?(this._layers[f]=d,l.filter&&this.filterLayer(d,l.filter),e.baselayer&&this._baselayers.push(f),c?[4,this.showLayer(f)]:[3,8]):[3,8];case 7:r.sent(),r.label=8;case 8:return void 0!==(_=e.opacity)&&_<=1&&this.setLayerOpacity(d,_),y=m&&(d.getBounds||d.getExtent),e.fit&&y?[4,y.call(d)]:[3,11];case 9:return(v=r.sent())?[4,this.fitBounds(v)]:[3,11];case 10:r.sent(),r.label=11;case 11:return e.onAdded&&e.onAdded(d),this._emitLayerEvent("layer:add",f,d),[2,d];case 12:return[2,Promise.reject("No adapter")]}}))}))},i.prototype.addLayerFromAsyncAdapter=function(t,e,n){return o(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){switch(r.label){case 0:return i=n||void 0!==e.order?e.order:this.reserveOrder(),[4,t()];case 1:return(o=r.sent())?[2,this.addLayer(o,e,i)]:[2,Promise.reject("No adapter")]}}))}))},i.prototype.removeLayers=function(t){for(var e in this._layers){var n=!0;t&&(n=t(e,this._layers[e])),n&&(this.removeLayer(e),delete this._layers[e])}},i.prototype.reserveOrder=function(){return this._layersOrderCounter++},i.prototype.removeOverlays=function(){this.removeLayers((function(t,e){return!(e&&e.options&&e.options.baselayer)}))},i.prototype.removeLayer=function(t){var e=this.getLayer(t),n=e&&this.getLayerId(e);if(e&&n){if(this.emitter.emit("layer:preremove",e),e.beforeRemove&&e.beforeRemove(),e.removeLayer?e.removeLayer():this.mapAdapter.removeLayer(e.layer),e.options&&e.options.baselayer){var i=this._baselayers.indexOf(n);i&&this._baselayers.splice(i,1)}delete this._layers[n],this.emitter.emit("layer:remove",e)}},i.prototype.addGeoJsonLayer=function(t,e){return void 0===t&&(t={}),(t=t||{}).multiselect=void 0!==t.multiselect&&t.multiselect,t.unselectOnSecondClick=void 0===t.unselectOnSecondClick||t.unselectOnSecondClick,e||(t=At(t)),t.paint=t.paint||{},this.addLayer(e||"GEOJSON",t)},i.prototype.addFeatureLayer=function(t){return void 0===t&&(t={}),this.addGeoJsonLayer(t)},i.prototype.addTileLayer=function(t,e){return void 0===e&&(e={}),this.addLayer("TILE",n(n({},e),{url:t}))},i.prototype.addImageLayer=function(t,e){var i;return"string"==typeof t?i=t:(i=t.url,e=t),this.addLayer("IMAGE",n(n({},e),{url:i}))},i.prototype.showLayer=function(t,e){return void 0===e&&(e={}),this.toggleLayer(t,!0,e)},i.prototype.hideLayer=function(t,e){return void 0===e&&(e={}),this.toggleLayer(t,!1,e)},i.prototype.toggleLayer=function(t,e,n){var i=this;void 0===n&&(n={});var s=this.getLayer(t),a=void 0!==e?e:!(s&&s.options.visibility),u=void 0!==n.silent&&n.silent;return s?this.onMapLoad().then((function(){return t=s,o(i,void 0,void 0,(function(){var e,n,i,o,s,h,l,c=this;return r(this,(function(r){switch(r.label){case 0:if(e=String(t.id),n=a?"layer:preshow":"layer:prehide",i=a?"layer:show":"layer:hide",u||(this._emitLayerEvent(n,e,t),this._emitLayerEvent("layer:pretoggle",e,t)),!a||!this.mapAdapter)return[3,9];if(o=t.options.baselayer?0:t.options.order,!t.options.baselayer||!this._baselayers.length)return[3,4];s=this._baselayers.filter((function(e){return e!==t.id&&c.isLayerVisible(e)})),h=0,l=s,r.label=1;case 1:return h<l.length?[4,this.hideLayer(l[h])]:[3,4];case 2:r.sent(),r.label=3;case 3:return h++,[3,1];case 4:return t.showLayer?[4,t.showLayer.call(t,t.layer)]:[3,6];case 5:return r.sent(),[3,8];case 6:return void 0===t.layer?[3,8]:[4,this.mapAdapter.showLayer(t.layer)];case 7:r.sent(),r.label=8;case 8:return void 0!==o&&this.mapAdapter.setLayerOrder(t.layer,o,this._layers),[3,13];case 9:return t.hideLayer?[4,t.hideLayer.call(t,t.layer)]:[3,11];case 10:return r.sent(),[3,13];case 11:return void 0===t.layer?[3,13]:[4,this.mapAdapter.hideLayer(t.layer)];case 12:r.sent(),r.label=13;case 13:return t.options.visibility=a,u||(this._emitLayerEvent(i,e,t),this._emitLayerEvent("layer:toggle",e,t)),[2]}}))}));var t})):Promise.resolve()},i.prototype.updateLayer=function(t){var e=this,n=this.getLayer(t);if(n){if(n.updateLayer)return Promise.resolve(n.updateLayer());if(this.isLayerVisible(n))return this.hideLayer(n,{silent:!0}).then((function(){return e.showLayer(n,{silent:!0})}))}return Promise.resolve()},i.prototype.setLayerOpacity=function(t,e){var n=this.getLayer(t);n&&(n.setOpacity?n.setOpacity(e):this.mapAdapter.setLayerOpacity&&this.mapAdapter.setLayerOpacity(n.layer,e))},i.prototype.isLayerLabelVisible=function(t){var e,n=this.getLayer(t);return n.isLabelVisible?n.isLabelVisible():null===(e=n.options.labelVisibility)||void 0===e||e},i.prototype.showLayerLabel=function(t){this.toggleLayerLabel(t,!0)},i.prototype.hideLayerLabel=function(t){this.toggleLayerLabel(t,!1)},i.prototype.toggleLayerLabel=function(t,e){var n=this.getLayer(t);return e=null!=e?e:!this.isLayerLabelVisible(t),n&&(e?n.showLabel&&(n.options.labelVisibility=!0,n.showLabel()):n.hideLabel&&(n.options.labelVisibility=!1,n.hideLabel()),n.id&&this._emitLayerEvent("layer:label:toggle",n.id,n)),e},i.prototype.selectLayer=function(t,e){var n=this.getLayer(t);if(n){n&&n.select&&n.select(e);var i=this.getLayerId(n);i&&this._selectedLayers.push(i)}},i.prototype.unSelectLayer=function(t,e){var n=this.getLayer(t);if(n){var i=n&&n;i.unselect&&i.unselect(e);var o=this.getLayerId(n);if(o){var r=this._selectedLayers.indexOf(o);-1!==r&&this._selectedLayers.splice(r,1)}}},i.prototype.unSelectLayers=function(){for(var t,e=0,n=Object.values(this.allLayers());e<n.length;e++)(t=n[e]).unselect&&t.unselect()},i.prototype.filterLayer=function(t,e){var n=this.getLayer(t);return n.filter?n.filter(e):[]},i.prototype.propertiesFilter=function(t,e,n){var i=this.getLayer(t);if(i){var o=i;if(o.propertiesFilter)return o.propertiesFilter(e,n);o.filter&&this.filterLayer(o,(function(t){return!t.feature||!t.feature.properties||bt(t.feature.properties,e)}))}return Promise.resolve()},i.prototype.removeLayerFilter=function(t){var e=this.getLayer(t);e.removeFilter?e.removeFilter():e.filter&&e.filter((function(){return!0}))},i.prototype.setLayerData=function(t,e){var n=this.getLayer(t);if(n){if(n.setData)return n.setData(e);if(n.clearLayer&&n.addData)return n.clearLayer(),n.addData(e)}return Promise.resolve()},i.prototype.addLayerData=function(t,e){var n=this.getLayer(t);n.addData&&n.addData(e)},i.prototype.clearLayerData=function(t,e){var n=this.getLayer(t);n&&n.clearLayer&&n.clearLayer(e)},i.prototype.setLayerPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.setPaint&&n.setPaint(e)},i.prototype.setLayerSelectedPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.setSelectedPaint&&n.setSelectedPaint(e)},i.prototype.updateLayerPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.updatePaint&&n.updatePaint(e)},i.prototype.updateLayerSelectedPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.updateSelectedPaint&&n.updateSelectedPaint(e)},i.prototype.getAttributions=function(t){var e=[];for(var n in this._layers){var i=this._layers[n],o=!(void 0===t.onlyVisible||t.onlyVisible)||i.options.visibility;if(o&&t.onlyBaselayer&&(o=this._baselayers.includes(n)),o){var r=i.options&&i.options.attribution;r&&e.push(r)}}return e},i.prototype.getActiveBaseLayer=function(){var t=this,e=this.getBaseLayers().find((function(e){return t.isLayerVisible(e)}));if(e)return this.getLayer(e)},i.prototype.addTileJsonLayer=function(t){return this.addLayer("TILE",{url:t.tiles[0],maxZoom:t.maxzoom,minZoom:t.minzoom,subdomains:t.scheme,attribution:t.attribution})},i.prototype._emitLayerEvent=function(t,e,n){var i=String(t);if(B(e)&&i.startsWith("layer:")){var o=i.replace("layer:","layer-"+e+":");this.emitter.emit(o,n)}this.emitter.emit(t,n)},i.prototype._onLayerClick=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this._emitLayerEvent("layer:click",t.layer.id||"",t),[2,Promise.resolve(t)]}))}))},i.prototype._onLayerSelect=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this._emitLayerEvent("layer:select",t.layer.id||"",t),[2,Promise.resolve(t)]}))}))},i.prototype._updateGeoJsonOptions=function(t){var e=this,n=t.onSelect,i=t.onLayerSelect,o=t.onMouseOut,r=t.onMouseOver,s=t.onClick||t.onLayerClick;t.onClick=function(t){return s&&s(t),e._onLayerClick(t)},t.onMouseOut=function(t){var n=t.layer.id;o&&o(t),B(n)&&e._emitLayerEvent("layer:mouseout",n,t)},t.onMouseOver=function(t){var n=t.layer.id;r&&r(t),B(n)&&e._emitLayerEvent("layer:mouseover",n,t)};var a=n||i;t.onSelect=function(t){return a&&a(t),e._onLayerSelect(t)},t.nativePaint||(this.options.paint&&(t.paint=Pt({paint:t.paint||{},defaultPaint:this.options.paint,getPaintFunctions:this.getPaintFunctions})),t.selectedPaint&&this.options.selectedPaint&&(t.selectedPaint=Pt({paint:t.selectedPaint,defaultPaint:this.options.selectedPaint,getPaintFunctions:this.getPaintFunctions})))},i}(function(){function t(e){this.options=Bt,this.emitter=new p.exports.EventEmitter,this.keys=t.keys,this.runtimeParams=[],this.getPaintFunctions=t.getPaintFunctions,this.mapState=[It,St],this.id=zt++,this._initMapState={},this._mapState=[],this._eventsStatus={},this._mapEvents={},this.mapAdapter=e.mapAdapter,this._starterKits=e.starterKits||[],e&&(this.options=N(Bt||{},e)),this.options.runtimeParams&&(this.runtimeParams=this.options.runtimeParams),this._addEventsListeners(),this.options.tileJson&&this._setTileJsonOptions(this.options.tileJson),this.options.create&&this.create()}return t.prototype.getId=function(){return this.id},t.prototype.create=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return this.getEventStatus("create")?[3,3]:[4,this._setInitMapState(this.mapState)];case 1:return t.sent(),[4,this._setupMap()];case 2:t.sent(),this._emitStatusEvent("create",this),t.label=3;case 3:return[2,this]}}))}))},t.prototype.setRuntimeParams=function(t){this.runtimeParams.push(t)},t.prototype.destroy=function(){this._removeEventListeners(),function(t){for(var e in t)delete t[e]}(this._emitStatusEvent),this.mapAdapter.destroy&&this.mapAdapter.destroy()},t.prototype.getState=function(){var t={};return this._mapState.forEach((function(e){t[e.name]=e.getValue()})),t},t.prototype.getRuntimeParams=function(){var t=this,e={};return this._mapState.forEach((function(n){for(var i=0,o=t.runtimeParams;i<o.length;i++){var r=o[i].get(n.name);if(void 0!==r){e[n.name]=n.parse(r);break}}})),e},t.prototype.getContainer=function(){if(this.mapAdapter.getContainer)return this.mapAdapter.getContainer();if(this.options.target){if(this.options.target instanceof HTMLElement)return this.options.target;if("string"==typeof this.options.target){var t=document.getElementById(this.options.target);if(t)return t}}},t.prototype.setCursor=function(t){this.mapAdapter.setCursor&&this.mapAdapter.setCursor(t)},t.prototype.getCursor=function(){if(this.mapAdapter.getCursor)return this.mapAdapter.getCursor();var t=this.getContainer();return t?t.style.cursor:void 0},t.prototype.setCenter=function(t){return this.mapAdapter.setCenter(t),this},t.prototype.getCenter=function(){return this.mapAdapter.getCenter()},t.prototype.getBounds=function(){if(this.mapAdapter.getBounds)return this.mapAdapter.getBounds()},t.prototype.getBoundsPolygon=function(){var t=this.getBounds();if(t)return{type:"Feature",properties:{},geometry:F(t)}},t.prototype.setZoom=function(t){return this.mapAdapter.setZoom(t),this},t.prototype.getZoom=function(){var t=this.mapAdapter.getZoom();if("number"==typeof t)return t},t.prototype.zoomIn=function(){if(this.mapAdapter.zoomIn)this.mapAdapter.zoomIn();else{var t=this.getZoom();if(void 0!==t)this.setZoom(t+1)}},t.prototype.zoomOut=function(){if(this.mapAdapter.zoomOut)this.mapAdapter.zoomOut();else{var t=this.getZoom();if(void 0!==t)this.setZoom(t-1)}},t.prototype.setView=function(t,e){if(Array.isArray(t)){var n=t;this.mapAdapter.setView&&n&&B(e)?this.mapAdapter.setView(n,e):(n&&this.mapAdapter.setCenter(n),B(e)&&this.mapAdapter.setZoom(e))}else{this.mapAdapter.setView&&this.mapAdapter.setView(t)}},t.prototype.fitBounds=function(t,e){return t.every((function(t){return B(t)}))&&(t[1]<-85.06&&(t[1]=-85.06),t[3]>85.06&&(t[3]=85.06),this.mapAdapter.fitBounds(t,e)),this},t.prototype.getEventStatus=function(t){var e=this._eventsStatus[t];return null!=e&&e},t.prototype.onLoad=function(t){var e=this;return void 0===t&&(t="create"),new Promise((function(n){e.getEventStatus(t)?n(e):e.emitter.once(t,(function(){n(e)}))}))},t.prototype.onMapLoad=function(t){var e=this;return new Promise((function(n){var i,o=function(){var i=e.mapAdapter;t&&t(i),i&&n(i)},r=null===(i=e.mapAdapter.isLoaded)||void 0===i||i;e.mapAdapter.map&&r?o():e.mapAdapter.emitter.once("create",(function(){o()}))}))},t.prototype.getLayerAdapters=function(){return this.mapAdapter.layerAdapters},t.prototype.getLayerAdapter=function(t){return this.mapAdapter.layerAdapters[t]},t.prototype.locate=function(t,e){if(this.mapAdapter&&this.mapAdapter.locate)return this.mapAdapter.locate(t,e);return{stop:function(){return{}}}},t.prototype.stopGetCoordFromMapClick=function(){this._coordFromMapClickPromise&&this._coordFromMapClickPromise.cancel()},t.prototype.getCoordFromMapClick=function(){var t=this;return this._coordFromMapClickPromise?this.getCoordFromMapClick():(this._coordFromMapClickPromise=new S((function(e,n,i){var o=t.getCursor()||"grab";t._removeEventListeners({include:["click"]}),t.setCursor("crosshair");var r=function(){t.setCursor(o),t._addEventsListeners({include:["click"]}),t.mapAdapter.emitter.off("click",s),t._coordFromMapClickPromise=void 0},s=function(t){r(),R(t),e(t.lngLat)};t.mapAdapter.emitter.once("click",s),i(r)})),this._coordFromMapClickPromise)},t.prototype._emitStatusEvent=function(t,e){var n=t;this._eventsStatus[n]=!0,this.emitter.emit(n,e)},t.prototype._addLayerProviders=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2]}))}))},t.prototype._onLoadSync=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2]}))}))},t.prototype._setupMap=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:if(!this.mapAdapter)throw new Error("WebMap `mapAdapter` option is not set");return[4,this.mapAdapter.create(this.options)];case 1:return t.sent(),this._zoomToInitialExtent(),[4,this._addLayerProviders()];case 2:return t.sent(),[4,this._onLoadSync()];case 3:return t.sent(),this._emitStatusEvent("build-map",this.mapAdapter),[2,this]}}))}))},t.prototype._setTileJsonOptions=function(t){t.center&&(this.options.center=t.center),t.bounds&&(this.options.bounds=t.bounds),B(t.maxzoom)&&(this.options.zoom=t.maxzoom),B(t.minzoom)&&(this.options.zoom=t.minzoom),B(t.maxzoom)&&B(t.minzoom)&&(this.options.zoom=(t.maxzoom+t.minzoom)/2)},t.prototype._zoomToInitialExtent=function(){var t,e=(t=this.options).center,n=t.zoom,i=t.bounds;this._extent?this.fitBounds(this._extent):e&&n?this.setView(e,n):i&&this.fitBounds(i)},t.prototype._setInitMapState=function(t){for(var e=0,n=t;e<n.length;e++){var i=new(0,n[e])(this);this._mapState.push(i);for(var o=0,r=this.runtimeParams;o<r.length;o++){var s=r[o].get(i.name);if(void 0!==s){var a=i.parse(s);this._initMapState[i.name]=a,Object.defineProperty(this.options,i.name,{value:a,configurable:!0,enumerable:!0});break}}}},t.prototype._addEventsListeners=function(t){var e=this,n=["preclick","click","zoomstart","zoom","zoomend","movestart","move","moveend","mousemove","mouseout","mouseover"];t&&t.include&&(n=n.filter((function(e){return t.include.includes(e)}))),n.forEach((function(t){e._mapEvents[t]=function(n){if(e.runtimeParams.length){var i=e._mapState.find((function(e){return e.event===t}));if(i){var o=i.toString(i.getValue());e.runtimeParams.forEach((function(t){t.set(i.name,o)}))}}e._eventsStatus&&e.emitter.emit(t,n)};var n=e._mapEvents[t];n&&e.mapAdapter.emitter.on(t,n)}))},t.prototype._removeEventListeners=function(t){var e=this,n=Object.entries(this._mapEvents);t&&t.include&&(n=n.filter((function(e){return t.include.includes(e[0])}))),n.forEach((function(t){var n=t[1];n&&e.mapAdapter.emitter.removeListener(t[0],n)}))},t.keys=new Ot,t}());function Nt(t,e){var n=document.createElement("div"),i=!1;e.getStatus?i=e.getStatus():e.status&&(i=e.status);var o=e.title||"",r=e.html;function s(){o&&(n.title="string"==typeof o?o:i?o.on:o.off,n.setAttribute("aria-label",n.title))}function a(t){t instanceof HTMLElement?(n.innerHTML="",n.appendChild(t)):"string"==typeof t&&(n.innerHTML=t)}function u(){r&&("string"==typeof r||r instanceof HTMLElement?a(r):a(i?r.on:r.off),n.setAttribute("aria-label",n.title))}function h(t,e){t.split(" ").forEach((function(t){e?n.classList.add(t):n.classList.remove(t)}))}function l(){e.addClassOn&&h(e.addClassOn,i),e.addClassOff&&h(e.addClassOff,!i)}s(),u(),e.addClass&&h(e.addClass,!0),l();var c=function(t){void 0!==t&&(i=t),u(),s(),l()},p=function(t){if(i=void 0!==t?t:!i,e.onClick){var n=e.onClick(i);Promise.resolve(n).then((function(){return c()})).catch((function(){return i=!i}))}else c()},d=t({html:n,onClick:p});return d.onClick=p,d.changeStatus=c,d}var Rt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._loadControlQueue={"top-right":[],"bottom-right":[],"top-left":[],"bottom-left":[]},e._isControlLoading={"top-right":!1,"bottom-right":!1,"top-left":!1,"bottom-left":!1},e}return e(n,t),n.prototype.addControl=function(t,e,n){return o(this,void 0,void 0,(function(){var i,s=this;return r(this,(function(a){return e=null!=e?e:"top-left",(i="string"==typeof t?this.getControl(t,n):t)?[2,new Promise((function(t){s._setControlQueue(e,(function(){return o(s,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:return[4,i];case 1:return n=r.sent(),o=this.mapAdapter.addControl(n,e),t(o),[2]}}))}))}))}))]:[2]}))}))},n.prototype.createControl=function(t,e){return o(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,this.onLoad("build-map")];case 1:return n.sent(),this.mapAdapter.createControl?[2,this.mapAdapter.createControl(t,e)]:[2]}}))}))},n.prototype.createButtonControl=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.onLoad("build-map")];case 1:return e.sent(),this.mapAdapter.createButtonControl?[2,this.mapAdapter.createButtonControl(t)]:[2]}}))}))},n.prototype.createToggleControl=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.onLoad("build-map")];case 1:return e.sent(),this.mapAdapter.createToggleControl?[2,this.mapAdapter.createToggleControl(t)]:this.mapAdapter.createButtonControl?[2,Nt(this.mapAdapter.createButtonControl,t)]:[2]}}))}))},n.prototype.removeControl=function(t){var e=this;"remove"in t?t.remove():this.mapAdapter.removeControl&&Promise.resolve(t).then((function(t){e.mapAdapter.removeControl(t)}))},n.prototype.getControl=function(t,e){var i=this.mapAdapter.controlAdapters[t];if(i)return new i(e);var o=n.controls[t];return o?o(this,e):void 0},n.prototype.getControlContainer=function(){if(this.mapAdapter.getControlContainer)return this.mapAdapter.getControlContainer()},n.prototype._setControlQueue=function(t,e){this._loadControlQueue[t].push(e),this._isControlLoading[t]||this._applyControls(t)},n.prototype._applyControls=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return this._loadControlQueue[t].length?(this._isControlLoading[t]=!0,[4,(0,this._loadControlQueue[t][0])()]):[3,2];case 1:return e.sent(),this._loadControlQueue[t].splice(0,1),this._applyControls(t),[3,3];case 2:this._isControlLoading[t]=!1,e.label=3;case 3:return[2]}}))}))},n.controls={CONTROL:function(t,e){return t.createControl(e.control,e.options)},BUTTON:function(t,e){return t.createButtonControl(e)},TOGGLE:function(t,e){return t.createToggleControl(e)}},n}(Zt),jt={};var Dt=function(t){function n(e){var n=t.call(this,e)||this;return n._addControls(),jt[n.id]=n,n}return e(n,t),n.get=function(t){return function(t){return jt[t]}(t)},n.prototype._addLayerProviders=function(){var t,e,n,i,s,a;return o(this,void 0,void 0,(function(){var o,h,l,c,p,d,f,m,_,y,v,g;return r(this,(function(r){switch(r.label){case 0:r.trys.push([0,18,19,24]),o=!0,h=u(this._starterKits),r.label=1;case 1:return[4,h.next()];case 2:return l=r.sent(),(t=l.done)?[3,17]:(o=!1,(c=l.value).getLayerAdapters?[4,c.getLayerAdapters.call(c)]:[3,16]);case 3:if(!(p=r.sent()))return[3,16];r.label=4;case 4:r.trys.push([4,10,11,16]),d=!0,s=void 0,f=u(p),r.label=5;case 5:return[4,f.next()];case 6:return m=r.sent(),(i=m.done)?[3,9]:(d=!1,[4,(_=m.value).createAdapter(this)]);case 7:(y=r.sent())&&(this.mapAdapter.layerAdapters[_.name]=y),r.label=8;case 8:return d=!0,[3,5];case 9:return[3,16];case 10:return v=r.sent(),s={error:v},[3,16];case 11:return r.trys.push([11,,14,15]),d||i||!(a=f.return)?[3,13]:[4,a.call(f)];case 12:r.sent(),r.label=13;case 13:return[3,15];case 14:if(s)throw s.error;return[7];case 15:return[7];case 16:return o=!0,[3,1];case 17:return[3,24];case 18:return g=r.sent(),e={error:g},[3,24];case 19:return r.trys.push([19,,22,23]),o||t||!(n=h.return)?[3,21]:[4,n.call(h)];case 20:r.sent(),r.label=21;case 21:return[3,23];case 22:if(e)throw e.error;return[7];case 23:return[7];case 24:return[2]}}))}))},n.prototype._onLoadSync=function(){var t,e,n;return o(this,void 0,void 0,(function(){var i,o,s,a,h,l;return r(this,(function(r){switch(r.label){case 0:r.trys.push([0,8,9,14]),i=!0,o=u(this._starterKits),r.label=1;case 1:return[4,o.next()];case 2:if(s=r.sent(),t=s.done)return[3,7];if(i=!1,!(a=s.value).onLoadSync)return[3,6];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,a.onLoadSync.call(a,this)];case 4:return r.sent(),[3,6];case 5:return h=r.sent(),console.error(h),[3,6];case 6:return i=!0,[3,1];case 7:return[3,14];case 8:return l=r.sent(),e={error:l},[3,14];case 9:return r.trys.push([9,,12,13]),i||t||!(n=o.return)?[3,11]:[4,n.call(o)];case 10:r.sent(),r.label=11;case 11:return[3,13];case 12:if(e)throw e.error;return[7];case 13:return[7];case 14:return[2]}}))}))},n.prototype._addControls=function(){var t=this;this.options.controls&&this.options.controls.forEach((function(e){var n=e,o={};"string"==typeof e&&t.options.controlsOptions&&t.options.controlsOptions[e]&&void 0!==(o=t.options.controlsOptions[e]).control&&(n=o.control);var r=o.position,s=i(o,["position"]);t.addControl(n,r||"top-left",s)})),this._emitStatusEvent("controls:create")},n}(Rt);var Ft,Ut=function(){function t(e){var n;void 0===e&&(e={}),this.cache=[];var i=null!==(n=e.namespace)&&void 0!==n?n:"default";return t.instance[i]?t.instance[i]:(t.instance[i]=this,this)}return t.prototype.clean=function(){this.cache.length=0},t.prototype.all=function(){return this.cache},t.prototype.addFull=function(t,e,n){return this.add(t,e,n,!0)},t.prototype.add=function(t,e,n,i){var o=this,r=this._find(t,n);if(r)return r.value;var s=void 0;s=e instanceof Function?e():e;var a=n&&JSON.parse(JSON.stringify(J(n))),u={key:t,value:s,props:a,options:a};return i&&!Z(s)?s:(this.cache.push(u),s instanceof Promise?(s.catch((function(e){throw o.delete(t,n),e})),i&&s.then((function(e){return Z(e)||o.delete(t,n),e})),s):s)},t.prototype.match=function(t,e){var n=this._find(t,e);if(n)return n.value},t.prototype.matchAll=function(t,e){var n=this;return t?this.cache.filter((function(i){return n._filter(i,t,e)})).map((function(t){return t.value})):this.cache.map((function(t){return t.value}))},t.prototype.delete=function(t,e){var n=this,i=[];"string"==typeof t?i=this.cache.filter((function(i){return n._filter(i,t,e)})):i.push(t);for(var o=0,r=i;o<r.length;o++){var s=this.cache.indexOf(r[o]);this.cache.splice(s,1)}},t.prototype._find=function(t,e){var n=this;return this.cache.find((function(i){return n._filter(i,t,e)}))},t.prototype._filter=function(t,e,n){return t.key===e&&(!n||G(t.props||t.options||{},J(n)))},t.instance={},t}(),Wt=function(t){function n(e){var i=t.call(this)||this;return i.name="NetworkError",Object.setPrototypeOf(i,n.prototype),i.message="Unable to request ".concat(e,".\n Possibly invalid NGW URL entered or CORS not configured to get request from ").concat(location.origin),i}return e(n,t),n}(Error),Ht=function(t){function n(e){var i=t.call(this)||this;return i.name="NgwError",Object.assign(i,e),Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Error);function Vt(t){return"[object Object]"===Object.prototype.toString.call(t)}Ft=function(t,e,n,i,o){void 0===n&&(n={}),n.method=n.method||"GET";var r=new XMLHttpRequest;r.open(n.method||"GET",t,!0),"blob"===n.responseType&&(r.responseType=n.responseType);var s=function(){try{return JSON.parse(r.responseText)}catch(t){return r.responseText}};r.onload=function(){-1!==[401,403,404,422,500].indexOf(r.status)&&i(new Ht(s())),function(t){void 0===t&&(t=!1);var o=t?i:e;"blob"===n.responseType?o(r.response):r.responseText?o(s()):i({message:""})}()},r.onerror=function(e){i(0===r.status?new Wt(t):e)},r.upload.onprogress=function(t){t.lengthComputable&&(n.onProgress&&n.onProgress(t.loaded/t.total*100,t))};var a,u=n.headers;if(u)for(var h in u){var l=u[h];"string"==typeof l&&r.setRequestHeader(h,l)}if(void 0!==n.withCredentials&&(r.withCredentials=n.withCredentials),n.file){if((a=new FormData).append("file",n.file),n.data)for(var c in n.data)a.append(c,a[c])}else a=n.data?"string"==typeof n.data?n.data:JSON.stringify(n.data):null;o&&o((function(){r.abort()})),r.send(a)};var qt=/\{ *([\w_-]+) *\}/g;function Gt(t,e){return t.replace(qt,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for letiable "+t);return"function"==typeof i&&(i=i(e)),i}))}var Jt=function(t){function n(e){var i=t.call(this,e)||this;return i.name="ResourceNotFoundError",i.exception="nextgisweb.resource.exception.ResourceNotFound",Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Ht),Kt=function(t){function n(e){var i=t.call(this,e)||this;return i.name="InsufficientPermissionsError",i.exception="nextgisweb.core.exception.InsufficientPermissions",Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Ht),Yt=[];function Qt(t){Yt.push(t)}var Xt=["description"];function $t(t,e){void 0===e&&(e=""),e=e?e+"__":"";for(var n={},i=0,o=Object.entries(t);i<o.length;i++){var r=o[i],s=r[0],a=r[1];if(-1===Xt.indexOf(s))if(Vt(a))if("owner_user"===s){var u=$t(a,s);Object.assign(n,u)}else"parent"===s&&"id"in a&&(n.parent_id=a.id);else B(a)&&(n[e+s]=a)}return n}var te=function(){function t(t){this.connector=t,this.cache=new Ut}return t.prototype.getOne=function(t,e){var i=this,o=new Ut,r={},s=n(n({},e),{cache:!1});"string"==typeof t?r.keyname=t:"number"==typeof t?r.id=t:Vt(t)&&(void 0!==t.id?r.id=t.id:t.keyname&&(r.keyname=t.keyname));return o.addFull("resource",(function(){return"string"==typeof t?i._fetchResourceBy({keyname:t},s):"number"==typeof t?i._fetchResourceById(t,s):Vt(t)?i._fetchResourceBy(t,s):S.resolve(void 0)}),r)},t.prototype.getOneOrFail=function(t,e){return this.getOne(t,e).then((function(t){if(t)return t;throw new Jt}))},t.prototype.getId=function(t,e){return"number"==typeof t?S.resolve(t):"string"==typeof t||Vt(t)?this.getOne(t,e).then((function(t){if(t)return t.resource.id})):S.resolve(void 0)},t.prototype.getIdOrFail=function(t,e){return this.getId(t,e).then((function(t){if(void 0===t)throw new Error;return t}))},t.prototype.getMany=function(t,e){var i=this;return this._resourceCacheFilter(t).then((function(o){if(!o.length){var r={};return t.keyname?r.keyname=t.keyname:Object.assign(r,$t(t)),i.connector.get("resource.search",e,n({serialization:"full"},r)).then((function(t){if(t)for(var e=0,n=t;e<n.length;e++){var o=n[e];i.cache.add("resource.item",S.resolve(o),{id:o.resource.id})}return t}))}return o}))},t.prototype.getParent=function(t,e){var n=this;return this.getOne(t,e).then((function(t){return t?n.getOne(t.resource.parent.id,e):S.resolve(void 0)}))},t.prototype.getChildrenOf=function(t,e){var n=this;return this.getIdOrFail(t).then((function(t){return n._getChildrenOf(t,e)}))},t.prototype.update=function(t,e){var n=this;return this.getId(t).then((function(t){if(void 0!==t)return n.connector.put("resource.item",{data:e},{id:t})}))},t.prototype.delete=function(t){var e=this;return this.getId(t).then((function(t){if(void 0!==t)return e.connector.delete("resource.item",null,{id:t}).then((function(){e._cleanResourceItemCache(t)}))}))},t.prototype._getChildrenOf=function(t,e,i){var o=this;return void 0===i&&(i=[]),this.connector.get("resource.collection",n({cache:!0},e),{parent:t}).then((function(t){for(var n=[],r=0,s=t;r<s.length;r++){var a=s[r];o.cache.add("resource.item",S.resolve(a),{id:a.resource.id}),i.push(a),(null==e?void 0:e.recursive)&&a.resource.children&&n.push(o._getChildrenOf(a.resource.id,e,i))}return n.length?S.all(n).then((function(){return i})):i}))},t.prototype._cleanResourceItemCache=function(t){return o(this,void 0,void 0,(function(){var e,n,i,o,s,a,u,h;return r(this,(function(r){switch(r.label){case 0:e=this.cache.all(),n=[],i=0,o=e,r.label=1;case 1:return i<o.length?(a=(s=o[i]).options&&s.options.id,["resource.item","resource"].includes(s.key)&&void 0!==a?"number"!=typeof a?[3,2]:(a===t&&n.push(s),[3,4]):[3,4]):[3,5];case 2:return[4,this.getId(a)];case 3:r.sent()===t&&n.push(s),r.label=4;case 4:return i++,[3,1];case 5:for(u=0,h=n;u<h.length;u++)this.cache.delete(h[u]);return[2]}}))}))},t.prototype._fetchResourceById=function(t,e){var n=this;return this.cache.add("resource.item",(function(){return n.connector.get("resource.item",e,{id:t})}),{id:t}).catch((function(t){if(!(t instanceof Jt))throw t}))},t.prototype._fetchResourceBy=function(t,e){return this.getMany(t,e).then((function(t){return t[0]}))},t.prototype._resourceCacheFilter=function(t){return S.all(this.cache.matchAll("resource.item")).then((function(e){return e.filter((function(e){if(e)return t.keyname&&e.resource.keyname?t.keyname===e.resource.keyname:B(t.id)&&B(e.resource.id)?t.id===e.resource.id:G(t,e.resource)})),[]}))},t}(),ee=0,ne=function(){function t(t){this.options=t,this.id=ee++,this.emitter=new p.exports.EventEmitter,this.routeStr="/api/component/pyramid/route",this.activeRequests=[];var e=function(t){return Yt.find((function(e){if(e.options.baseUrl===t.baseUrl){if(!t.auth)return!0;if(e.options.auth)return G(e.options.auth,t.auth)}}))}(t);if(e)return e;this.options.route&&(this.routeStr=this.options.route),this.options.requestTransform&&(this.requestTransform=this.options.requestTransform),this.resources=new te(this),Qt(this)}return t.create=function(t){return new this(t)},t.prototype.setRequestTransform=function(t){this.requestTransform=t},t.prototype.setNgw=function(t){this.logout(),this.options.baseUrl=t,Qt(this)},t.prototype.connect=function(){var t=this,e=new Ut,n=this.options.auth;return e.add("route",(function(){return new S((function(e,i){var o=function(){return t.makeQuery(t.routeStr,{},{}).then((function(t){e(t)})).catch((function(t){i(t)}))};if(n){var r=n.login,s=n.password;if(r&&s)return t._login({login:r,password:s}).then((function(){return o()})).catch((function(t){return i(t)}))}return o()}))}),{id:this.id,auth:n,baseUrl:this.options.baseUrl})},t.prototype.login=function(t,e){return this.logout(),Qt(this),this._login(t,e)},t.prototype.logout=function(){var t;this.abort(),-1!==(t=Yt.indexOf(this))&&Yt.splice(t,1),this.options.auth=void 0,this.user=void 0,this.emitter.emit("logout"),this.resources.cache.clean()},t.prototype.getUserInfo=function(t,e){if(this.user&&this.user.id)return S.resolve(this.user);t&&(this.options.auth=t);var i=n({headers:this.getAuthorizationHeaders(t)},e);return this.makeQuery("/api/component/auth/current_user",{},i)},t.prototype.getAuthorizationHeaders=function(t){var e=this.makeClientId(t);if(e)return{Authorization:"Basic "+e}},t.prototype.makeClientId=function(t){if(t=t||this.options.auth){var e=t.password,n=unescape(encodeURIComponent("".concat(t.login,":").concat(e)));return window.btoa(n)}},t.prototype.abort=function(){for(var t=0,e=this.activeRequests;t<e.length;t++){e[t].cancel()}this.activeRequests=[]},t.prototype.getActiveApiRequests=function(){return a([],this.activeRequests,!0)},t.prototype.apiRequest=function(t,e,i){var o,r,s=this;void 0===e&&(e={}),void 0===i&&(i={});var u=i.method,h=i.headers,l=i.withCredentials,c=i.responseType,p=J(e=null!==(o=i.params)&&void 0!==o?o:e),d=function(){return function(t){var e=t.params;return new S((function(n,i){t.connector.connect().then((function(o){var r=o&&o[t.name];if(r){var s=(r=a([],r,!0)).shift();if(r.length){for(var u={},h=0;h<r.length;h++){var l=r[h];if(u[h]="{"+l+"}",void 0===e[l])throw new Error("`"+l+"` url api argument is not specified")}s&&(s=Gt(s,u))}if(e){var c=[],p=e.paramList;for(var d in Array.isArray(p)&&(delete e.paramList,p.forEach((function(t){c.push("".concat(t[0],"=").concat(t[1]))}))),e)-1===r.indexOf(d)&&c.push("".concat(d,"=").concat(e[d]));c.length&&(s=s+"?"+c.join("&"))}s?n(t.connector.makeQuery(s,e,t.requestOptions)):i(new Error("request url is not set"))}else n(void 0)})).catch((function(t){i(t)}))}))}({name:t,params:p,requestOptions:i,connector:s})};return i.cache&&"GET"===u?(new Ut).add(t,d,n({params:p},J({headers:h,withCredentials:l,responseType:c,baseUrl:this.options.baseUrl,userId:null===(r=this.user)||void 0===r?void 0:r.id}))):d()},t.prototype.post=function(t,e,n){return(e=e||{}).method="POST",this.apiRequest(t,n,e)},t.prototype.get=function(t,e,n){return(e=e||{}).method="GET",this.apiRequest(t,n,e)},t.prototype.patch=function(t,e,n){return(e=e||{}).method="PATCH",this.apiRequest(t,n,e)},t.prototype.put=function(t,e,n){return(e=e||{}).method="PUT",this.apiRequest(t,n,e)},t.prototype.delete=function(t,e,n){return(e=e||{}).method="DELETE",this.apiRequest(t,n,e)},t.prototype.makeQuery=function(t,e,n){if(void 0===n&&(n={}),t=(this.options.baseUrl?this.options.baseUrl:"")+t)return e&&(t=Gt(t,e)),t=encodeURI(Y(t)),this._loadData(t,n);throw new Error("Empty `url` not allowed")},t.prototype.getResource=function(t,e){return this.resources.getOne(t,e)},t.prototype.getResourceOrFail=function(t,e){return this.resources.getOneOrFail(t,e)},t.prototype.getResourceBy=function(t){return this.resources.getOne(t)},t.prototype.getResourceByKeyname=function(t){return this.resources.getOne(t)},t.prototype.getResourceById=function(t){return this.resources.getOne(t)},t.prototype.getResourceId=function(t,e){return this.resources.getId(t,e)},t.prototype.getResourceIdOrFail=function(t,e){return this.resources.getIdOrFail(t,e)},t.prototype.getResourcesBy=function(t,e){return this.resources.getMany(t,e)},t.prototype.getResourceParent=function(t,e){return this.resources.getParent(t,e)},t.prototype.getResourceChildren=function(t,e){return this.resources.getChildrenOf(t,e)},t.prototype.updateResource=function(t,e){return this.resources.update(t,e)},t.prototype.deleteResource=function(t){return this.resources.delete(t)},t.prototype._loadData=function(t,e){var i=this;e.responseType=e.responseType||"json";var o=new S((function(o,r,s){if(i.user&&((e=e||{}).headers=n(n({},i.getAuthorizationHeaders()),e.headers)),i.requestTransform){var a=i.requestTransform(t,e);t=a[0],e=a[1]}Ft(t,o,e,r,s)})).then((function(t){return i._cleanActiveRequests(o),t})).catch((function(t){if(i._cleanActiveRequests(o),t instanceof S.CancelError);else{var e=i._handleHttpError(t);if(e)throw e}}));return e.signal&&"function"==typeof e.signal.addEventListener&&e.signal.addEventListener("abort",(function(){o.cancel(),i._cleanActiveRequests(o)})),this.activeRequests.push(o),o},t.prototype._login=function(t,e){var n=this;return this.getUserInfo(t,e).then((function(t){return n.user=t,n.emitter.emit("login",t),t})).catch((function(t){throw n.emitter.emit("login:error",t),t}))},t.prototype._cleanActiveRequests=function(t){var e=this.activeRequests.indexOf(t);-1!==e&&this.activeRequests.splice(e,1)},t.prototype._handleHttpError=function(t){if(t&&t instanceof Ht){if("nextgisweb.resource.exception.ResourceNotFound"===t.exception)throw new Jt(t);if("nextgisweb.core.exception.InsufficientPermissions"===t.exception)throw new Kt(t)}return t},t.errors={NgwError:Ht,ResourceNotFoundError:Jt},t}();function ie(t){var e=t.extent_bottom,n=t.extent_left,i=t.extent_top,o=t.extent_right;if(e&&n&&i&&o){var r=[n,e,o,i];return r[3]>82&&(r[3]=82),r[1]<-82&&(r[1]=-82),r}}function oe(t){var e=t.cache;return t.connector.get("layer.extent",{cache:void 0===e||e},{id:t.resourceId}).then((function(t){if(t){var e=t.extent;return[e.minLon,e.minLat,e.maxLon,e.maxLat]}}))}function re(t){return t.connector.getResource(t.resourceId).then((function(e){if(e)return se(e,t.connector,t)}))}function se(t,e,i){if(t.webmap)return S.resolve(ie(t.webmap));var o=t.resource;return o.cls&&-1!==o.cls.indexOf("style")?e.getResource(o.parent.id).then((function(t){if(t)return oe(n(n({},i),{resourceId:t.resource.id,connector:e}))})):oe(n(n({},i),{resourceId:o.id,connector:e}))}var ae=function(){function t(){}return t.prototype.getExtent=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.getBounds()]}))}))},t.prototype.getBounds=function(t){return o(this,void 0,void 0,(function(){var e;return r(this,(function(n){switch(n.label){case 0:return this._extent?[2,this._extent]:this.item?(e=this,[4,se(this.item,this.connector,t)]):[3,2];case 1:return e._extent=n.sent(),[2,this._extent];case 2:return[2]}}))}))},t}();var ue=["fields","intersects","limit","orderBy","strategy"];function he(t){var e={};return ue.forEach((function(n){var i=t[n];void 0!==i&&(e[n]=i)})),e}function le(t,e){return o(this,void 0,void 0,(function(){var n,i,o,s,a;return r(this,(function(r){switch(r.label){case 0:return i=n=t.resource,o=t.keyname,s=t.resourceId,n?"string"!=typeof n?[3,1]:(o=n,[3,5]):[3,5];case 1:return"number"!=typeof n?[3,2]:(s=n,[3,5]);case 2:return i.resource&&void 0!==i.resource&&"resource"in i?(s=n.resource.id,[3,5]):[3,3];case 3:return[4,le(n,e)];case 4:s=r.sent(),r.label=5;case 5:return s||!o?[3,7]:[4,e.getResource(o)];case 6:(a=r.sent())&&(s=a.resource.id),r.label=7;case 7:return[2,s]}}))}))}var ce={srs:4326,geom_format:"geojson"};function pe(t){return{geometry:t.geom,id:t.id,type:"Feature",properties:t.fields}}function de(t,e){var n=e.extensions,i=e.geom,o=e.fields,r=e.srs,s=e.ilike,a=e.like,u=n?n.join(","):"";"*"!==u&&(t.extensions=u),void 0!==o&&(t.fields=Array.isArray(o)?o.join(","):""),void 0!==i&&(t.geom=i?"yes":"no",i||(delete t.srs,delete t.geom_format)),B(s)?t.ilike=s:B(a)&&(t.like=a),B(r)&&(t.srs=r)}function fe(t){var e=_e(t);return S.all(e).then((function(e){for(var n=[],i=[],o=0,r=e;o<r.length;o++)for(var s=0,a=r[o];s<a.length;s++){var u=a[s];n.includes(u.id)||(i.push(u),n.push(u.id))}return t.offset||t.limit?i.splice(void 0!==t.offset?t.offset:0,void 0!==t.limit?t.limit:i.length):i}))}function me(t){var e=t[0],n=t[1],i=t[2],o="id"!==e?"fld_":"",r="",s="",a=String(e).trim().replace(/^(%?)(.+?)(%?)$/,(function(t,e,n,i){return r=e,s=i,n})),u=r+i+s;return["".concat(o).concat(a,"__").concat(n),u]}function _e(t,e,i){void 0===e&&(e=[]),void 0===i&&(i=[]);var o=t.filters,r="string"==typeof o[0]?o[0]:"all",s=o.filter((function(t){return Array.isArray(t)}));if("any"===r)for(var u=0,h=s;u<h.length;u++){gt(f=h[u])?e.push(ve(n(n({},t),{paramList:a(a([],i,!0),[me(f)],!1)}))):_e(n(n({},t),{filters:f}),e,a([],i,!0))}else if("all"===r){for(var l=[],c=[],p=0,d=s;p<d.length;p++){var f;gt(f=d[p])?l.push(me(f)):c.push(f)}if(c.length)for(var m=0,_=c;m<_.length;m++){var y=_[m];_e(n(n({},t),{filters:y}),e,a(a([],i,!0),l,!0))}else e.push(ve(n(n({},t),{paramList:a(a([],i,!0),l,!0)})))}return e}function ye(t){var e=t.map((function(t){var e=V(t[0],t[1]).map((function(t){return e=t,i=n?Number("1e+"+n):1,Math.round((e+Number.EPSILON)*i)/i;var e,n,i}));return e[0]+" "+e[1]}));return"POLYGON((".concat(e.join(", "),"))")}function ve(t){var e=n({},ce),i=t.limit,o=t.cache,r=t.signal,s=t.offset,a=t.orderBy,u=t.paramList,h=t.connector,l=t.geomFormat,c=t.intersects,p=t.resourceId;if(i?i!==Number.POSITIVE_INFINITY&&(e.limit=i):e.limit=7e3,s&&(e.offset=s),l&&(e.geom_format=l),de(e,t),a&&(e.order_by=a.join(",")),Array.isArray(c)){var d=function(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))}(c)?U(c):c;e.intersects=ye(d)}else"string"==typeof c&&(e.intersects=c);u&&(e.paramList=u);var f=n({id:p},e);return h.get("feature_layer.feature.collection",{cache:o,signal:r},f)}function ge(t){var e,n=function(){var n=t[e];if(K(n)){var i=n;if(B(i.year)&&B(i.month)&&B(i.day)){var o=[i.year,i.month-1,i.day];"hour"in i&&[i.hour,i.minute,i.second].forEach((function(t){o.push(t)})),t[e]=(new(Date.bind.apply(Date,a([void 0],o,!1)))).toISOString()}}else"id"===e&&"string"==typeof n&&(t[e]=n.split(",").map(Number))};for(e in t)n();return t}function be(t){var e=t.filters;return e?fe(n(n({},t),{filters:e})).then((function(i){var o;return(null!==(o=t.clientFilterValidate)&&void 0!==o?o:we(e))&&(i=i.filter((function(t){return bt(ge(n(n({},t.fields),{id:t.id})),e)}))),i})):ve(t)}function we(t){if("any"===t[0])return!0;for(var e=1;e<t.length;e++){var n=t[e];if("[object Array]"===Object.prototype.toString.call(n))if(we(n))return!0}return!1}function xe(t){return function(t){return be(t).then((function(t){var e=[];return t.forEach((function(t){e.push(pe(t))})),e}))}(t).then((function(t){return{type:"FeatureCollection",features:t}}))}function Le(t){var i,s;return o(this,void 0,void 0,(function(){var a,u,h,l,c,d,f,m,_,y,v,g,b,w,x,L,P=this;return r(this,(function(M){switch(M.label){case 0:return a=t.item,u=t.webMap,c=null==(l=t.addLayerOptionsPriority)||l,f=t.Adapter||u.mapAdapter.layerAdapters.GEOJSON,m=[],_=!1,[4,le(d=t.layerOptions,h=t.connector)];case 1:return g=M.sent(),(null===(s=null===(i=d.adapterOptions)||void 0===i?void 0:i.popupOptions)||void 0===s?void 0:s.fromProperties)&&(d.adapterOptions.popupOptions.createPopupContent=function(t){var e=t.feature;return e&&function(t,e){var n=document.createElement("div");if(e&&e.feature_layer)e.feature_layer.fields.forEach((function(e){if(e.grid_visibility){var i=t.properties&&t.properties[e.keyname];if(i){var o=document.createElement("div");n.appendChild(o),o.innerHTML="<span>".concat(e.display_name,"</span>: ").concat(i,"<span></span>")}}}));else if(t.properties)for(var i in t.properties){var o=document.createElement("div");n.appendChild(o),o.innerHTML="<span>".concat(i,"</span>: ").concat(t.properties[i],"<span></span>")}return n}(e,a)}),b=function(t,e){return o(P,void 0,void 0,(function(){return r(this,(function(i){switch(i.label){case 0:return x(),y={filters:t,options:e},[4,v=xe(n({resourceId:g,filters:t,connector:h,cache:!0},e))];case 1:return[2,i.sent()]}}))}))},w=!1,x=function(){v&&(v.cancel(),v=void 0)},L=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.emitter=new p.exports.EventEmitter,e}return e(i,t),i.prototype.addLayer=function(e){return o(this,void 0,void 0,(function(){var i,o,s,u,h;return r(this,(function(r){switch(r.label){case 0:return i=!e.data,o=void 0===e.waitFullLoad||e.waitFullLoad,void 0!==d.id&&(e.id=d.id),a&&a.vector_layer&&(e.type=en[a.vector_layer.geometry_type]),d.adapterOptions&&(e=c?n(n({},d.adapterOptions),e):n(n({},e),d.adapterOptions)),e.data&&0===Object.keys(e.data).length&&(e.data=void 0,i=!1),this.options.strategy=s=e.strategy||void 0,u=t.prototype.addLayer.call(this,e),y={filters:e.propertiesFilter,options:he(e)},i&&(h=this.updateLayer()),o&&h?[4,h]:[3,2];case 1:r.sent(),r.label=2;case 2:return s&&s.startsWith("BBOX")&&!_&&this._addBboxEventListener(),[2,u]}}))}))},i.prototype.getExtent=function(){return this.getBounds()},i.prototype.getBounds=function(){return o(this,void 0,void 0,(function(){var e,n;return r(this,(function(i){return e=this.getLayers&&this.getLayers().length,(null==(n=this.options.strategy)?void 0:n.startsWith("BBOX"))||e?[2,re({connector:h,resourceId:a.resource.id})]:t.prototype.getBounds?[2,t.prototype.getBounds.call(this)]:[2]}))}))},i.prototype.beforeRemove=function(){w=!0,this._removeMoveEventListener(),this._removeBboxEventListener(),this.__disableMapMoveListener=void 0,this.__enableMapMoveListener=void 0,this.__onMapMove=void 0,this.__onMapMoveStart=void 0,x()},i.prototype.getCount=function(){return function(t){var e=t.cache;return t.connector.get("feature_layer.feature.count",{cache:void 0===e||e},{id:t.resourceId}).then((function(t){return t.total_count}))}({connector:h,resourceId:g,cache:!0})},i.prototype.updateLayer=function(e){var i;return o(this,void 0,void 0,(function(){var o,s,a,h,l,c,p,f,v,g,x;return r(this,(function(r){switch(r.label){case 0:return e=e||y||{},(null===(i=this.options.strategy)||void 0===i?void 0:i.startsWith("BBOX"))?[4,u.onLoad("create")]:[3,2];case 1:if(r.sent(),e.options=e.options||{},e.options.intersects=u.getBounds(),s=(o=this.options).minZoom,a=o.maxZoom,void 0!==(h=u.getZoom())){if(void 0!==s&&h<s)return[2];if(void 0!==a&&h>a)return[2];if(_)return[2]}r.label=2;case 2:if(w)return[2];r.label=3;case 3:return r.trys.push([3,10,,11]),this.emitter.emit("preupdate",e),u._emitLayerEvent("layer:preupdate",d.id||"",e),[4,b(e.filters,n(n({},e.options),{srs:this.options.srs}))];case 4:return l=r.sent(),c=l,[4,this.getCount()];case 5:if(p=r.sent(),"BBOX+"!==this.options.strategy)return[3,7];for(c={type:"FeatureCollection",features:[]},f=0,v=l.features;f<v.length;f++)g=v[f],-1===m.indexOf(String(g.id))&&(m.push(String(g.id)),c.features.push(g));return _=void 0!==p&&m.length>=p,[4,u.addLayerData(this,c)];case 6:return r.sent(),[3,9];case 7:return _=void 0!==p&&l.features.length>=p,[4,u.setLayerData(this,l)];case 8:r.sent(),r.label=9;case 9:return this.emitter.emit("updated",l),u._emitLayerEvent("layer:updated",d.id||"",{data:l,newData:c,isFull:_}),[3,11];case 10:if((x=r.sent())instanceof Error&&"CancelError"!==x.name)throw x;return[3,11];case 11:return t.prototype.updateLayer&&t.prototype.updateLayer.call(this),[2]}}))}))},i.prototype.propertiesFilter=function(t,e){return o(this,void 0,void 0,(function(){var i;return r(this,(function(o){switch(o.label){case 0:return x(),this.filter&&_?(this.filter((function(e){var i=e.feature&&e.feature.properties&&ge(n({},e.feature.properties));return!i||bt(i,t)})),[3,3]):[3,1];case 1:return this.setData?(this.clearLayer&&this.clearLayer(),[4,b(t,n(n({},e),{srs:this.options.srs}))]):[3,3];case 2:i=o.sent(),this.setData(i),o.label=3;case 3:return[2]}}))}))},i.prototype.removeFilter=function(){y=void 0,this.propertiesFilter([]),this.filter&&this.filter((function(){return!0}))},i.prototype._addBboxEventListener=function(){var t=this;this.__enableMapMoveListener=function(e){e===t&&(t._removeMoveEventListener(),t.updateLayer(),t._addMoveEventListener())},this.__disableMapMoveListener=function(e){e===t&&t._removeMoveEventListener()},u.emitter.on("layer:show",this.__enableMapMoveListener),u.emitter.on("layer:hide",this.__disableMapMoveListener),this.__enableMapMoveListener(this)},i.prototype._removeBboxEventListener=function(){this.__enableMapMoveListener&&u.emitter.on("layer:show",this.__enableMapMoveListener),this.__disableMapMoveListener&&u.emitter.on("layer:hide",this.__disableMapMoveListener)},i.prototype._addMoveEventListener=function(){var t=this;this.__onMapMove=j((function(){return t.updateLayer()})),this.__onMapMoveStart=x,u.emitter.on("movestart",this.__onMapMoveStart),u.emitter.on("moveend",this.__onMapMove)},i.prototype._removeMoveEventListener=function(){this.__onMapMove&&u.emitter.removeListener("moveend",this.__onMapMove),this.__onMapMoveStart&&u.emitter.removeListener("movestart",this.__onMapMoveStart)},i}(f),[2,L]}}))}))}function Pe(t){var e,n,i=t.options,o=t.webMap,r=t.baseUrl,s=i.adapter||"IMAGE",a=o&&o.getLayerAdapters(),u=i.resource,h=i.tileNoData?i.tileNoData:200;if("number"==typeof u){if("IMAGE"===s){if(!a||a.IMAGE)return function(t){var e=t.resourceId,n=t.nd,i=t.headers,o=t.baseUrl+"/api/component/render/image",r={resource:e};return n&&(r.nd=n),{url:o,resourceId:e,headers:i,params:r,updateWmsParams:function(t){return n&&(t.nd=n),$e(t,e)}}}({resourceId:u,headers:i.headers,nd:h,baseUrl:r});s="TILE"}if("WMS"===s){n="".concat(r,"/api/resource/").concat(u,"/wms");var l=i.adapterOptions;return{url:n,format:"image/png",version:"1.1.1",layers:l&&l.layers,headers:i.headers}}if("MVT"===s)return{url:n=r+"/api/component/feature_layer/mvt?x={x}&y={y}&z={z}&resource="+u+"&simplification="+(null!==(e=i.simplification)&&void 0!==e?e:6),sourceLayer:"ngw:"+u,featureIdName:"$id"};if("TERRAIN"===s)return{url:n=r+"/api/resource/".concat(u,"/terrain_provider"),adapter:s};if("MODEL_3D"===s)return{url:n=r+"/api/component/model_3d/".concat(u,"/data.glb")};if("TILE"===s)return{url:n=r+"/api/component/render/tile?z={z}&x={x}&y={y}&resource="+u+"&nd="+h,adapter:s}}else{if(void 0!==u)throw new Error("Option `resource` must be number, not "+typeof u);console.log("Option `resource` not set")}}function Me(t){var i=t.layerOptions,s=t.webMap,a=t.connector,u=t.item;return o(this,void 0,void 0,(function(){var t,h,l,c,p,d;return r(this,(function(f){switch(f.label){case 0:return t=u.resource.cls,h={wmsserver_service:"WMS",tmsclient_layer:"IMAGE"},void 0!==(l=i.adapter||t&&h[t]||"IMAGE")&&(i.adapter=l),"IMAGE"===l&&(c=s.getLayerAdapters(),!c||c.IMAGE||(l="TILE")),(p=s.mapAdapter.layerAdapters[l])?[4,le(i,a)]:[3,2];case 1:return d=f.sent(),[2,function(t){function h(e,o){var r=t.call(this,e,o)||this;r.map=e,r.item=u,r.resourceId=d;var h=Pe({options:i,webMap:s,baseUrl:a.options.baseUrl||""});if(h){var l=n(n(n({},h),i.adapterOptions),{params:{resource:d},layers:h.layers||String(d),resourceId:d});i.adapterOptions&&B(i.adapterOptions.setViewDelay)&&(l.setViewDelay=i.adapterOptions.setViewDelay),r.options=n(n({},r.options),l)}return r}return e(h,t),h.prototype.addLayer=function(e){return t.prototype.addLayer.call(this,n(n({},this.options),e))},h.prototype.getIdentificationIds=function(){return o(this,void 0,void 0,(function(){var t;return r(this,(function(e){if(this.item){if("MVT"===l)return[2,[this.item.resource.id]];if(B(t=this.item.resource.parent.id))return[2,[t]]}return[2,[]]}))}))},h}(p)];case 2:throw new Error(l+" not supported yet. Only TILE")}}))}))}function Ce(t,e,n,i){return!!Te(t,e,n,Oe,i)}function ke(t,e,n,i){return Te(t,e,n,Ee,i)}function Ae(t,e){void 0===e&&(e="children");var n=[],i=("function"==typeof e?e:function(t){return t[e]})(t);return i&&(Array.isArray(i)?n=i:n.push(i)),i?n:void 0}function Te(t,e,n,i,o){void 0===e&&(e=function(t){return!!t}),void 0===n&&(n="children");var r="function"==typeof e?e:function(t){return bt(t,e)};return i(t,o?function(t){return r(o(t))}:r,n)}function Oe(t,e,n,i){void 0===e&&(e=function(t){return!!t});var o=[];if(Array.isArray(t))o=t;else{if(e(t))return t;var r=Ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++)if(o[s]){var a=Oe(o[s],e,n);if(a)return a}}function Ee(t,e,n,i){void 0===e&&(e=function(t){return!!t}),void 0===i&&(i=[]);var o=[];if(Array.isArray(t))o=t;else{e(t)&&i.push(t);var r=Ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++)o[s]&&Ee(o[s],e,n,i);return i}function Ie(t,e,n,i){void 0===e&&(e=function(t){return!!t});var o=[];if(Array.isArray(t))o=t;else{if(!e(t))return!1;var r=Ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++){if(o[s])if(!Ie(o[s],e,n))return!1}return!0}var Se=function(){function t(t){this._children=[],this.item=t}return t.prototype.setParent=function(t){this._parent=t},t.prototype.addChild=function(t){this._children.push(t)},t.prototype.getParent=function(){return this._parent},t.prototype.getParents=function(t){var e=this.getParent();return e?ke(e,t,(function(t){return t.tree.getParent()})):[]},t.prototype.getRoot=function(){for(var t=this.getParent(),e=t;t;)(t=t.tree.getParent())&&(e=t);return e},t.prototype.find=function(t){return Te(this._children,t,(function(t){return t.tree.getChildren()}),Oe,e);var e},t.prototype.every=function(t){return!!Te(this._children,t,(function(t){return t.tree.getChildren()}),Ie,e);var e},t.prototype.some=function(t){return Ce(this._children,t,(function(t){return t.tree.getChildren()}))},t.prototype.all=function(t){return this.getDescendants(t)},t.prototype.getDescendants=function(t){return ke(this._children,t,(function(t){return t.tree.getChildren()}))},t.prototype.getChildren=function(){return a([],this._children,!0)},t}(),ze=function(){function t(t,e,n){this.emitter=new p.exports.EventEmitter,this._blocked=!1,this.item=e,this.options=Object.assign({},n),this.name=t,this._value=this.getProperty()}return t.prototype.getProperty=function(){return"function"==typeof this.options.getProperty?this.options.getProperty.call(this,this.item):this.options.value},t.prototype.getParents=function(){return this.item.tree.getParents()||[]},t.prototype.getParent=function(){return this.item.tree.getParent()},t.prototype.getChildren=function(){return this.item.tree.getChildren()},t.prototype.isGroup=function(){return this.item.tree.getDescendants().length},t.prototype.isBlocked=function(){if(void 0!==this._blocked)return this._blocked;var t=this.item.tree.getParents();return this._blocked=this._calculateBlockedStatus(t),this._blocked},t.prototype.set=function(t,e){this._value=this._prepareValue(t),this.update(this._value,e),this._fireChangeEvent(this._value,e)},t.prototype.get=function(){return this.getValue()},t.prototype.update=function(t,e){this._callOnSet(t,e)},t.prototype.getContainer=function(){return this._container},t.prototype.destroy=function(){if(this._container){var t=this._container.parentNode;t&&t.removeChild(this._container)}this._removeEventsListener&&this._removeEventsListener()},t.prototype.getValue=function(){return void 0!==this._value?this._value:this.getProperty()},t.prototype._prepareValue=function(t){return t},t.prototype._callOnSet=function(t,e){this.options.onSet&&this.options.onSet.call(this,t,e,this.item)},t.prototype._fireChangeEvent=function(t,e){var n=this;this.emitter&&(t=void 0!==t?t:this.getValue(),this.emitter.emit("change",{value:t,options:e}),this.item.tree.getParents().forEach((function(i){var o=i.properties&&i.properties.property(n.name);o&&o.emitter.emit("change-tree",{value:t,options:e,item:n.item})})))},t.prototype._calculateBlockedStatus=function(t){var e=this;return t.some((function(t){var n,i=null===(n=t.properties)||void 0===n?void 0:n.property(e.name);return!!i&&!i.get()}))},t}(),Be=function(t){function i(e,o,r){var s=t.call(this,e,o,n(n({},i.options),r))||this;return s.set(s.get()),s}return e(i,t),i.prototype.update=function(t,e){if(t){if(e&&e.bubble||this.options.bubble){this.unBlock(e);var n=this.getParent(),i=n&&n.properties&&n.properties.property(this.name);i&&i.set(t,Object.assign({},e,{bubble:!0,propagation:!1}))}this.isBlocked()||this._turnOn(e)}else this._turnOff(e);(e&&e.propagation||this.options.propagation)&&this._propagation(t,e)},i.prototype.getHierarchyValue=function(){var t=this;return this.get()&&this.getParents().every((function(e){var n=e.properties&&e.properties.get(t.name);return n&&n.get()}))},i.prototype.block=function(t){this._blocked=!0,this._block(t)},i.prototype.unBlock=function(t){this._blocked=!1,this.getValue()&&this._unBlock(t)},i.prototype.blockChild=function(t){var e=this;this.item.tree.getDescendants().forEach((function(n){return e._blockChild(n,t)}))},i.prototype.unblockChild=function(t){var e=this;this.item.tree.getChildren().forEach((function(n){return e._unBlockChild(n,t)}))},i.prototype._prepareValue=function(t){return t},i.prototype._turnOff=function(t){this.options.turnOff&&this.options.turnOff.call(this,t),this._callOnSet(!1,t),this.options.hierarchy&&this.isGroup()&&this.blockChild(t)},i.prototype._turnOn=function(t){this.options.turnOn&&this.options.turnOn.call(this,t),this._callOnSet(!0,t),this.options.hierarchy&&this.isGroup()&&this.unblockChild(t)},i.prototype._block=function(t){this._turnOff(t)},i.prototype._unBlock=function(t){this._turnOn(t)},i.prototype._blockChild=function(t,e){var n=t.properties&&t.properties.property(this.name);n&&n.block&&n.block(e)},i.prototype._unBlockChild=function(t,e){var n=t.properties&&t.properties.property(this.name);n&&n.unBlock&&n.unBlock(e)},i.prototype._propagation=function(t,e){if(this.isGroup())for(var i=this.item.tree.getChildren(),o=0;o<i.length;o++){var r=i[o],s=r.properties&&r.properties.property(this.name);s&&s.set(t,n(n({},e),{propagation:!0,bubble:!1}))}},i.options={hierarchy:!0,bubble:!1,propagation:!1,label:"Toggle"},i}(ze),Ze=function(){function t(t,e){this.item=t,this.options={},this._properties={},this._propertiesList=[],e&&e.forEach(this._setPropertyHandler.bind(this))}return t.prototype.add=function(t){this._setPropertyHandler(t)},t.prototype.update=function(){this.list().forEach((function(t){return t.update()}))},t.prototype.get=function(t){var e=this.property(t);return e?e.get():void 0},t.prototype.set=function(t,e,n){var i=this.property(t);i&&i.getValue()!==e&&i.set(e,n)},t.prototype.property=function(t){return this._properties[t]},t.prototype.list=function(){var t=this;return this._propertiesList.map((function(e){return t._properties[e]}))},t.prototype.destroy=function(){for(var t in this._properties){var e=this.property(t);e&&e.destroy&&e.destroy()}this._properties={},this._propertiesList=[]},t.prototype._setPropertyHandler=function(t){var e=this._getHandler(t);if(e&&t.name){var i=n({},t);this._properties[t.name]=new e(t.name,this.item,i),this._propertiesList.push(t.name)}},t.prototype._getHandler=function(e){var n=e.handler;return!n&&e.type?"boolean"===e.type?t.handlers.CheckProperty:t.handlers.BaseProperty:n},t.handlers={CheckProperty:Be},t}(),Ne=0,Re=function(){function t(t){this.options={},this.id=Ne,Ne+=1,this.options=n({},t),this.tree=new Se(this)}return t.prototype.initProperties=function(){this.properties=new Ze(this,this.options.properties)},t}(),je=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getProperty=function(){var t=this.item.layer;return t&&t&&t.options&&void 0!==t.options.opacity?t.options.opacity:1},n.prototype.update=function(t,e){var n=this;if(e=e||{},this.isGroup()){this._value=this._prepareValue(t,e);for(var i=0,o=this.getChildren();i<o.length;i++){var r=o[i].properties.property(this.name);r&&(e.propagation?r.set(t,e):r.update(r.get(),e))}}var s=this.item.layer;if(s){var a=this.getParents().reduce((function(t,e){var i=e.properties.property(n.name);return t*(i?i.getValue():1)}),1);this.item.webMap.setLayerOpacity(s,this._prepareValue(t*a))}},n.prototype._prepareValue=function(t,e){return e&&e.propagation&&this.isGroup()?1:Number(t)},n}(ze),De=function(t){function i(e,o,r,s,a,u){var h=t.call(this,n(n({},i.options),r))||this;if(h.webMap=e,h.emitter=new p.exports.EventEmitter,h._rootDescendantsCount=0,s&&(h.connector=s),a&&h.tree.setParent(a),h.item=o,"root"===h.item.item_type)h._rootDescendantsCount=h._sumUp(h.item.children);else{var l=h.tree.getRoot();l&&(h._rootDescendantsCount=l._rootDescendantsCount)}return h.initProperties(),u||h._init(o),h}return e(i,t),i.create=function(t,e,n,s,a){return o(this,void 0,void 0,(function(){var o;return r(this,(function(r){switch(r.label){case 0:return[4,(o=new i(t,e,n,s,a,!0))._init(e)];case 1:return r.sent(),[2,o]}}))}))},i.prototype.initItem=function(t){var e=this,n=t,o=this.getItemOptions(t),r=function(t){n._layer=t,e.layer=t,e.properties.get("visibility")&&e.properties.set("visibility",!0),void 0!==o.opacity&&e.webMap.setLayerOpacity(t,o.opacity)};if("group"===t.item_type||"root"===t.item_type){if(t.children&&t.children.length)for(var s=0,a=this.getChildren(t);s<a.length;s++){var u=new this.constructor(this.webMap,a[s],this.options,this.connector,this);this.tree.addChild(u)}return Promise.resolve()}var h=void 0;if("layer"===t.item_type)h=t.adapter||t.layer_adapter.toUpperCase();else if(i.GetAdapterFromLayerType[t.item_type]){h=(0,i.GetAdapterFromLayerType[t.item_type])(t,o,this.webMap,this.connector)}return h?this.webMap.addLayer(h,o).then((function(t){r(t)})):t._layer?Promise.resolve(r(t._layer)):Promise.reject("No layer added")},i.prototype.bringToFront=function(){},i.prototype.fit=function(){},i.prototype.getLayer=function(){return this.layer},i.prototype.getItemOptions=function(t){var e,n="layer"===t.item_type&&t.layer_transparency,i="number"==typeof n?(100-n)/100:void 0,o={visibility:!1,headers:this.options.headers,crossOrigin:this.options.crossOrigin,setViewDelay:this.options.setViewDelay,params:{resource:this.item.resourceId,item:this.item}};if(this.options.order){var r=String(this.options.drawOrderEnabled&&"draw_order_position"in t?this._rootDescendantsCount-t.draw_order_position:this.id).padStart(4,"0");o.order=Number((0|this.options.order)+"."+r)}if(this.options.popupOptions&&(o.popupOptions=this.options.popupOptions),"layer"===t.item_type){var s=(e=this._getZoomRange(t)).maxZoom;!function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var i=0,o=e;i<o.length;i++)for(var r=o[i],s=0,a=Object.getOwnPropertyNames(r);s<a.length;s++){var u=a[s];t[u]=r[u]}}(o,{updateWmsParams:t.updateWmsParams,url:t.url,headers:this.options.headers,ratio:this.options.ratio,maxZoom:s,minZoom:e.minZoom,minScale:t.layer_min_scale_denom,maxScale:t.layer_max_scale_denom})}return void 0!==i&&(o.opacity=i),o},i.prototype.getChildren=function(t){return a([],t.children,!0).reverse()},i.prototype._mapScaleToZoomLevel=function(t){return function(t,e){void 0===e&&(e=0);var n=e,i=function(){if(void 0===tn){var t=document.createElement("div");t.style.cssText="position: absolute; left: -100%; top: -100%; width: 100cm;",document.body.appendChild(t);var e=t.offsetWidth;document.body.removeChild(t),tn=e}return tn}()*function(t){return 12756274*Math.PI*Math.cos(t*Math.PI/180)}(n)/t;return function(t){return Math.log(t/256)/Math.LN2}(i)}(t)},i.prototype._getZoomRange=function(t){var e=this.options.minZoom,n=this.options.maxZoom,i=t.layer_min_scale_denom?this._mapScaleToZoomLevel(t.layer_min_scale_denom):void 0,o=t.layer_max_scale_denom?this._mapScaleToZoomLevel(t.layer_max_scale_denom):void 0,r=[e,i].filter(Boolean),s=[n,o].filter(Boolean);return{minZoom:r.length?Math.max.apply(Math,r):void 0,maxZoom:s.length?Math.min.apply(Math,s):void 0}},i.prototype._init=function(t){var e=this;this.initItem(t).then((function(){e.emitter.emit("init")}))},i.prototype._sumUp=function(t,e){void 0===e&&(e=0);for(var n=0,i=t;n<i.length;n++){var o=i[n];"layer"===o.item_type?(e+=1,o.draw_order_position=o.draw_order_position||e):"group"===o.item_type&&(e=this._sumUp(o.children,e))}return e},i.GetAdapterFromLayerType={},i.options={properties:[{type:"boolean",name:"visibility",getProperty:function(t){if(t){if("group"===t.item.item_type||"root"===t.item.item_type)return Ce(t.item,(function(t){return"layer_enabled"in t&&t.layer_enabled}),(function(t){return t.children}));if("layer"===t.item.item_type)return t.item.layer_enabled}return!1},onSet:function(t,e,n){n&&"layer"===n.item.item_type&&(n.layer&&(t?n.webMap.showLayer(n.layer):n.webMap.hideLayer(n.layer)),n.item.layer_enabled=t)}},{name:"opacity",handler:je}]},i}(Re);function Fe(t){var e=t.webMap,i=t.connector,s=t.item,a=t.adapterOptions,u=void 0===a?{}:a,h=t.idPrefix,l=void 0===h?"first-show-adapter":h;return o(this,void 0,void 0,(function(){var t;return r(this,(function(a){return t=function(t){var e=t.webMap,i=t.adapterOptions,s=void 0===i?{}:i,a=t.onLayerAdded,u=t.createAdapter;return o(this,void 0,void 0,(function(){var t;return r(this,(function(i){return t=function(){function t(){this.options={},this.layer=[],this._removed=!1,this._creatingInProgress=!1}return t.prototype.addLayer=function(){return this.layer},t.prototype.removeLayer=function(){this._removed=!0;for(var t=0,n=this.layer;t<n.length;t++)e.removeLayer(n[t])},t.prototype.destroyed=function(){return this._removed},t.prototype.showLayer=function(){return o(this,void 0,void 0,(function(){var t,n;return r(this,(function(i){switch(i.label){case 0:if(this.options.visibility=!0,!this.layer.length)return[3,5];t=0,n=this.layer,i.label=1;case 1:return t<n.length?[4,e.showLayer(n[t])]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[3,7];case 5:return[4,this.loadLayer()];case 6:i.sent(),i.label=7;case 7:return[2]}}))}))},t.prototype.hideLayer=function(){return o(this,void 0,void 0,(function(){var t,n;return r(this,(function(i){switch(i.label){case 0:if(this.options.visibility=!1,!this.layer)return[3,4];t=0,n=this.layer,i.label=1;case 1:return t<n.length?[4,e.hideLayer(n[t])]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))},t.prototype.loadLayer=function(){return o(this,void 0,void 0,(function(){var t,i,o;return r(this,(function(r){switch(r.label){case 0:return this.layer.length||this._creatingInProgress?[3,5]:(this._creatingInProgress=!0,[4,u(this)]);case 1:return(t=r.sent())?[4,(i=new t(e.mapAdapter.map,n({},s))).addLayer({order:this.options.order,headers:this.options.headers,baselayer:this.options.baselayer})]:[3,5];case 2:return o=r.sent(),a&&a(i),Object.assign(i.options,s),i.layer=o,this._removed&&e.removeLayer(i),this.layer.push(i),this.options.visibility?[4,e.showLayer(i)]:[3,4];case 3:r.sent(),r.label=4;case 4:this._creatingInProgress=!1,r.label=5;case 5:return[2,this.layer]}}))}))},t}(),[2,t]}))}))}({webMap:e,adapterOptions:u,onLayerAdded:function(t){t.options.baselayer=!1,t.id=l+"-"+s.resource_id},createAdapter:function(){return Xe({resource:s.resource_id,adapterOptions:{name:s.display_name,opacity:s.opacity}},e,i)}}),[2,t]}))}))}var Ue=function(){function t(t){this.options=t,this.resourceId=t.resourceId;var e=t.item;this.item=e,this.name=t.labelField&&e.fields?e.fields[t.labelField]:String(e.id)}return t.prototype.extent=function(){var t=this;return this._extent?S.resolve(this._extent):this.options.connector.get("feature_layer.feature.item_extent",null,{id:this.resourceId,fid:this.item.id}).then((function(e){var n=e.extent,i=[n.minLon,n.minLat,n.maxLon,n.maxLat];return t._extent=i,i}))},t.prototype.geoJson=function(){var t=this;return this.item.geom?S.resolve(pe(this.item)):sn({resourceId:this.resourceId,featureId:this.item.id,connector:this.options.connector,geom:!0,fields:null,extensions:null}).then((function(e){return t.item.geom=e.geom,pe(t.item)}))},t}(),We=function(){function t(t,e){this.map=t,this.options=e,this.NgwWebmapItem=De,this.pixelRadius=10,this.webmapClassName="webmap",this.emitter=new p.exports.EventEmitter,this._webmapBaselayersIds=[];var n=e.resourceId;if(Array.isArray(n)?(this.resourceId=n[0],this.options.id=n[1]):this.resourceId=n,!this.resourceId)throw new Error("NGW `resourceId` is not defined")}return t.prototype.addLayer=function(t){var e,i;return o(this,void 0,void 0,(function(){var o,s;return r(this,(function(r){switch(r.label){case 0:return this.options=n(n({},this.options),t),o=this,[4,this._getWebMapLayerItem()];case 1:return o.layer=r.sent(),s=null===(i=null===(e=this.response)||void 0===e?void 0:e.webmap)||void 0===i?void 0:i.extent_constrained,this.options.useExtentConstrained&&this._extent&&s&&this.options.webMap.setView({maxBounds:this._extent}),[2,this.layer]}}))}))},t.prototype.removeLayer=function(){var t=this.options.webMap.mapAdapter;if(this.getDependLayers().forEach((function(e){"layer"in e&&t.removeLayer(e.layer.layer)})),this._webmapBaselayersIds.length){for(var e=0,n=this._webmapBaselayersIds;e<n.length;e++){this.options.webMap.removeLayer(n[e])}this._lastActiveBaselayer&&this.options.webMap.showLayer(this._lastActiveBaselayer)}this.options.useExtentConstrained&&this._extent&&this.options.webMap.setView({maxBounds:null}),delete this.layer,delete this.response,delete this._webmapLayersIds},t.prototype.showLayer=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return this.layer&&this.layer.properties?[2,this.layer.properties.property("visibility").set(!0)]:[2]}))}))},t.prototype.hideLayer=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return this.layer&&this.layer.properties?[2,this.layer.properties.property("visibility").set(!1)]:[2]}))}))},t.prototype.setOpacity=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this.layer&&this.layer.properties?[2,this.layer.properties.property("opacity").set(t)]:[2]}))}))},t.prototype.getExtent=function(){return this.getBounds()},t.prototype.getBounds=function(){var t=this.response&&this.response.webmap;if(t)return ie(t)},t.prototype.getDependLayers=function(){return this.layer&&this.layer.tree.getDescendants()||[]},t.prototype.getBookmarksResourceId=function(){var t=this.response&&this.response.webmap;if(t)return t.bookmark_resource.id},t.prototype.fetchBookmarks=function(){var t=this.getBookmarksResourceId(),e=this.options.connector;if(t)return e.getResourceOrFail(t).then((function(n){var i,o=null===(i=n.feature_layer)||void 0===i?void 0:i.fields.find((function(t){return t.label_field})),r=o&&o.keyname;return be({connector:e,resourceId:t,geom:!1,fields:r?[r]:void 0}).then((function(n){for(var i=[],o=0,s=n;o<s.length;o++){var a=new Ue({item:s[o],resourceId:t,labelField:r,connector:e});i.push(a)}return i}))}));throw new Error("Webmap was not loaded correctly, it is impossible to extract bookmarks")},t.prototype.getIdentificationIds=function(){return o(this,void 0,void 0,(function(){var t,e,n;return r(this,(function(i){switch(i.label){case 0:return t=[],(e=this._webmapLayersIds)?[3,2]:[4,this._getWebMapIds()];case 1:e=i.sent(),this._webmapLayersIds=e,i.label=2;case 2:return e&&e.length&&(n=(n=this.getDependLayers()).sort((function(t,e){return e.id-t.id})),n.forEach((function(e){var n=e.item,i=n.parentId;if(void 0!==i&&"layer"===n.item_type){var o=e.properties.property("visibility");o.get()&&!o.isBlocked()&&t.push(i)}}))),[2,t]}}))}))},t.prototype._getWebMapLayerItem=function(){return o(this,void 0,void 0,(function(){var t,e=this;return r(this,(function(n){switch(n.label){case 0:return this.resourceId?[4,this.getWebMapConfig(this.resourceId)]:[3,2];case 1:if((t=n.sent())&&t.root_item)return[2,new Promise((function(n){var i={};if(e.options.connector&&e.options.connector.options.auth){var o=e.options.connector.getAuthorizationHeaders();o&&(i.headers=o)}i.setViewDelay=e.options.setViewDelay,i.order=e.options.order,i.ratio=e.options.ratio,i.crossOrigin=e.options.crossOrigin,i.minZoom=e.options.minZoom,i.maxZoom=e.options.maxZoom,i.drawOrderEnabled=t.draw_order_enabled,i.popupOptions=e.options.popupOptions;var r=new e.NgwWebmapItem(e.options.webMap,t.root_item,i,e.options.connector);r.emitter.on("init",(function(){return n(r)}))}))];n.label=2;case 2:return[2]}}))}))},t.prototype.getWebMapConfig=function(t){return o(this,void 0,void 0,(function(){var e,n;return r(this,(function(i){switch(i.label){case 0:return[4,this.options.connector.getResource(t)];case 1:return(e=i.sent())&&(this.response=e,n=e[this.webmapClassName],this._setupBaselayers(e),n)?(this._extent=[n.extent_left,n.extent_bottom,n.extent_right,n.extent_top],this._updateItemsParams(n.root_item,this.options.webMap,e),[2,n]):[2]}}))}))},t.prototype._setupBaselayers=function(t){var e,n=this.options.webMap;if(null===(e=this.options.useBasemap)||void 0===e||e)if(t.basemap_webmap&&t.basemap_webmap.basemaps.length){var i=n.getActiveBaseLayer();this._lastActiveBaselayer=i?i.id:void 0,this._setBasemaps(t.basemap_webmap)}else this.options.defaultBasemap&&n.addBaseLayer("OSM",{id:"webmap-default-baselayer",name:"OpenStreetMap"})},t.prototype._setBasemaps=function(t){for(var e=this,n=this.options.webMap,i=!1,o=function(t){Fe({webMap:n,connector:r.options.connector,item:t,adapterOptions:{crossOrigin:r.options.crossOrigin}}).then((function(o){var r=!i&&t.enabled;return t.enabled&&(i=!0),n.addBaseLayer(o,{id:rn+t.resource_id,name:t.display_name,opacity:t.opacity,visibility:r}).then((function(t){t.id&&e._webmapBaselayersIds.push(t.id)}))}))},r=this,s=0,a=t.basemaps;s<a.length;s++){o(a[s])}},t.prototype._updateItemsParams=function(t,e,i){var o=this;if(t)if("group"===t.item_type||"root"===t.item_type)t.children&&(t.children=t.children.map((function(t){return o._updateItemsParams(t,e,i)}))),"root"===t.item_type&&(t.display_name=i.resource.display_name);else if("layer"===t.item_type){var r=Y(this.options.connector.options.baseUrl+"/api/component/render/image"),s=t.layer_style_id;t.url=r,t.resourceId=s,t.updateWmsParams=function(t){return $e(t,s)};var a=Pe({options:{adapter:t.layer_adapter.toUpperCase(),resource:s},webMap:e,baseUrl:this.options.connector.options.baseUrl||""});t=n(n({},t),a)}return t},t.prototype._getWebMapIds=function(){return o(this,void 0,void 0,(function(){var t,e,n,i,o,s,a;return r(this,(function(r){switch(r.label){case 0:if(!(t=this.layer)||"root"!==t.item.item_type)return[3,2];for(e=t.tree.getDescendants(),n=[],i=function(t){var e=t.item;if("layer"===e.item_type){var i=o.options.connector.getResource(e.layer_style_id).then((function(t){if(t){var n=Number(t.resource.parent.id);return e.parentId=n,n}}));n.push(i)}},o=this,s=0,a=e;s<a.length;s++)i(a[s]);return[4,Promise.all(n)];case 1:return[2,r.sent().filter((function(t){return void 0!==t}))];case 2:return[2]}}))}))},t}();var He={tms:"TILE"};function Ve(t){return new Promise((function(e,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState&&200===i.status&&i.responseText)try{e(JSON.parse(i.responseText))}catch(t){n(t)}},i.open("GET",Y(t),!0),i.send()}))}var qe="https://qms.nextgis.com";function Ge(t,e,s){var a;if(void 0===e&&(e=qe),void 0===s&&(s={}),"webMap"in t){var u=t.webMap,h=t.url,l=i(t,["webMap","url"]);a=u,h&&(e=h),l&&(s=l)}else a=t;return e||(e=qe),function(){function t(t,e){this.map=t;var i=n(n({},s),e);this.options=i,this.options.baselayer=!0,i.qms&&(this.qms=i.qms)}return t.prototype.addLayer=function(i){return o(this,void 0,void 0,(function(){var o,s,u,h,l,c,p,d;return r(this,(function(r){switch(r.label){case 0:if(this.qms||!i.qmsId)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),o=this,[4,Ve(e+"/api/v1/geoservices/"+i.qmsId)];case 2:return o.qms=r.sent(),[3,4];case 3:return s=r.sent(),console.error(s),[3,4];case 4:return(u=this.qms)&&(l=a.mapAdapter.layerAdapters[h=He[u.type||"tms"]])&&(m=t,_=l,["showLayer","hideLayer"].forEach((function(t){var e=Object.getOwnPropertyDescriptor(_.prototype,t);e&&Object.defineProperty(m.prototype,t,e)})),"TILE"===h)?(i=n(n({order:0,maxZoom:a.options.maxZoom,minZoom:a.options.minZoom},this.options),function(t){var e=("https:"===location.protocol?"https":"http")+"://",n=t.url.replace(/^(https?|ftp):\/\//,e);return t.y_origin_top||(n=n.replace("{y}","{-y}")),{url:n,name:t.name,attribution:t.copyright_text,maxZoom:t.z_max,minZoom:t.z_min}}(u)),u.origin_url&&(f=[],c=[u.origin_url.replace(/{switch:(.*?)}/,(function(t,e){return"string"==typeof e&&e.split(",").forEach((function(t){return f.push(t)})),"{s}"})),f],p=c[0],(d=c[1]).length&&(i.subdomains=d,i.url=p)),this.options=i,[2,new l(this.map,i).addLayer(i)]):[2]}var f,m,_}))}))},t}()}var Je=function(){function t(t){this.options={url:"https://qms.nextgis.com"},this.options=n(n({},this.options),t),this.url=this.options.url}return t.prototype.getLayerAdapters=function(){var t=this;return Promise.resolve([{name:"QMS",createAdapter:function(e){return Promise.resolve(t._createAdapter(e))}}])},t.prototype._createAdapter=function(t){return Ge({webMap:t,url:this.url})},t.utils={createQmsAdapter:Ge},t}();var Ke={},Ye=["mapserver_style","qgis_vector_style","qgis_raster_style","wmsserver_service","raster_style","basemap_layer","vector_layer","raster_layer","postgis_layer","webmap","tmsclient_layer"];function Qe(t){var e=t.layerOptions,i=t.webMap,s=t.connector,a=t.item;return o(this,void 0,void 0,(function(){var t,o;return r(this,(function(r){switch(r.label){case 0:return[4,s.getResourceChildren(a.resource.id)];case 1:return t=r.sent(),(o=t&&t[0])?[2,Xe(n(n({},e),{resource:o.resource.id}),i,s)]:[2]}}))}))}function Xe(t,i,s){return o(this,void 0,void 0,(function(){var a,u,h,l,c,p,d,f,m,_,y,v,g,b;return r(this,(function(w){switch(w.label){case 0:return h=t.adapter,[4,le(t,s)];case 1:return(l=w.sent())?(c=t.resource)&&c.resource&&void 0!==c.resource.id?(u=c,[3,4]):[3,2]:[3,15];case 2:return[4,s.getResource(l)];case 3:u=w.sent(),w.label=4;case 4:return u?(p=u.resource.cls,d=n(n({},t),{resource:l}),f={layerOptions:d,webMap:i,connector:s,item:u},-1===Ye.indexOf(p)?[3,12]:"webmap"!==p?[3,5]:(a=function(t){var n=t.layerOptions,i=t.webMap,s=t.connector;return o(this,void 0,void 0,(function(){var t;return r(this,(function(o){switch(o.label){case 0:return[4,le(n,s)];case 1:return t=o.sent(),[2,function(n){function o(e){return n.call(this,e,{url:"",webMap:i,resourceId:t,connector:s})||this}return e(o,n),o}(We)]}}))}))}(f),[3,11])):[3,14];case 5:if("vector_layer"!==p&&"postgis_layer"!==p)return[3,6];if(m=u.vector_layer&&en[u.vector_layer.geometry_type],(_=f.layerOptions.adapterOptions||{}).type=_.type||m,f.layerOptions.adapterOptions=_,t.adapterOptions=f,void 0!==h&&"GEOJSON"!==h){if("MVT"!==h)return[2,Qe(f)];a=Me(f)}else a=Le(f);return[3,11];case 6:return"raster_layer"!==p?[3,7]:[2,Qe(f)];case 7:return"basemap_layer"!==p?[3,8]:(a=function(t){var i=t.webMap,s=t.item;return o(this,void 0,void 0,(function(){var t,a,u,h,l;return r(this,(function(c){if(s.basemap_layer){if(a=s.basemap_layer.url,t=s.basemap_layer.qms)return u=JSON.parse(t),[2,Promise.resolve(Je.utils.createQmsAdapter(i,void 0,{qms:u,baselayer:!0}))];if(a&&(h=i.mapAdapter.layerAdapters.TILE))return l=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(e){return o(this,void 0,void 0,(function(){return r(this,(function(i){return[2,t.prototype.addLayer.call(this,n(n({},e),{url:a}))]}))}))},i}(h),[2,l]}return[2]}))}))}(f),[3,11]);case 8:return"GEOJSON"!==h?[3,10]:[4,s.getResource(u.resource.parent.id)];case 9:return(y=w.sent())&&(v=n(n({},t),{resource:u.resource.parent.id}),a=Le(n(n({},f),{item:y,layerOptions:v}))),[3,11];case 10:a=Me(f),w.label=11;case 11:return[3,13];case 12:if(!Ke[p])throw"Resource class '".concat(p,"' not yet supported.");g=Ke[p],b=void 0,(b=h&&"function"!=typeof b?g[h]:g)&&(a=b(f)),w.label=13;case 13:return[3,15];case 14:throw"Resource item is not found";case 15:return a?[2,a.then((function(t){if(t){var e=t;return u&&(e.prototype.item=u,e.prototype.resourceId=u.resource.id,e.prototype.connector=s),z(e,[ae],{replace:!1}),e}}))]:[2]}}))}))}function $e(t,e){var n=t.bbox,i=t.width,o=t.height,r=t.nd;return{resource:Array.isArray(e)?e.join(","):e,extent:n,size:i+","+o,timestamp:Date.now(),nd:null!=r?r:200}}var tn,en={POINT:"point",LINESTRING:"line",POLYGON:"polygon",MULTIPOINT:"point",MULTILINESTRING:"line",MULTIPOLYGON:"polygon",POINTZ:"point",LINESTRINGZ:"line",POLYGONZ:"polygon",MULTIPOINTZ:"point",MULTILINESTRINGZ:"line",MULTIPOLYGONZ:"polygon"};var nn=function(){function t(t){if(this.options=t,this.options.connector)this.url=this.options.connector.options.baseUrl||"",this.connector=this.options.connector;else{if(!this.options.baseUrl)throw new Error("url is not defined");this.url=this.options.baseUrl,this.connector=new ne({baseUrl:this.url,auth:this.options.auth})}}return t.addClassAdapters=function(t,e){Ke[t]=e},t.prototype.onLoadSync=function(t){return o(this,void 0,void 0,(function(){var e,i,o;return r(this,(function(r){switch(r.label){case 0:if(!this.options.resourceId||!this.url)return[3,4];if(!(e=[this.options.resourceId]).length)return[3,4];i=0,o=e,r.label=1;case 1:return i<o.length?[4,t.addLayer(We,n({visibility:!0,fit:!0,pixelRadius:this.options.pixelRadius},{resourceId:o[i],connector:this.connector,webMap:t}))]:[3,4];case 2:return[2,r.sent()];case 3:return i++,[3,1];case 4:return[2]}}))}))},t.prototype.getLayerAdapters=function(){return Promise.resolve([this._getLayerAdapter()])},t.prototype._getLayerAdapter=function(){var t=this;return{name:"WEBMAP",createAdapter:function(e){return Promise.resolve(t._createAdapter(e))}}},t.prototype._createAdapter=function(t){var i;return i={webMap:t,connector:this.connector,baseUrl:this.url},function(t){function o(e,o){return o=n(n({},i),o),t.call(this,e,o)||this}return e(o,t),o}(We)},t}(),on=function(){function t(t){var e=t.feature;this.id=e.id,this.geom=e.geom,this.label=e.label,this.parent=e.parent,this.fields=e.fields,this.layerId=e.layerId,this.connector=t.connector}return t.prototype.identify=function(t){var e=this;return void 0===t&&(t={}),this._item?S.resolve(this._item):sn(n({connector:this.connector,featureId:this.id,resourceId:this.layerId,fields:null,extensions:["attachment","description"]},t)).then((function(t){return e._item=t,e.geom=t.geom,e.extensions=t.extensions,t}))},t.prototype.resource=function(){var t=this;return this._resource?S.resolve(this._resource.feature_layer):this.connector.getResource(this.layerId).then((function(e){return t._resource=e,t._resource.feature_layer}))},t.prototype.getBounds=function(){return this._extent?S.resolve(this._extent):(t={connector:this.connector,featureId:this.id,resourceId:this.layerId}).connector.get("feature_layer.feature.item_extent",{cache:void 0===(e=t.cache)||e},{id:t.resourceId,fid:t.featureId}).then((function(t){if(t){var e=t.extent;return[e.minLon,e.minLat,e.maxLon,e.maxLat]}}));var t,e},t.prototype.geojson=function(){var t=this;return this._geojson?S.resolve(this._geojson):this.identify().then((function(e){return e.toGeojson().then((function(e){return t._geojson=e,e}))}))},t}(),rn="webmap-baselayer";function sn(t){var e=n({},ce);de(e,t);var i=n({id:t.resourceId,fid:t.featureId},e);return t.connector.get("feature_layer.feature.item",{cache:t.cache||!0},i).then((function(e){return n(n({},e),{toGeojson:function(){return e.geom?S.resolve(pe(e)):sn(n(n({},t),{geom:!0,fields:null,extensions:null})).then((function(t){var i=t.geom;return pe(n(n({},e),{geom:i}))}))}})}))}function an(t){return sn(t).then((function(t){return pe(t)}))}function un(t,e){void 0===e&&(e=!1);var n=[],i=[];for(var o in t){var r=Number(o);isNaN(r)||n.push(r)}var s=t.resources;s&&n.sort((function(t,e){return s.indexOf(t)-s.indexOf(e)}));for(var a=0;a<n.length;a++){var u=t[o=n[a]];if("features"in u){var h=hn(u.features,Number(o),e);if(h.length&&(i.push.apply(i,h),!e))break}}return i}function hn(t,e,n){for(var i=[],o=0,r=t;o<r.length;o++){var s=r[o];if(i.push({featureId:s.id,resourceId:e,feature:s}),!n)break}return i}function ln(t){var e=t.geom,n=t.signal,i=t.cache,o=t.layers,r="string"==typeof e?e:function(t){var e=function(t){var e;if(Array.isArray(t))return t;if("Feature"===t.type)return null===(e=t.geometry)||void 0===e?void 0:e.coordinates[0];if("Polygon"===t.type)return t.coordinates[0];return null}(t);if(!e)return null;var n=e.map((function(t){var e=V(t[0],t[1]),n=e[1];return"".concat(e[0]," ").concat(n)}));return"POLYGON((".concat(n.join(","),"))")}(e);if(!r)throw new Error("Not valid geometry format to make intersection");return t.connector.post("feature_layer.identify",{data:{geom:r,srs:3857,layers:o},signal:n,cache:i})}function cn(t,e){R(t);var i=t.lngLat,o=e.geom,r=e.signal,s=e.cache,a=null!=o?o:function(t,e,n,i){void 0===n&&(n=10),void 0===i&&(i=6);for(var o=n/D*H,r=o/Math.cos(e*W),s=[],a=0;a<i+1;a++){var u=Math.PI*(a/(i/2)),h=t+r*Math.cos(u),l=e+o*Math.sin(u);s.push([h,l])}return s}(i[0],i[1],e.radius);return ln(n(n({},e),{geom:a,signal:r,cache:s}))}function pn(t,e){var n;return o(this,void 0,void 0,(function(){var i,o,s,a,u,h,l;return r(this,(function(r){switch(r.label){case 0:return[4,t.get("pyramid.settings",null,{component:"pyramid"})];case 1:if(!((i=r.sent())&&i.company_logo&&i.company_logo.enabled))return[3,6];(o=document.createElement("a")).style.position="absolute",o.style.bottom="0",o.style.right="0",o.style.padding=null!==(n=null==e?void 0:e.padding)&&void 0!==n?n:"10px",o.className="ngw-map-logo",e&&e.cssClass&&(o.className+=" "+e.cssClass),(s=new Image).style.maxHeight="100px",s.style.maxWidth="100px",s.src="",r.label=2;case 2:return r.trys.push([2,4,,5]),[4,t.get("pyramid.company_logo",{responseType:"blob"})];case 3:return a=r.sent(),u=window.URL||window.webkitURL,h=u.createObjectURL(a),s.src=h,[3,5];case 4:return l=r.sent(),console.warn(l),[3,5];case 5:return null!==i.company_logo.link&&""!==i.company_logo.link.trim()&&(o.href=i.company_logo.link,o.target="_blank",-1!==i.company_logo.link.search(/:\/\/nextgis/)&&(s.alt="Get your own Web GIS at nextgis.com")),o.appendChild(s),[2,o];case 6:return[2]}}))}))}var dn={brill:'<path d="m6 0-5 6 5 6 5-6z"/>',circle:'<circle cx="6" cy="6" r="6"/>',rect:'<rect width="12" height="12"/>',marker:'<path d="m6 0c-1.85 0-4 1.19-4 4.22 0 2.05 3.08 6.59 4 7.78 0.821-1.19 4-5.62 4-7.78 0-3.03-2.15-4.22-4-4.22z"/>',cross:'<path d="M 2.4,12 6,8.4 9.6,12 12,9.6 8.4,6 12,2.4 9.6,0 6,3.6 2.4,0 0,2.4 3.6,6 0,9.6 Z"/>',star:'<path d="m6 0.25 1.71 4.18 4.29-1.04e-4 -3.43 3.14 0.857 4.18-3.43-3.14-3.43 3.14 0.857-4.18-3.43-3.14 4.29-0.209z"/>',triangle:'<path d="m12 11.7h-12l6-11.2z"/>',plus:'<path d="m7.5 12v-4.5h4.5v-3h-4.5v-4.5h-3v4.5h-4.5v3h4.5v4.5z"/>',minus:'<path d="m12 7.5v-3h-12v3z"/>',asterisk:'<path d="m7.59 12v-3.27l2.83 1.64 1.58-2.74-2.85-1.64 2.83-1.64-1.56-2.74-2.83 1.64v-3.24h-3.17v3.24l-2.85-1.64-1.57 2.74 2.84 1.64-2.84 1.64 1.57 2.74 2.85-1.64v3.27z"/>'},fn=12;function mn(t){var e,n,i,o,r,s;void 0===t&&(t={});var a=null!==(e=t.shape)&&void 0!==e?e:"circle",u=null!==(n=t.color)&&void 0!==n?n:"blue",h=null!==(i=t.strokeColor)&&void 0!==i?i:"white",l=null!==(o=t.size)&&void 0!==o?o:fn,c=null!==(r=t.rotate)&&void 0!==r?r:0,p=null!==(s=t.anchor)&&void 0!==s?s:[l/2,l/2],d=void 0!==t.stroke?Number(t.stroke):.8,f=t.p||dn[a]||"circle",m="string"==typeof f?f:f(t),_=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}(t.svg||function(t){var e=t.height,n=t.stroke,i=void 0===n?0:n,o=t.content,r=i/2;return'<svg\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n width="'.concat(t.width,'"\n height="').concat(e,'"\n viewBox="-').concat(r," -").concat(r," ").concat(fn+i," ").concat(fn+i,'"\n >').concat(o,"</svg>")}({width:l,height:l,stroke:d,content:m}));return _.setAttribute("width",String(l)),_.setAttribute("height",String(l)),_.setAttribute("fill",u),d&&(_.setAttribute("stroke",h),_.setAttribute("stroke-width",String(d))),{type:"icon",iconSize:[l,l],iconAnchor:p,html:(new XMLSerializer).serializeToString(_),rotate:c,svg:_}}function _n(t,e,i,o){if("number"==typeof e||"string"==typeof e)e=Number(e),t.push(n(n({},i),{resource:e}));else if(Array.isArray(e)){var r=e[0],s=e[1];t.push(n(n(n({},i),{resource:r,id:s}),o))}else"object"==typeof e&&t.push(n(n(n({},i),e),o))}var yn={target:"map",baseUrl:"",whitlabel:!1,controls:["ZOOM","ATTRIBUTION"],controlsOptions:{ZOOM:{position:"top-left"},ATTRIBUTION:{position:"bottom-right",customAttribution:['<a href="https://nextgis.com" target="_blank">©NextGIS</a>']}},pixelRadius:10};var vn=function(t){function i(e){var i=t.call(this,function(t){var e=[new Je];return t.starterKits&&t.starterKits.forEach((function(t){e.push(t)})),t.connector?t.connector&&(t.baseUrl=t.connector.options.baseUrl):t.connector=new ne({baseUrl:t.baseUrl||"",auth:t.auth}),(t=N(yn,t)).center||t.bounds||(t.bounds=[-179,-90,180,90]),t.connector&&e.push(new nn({connector:t.connector,auth:t.auth})),n(n({},t),{starterKits:e,create:!1})}(e))||this;return i.emitter=new p.exports.EventEmitter,i._ngwLayers={},i._promises={select:[],identify:[]},e.connector&&(i.connector=e.connector),i._createWebMap().then((function(){var t=i.getContainer();t&&t.classList.add("ngw-map-container"),i.options.whitlabel&&i._whiteLabel()})),i}return e(i,t),i.prototype.addControl=function(e,n,i){return o(this,void 0,void 0,(function(){return r(this,(function(o){switch(o.label){case 0:return[4,this.onLoad("controls:create")];case 1:return o.sent(),[2,t.prototype.addControl.call(this,e,n,i)]}}))}))},i.prototype.addNgwLayer=function(t){return o(this,void 0,void 0,(function(){var e,i,o,s,a,u,h,l,c;return r(this,(function(r){switch(r.label){case 0:return[4,this.onMapLoad()];case 1:if(r.sent(),i=t.resourceId,((e=t.keyname)||void 0!==i)&&console.warn("DEPRECATED WARN: ".concat("set `resource` options instead of `keyname` or `resourceId`")),o=t.resource,!e&&!i&&!o)throw new Error("resource, resourceId or keyname is required parameter to add NGW layer");if(!B(this.options.baseUrl))return[3,5];r.label=2;case 2:return r.trys.push([2,4,,5]),B(this.options.setViewDelay)&&(t.adapterOptions=t.adapterOptions||{},B(t.adapterOptions.setViewDelay)||(t.adapterOptions.setViewDelay=this.options.setViewDelay)),s=function(t,e,n){var i=n.getAuthorizationHeaders();return i&&(t.headers=i),Xe(t,e,n)}(t,this,this.connector),a=n(n({visibility:!0},t),t.adapterOptions),[4,this.addLayer(s,a)];case 3:return u=r.sent(),h=u&&this.getLayerId(u),u&&h&&(this._ngwLayers[h]={layer:u,resourceId:u.resourceId},u.options.name=u.options.name||u.item&&u.item.resource.display_name,u.options.baselayer&&this.getActiveBaseLayer()),[2,u];case 4:return l=r.sent(),c=K(o)&&"id"in o?o.id:e||i||o,console.error("Can't add NGW layer ".concat(c,"."),l),[3,5];case 5:return[2]}}))}))},i.prototype.fit=function(){var t,e=(t=this.options).center,n=t.zoom,i=t.bounds;e?(this.setCenter(e),n&&this.setZoom(n)):i&&this.fitBounds(i)},i.prototype.fetchNgwLayerItem=function(t){return sn(n({connector:this.connector},t))},i.prototype.fetchNgwLayerItems=function(t){return be(n({connector:this.connector},t))},i.prototype.fetchNgwLayerFeature=function(t){return an(n({connector:this.connector},t))},i.prototype.fetchNgwLayerFeatures=function(t){return xe(n({connector:this.connector},t))},i.prototype.fetchIdentifyItem=function(t,e){var i,o,r,s=(o=(i={identify:t,connector:this.connector,requestOptions:e}).connector,(r=un(i.identify))&&r.length?sn(n(n({connector:o},i.requestOptions),r[0])):S.resolve(void 0));return this._addPromise("identify",s),s},i.prototype.fetchIdentifyGeoJson=function(t,e){void 0===e&&(e=!1);var i=function(t){var e=t.connector,i=t.identify,o=t.requestOptions;for(var r in i){var s=Number(r);if(!isNaN(s)){var a=i[r];if("features"in a){var u=a.features.find((function(t){return t.geom}));if(u&&u.geom){var h=u.geom;return S.resolve(pe(n(n({},u),{geom:h})))}}}}var l=un(i);return l&&l.length?an(n(n(n({},o),{connector:e}),l[0])):S.resolve(void 0)}({identify:t,connector:this.connector,multiple:e});return i&&"then"in i?(this._addPromise("identify",i),i):S.resolve(i)},i.prototype.getIdentifyGeoJson=function(t,e){return void 0===e&&(e=!1),this.fetchIdentifyGeoJson(t,e)},i.prototype.getNgwLayers=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.onLoad()];case 1:return t.sent(),[2,this._ngwLayers]}}))}))},i.prototype.getNgwLayerByResourceId=function(t){return o(this,void 0,void 0,(function(){var e,n,i,o,s,a,u,h;return r(this,(function(r){switch(r.label){case 0:for(i in n=[],e=this._ngwLayers)n.push(i);o=0,r.label=1;case 1:return o<n.length?(i=n[o])in e?(s=this._ngwLayers[i]).resourceId!==t?[3,2]:[2,s&&s.layer]:[3,5]:[3,6];case 2:return s.layer.getIdentificationIds?[4,s.layer.getIdentificationIds()]:[3,4];case 3:if((a=r.sent())&&a.some((function(e){return e===t})))return[2,s.layer];r.label=4;case 4:if(s.layer.getDependLayers&&(u=s.layer.getDependLayers(),h=u.find((function(e){return e.item&&e.item.parentId===t}))))return[2,h.layer];r.label=5;case 5:return o++,[3,1];case 6:return[2]}}))}))},i.prototype.fitLayer=function(e,n){return o(this,void 0,void 0,(function(){var i,o,s,a,u=this;return r(this,(function(r){switch(r.label){case 0:return i="string"==typeof e||"number"==typeof e?String(i):e.id,(o=i&&this._ngwLayers[i])?o.layer.getBounds?[4,o.layer.getBounds()]:[3,2]:[3,7];case 1:return(s=r.sent())&&this.fitBounds(s,n),[3,6];case 2:return a=void 0,o.layer.item?(a=o.layer.item,[3,5]):[3,3];case 3:return[4,this.connector.getResource(o.resourceId)];case 4:a=r.sent(),r.label=5;case 5:a&&re({resourceId:a.resource.id,connector:this.connector}).then((function(t){t&&u.fitBounds(t,n)})),r.label=6;case 6:return[3,8];case 7:t.prototype.fitLayer.call(this,"number"==typeof e?String(e):e,n),r.label=8;case 8:return[2]}}))}))},i.prototype.zoomToLayer=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return[2,this.fitLayer(t)]}))}))},i.prototype.onLoad=function(e){return void 0===e&&(e="ngw-map:create"),t.prototype.onLoad.call(this,e)},i.prototype.removeLayer=function(e){var n=this.getLayer(e);if(n){var i=this.getLayerId(n);i&&delete this._ngwLayers[i],t.prototype.removeLayer.call(this,n)}},i.prototype.enableSelection=function(){var t=this;this.$$selectFromNgwRaster||(this.$$selectFromNgwRaster=function(e){t._getSelectListenersCount()&&t.selectFromNgwRaster(e)},this.$$selectFromNgwVector=function(e){t._getSelectListenersCount()&&t._selectFromNgwVector(e)},this.emitter.on("click",this.$$selectFromNgwRaster),this.emitter.on("layer:click",this.$$selectFromNgwVector))},i.prototype.disableSelection=function(){this.$$selectFromNgwRaster&&(this.emitter.removeListener("click",this.$$selectFromNgwRaster),this.$$selectFromNgwRaster=void 0),this.$$selectFromNgwVector&&(this.emitter.removeListener("layer:click",this.$$selectFromNgwVector),this.$$selectFromNgwVector=void 0)},i.prototype.getNgwLayerItem=function(t){return this.fetchNgwLayerItem(t)},i.prototype.getNgwLayerItems=function(t){return this.fetchNgwLayerItems(t)},i.prototype.getNgwLayerFeature=function(t){return this.fetchNgwLayerFeature(t)},i.prototype.getNgwLayerFeatures=function(t){return this.fetchNgwLayerFeatures(t)},i.prototype.cancelPromise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.cancelPromises.apply(this,t)},i.prototype.cancelPromises=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.length||(e=Object.keys(this._promises)),e.forEach((function(e){var n=t._promises[e];n&&(n.forEach((function(t){return t.cancel()})),t._promises[e]=[])}))},i.prototype.selectFromNgwRaster=function(t){return o(this,void 0,void 0,(function(){var e,i,o,s,a,u,h,l,c,p,d,f,m,_,y,v,g=this;return r(this,(function(r){switch(r.label){case 0:for(this._emitStatusEvent("ngw:preselect"),e=[],(i=Object.values(this._ngwLayers)).sort((function(t,e){return t.layer.order&&e.layer.order?e.layer.order-t.layer.order:1})),o=0,s=i;o<s.length;o++)(u="function"==typeof(a=s[o].layer).getIdentificationIds&&a.getIdentificationIds)&&a.options.selectable&&this.isLayerVisible(a)&&e.push(u.call(a));return[4,Promise.all(e)];case 1:for(h=r.sent(),l=[],c=0,p=h;c<p.length;c++)(d=p[c])&&l.push.apply(l,d);return l.length?(f=this.options.pixelRadius||10,m=this.getCenter(),_=void 0!==(_=this.getZoom())?_:20,m&&_?(y=function(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4}(m,_,f),v=cn(t,{layers:l,connector:this.connector,radius:y}).then((function(e){var i=n(n({},e),{resources:l,sourceType:"raster",event:t}),o=g._prepareToIdentify(i);return g._emitStatusEvent("ngw:select",o),o})),this._addPromise("select",v),[2,v]):(this._emitStatusEvent("ngw:select",null),[2])):(this._emitStatusEvent("ngw:select",null),[2])}}))}))},i.prototype._addPromise=function(t,e){var n=this._promises[t];if(n&&-1===n.indexOf(e)){var i=function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)};e.then(i),e.catch(i),n.push(e)}},i.prototype._isFitFromResource=function(){var t=this._initMapState;return!t.zoom||!t.center},i.prototype._createWebMap=function(){return o(this,void 0,void 0,(function(){var t,e,n,i,o,s,a,u,h,l;return r(this,(function(r){switch(r.label){case 0:return[4,this.create()];case 1:if(r.sent(),this.options.qmsId&&this._addQmsBaseLayer(),this.options.osm&&this._addOsmBaseLayer(),t=[],e=this._isFitFromResource(),this.options.webmapId&&_n(t,this.options.webmapId,{fit:e}),this.options.resources&&Array.isArray(this.options.resources))for(n=0,i=this.options.resources;n<i.length;n++)o=i[n],s={},e||(s.fit=!1),_n(t,o,{},s);a=0,u=t,r.label=2;case 2:if(!(a<u.length))return[3,7];h=u[a],r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.addNgwLayer(h)];case 4:return r.sent(),[3,6];case 5:return l=r.sent(),console.warn(l),[3,6];case 6:return a++,[3,2];case 7:return this._emitStatusEvent("ngw-map:create",this),this.enableSelection(),[2]}}))}))},i.prototype._addOsmBaseLayer=function(){this.addBaseLayer("OSM")},i.prototype._addQmsBaseLayer=function(){var t,e;Array.isArray(this.options.qmsId)?(t=this.options.qmsId[0],e=this.options.qmsId[1]):t=Number(this.options.qmsId);var n={qmsId:t};e&&(n.id=e),this.addBaseLayer("QMS",n)},i.prototype._selectFromNgwVector=function(t){var e,i=t.layer;if(i.options.selectable&&this.isLayerVisible(i)){var o=i.item&&i.item.resource.id,r=t.feature;if(void 0!==o&&r){var s=r.id;if(s){var a={id:Number(s),fields:r.properties||{},label:"#".concat(o),layerId:Number(o),parent:"",geom:r.geometry},u=((e={featureCount:1})[o]={featureCount:1,features:[a]},e);return this._emitStatusEvent("ngw:select",this._prepareToIdentify(n(n({},u),{resources:[o],sourceType:"vector"}))),u}}}},i.prototype._prepareToIdentify=function(t){var e=this;return n(n({},t),{getIdentifyItems:function(){return un(t,!0).map((function(t){return new on({feature:t.feature,connector:e.connector})}))}})},i.prototype._getSelectListenersCount=function(){return this.emitter.listenerCount("ngw:select")},i.prototype._whiteLabel=function(){return o(this,void 0,void 0,(function(){var t,e;return r(this,(function(n){switch(n.label){case 0:return(t=this.getContainer())?[4,pn(this.connector,this.options.companyLogoOptions)]:[3,2];case 1:(e=n.sent())&&t.appendChild(e),n.label=2;case 2:return[2]}}))}))},i.getIcon=mn,i}(Dt);function gn(t){var e=t.containerPoint,n=t.latlng;return{latLng:n,lngLat:[n.lng,n.lat],pixel:{left:e.x,top:e.y},source:t}}function bn(t,e,n){return void 0===e&&(e={}),new(l.exports.Control.extend({onAdd:function(){var i=document.createElement("div"),o=t.onAdd(n);return i.classList.add("leaflet-control"),e.bar&&i.classList.add("leaflet-bar"),e.addClass&&i.classList.add(e.addClass),e.margin||e.bar||(i.style.marginBottom="0px",i.style.marginTop="0px",i.style.marginLeft="0px",i.style.marginRight="0px"),o&&i.appendChild(o),l.exports.DomEvent.disableClickPropagation(i),i},onRemove:function(){t.onRemove()}}))}var wn=function(t){function n(e){var n=t.call(this,e)||this,i=e&&e.customAttribution;if(i){var o=[];Array.isArray(i)?o=i:i&&(o=[i]),o.forEach((function(t){return n.addAttribution(t)}))}return n}return e(n,t),n}(l.exports.Control.Attribution);function xn(t){var e=t.getNorthEast(),n=t.getSouthWest();return[n.lng,n.lat,e.lng,e.lat]}var Ln={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon",GeometryCollection:"polygon"},Pn={stroke:!1,opacity:1},Mn={};for(var Cn in Ln){var kn=Ln[Cn],An=Mn[kn]||[];An.push(Cn),Mn[kn]=An}function Tn(t,e){return-1!==(Mn[e]||[]).indexOf(t)}function On(t){var e=new l.exports.GeoJSON;return(Array.isArray(t)?t:[t]).forEach((function(t){return e.addData(t)})),e.getBounds()}function En(t){return{getBounds:function(){return function(t){return xn(On(t))}(t)},getCenter:function(){return function(t){var e=On(t).getCenter();return[e.lng,e.lat]}(t)}}}function In(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1+(e[t[n]]||0);var i="";for(var o in e){e[o]>(i?e[i]:0)&&(i=o)}return i}var Sn=function(){function t(t,e){if(this.map=t,this.options=e,this.pane="order-0",void 0!==e.order){var n="order-"+e.order,i=t.getPane(n);i||(i=t.createPane(n)),i.style.zIndex=String(Math.round(100*e.order)),this.pane=n}}return t.prototype.addLayer=function(t){Object.assign(this.options,t)},t}();var zn=function(){function t(t){this.layer=t}return t.prototype.handleMouseEvents=function(t){var e=this,i=this.layer.options,o=i.onMouseOut,r=i.onMouseOver,s=i.onClick||i.onLayerClick;s&&(this._onclick=function(i){var o=!!e.layer._getSelected(t);s(n({selected:o},e._createMouseEvent(i)))},t.on("click",this._onclick,this)),o&&(this._mouseout=function(t){o(e._createMouseEvent(t))},t.on("mouseout",this._mouseout,this)),r&&(this._mouseover=function(t){r(e._createMouseEvent(t))},t.on("mouseover",this._mouseover,this))},t.prototype.stopMouseEvents=function(t){this._mouseover&&t.off("mouseover",this._mouseover,this),this._mouseout&&t.off("mouseout",this._mouseout,this),this._onclick&&t.off("click",this._onclick,this)},t.prototype._createMouseEvent=function(t){return function(t){var e=t.source,i=e.target.feature;return n({layer:t.layer,feature:i,event:gn(e),source:e},En(i))}({layer:this.layer,source:t})},t}(),Bn=function(){function t(t){this.layer=t}return t.prototype.setPaintEachLayer=function(t){var e=this;this.layer._layers.forEach((function(n){e.setPaint(n,t)}))},t.prototype.setPaint=function(t,e){var n=void 0,i=t.layer,o=t.feature;if(i&&o&&(X(e)?n=e(o):Q(e)&&(n=e),n))if("point"===this.layer.type&&"icon"===n.type){var r=i,s=this._createDivIcon(n);setTimeout((function(){r.setIcon(s)}),10)}else"setStyle"in i&&i.setStyle(this.preparePaint(n))},t.prototype.preparePaint=function(t){if("get-paint"!==t.type){var e="line"===this.layer.type?[["color","strokeColor"],["opacity","strokeOpacity"],["weight","weight"]]:[["color","strokeColor"],["opacity","strokeOpacity"],["stroke","stroke"],["fillColor","fillColor"],["fillOpacity","fillOpacity"],["fill","fill"],["weight","weight"]],n={};"radius"in t&&"number"==typeof t.radius&&(n.radius=t.radius);for(var i=0,o=e;i<o.length;i++){var r=o[i],s=r[0],a=r[1],u=this.layer.options.opacity,h=t[a];B(u)&&-1!==a.toLowerCase().indexOf("opacity")&&(h=Number(h)*u),void 0!==h&&Object.defineProperty(n,s,{enumerable:!0,value:h})}return n}return Pn},t.prototype._createDivIcon=function(t){var e=t.html,o=t.rotate,r=t.className,s=i(t,["html","rotate","className"]),a=document.createElement("div");return r&&(a.className=r),o&&(a.style.transform="rotateZ(".concat(o,"deg)")),e&&(a.innerHTML=e),new l.exports.DivIcon(n(n({className:""},s),{html:a}))},t.prototype.createPaintToLayer=function(t){var e=this;if(t&&t.type)if("icon"===t.type){if(t.className||t.html)return function(n,i){var o=e._createDivIcon(t);return new l.exports.Marker(i,{icon:o})}}else if("pin"===t.type)return function(t,e){return new l.exports.Marker(e)};return function(i,o){return new l.exports.CircleMarker(o,e.preparePaint(n(n({},Pn),t)))}},t.prototype.createPaintOptions=function(t){var e={},n=this.preparePaint(t);return t&&(e.style=function(){return n}),"point"===this.layer.type?e.pointToLayer=this.createPaintToLayer(t):"line"===this.layer.type&&(n.stroke=!0),e},t}(),Zn=function(t){function i(e,n){var i=t.call(this,e,n)||this;return i.selected=!1,i._layers=[],i._selectedLayers=[],i._filteredLayers=[],i._openedPopup=[],i.$updateTooltip=j((function(){i.updateTooltip()}),300),i.$unselect=function(){i.unselect()},i._events=new zn(i),i._paint=new Bn(i),i}return e(i,t),i.prototype.addLayer=function(t){return Object.assign(this.options,t),this.paint=t.paint,this.layer=new l.exports.FeatureGroup([],n(n({},t.nativeOptions),{pane:this.pane})),this.selectedPaint=t.selectedPaint,t.paint=this.paint,t.data&&this.addData(t.data),this._addMapListener(),this.layer},i.prototype.beforeRemove=function(){this._removeMapListener()},i.prototype.select=function(t){if(this.unselect(),t)for(var e=0,n=this._layers.filter(t);e<n.length;e++){this._selectLayer(n[e],"api")}else this.selected||(this.selected=!0,this.selectedPaint&&this._paint.setPaintEachLayer(this.selectedPaint))},i.prototype.unselect=function(t){var e=this;if(t)this._layers.filter(t).forEach((function(t){e._unSelectLayer(t)}));else if(this.selected){for(var n=0,i=this._openedPopup;n<i.length;n++){this._removePopup(i[n][0])}this.paint&&this._paint.setPaintEachLayer(this.paint),this._selectedLayers.length=0,this.selected=!1}},i.prototype.getSelected=function(){var t=this;return this._selectedLayers.map((function(e){return n({target:t,feature:e.feature,layer:e},En(e.feature))}))},i.prototype.getFiltered=function(){return this._filteredLayers},i.prototype.filter=function(t){var e=this;this._filterFun=t;var i=this.layer,o=i&&i._map;if(i&&o){i.remove();var r=[];this._layers.forEach((function(o){var s=o.feature,a=o.layer;a&&(!t||t(n({target:e,feature:s,layer:a},En(s)))?(i.addLayer(a),r.push(n({target:e,feature:s,layer:a},En(s)))):i.removeLayer(a))})),this._filteredLayers=r,i.addTo(o)}return this._filteredLayers},i.prototype.cleanFilter=function(){this.filter()},i.prototype.getLayers=function(){var t=this;return this._layers.map((function(e){var i=e.layer,o=e.feature;return n({feature:o,layer:i,visible:i&&!!i._map,target:t},En(o))}))},i.prototype.clearLayer=function(t){this.unselect();var e=this.layer;if(e)if(t)for(var n=this._layers.length;n--;){var i=this._layers[n];if(i){var o=i.feature,r=i.layer;if(o&&r)t(o)&&(e.removeLayer(r),this._layers.splice(n,1))}}else e.clearLayers(),this._layers=[]},i.prototype.setData=function(t){this.clearLayer(),this.addData(t)},i.prototype.addData=function(t){var e,n=this.options;if(n){if(t){var i=void 0;if(n.type)i=n.type;else{var o=function(t){var e;e="FeatureCollection"===t.type?In(t.features.map((function(t){return t.geometry.type}))):"GeometryCollection"===t.type?In(t.geometries.map((function(t){return t.type}))):"Feature"===t.type?t.geometry.type:t.type;return e}(t);i=Ln[o]}if(this.type&&this.type!==i)return void console.warn("no other data type than layer can be added");this.type=i,t=function(t,e){if("FeatureCollection"===t.type)(n=t).features=n.features.filter((function(t){return Tn(t.geometry.type,e)}));else if("Feature"===t.type){if(!Tn(t.geometry.type,e))return!1}else if("GeometryCollection"===t.type){var n;(n=t).geometries=n.geometries.filter((function(t){return Tn(t.type,e)}))}return t}(t,i),t&&(e=this._getGeoJsonOptions(n,i))}new l.exports.GeoJSON(t||void 0,e)}},i.prototype.openPopup=function(t,e){var n=this;t&&this._layers.filter(t).forEach((function(t){n._openPopup(t,e,"api")}))},i.prototype.closePopup=function(t){var e=this;(t?this._openedPopup.filter((function(e){return t(e[2])})):this._openedPopup).forEach((function(t){e._removePopup(t[0])}))},i.prototype.updateTooltip=function(t){var e=this;t?this._updateTooltip(t):this.getLayers().forEach((function(t){return e._updateTooltip({feature:t.feature,layer:t.layer})}))},i.prototype.getExtent=function(){return this.getBounds()},i.prototype.getBounds=function(){if(this.layer){var t=this.layer.getBounds();if(t.isValid())return xn(t)}},i.prototype.setOpacity=function(t){this.options.opacity=t,this.setPaint(this.paint),this.setSelectedPaint(this.selectedPaint)},i.prototype.setPaint=function(t){if(t){this.paint=t;for(var e=0,n=this._layers;e<n.length;e++){this._paint.setPaint(n[e],t)}}},i.prototype.setSelectedPaint=function(t){if(t){this.selectedPaint=t;for(var e=0,n=this._selectedLayers;e<n.length;e++){this._paint.setPaint(n[e],t)}}},i.prototype.updatePaint=function(t){this.paint=n(n({},this.paint),t);for(var e=0,i=this._layers;e<i.length;e++){this._paint.setPaint(i[e],this.paint)}},i.prototype.updateSelectedPaint=function(t){this.selectedPaint=n(n({},this.selectedPaint),t);for(var e=0,i=this._selectedLayers;e<i.length;e++){this._paint.setPaint(i[e],this.selectedPaint)}},i.prototype._getSelected=function(t){return this._selectedLayers.find((function(e){return e.layer===t}))},i.prototype._updateTooltip=function(t){var e=t.feature,n=t.layer;if(e&&n&&e.properties&&this.options.labelField){n.unbindTooltip();var i=e.properties[this.options.labelField];if(void 0!==i){var o=!this.options.labelOnHover;n.bindTooltip(String(i),{permanent:o,sticky:!1})}}},i.prototype._openPopup=function(t,e,i,s){var a,u;return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,h,l,c,p,d,f,m,_,y,v,g,b,w,x,L=this;return r(this,(function(r){switch(r.label){case 0:return o=t.feature,h=t.layer,l=n({minWidth:300},e),c=l.minWidth,p=l.autoPan,d=l.maxWidth,m=null!=(f=l.closeButton)?f:!this.options.selectOnHover,y=[],v=function(t){y.push(t)},g=function(){_&&L._removePopup(_)},e.createPopupContent?[4,e.createPopupContent(n({layer:h,feature:o,target:this,type:i,close:g,onClose:v},En(o)))]:[3,2];case 1:return b=r.sent(),[3,3];case 2:b=e.popupContent,r.label=3;case 3:return b&&h&&(w={minWidth:c,autoPan:p,closeButton:m,closeOnClick:!1,autoClose:!1},B(d)&&(w.maxWidth=d),_=h.bindPopup(b,w),(null===(u=null===(a=this.options.popupOptions)||void 0===a?void 0:a.unselectOnClose)||void 0===u||u)&&(x=h.getPopup())&&x.once("remove",(function(){g()}),this),this._openedPopup.push([_,y,t]),_.openPopup(s)),[2]}}))}))},i.prototype._removePopup=function(t){var e,n;if(this.map){t.closePopup().unbindPopup();var i=this._openedPopup.findIndex((function(e){return e[0]===t}));if(-1!==i){for(var o=null===(n=null===(e=this.options.popupOptions)||void 0===e?void 0:e.unselectOnClose)||void 0===n||n,r=this._openedPopup[i],s=r[1],a=r[2],u=0,h=s;u<h.length;u++){(0,h[u])(a)}s.length=0,o&&this._unSelectLayer(a),this._openedPopup.splice(i,1)}}},i.prototype._getGeoJsonOptions=function(t,e){var i=this,o=t.paint,r={};return"function"==typeof o?"point"===e?r.pointToLayer=function(t,e){var n=o(t);return i._paint.createPaintToLayer(n)(t,e)}:r={style:function(t){return i._paint.preparePaint(n(n({},Pn),t?o(t):{type:"path"}))}}:r=this._paint.createPaintOptions(o),r.onEachFeature=function(t,e){i._onEachFeature(t,e)},r},i.prototype._onEachFeature=function(t,e){var i=this,o=this.layer;if(o){var r=n({target:this,feature:t,layer:e},En(t));e.options.pane=this.pane,this._layers.push(r);var s=!0;if(this._filterFun&&(s=this._filterFun(r)),s){var a=this.options,u=a.popup,h=a.popupOptions,l=a.selectable,c=a.interactive,p=a.selectOnHover;e.options.interactive=!B(c)||c,o.addLayer(e),l&&(p?(e.on("mouseover",(function(){i._selectLayer(r,"hover")})),e.on("mouseout",(function(){i._unSelectLayer(r)}))):e.on("click",(function(t){return i._selectOnLayerClick(t)}),this)),this._events.handleMouseEvents(e),setTimeout((function(){u&&i._openPopup(n({target:i,layer:e,feature:t},En(t)),h,"api"),i._updateTooltip({layer:e,feature:t})}))}}},i.prototype._selectOnLayerClick=function(t){l.exports.DomEvent.stopPropagation(t);var e=t.target,i=e.feature,o=n({target:this,layer:e,feature:i},En(i)),r=this._getSelected(e);r?this.options&&this.options.unselectOnSecondClick&&this._unSelectLayer(r):this._selectLayer(o,"click",t.latlng)},i.prototype._selectLayer=function(t,e,i){var o=this;this.options.multiselect||(this.map._addUnselectCb((function(){o._unSelectLayer(t)})),this._selectedLayers.forEach((function(t){return o._unSelectLayer(t)}))),this._selectedLayers.push(t),this.selected=!0;var r=this.options,s=r.selectedPaint,a=r.popupOnSelect,u=r.popupOptions;if(s&&t.layer&&this._paint.setPaint(t,s),a&&this._openPopup(t,u,e,i),this.options.onSelect){var h=t.feature?[t.feature]:[];this.options.onSelect(n({type:e,layer:this,features:h},En(h)))}},i.prototype._unSelectLayer=function(t){var e=this._selectedLayers.indexOf(t);-1!==e&&(this._selectedLayers.splice(e,1),this.options&&(this.options.paint&&this._paint.setPaint(t,this.options.paint),this.options.popupOnSelect&&t.layer&&this._removePopup(t.layer))),this.selected=this._selectedLayers.length>0},i.prototype._addMapClickListener=function(){var t=this.map;if(t){var e=this.options.unselectOnClick;(null==e||e)&&t.on("click",this.$unselect)}},i.prototype._removeMapClickListener=function(){this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip),this.map.off("click",this.$unselect)},i.prototype._addMapListener=function(){var t=this.map;if(t){var e=this.options,n=e.labelField,i=e.labelOnHover;this._addMapClickListener(),n&&!i&&(t.on("zoomend",this.$updateTooltip),t.on("moveend",this.$updateTooltip))}},i.prototype._removeMapListener=function(){this._removeMapClickListener(),this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip)},i}(Sn);function Nn(t,e,n){var i=new XMLHttpRequest;for(var o in i.open("GET",t),i.responseType="arraybuffer",n)i.setRequestHeader(o,n[o]);return i.onload=function(){var t=new Uint8Array(this.response),n=new Blob([t],{type:"image/png"}),i=(window.URL||window.webkitURL).createObjectURL(n);e(i)},i.send(),function(){i.abort()}}var Rn=function(t){function n(e,n,i){var o=t.call(this,e,n,i)||this;return o._abort=[],o}return e(n,t),n.prototype.cancelLoad=function(){this._abort&&(this._abort.forEach((function(t){return t()})),this._abort=[])},n.prototype._initImage=function(){t.prototype._initImage.call(this);var e=this.options.headers;if(e){var n=this._image,i=n.src;n.src="",this._abort.push(Nn(i,(function(t){n.src=t}),e))}},n}(l.exports.ImageOverlay),jn=function(t){function n(e,n){var i=t.call(this,n)||this;i.defaultWmsParams={service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},i.options={crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,pane:"tilePane",headers:null,viewPortBuffer:0,setViewDelay:100},i._url=e;var o,r={},s={};for(o in n)o in i.options?s[o]=n[o]:r[o]=n[o];return l.exports.Util.setOptions(i,s),i.wmsParams=l.exports.Util.extend({},i.defaultWmsParams,r),i}return e(n,t),n.prototype.setParams=function(t){l.exports.Util.extend(this.wmsParams,t),this.update()},n.prototype.getAttribution=function(){return this.options.attribution||""},n.prototype.onAdd=function(){return this.update(),this},n.prototype.onRemove=function(t){return this._currentOverlay&&(this._currentOverlay.cancelLoad(),t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl,this},n.prototype.getEvents=function(){return{moveend:j(this.update,this.options.setViewDelay)}},n.prototype.update=function(){var t=this;if(this._map){this.updateWmsParams();var e=this.getImageUrl();if(this._currentUrl!==e){this._currentUrl=e;var n=this.options.viewPortBuffer||0,i=this._map.getBounds().pad(n),o=new Rn(e,i,{opacity:0,pane:this.options.pane,headers:this.options.headers});o.addTo(this._map),this._currentOverlay&&this._currentOverlay.cancelLoad(),o.once("load",(function(){t._map&&(o._url===t._currentUrl?(t._currentOverlay&&t._map.removeLayer(t._currentOverlay),t._currentOverlay=o,o.setOpacity(void 0!==t.options.opacity?t.options.opacity:1),!0===t.options.isBack&&o.bringToBack(),!1===t.options.isBack&&o.bringToFront(),void 0!==t.options.zIndex&&o.setZIndex(t.options.zIndex)):t._map.removeLayer(o))}),this);var r=this.options,s=r.minZoom,a=r.maxZoom;(s&&this._map.getZoom()<s||a&&this._map.getZoom()>a)&&this._map.removeLayer(o)}}},n.prototype.setOpacity=function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},n.prototype.bringToBack=function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},n.prototype.bringToFront=function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},n.prototype.setZIndex=function(t){this.options.zIndex=t,this._currentOverlay&&this._currentOverlay.setZIndex(t)},n.prototype.updateWmsParams=function(t){t||(t=this._map);var e=this.options.viewPortBuffer||0,n=t.getBounds().pad(e),i=t.getSize();if(0!==this.options.viewPortBuffer){var o=e+1;i.x=Math.ceil(i.x*o),i.y=Math.ceil(i.y*o)}var r=parseFloat(this.wmsParams.version),s=this.options.crs||t.options.crs,a=r>=1.3?"crs":"srs";if(s){var u=s.project(n.getNorthWest()),h=s.project(n.getSouthEast()),c={width:i.x,height:i.y};c[a]=s.code,c.bbox=(r>=1.3&&s===l.exports.CRS.EPSG4326?[h.y,u.x,u.y,h.x]:[u.x,h.y,h.x,u.y]).join(","),l.exports.Util.extend(this.wmsParams,c)}},n.prototype.getImageUrl=function(){var t=l.exports.Util.getParamString(this.wmsParams,this._url,this.options.uppercase||!1);return this._url+t},n}(l.exports.Layer),Dn=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(t){var e=t&&t.url;if(e){var i=(t=n({transparent:!0},t)).updateWmsParams;if(this.layer=new jn(e,n(n(n({pane:this.pane,headers:t.headers,setViewDelay:t.setViewDelay},t),t.params),t.nativeOptions)),i){var o=this.layer.updateWmsParams;this.layer.updateWmsParams=function(t){o.call(this,t),this.wmsParams=i(this.wmsParams)}}return this.layer}},i}(Sn);
|
|
2
2
|
/*!
|
|
3
3
|
* leaflet.wms.js
|
|
4
4
|
* A collection of Leaflet utilities for working with Web Mapping services.
|
|
5
5
|
* (c) 2014-2016, Houston Engineering, Inc.
|
|
6
6
|
* MIT License
|
|
7
|
-
*/function Dn(t){return function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,e)||this;return i.options.setViewDelay&&(i._update=j((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=l.exports.GridLayer.prototype._update).call.apply(t,a([i],e,!1))}),i.options.setViewDelay)),i}return e(n,t),n.prototype.createTile=function(t,e){var n=this.getTileUrl(t),i=document.createElement("img");return i.abort=Zn(n,(function(t){i.src=t,e(null,i)}),this.options.headers),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i},n.prototype._abortLoading=function(){var t=this._tiles,e=this._tileZoom;for(var n in t)if(t[n].coords.z!==e){var i=t[n].el;i.onload=l.exports.Util.falseFn,i.onerror=l.exports.Util.falseFn,i.complete||(i.abort&&i.abort(),i.src=l.exports.Util.emptyImageUrl,l.exports.DomUtil.remove(i),delete t[n])}},n}(t)}var Fn=Dn(function(t){function n(e,n){var i=t.call(this,e,n)||this;return Object.assign(i.options,n),i}return e(n,t),n}(l.exports.TileLayer)),Un=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.addLayer=function(t){if(this.options=Object.assign(this.options,t),t){var e=t.url,o=i(t,["url"]);if(e){var r=n({pane:this.pane,attribution:o.attribution,minZoom:o.minZoom,maxZoom:o.maxZoom},o.nativeOptions);o.subdomains&&(r.subdomains=o.subdomains);return o.headers?new Fn(e,n(n({},r),{headers:o.headers,setViewDelay:o.setViewDelay})):new l.exports.TileLayer(e,r)}}},o}(In),Wn=Dn(function(t){function n(e,n){return t.call(this,e,n)||this}return e(n,t),n}(l.exports.TileLayer.WMS)),Hn=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.addLayer=function(t){Object.assign(this.options,t);var e=t.url,o=i(t,["url"]);if(e){var r=n({pane:this.pane,attribution:o.attribution,minZoom:o.minZoom,maxZoom:o.maxZoom,layers:t.layers,format:t.format},t.nativeOptions);return o.headers?new Wn(e,n(n({},r),{headers:o.headers})):new l.exports.TileLayer.WMS(e,r)}},o}(In),Vn=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(e){return t.prototype.addLayer.call(this,n(n({name:"OpenStreetMap",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},e),{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}))},i}(Un);function qn(t){return[[t[3],t[0]],[t[1],t[2]]]}var Gn=function(){function t(){this.options={target:"map"},this.layerAdapters=t.layerAdapters,this.controlAdapters=t.controlAdapters,this.emitter=new p.exports.EventEmitter,this._unselectCb=[],this._universalEvents=["move","zoom","zoomend","zoomstart","moveend","movestart"],this._positionEvents=["mousemove","mouseout","mouseover"]}return t.prototype.create=function(t){var e,i=this;if(this.options=n({},t),this.options.target){var o=(e=this.options).zoom,r=e.center,s=e.maxZoom,a=e.minZoom,u=e.maxBounds,h=e.mapAdapterOptions;this.map=this.options.map||new l.exports.Map(this.options.target,n({attributionControl:!1,zoomControl:!1,maxBounds:u?qn(u):void 0,maxZoom:s,minZoom:a,center:r&&[r[1],r[0]],zoom:o},h));var c=this.map.createPane("order-0");this.map._addUnselectCb=function(t){i._addUnselectCb(t)},c.style.zIndex=String(0),this.emitter.emit("create",this),this._addMapListeners()}},t.prototype.destroy=function(){this.map&&this.map.remove(),this._stopWatchSizeChangeToUpdateMinZoom()},t.prototype.getContainer=function(){return this.map&&this.map.getContainer()},t.prototype.getControlContainer=function(){var t=this.map&&this.map._controlContainer;if(t)return t;throw new Error("Leaflet Map is not initialized yet")},t.prototype.setCursor=function(t){this.map&&(this.map.getContainer().style.cursor=t)},t.prototype.setView=function(t,e){var n=this.map;if(n)if(Array.isArray(t)){var i=t[0],o=t[1];this.map&&("number"==typeof e?this.map.setView([o,i],e,{animate:!1}):this.setCenter([i,o]))}else{var r=t.zoom,s=t.center,a=t.maxBounds,u=t.bounds,h=t.minZoom,l=t.maxZoom;if(s&&void 0!==r?this.setView(s,r):(void 0!==r&&this.setZoom(r),s&&this.setCenter(s)),u&&this.fitBounds(u),void 0!==a)if(a){var c=qn(a);n.setMaxBounds(c),n.setMinZoom(n.getBoundsZoom(c)),this._watchSizeChangeToUpdateMinZoom(c)}else n.setMaxBounds(null),this._stopWatchSizeChangeToUpdateMinZoom();void 0!==l&&n.setMaxZoom(l),void 0!==h&&(this._stopWatchSizeChangeToUpdateMinZoom(),n.setMinZoom(h))}},t.prototype.setCenter=function(t){this.map&&this.map.panTo([t[1],t[0]])},t.prototype.getCenter=function(){var t=this.map;if(t){var e=t.getBounds().getCenter();return[e.lng,e.lat]}},t.prototype.setZoom=function(t){this.map&&this.map.setZoom(t)},t.prototype.getZoom=function(){var t;return null!==(t=this.map&&this.map.getZoom())&&void 0!==t?t:void 0},t.prototype.getBounds=function(){if(this.map){var t=this.map.getBounds(),e=t.getSouthWest(),n=t.getNorthEast();return[e.lng,e.lat,n.lng,n.lat]}},t.prototype.fitBounds=function(t,e){if(void 0===e&&(e={}),this.map){var n=e.maxZoom,i=e.offset,o=e.padding,r={};n&&(r.maxZoom=n),o&&(r.padding=[o,o]),i&&(r.padding=i),this.map.fitBounds(qn(t),r)}},t.prototype.getLayerAdapter=function(e){return t.layerAdapters[e]},t.prototype.createControl=function(t,e){return gn(t,e,this)},t.prototype.createButtonControl=function(t){return function(t,e){var n=document.createElement("a"),i=t.title||"";n.href="#",n.title=i,n.setAttribute("role","button"),n.setAttribute("aria-label",i),t.addClass&&n.classList.add(t.addClass),l.exports.DomEvent.disableClickPropagation(n),l.exports.DomEvent.on(n,"click",l.exports.DomEvent.stop),t.html instanceof HTMLElement?n.appendChild(t.html):"string"==typeof t.html&&(n.innerHTML=t.html);var o=function(e){e.stopPropagation(),t.onClick()};return gn({onAdd:function(){return void 0!==t.onClick&&n.addEventListener("click",o),n},onRemove:function(){var e=n.parentNode;e&&e.removeChild(n),void 0!==t.onClick&&n.removeEventListener("click",o)}},{bar:!0},e)}(t,this)},t.prototype.addControl=function(t,e){if(t.options.position=e.replace("-",""),this.map)return this.map.addControl(t),t},t.prototype.removeControl=function(t){this.map&&this.map.removeControl(t)},t.prototype.removeLayer=function(t){t&&t.remove&&t.remove()},t.prototype.showLayer=function(t){this.map&&t.addTo(this.map)},t.prototype.hideLayer=function(t){t.remove()},t.prototype.setLayerOpacity=function(t,e){"setOpacity"in t&&t.setOpacity(e)},t.prototype.setLayerOrder=function(t,e,n){},t.prototype.onMapClick=function(t){var e=vn(t);this.emitter.emit("preclick",e),this.emitter.emit("click",e)},t.prototype.locate=function(t,e){var n=this.map;if(n&&(n.locate(t),e)){var i=e.locationfound,o=e.locationerror,r=function(t){i({lngLat:[t.latlng.lng,t.latlng.lat]})};void 0!==i&&n.on("locationfound",r,this),o&&n.on("locationerror",o,this);return{stop:function(){void 0!==i&&n.off("locationfound",r),o&&n.off("locationerror",o)}}}return{stop:function(){}}},t.prototype._addUnselectCb=function(t){for(var e=0,n=this._unselectCb;e<n.length;e++){(0,n[e])()}this._unselectCb.length=0,this._unselectCb.push(t)},t.prototype._watchSizeChangeToUpdateMinZoom=function(t){this._stopWatchSizeChangeToUpdateMinZoom();var e=this.getContainer(),n=this.map;e&&n&&window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((function(){n.setMinZoom(n.getBoundsZoom(t))})),this._resizeObserver.observe(e))},t.prototype._stopWatchSizeChangeToUpdateMinZoom=function(){var t=this.map;t&&t.setMinZoom(0),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0)},t.prototype._addMapListeners=function(){var t=this,e=this.map;if(e){e.on("click",(function(e){t.onMapClick(e)}));for(var n=function(n){e.on(n,(function(){return t.emitter.emit(n,t)}),e)},i=0,o=this._universalEvents;i<o.length;i++){n(o[i])}for(var r=function(n){e.on(n,(function(e){return t.emitter.emit(n,vn(e))}),e)},s=0,a=this._positionEvents;s<a.length;s++){r(a[s])}}},t.layerAdapters={GEOJSON:Bn,IMAGE:jn,TILE:Un,WMS:Hn,OSM:Vn},t.controlAdapters={ZOOM:l.exports.Control.Zoom,ATTRIBUTION:bn},t.Map=l.exports.Map,t}();delete l.exports.Icon.Default.prototype._getIconUrl,l.exports.Icon.Default.mergeOptions({iconRetinaUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",shadowUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC"});var Jn=function(t){function i(e){return e=n(n({},e),{mapAdapter:new Gn}),t.call(this,e)||this}return e(i,t),i.create=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return[2,new i(t).onLoad()]}))}))},i}(yn);return window&&!window.NgwMap&&(window.NgwMap=Jn),Jn}();
|
|
7
|
+
*/function Fn(t){return function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,e)||this;return i.options.setViewDelay&&(i._update=j((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=l.exports.GridLayer.prototype._update).call.apply(t,a([i],e,!1))}),i.options.setViewDelay)),i}return e(n,t),n.prototype.createTile=function(t,e){var n=this.getTileUrl(t),i=document.createElement("img");return i.abort=Nn(n,(function(t){i.src=t,e(null,i)}),this.options.headers),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i},n.prototype._abortLoading=function(){var t=this._tiles,e=this._tileZoom;for(var n in t)if(t[n].coords.z!==e){var i=t[n].el;i.onload=l.exports.Util.falseFn,i.onerror=l.exports.Util.falseFn,i.complete||(i.abort&&i.abort(),i.src=l.exports.Util.emptyImageUrl,l.exports.DomUtil.remove(i),delete t[n])}},n}(t)}var Un=Fn(function(t){function n(e,n){var i=t.call(this,e,n)||this;return Object.assign(i.options,n),i}return e(n,t),n}(l.exports.TileLayer)),Wn=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.addLayer=function(t){if(this.options=Object.assign(this.options,t),t){var e=t.url,o=i(t,["url"]);if(e){var r=n({pane:this.pane,attribution:o.attribution,minZoom:o.minZoom,maxZoom:o.maxZoom},o.nativeOptions);o.subdomains&&(r.subdomains=o.subdomains);return o.headers?new Un(e,n(n({},r),{headers:o.headers,setViewDelay:o.setViewDelay})):new l.exports.TileLayer(e,r)}}},o}(Sn),Hn=Fn(function(t){function n(e,n){return t.call(this,e,n)||this}return e(n,t),n}(l.exports.TileLayer.WMS)),Vn=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.addLayer=function(t){Object.assign(this.options,t);var e=t.url,o=i(t,["url"]);if(e){var r=n({pane:this.pane,attribution:o.attribution,minZoom:o.minZoom,maxZoom:o.maxZoom,layers:t.layers,format:t.format},t.nativeOptions);return o.headers?new Hn(e,n(n({},r),{headers:o.headers})):new l.exports.TileLayer.WMS(e,r)}},o}(Sn),qn=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(e){return t.prototype.addLayer.call(this,n(n({name:"OpenStreetMap",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},e),{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}))},i}(Wn);function Gn(t){return[[t[3],t[0]],[t[1],t[2]]]}var Jn=function(){function t(){this.options={target:"map"},this.layerAdapters=t.layerAdapters,this.controlAdapters=t.controlAdapters,this.emitter=new p.exports.EventEmitter,this._unselectCb=[],this._universalEvents=["move","zoom","zoomend","zoomstart","moveend","movestart"],this._positionEvents=["mousemove","mouseout","mouseover"]}return t.prototype.create=function(t){var e,i=this;if(this.options=n({},t),this.options.target){var o=(e=this.options).zoom,r=e.center,s=e.maxZoom,a=e.minZoom,u=e.maxBounds,h=e.mapAdapterOptions;this.map=this.options.map||new l.exports.Map(this.options.target,n({attributionControl:!1,zoomControl:!1,maxBounds:u?Gn(u):void 0,maxZoom:s,minZoom:a,center:r&&[r[1],r[0]],zoom:o},h));var c=this.map.createPane("order-0");this.map._addUnselectCb=function(t){i._addUnselectCb(t)},c.style.zIndex=String(0),this.emitter.emit("create",this),this._addMapListeners()}},t.prototype.destroy=function(){this.map&&this.map.remove(),this._stopWatchSizeChangeToUpdateMinZoom()},t.prototype.getContainer=function(){return this.map&&this.map.getContainer()},t.prototype.getControlContainer=function(){var t=this.map&&this.map._controlContainer;if(t)return t;throw new Error("Leaflet Map is not initialized yet")},t.prototype.setCursor=function(t){this.map&&(this.map.getContainer().style.cursor=t)},t.prototype.setView=function(t,e){var n=this.map;if(n)if(Array.isArray(t)){var i=t[0],o=t[1];this.map&&("number"==typeof e?this.map.setView([o,i],e,{animate:!1}):this.setCenter([i,o]))}else{var r=t.zoom,s=t.center,a=t.maxBounds,u=t.bounds,h=t.minZoom,l=t.maxZoom;if(s&&void 0!==r?this.setView(s,r):(void 0!==r&&this.setZoom(r),s&&this.setCenter(s)),u&&this.fitBounds(u),void 0!==a)if(a){var c=Gn(a);n.setMaxBounds(c),n.setMinZoom(n.getBoundsZoom(c)),this._watchSizeChangeToUpdateMinZoom(c)}else n.setMaxBounds(null),this._stopWatchSizeChangeToUpdateMinZoom();void 0!==l&&n.setMaxZoom(l),void 0!==h&&(this._stopWatchSizeChangeToUpdateMinZoom(),n.setMinZoom(h))}},t.prototype.setCenter=function(t){this.map&&this.map.panTo([t[1],t[0]])},t.prototype.getCenter=function(){var t=this.map;if(t){var e=t.getBounds().getCenter();return[e.lng,e.lat]}},t.prototype.setZoom=function(t){this.map&&this.map.setZoom(t)},t.prototype.getZoom=function(){var t;return null!==(t=this.map&&this.map.getZoom())&&void 0!==t?t:void 0},t.prototype.getBounds=function(){if(this.map){var t=this.map.getBounds(),e=t.getSouthWest(),n=t.getNorthEast();return[e.lng,e.lat,n.lng,n.lat]}},t.prototype.fitBounds=function(t,e){if(void 0===e&&(e={}),this.map){var n=e.maxZoom,i=e.offset,o=e.padding,r={};n&&(r.maxZoom=n),o&&(r.padding=[o,o]),i&&(r.padding=i),this.map.fitBounds(Gn(t),r)}},t.prototype.getLayerAdapter=function(e){return t.layerAdapters[e]},t.prototype.createControl=function(t,e){return bn(t,e,this)},t.prototype.createButtonControl=function(t){return function(t,e){var n=document.createElement("a"),i=t.title||"";n.href="#",n.title=i,n.setAttribute("role","button"),n.setAttribute("aria-label",i),t.addClass&&n.classList.add(t.addClass),l.exports.DomEvent.disableClickPropagation(n),l.exports.DomEvent.on(n,"click",l.exports.DomEvent.stop),t.html instanceof HTMLElement?n.appendChild(t.html):"string"==typeof t.html&&(n.innerHTML=t.html);var o=function(e){e.stopPropagation(),t.onClick()};return bn({onAdd:function(){return void 0!==t.onClick&&n.addEventListener("click",o),n},onRemove:function(){var e=n.parentNode;e&&e.removeChild(n),void 0!==t.onClick&&n.removeEventListener("click",o)}},{bar:!0},e)}(t,this)},t.prototype.addControl=function(t,e){if(t.options.position=e.replace("-",""),this.map)return this.map.addControl(t),t},t.prototype.removeControl=function(t){this.map&&this.map.removeControl(t)},t.prototype.removeLayer=function(t){t&&t.remove&&t.remove()},t.prototype.showLayer=function(t){this.map&&t.addTo(this.map)},t.prototype.hideLayer=function(t){t.remove()},t.prototype.setLayerOpacity=function(t,e){"setOpacity"in t&&t.setOpacity(e)},t.prototype.setLayerOrder=function(t,e,n){},t.prototype.onMapClick=function(t){var e=gn(t);this.emitter.emit("preclick",e),this.emitter.emit("click",e)},t.prototype.locate=function(t,e){var n=this.map;if(n&&(n.locate(t),e)){var i=e.locationfound,o=e.locationerror,r=function(t){i({lngLat:[t.latlng.lng,t.latlng.lat]})};void 0!==i&&n.on("locationfound",r,this),o&&n.on("locationerror",o,this);return{stop:function(){void 0!==i&&n.off("locationfound",r),o&&n.off("locationerror",o)}}}return{stop:function(){}}},t.prototype._addUnselectCb=function(t){for(var e=0,n=this._unselectCb;e<n.length;e++){(0,n[e])()}this._unselectCb.length=0,this._unselectCb.push(t)},t.prototype._watchSizeChangeToUpdateMinZoom=function(t){this._stopWatchSizeChangeToUpdateMinZoom();var e=this.getContainer(),n=this.map;e&&n&&window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((function(){n.setMinZoom(n.getBoundsZoom(t))})),this._resizeObserver.observe(e))},t.prototype._stopWatchSizeChangeToUpdateMinZoom=function(){var t=this.map;t&&t.setMinZoom(0),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0)},t.prototype._addMapListeners=function(){var t=this,e=this.map;if(e){e.on("click",(function(e){t.onMapClick(e)}));for(var n=function(n){e.on(n,(function(){return t.emitter.emit(n,t)}),e)},i=0,o=this._universalEvents;i<o.length;i++){n(o[i])}for(var r=function(n){e.on(n,(function(e){return t.emitter.emit(n,gn(e))}),e)},s=0,a=this._positionEvents;s<a.length;s++){r(a[s])}}},t.layerAdapters={GEOJSON:Zn,IMAGE:Dn,TILE:Wn,WMS:Vn,OSM:qn},t.controlAdapters={ZOOM:l.exports.Control.Zoom,ATTRIBUTION:wn},t.Map=l.exports.Map,t}();delete l.exports.Icon.Default.prototype._getIconUrl,l.exports.Icon.Default.mergeOptions({iconRetinaUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",shadowUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC"});var Kn=function(t){function i(e){return e=n(n({},e),{mapAdapter:new Jn}),t.call(this,e)||this}return e(i,t),i.create=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return[2,new i(t).onLoad()]}))}))},i}(vn);return window&&!window.NgwMap&&(window.NgwMap=Kn),Kn}();
|
|
8
8
|
//# sourceMappingURL=ngw-leaflet.global.prod.js.map
|