gis-leaflet-helper 3.2.16 → 3.2.18

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.
@@ -1,13 +1,13 @@
1
- (function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode(".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}\n.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();(function(Jt,$t){typeof exports=="object"&&typeof module<"u"?$t(exports,require("gis-common")):typeof define=="function"&&define.amd?define(["exports","gis-common"],$t):(Jt=typeof globalThis<"u"?globalThis:Jt||self,$t(Jt["gis-leaflet-helper"]={},Jt.Gis))})(this,function(Jt,$t){"use strict";var Yf=Object.defineProperty;var Jf=(Jt,$t,An)=>$t in Jt?Yf(Jt,$t,{enumerable:!0,configurable:!0,writable:!0,value:An}):Jt[$t]=An;var Lt=(Jt,$t,An)=>Jf(Jt,typeof $t!="symbol"?$t+"":$t,An);function An(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,u.get?u:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const _l=An($t);var vn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ml(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gl(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var r=function u(){return this instanceof u?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(u){var d=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(r,u,d.get?d:{enumerable:!0,get:function(){return e[u]}})}),r}var da={exports:{}};/* @preserve
1
+ (function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode(".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}\n.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();(function(Jt,$t){typeof exports=="object"&&typeof module<"u"?$t(exports,require("gis-common")):typeof define=="function"&&define.amd?define(["exports","gis-common"],$t):(Jt=typeof globalThis<"u"?globalThis:Jt||self,$t(Jt["gis-leaflet-helper"]={},Jt.Gis))})(this,function(Jt,$t){"use strict";var dp=Object.defineProperty;var fp=(Jt,$t,An)=>$t in Jt?dp(Jt,$t,{enumerable:!0,configurable:!0,writable:!0,value:An}):Jt[$t]=An;var Lt=(Jt,$t,An)=>fp(Jt,typeof $t!="symbol"?$t+"":$t,An);function An(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,u.get?u:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const gl=An($t);var vn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Al(t){if(t.__esModule)return t;var n=t.default;if(typeof n=="function"){var r=function u(){return this instanceof u?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(u){var d=Object.getOwnPropertyDescriptor(t,u);Object.defineProperty(r,u,d.get?d:{enumerable:!0,get:function(){return t[u]}})}),r}var da={exports:{}};/* @preserve
2
2
  * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
3
3
  * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4
- */var sh;function ah(){return sh||(sh=1,function(e,n){(function(r,u){u(n)})(vn,function(r){var u="1.9.4";function d(t){var a,l,p,v;for(l=1,p=arguments.length;l<p;l++){v=arguments[l];for(a in v)t[a]=v[a]}return t}var f=Object.create||function(){function t(){}return function(a){return t.prototype=a,new t}}();function m(t,a){var l=Array.prototype.slice;if(t.bind)return t.bind.apply(t,l.call(arguments,1));var p=l.call(arguments,2);return function(){return t.apply(a,p.length?p.concat(l.call(arguments)):arguments)}}var g=0;function M(t){return"_leaflet_id"in t||(t._leaflet_id=++g),t._leaflet_id}function B(t,a,l){var p,v,k,Z;return Z=function(){p=!1,v&&(k.apply(l,v),v=!1)},k=function(){p?v=arguments:(t.apply(l,arguments),setTimeout(Z,a),p=!0)},k}function E(t,a,l){var p=a[1],v=a[0],k=p-v;return t===p&&l?t:((t-v)%k+k)%k+v}function b(){return!1}function C(t,a){if(a===!1)return t;var l=Math.pow(10,a===void 0?6:a);return Math.round(t*l)/l}function D(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return D(t).split(/\s+/)}function j(t,a){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?f(t.options):{});for(var l in a)t.options[l]=a[l];return t.options}function W(t,a,l){var p=[];for(var v in t)p.push(encodeURIComponent(l?v.toUpperCase():v)+"="+encodeURIComponent(t[v]));return(!a||a.indexOf("?")===-1?"?":"&")+p.join("&")}var at=/\{ *([\w_ -]+) *\}/g;function rt(t,a){return t.replace(at,function(l,p){var v=a[p];if(v===void 0)throw new Error("No value provided for variable "+l);return typeof v=="function"&&(v=v(a)),v})}var ct=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function yt(t,a){for(var l=0;l<t.length;l++)if(t[l]===a)return l;return-1}var mt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function xt(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var Dt=0;function It(t){var a=+new Date,l=Math.max(0,16-(a-Dt));return Dt=a+l,window.setTimeout(t,l)}var zt=window.requestAnimationFrame||xt("RequestAnimationFrame")||It,Yt=window.cancelAnimationFrame||xt("CancelAnimationFrame")||xt("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function Et(t,a,l){if(l&&zt===It)t.call(a);else return zt.call(window,m(t,a))}function Zt(t){t&&Yt.call(window,t)}var be={__proto__:null,extend:d,create:f,bind:m,get lastId(){return g},stamp:M,throttle:B,wrapNum:E,falseFn:b,formatNum:C,trim:D,splitWords:G,setOptions:j,getParamString:W,template:rt,isArray:ct,indexOf:yt,emptyImageUrl:mt,requestFn:zt,cancelFn:Yt,requestAnimFrame:Et,cancelAnimFrame:Zt};function pe(){}pe.extend=function(t){var a=function(){j(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},l=a.__super__=this.prototype,p=f(l);p.constructor=a,a.prototype=p;for(var v in this)Object.prototype.hasOwnProperty.call(this,v)&&v!=="prototype"&&v!=="__super__"&&(a[v]=this[v]);return t.statics&&d(a,t.statics),t.includes&&(ao(t.includes),d.apply(null,[p].concat(t.includes))),d(p,t),delete p.statics,delete p.includes,p.options&&(p.options=l.options?f(l.options):{},d(p.options,t.options)),p._initHooks=[],p.callInitHooks=function(){if(!this._initHooksCalled){l.callInitHooks&&l.callInitHooks.call(this),this._initHooksCalled=!0;for(var k=0,Z=p._initHooks.length;k<Z;k++)p._initHooks[k].call(this)}},a},pe.include=function(t){var a=this.prototype.options;return d(this.prototype,t),t.options&&(this.prototype.options=a,this.mergeOptions(t.options)),this},pe.mergeOptions=function(t){return d(this.prototype.options,t),this},pe.addInitHook=function(t){var a=Array.prototype.slice.call(arguments,1),l=typeof t=="function"?t:function(){this[t].apply(this,a)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(l),this};function ao(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=ct(t)?t:[t];for(var a=0;a<t.length;a++)t[a]===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)}}var De={on:function(t,a,l){if(typeof t=="object")for(var p in t)this._on(p,t[p],a);else{t=G(t);for(var v=0,k=t.length;v<k;v++)this._on(t[v],a,l)}return this},off:function(t,a,l){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var p in t)this._off(p,t[p],a);else{t=G(t);for(var v=arguments.length===1,k=0,Z=t.length;k<Z;k++)v?this._off(t[k]):this._off(t[k],a,l)}return this},_on:function(t,a,l,p){if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}if(this._listens(t,a,l)===!1){l===this&&(l=void 0);var v={fn:a,ctx:l};p&&(v.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(v)}},_off:function(t,a,l){var p,v,k;if(this._events&&(p=this._events[t],!!p)){if(arguments.length===1){if(this._firingCount)for(v=0,k=p.length;v<k;v++)p[v].fn=b;delete this._events[t];return}if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}var Z=this._listens(t,a,l);if(Z!==!1){var Y=p[Z];this._firingCount&&(Y.fn=b,this._events[t]=p=p.slice()),p.splice(Z,1)}}},fire:function(t,a,l){if(!this.listens(t,l))return this;var p=d({},a,{type:t,target:this,sourceTarget:a&&a.sourceTarget||this});if(this._events){var v=this._events[t];if(v){this._firingCount=this._firingCount+1||1;for(var k=0,Z=v.length;k<Z;k++){var Y=v[k],st=Y.fn;Y.once&&this.off(t,st,Y.ctx),st.call(Y.ctx||this,p)}this._firingCount--}}return l&&this._propagateEvent(p),this},listens:function(t,a,l,p){typeof t!="string"&&console.warn('"string" type argument expected');var v=a;typeof a!="function"&&(p=!!a,v=void 0,l=void 0);var k=this._events&&this._events[t];if(k&&k.length&&this._listens(t,v,l)!==!1)return!0;if(p){for(var Z in this._eventParents)if(this._eventParents[Z].listens(t,a,l,p))return!0}return!1},_listens:function(t,a,l){if(!this._events)return!1;var p=this._events[t]||[];if(!a)return!!p.length;l===this&&(l=void 0);for(var v=0,k=p.length;v<k;v++)if(p[v].fn===a&&p[v].ctx===l)return v;return!1},once:function(t,a,l){if(typeof t=="object")for(var p in t)this._on(p,t[p],a,!0);else{t=G(t);for(var v=0,k=t.length;v<k;v++)this._on(t[v],a,l,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[M(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[M(t)],this},_propagateEvent:function(t){for(var a in this._eventParents)this._eventParents[a].fire(t.type,d({layer:t.target,propagatedFrom:t.target},t),!0)}};De.addEventListener=De.on,De.removeEventListener=De.clearAllEventListeners=De.off,De.addOneTimeEventListener=De.once,De.fireEvent=De.fire,De.hasEventListeners=De.listens;var en=pe.extend(De);function Pt(t,a,l){this.x=l?Math.round(t):t,this.y=l?Math.round(a):a}var Cs=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};Pt.prototype={clone:function(){return new Pt(this.x,this.y)},add:function(t){return this.clone()._add(Ct(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(Ct(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 Pt(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new Pt(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=Cs(this.x),this.y=Cs(this.y),this},distanceTo:function(t){t=Ct(t);var a=t.x-this.x,l=t.y-this.y;return Math.sqrt(a*a+l*l)},equals:function(t){return t=Ct(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=Ct(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+C(this.x)+", "+C(this.y)+")"}};function Ct(t,a,l){return t instanceof Pt?t:ct(t)?new Pt(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new Pt(t.x,t.y):new Pt(t,a,l)}function te(t,a){if(t)for(var l=a?[t,a]:t,p=0,v=l.length;p<v;p++)this.extend(l[p])}te.prototype={extend:function(t){var a,l;if(!t)return this;if(t instanceof Pt||typeof t[0]=="number"||"x"in t)a=l=Ct(t);else if(t=we(t),a=t.min,l=t.max,!a||!l)return this;return!this.min&&!this.max?(this.min=a.clone(),this.max=l.clone()):(this.min.x=Math.min(a.x,this.min.x),this.max.x=Math.max(l.x,this.max.x),this.min.y=Math.min(a.y,this.min.y),this.max.y=Math.max(l.y,this.max.y)),this},getCenter:function(t){return Ct((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return Ct(this.min.x,this.max.y)},getTopRight:function(){return Ct(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 a,l;return typeof t[0]=="number"||t instanceof Pt?t=Ct(t):t=we(t),t instanceof te?(a=t.min,l=t.max):a=l=t,a.x>=this.min.x&&l.x<=this.max.x&&a.y>=this.min.y&&l.y<=this.max.y},intersects:function(t){t=we(t);var a=this.min,l=this.max,p=t.min,v=t.max,k=v.x>=a.x&&p.x<=l.x,Z=v.y>=a.y&&p.y<=l.y;return k&&Z},overlaps:function(t){t=we(t);var a=this.min,l=this.max,p=t.min,v=t.max,k=v.x>a.x&&p.x<l.x,Z=v.y>a.y&&p.y<l.y;return k&&Z},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var a=this.min,l=this.max,p=Math.abs(a.x-l.x)*t,v=Math.abs(a.y-l.y)*t;return we(Ct(a.x-p,a.y-v),Ct(l.x+p,l.y+v))},equals:function(t){return t?(t=we(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function we(t,a){return!t||t instanceof te?t:new te(t,a)}function Ce(t,a){if(t)for(var l=a?[t,a]:t,p=0,v=l.length;p<v;p++)this.extend(l[p])}Ce.prototype={extend:function(t){var a=this._southWest,l=this._northEast,p,v;if(t instanceof Ht)p=t,v=t;else if(t instanceof Ce){if(p=t._southWest,v=t._northEast,!p||!v)return this}else return t?this.extend(Rt(t)||ae(t)):this;return!a&&!l?(this._southWest=new Ht(p.lat,p.lng),this._northEast=new Ht(v.lat,v.lng)):(a.lat=Math.min(p.lat,a.lat),a.lng=Math.min(p.lng,a.lng),l.lat=Math.max(v.lat,l.lat),l.lng=Math.max(v.lng,l.lng)),this},pad:function(t){var a=this._southWest,l=this._northEast,p=Math.abs(a.lat-l.lat)*t,v=Math.abs(a.lng-l.lng)*t;return new Ce(new Ht(a.lat-p,a.lng-v),new Ht(l.lat+p,l.lng+v))},getCenter:function(){return new Ht((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 Ht(this.getNorth(),this.getWest())},getSouthEast:function(){return new Ht(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){typeof t[0]=="number"||t instanceof Ht||"lat"in t?t=Rt(t):t=ae(t);var a=this._southWest,l=this._northEast,p,v;return t instanceof Ce?(p=t.getSouthWest(),v=t.getNorthEast()):p=v=t,p.lat>=a.lat&&v.lat<=l.lat&&p.lng>=a.lng&&v.lng<=l.lng},intersects:function(t){t=ae(t);var a=this._southWest,l=this._northEast,p=t.getSouthWest(),v=t.getNorthEast(),k=v.lat>=a.lat&&p.lat<=l.lat,Z=v.lng>=a.lng&&p.lng<=l.lng;return k&&Z},overlaps:function(t){t=ae(t);var a=this._southWest,l=this._northEast,p=t.getSouthWest(),v=t.getNorthEast(),k=v.lat>a.lat&&p.lat<l.lat,Z=v.lng>a.lng&&p.lng<l.lng;return k&&Z},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,a){return t?(t=ae(t),this._southWest.equals(t.getSouthWest(),a)&&this._northEast.equals(t.getNorthEast(),a)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ae(t,a){return t instanceof Ce?t:new Ce(t,a)}function Ht(t,a,l){if(isNaN(t)||isNaN(a))throw new Error("Invalid LatLng object: ("+t+", "+a+")");this.lat=+t,this.lng=+a,l!==void 0&&(this.alt=+l)}Ht.prototype={equals:function(t,a){if(!t)return!1;t=Rt(t);var l=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return l<=(a===void 0?1e-9:a)},toString:function(t){return"LatLng("+C(this.lat,t)+", "+C(this.lng,t)+")"},distanceTo:function(t){return fi.distance(this,Rt(t))},wrap:function(){return fi.wrapLatLng(this)},toBounds:function(t){var a=180*t/40075017,l=a/Math.cos(Math.PI/180*this.lat);return ae([this.lat-a,this.lng-l],[this.lat+a,this.lng+l])},clone:function(){return new Ht(this.lat,this.lng,this.alt)}};function Rt(t,a,l){return t instanceof Ht?t:ct(t)&&typeof t[0]!="object"?t.length===3?new Ht(t[0],t[1],t[2]):t.length===2?new Ht(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new Ht(t.lat,"lng"in t?t.lng:t.lon,t.alt):a===void 0?null:new Ht(t,a,l)}var si={latLngToPoint:function(t,a){var l=this.projection.project(t),p=this.scale(a);return this.transformation._transform(l,p)},pointToLatLng:function(t,a){var l=this.scale(a),p=this.transformation.untransform(t,l);return this.projection.unproject(p)},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 a=this.projection.bounds,l=this.scale(t),p=this.transformation.transform(a.min,l),v=this.transformation.transform(a.max,l);return new te(p,v)},infinite:!1,wrapLatLng:function(t){var a=this.wrapLng?E(t.lng,this.wrapLng,!0):t.lng,l=this.wrapLat?E(t.lat,this.wrapLat,!0):t.lat,p=t.alt;return new Ht(l,a,p)},wrapLatLngBounds:function(t){var a=t.getCenter(),l=this.wrapLatLng(a),p=a.lat-l.lat,v=a.lng-l.lng;if(p===0&&v===0)return t;var k=t.getSouthWest(),Z=t.getNorthEast(),Y=new Ht(k.lat-p,k.lng-v),st=new Ht(Z.lat-p,Z.lng-v);return new Ce(Y,st)}},fi=d({},si,{wrapLng:[-180,180],R:6371e3,distance:function(t,a){var l=Math.PI/180,p=t.lat*l,v=a.lat*l,k=Math.sin((a.lat-t.lat)*l/2),Z=Math.sin((a.lng-t.lng)*l/2),Y=k*k+Math.cos(p)*Math.cos(v)*Z*Z,st=2*Math.atan2(Math.sqrt(Y),Math.sqrt(1-Y));return this.R*st}}),nn=6378137,Es={R:nn,MAX_LATITUDE:85.0511287798,project:function(t){var a=Math.PI/180,l=this.MAX_LATITUDE,p=Math.max(Math.min(l,t.lat),-l),v=Math.sin(p*a);return new Pt(this.R*t.lng*a,this.R*Math.log((1+v)/(1-v))/2)},unproject:function(t){var a=180/Math.PI;return new Ht((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*a,t.x*a/this.R)},bounds:function(){var t=nn*Math.PI;return new te([-t,-t],[t,t])}()};function Ps(t,a,l,p){if(ct(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=a,this._c=l,this._d=p}Ps.prototype={transform:function(t,a){return this._transform(t.clone(),a)},_transform:function(t,a){return a=a||1,t.x=a*(this._a*t.x+this._b),t.y=a*(this._c*t.y+this._d),t},untransform:function(t,a){return a=a||1,new Pt((t.x/a-this._b)/this._a,(t.y/a-this._d)/this._c)}};function sn(t,a,l,p){return new Ps(t,a,l,p)}var ks=d({},fi,{code:"EPSG:3857",projection:Es,transformation:function(){var t=.5/(Math.PI*Es.R);return sn(t,.5,-t,.5)}()}),Ea=d({},ks,{code:"EPSG:900913"});function Pa(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ka(t,a){var l="",p,v,k,Z,Y,st;for(p=0,k=t.length;p<k;p++){for(Y=t[p],v=0,Z=Y.length;v<Z;v++)st=Y[v],l+=(v?"L":"M")+st.x+" "+st.y;l+=a?Mt.svg?"z":"x":""}return l||"M0 0"}var Sn=document.documentElement.style,Gi="ActiveXObject"in window,Sa=Gi&&!document.addEventListener,Ba="msLaunchUri"in navigator&&!("documentMode"in document),Ss=je("webkit"),Ta=je("android"),Da=je("android 2")||je("android 3"),ro=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),oo=Ta&&je("Google")&&ro<537&&!("AudioNode"in window),Bs=!!window.opera,Oa=!Ba&&je("chrome"),Ia=je("gecko")&&!Ss&&!Bs&&!Gi,Ra=!Oa&&je("safari"),Ts=je("phantom"),Fa="OTransition"in Sn,zi=navigator.platform.indexOf("Win")===0,Ga=Gi&&"transition"in Sn,Bn="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Da,Ni="MozPerspective"in Sn,za=!window.L_DISABLE_3D&&(Ga||Bn||Ni)&&!Fa&&!Ts,xi=typeof orientation<"u"||je("mobile"),ho=xi&&Ss,lo=xi&&Bn,Ds=!window.PointerEvent&&window.MSPointerEvent,Na=!!(window.PointerEvent||Ds),Ua="ontouchstart"in window||!!window.TouchEvent,uo=!window.L_NO_TOUCH&&(Ua||Na),co=xi&&Bs,Za=xi&&Ia,ja=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,fo=function(){var t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",b,a),window.removeEventListener("testPassiveEventSupport",b,a)}catch{}return t}(),po=function(){return!!document.createElement("canvas").getContext}(),Os=!!(document.createElementNS&&Pa("svg").createSVGRect),qa=!!Os&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),_o=!Os&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var a=t.firstChild;return a.style.behavior="url(#default#VML)",a&&typeof a.adj=="object"}catch{return!1}}(),mo=navigator.platform.indexOf("Mac")===0,go=navigator.platform.indexOf("Linux")===0;function je(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Mt={ie:Gi,ielt9:Sa,edge:Ba,webkit:Ss,android:Ta,android23:Da,androidStock:oo,opera:Bs,chrome:Oa,gecko:Ia,safari:Ra,phantom:Ts,opera12:Fa,win:zi,ie3d:Ga,webkit3d:Bn,gecko3d:Ni,any3d:za,mobile:xi,mobileWebkit:ho,mobileWebkit3d:lo,msPointer:Ds,pointer:Na,touch:uo,touchNative:Ua,mobileOpera:co,mobileGecko:Za,retina:ja,passiveEvents:fo,canvas:po,svg:Os,vml:_o,inlineSvg:qa,mac:mo,linux:go},Ha=Mt.msPointer?"MSPointerDown":"pointerdown",Va=Mt.msPointer?"MSPointerMove":"pointermove",Is=Mt.msPointer?"MSPointerUp":"pointerup",$a=Mt.msPointer?"MSPointerCancel":"pointercancel",Rs={touchstart:Ha,touchmove:Va,touchend:Is,touchcancel:$a},Ka={touchstart:xo,touchmove:Dn,touchend:Dn,touchcancel:Dn},Ui={},Wa=!1;function yo(t,a,l){return a==="touchstart"&&Fs(),Ka[a]?(l=Ka[a].bind(this,l),t.addEventListener(Rs[a],l,!1),l):(console.warn("wrong event specified:",a),b)}function Ao(t,a,l){if(!Rs[a]){console.warn("wrong event specified:",a);return}t.removeEventListener(Rs[a],l,!1)}function vo(t){Ui[t.pointerId]=t}function Mo(t){Ui[t.pointerId]&&(Ui[t.pointerId]=t)}function Tn(t){delete Ui[t.pointerId]}function Fs(){Wa||(document.addEventListener(Ha,vo,!0),document.addEventListener(Va,Mo,!0),document.addEventListener(Is,Tn,!0),document.addEventListener($a,Tn,!0),Wa=!0)}function Dn(t,a){if(a.pointerType!==(a.MSPOINTER_TYPE_MOUSE||"mouse")){a.touches=[];for(var l in Ui)a.touches.push(Ui[l]);a.changedTouches=[a],t(a)}}function xo(t,a){a.MSPOINTER_TYPE_TOUCH&&a.pointerType===a.MSPOINTER_TYPE_TOUCH&&ce(a),Dn(t,a)}function Lo(t){var a={},l,p;for(p in t)l=t[p],a[p]=l&&l.bind?l.bind(t):l;return t=a,a.type="dblclick",a.detail=2,a.isTrusted=!1,a._simulated=!0,a}var bo=200;function wo(t,a){t.addEventListener("dblclick",a);var l=0,p;function v(k){if(k.detail!==1){p=k.detail;return}if(!(k.pointerType==="mouse"||k.sourceCapabilities&&!k.sourceCapabilities.firesTouchEvents)){var Z=tr(k);if(!(Z.some(function(st){return st instanceof HTMLLabelElement&&st.attributes.for})&&!Z.some(function(st){return st instanceof HTMLInputElement||st instanceof HTMLSelectElement}))){var Y=Date.now();Y-l<=bo?(p++,p===2&&a(Lo(k))):p=1,l=Y}}}return t.addEventListener("click",v),{dblclick:a,simDblclick:v}}function Co(t,a){t.removeEventListener("dblclick",a.dblclick),t.removeEventListener("click",a.simDblclick)}var Gs=In(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),an=In(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Xa=an==="webkitTransition"||an==="OTransition"?an+"End":"transitionend";function Ya(t){return typeof t=="string"?document.getElementById(t):t}function pi(t,a){var l=t.style[a]||t.currentStyle&&t.currentStyle[a];if((!l||l==="auto")&&document.defaultView){var p=document.defaultView.getComputedStyle(t,null);l=p?p[a]:null}return l==="auto"?null:l}function Nt(t,a,l){var p=document.createElement(t);return p.className=a||"",l&&l.appendChild(p),p}function Qt(t){var a=t.parentNode;a&&a.removeChild(t)}function rn(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Zi(t){var a=t.parentNode;a&&a.lastChild!==t&&a.appendChild(t)}function Li(t){var a=t.parentNode;a&&a.firstChild!==t&&a.insertBefore(t,a.firstChild)}function zs(t,a){if(t.classList!==void 0)return t.classList.contains(a);var l=On(t);return l.length>0&&new RegExp("(^|\\s)"+a+"(\\s|$)").test(l)}function Tt(t,a){if(t.classList!==void 0)for(var l=G(a),p=0,v=l.length;p<v;p++)t.classList.add(l[p]);else if(!zs(t,a)){var k=On(t);Ns(t,(k?k+" ":"")+a)}}function ne(t,a){t.classList!==void 0?t.classList.remove(a):Ns(t,D((" "+On(t)+" ").replace(" "+a+" "," ")))}function Ns(t,a){t.className.baseVal===void 0?t.className=a:t.className.baseVal=a}function On(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function Ne(t,a){"opacity"in t.style?t.style.opacity=a:"filter"in t.style&&Eo(t,a)}function Eo(t,a){var l=!1,p="DXImageTransform.Microsoft.Alpha";try{l=t.filters.item(p)}catch{if(a===1)return}a=Math.round(a*100),l?(l.Enabled=a!==100,l.Opacity=a):t.style.filter+=" progid:"+p+"(opacity="+a+")"}function In(t){for(var a=document.documentElement.style,l=0;l<t.length;l++)if(t[l]in a)return t[l];return!1}function bi(t,a,l){var p=a||new Pt(0,0);t.style[Gs]=(Mt.ie3d?"translate("+p.x+"px,"+p.y+"px)":"translate3d("+p.x+"px,"+p.y+"px,0)")+(l?" scale("+l+")":"")}function re(t,a){t._leaflet_pos=a,Mt.any3d?bi(t,a):(t.style.left=a.x+"px",t.style.top=a.y+"px")}function wi(t){return t._leaflet_pos||new Pt(0,0)}var on,hn,Us;if("onselectstart"in document)on=function(){Bt(window,"selectstart",ce)},hn=function(){Kt(window,"selectstart",ce)};else{var ji=In(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);on=function(){if(ji){var t=document.documentElement.style;Us=t[ji],t[ji]="none"}},hn=function(){ji&&(document.documentElement.style[ji]=Us,Us=void 0)}}function Zs(){Bt(window,"dragstart",ce)}function js(){Kt(window,"dragstart",ce)}var Rn,qs;function Hs(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Fn(),Rn=t,qs=t.style.outlineStyle,t.style.outlineStyle="none",Bt(window,"keydown",Fn))}function Fn(){Rn&&(Rn.style.outlineStyle=qs,Rn=void 0,qs=void 0,Kt(window,"keydown",Fn))}function Ja(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Vs(t){var a=t.getBoundingClientRect();return{x:a.width/t.offsetWidth||1,y:a.height/t.offsetHeight||1,boundingClientRect:a}}var Po={__proto__:null,TRANSFORM:Gs,TRANSITION:an,TRANSITION_END:Xa,get:Ya,getStyle:pi,create:Nt,remove:Qt,empty:rn,toFront:Zi,toBack:Li,hasClass:zs,addClass:Tt,removeClass:ne,setClass:Ns,getClass:On,setOpacity:Ne,testProp:In,setTransform:bi,setPosition:re,getPosition:wi,get disableTextSelection(){return on},get enableTextSelection(){return hn},disableImageDrag:Zs,enableImageDrag:js,preventOutline:Hs,restoreOutline:Fn,getSizedParentNode:Ja,getScale:Vs};function Bt(t,a,l,p){if(a&&typeof a=="object")for(var v in a)Ks(t,v,a[v],l);else{a=G(a);for(var k=0,Z=a.length;k<Z;k++)Ks(t,a[k],l,p)}return this}var $e="_leaflet_events";function Kt(t,a,l,p){if(arguments.length===1)Qa(t),delete t[$e];else if(a&&typeof a=="object")for(var v in a)_i(t,v,a[v],l);else if(a=G(a),arguments.length===2)Qa(t,function(Y){return yt(a,Y)!==-1});else for(var k=0,Z=a.length;k<Z;k++)_i(t,a[k],l,p);return this}function Qa(t,a){for(var l in t[$e]){var p=l.split(/\d/)[0];(!a||a(p))&&_i(t,p,null,null,l)}}var $s={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ks(t,a,l,p){var v=a+M(l)+(p?"_"+M(p):"");if(t[$e]&&t[$e][v])return this;var k=function(Y){return l.call(p||t,Y||window.event)},Z=k;!Mt.touchNative&&Mt.pointer&&a.indexOf("touch")===0?k=yo(t,a,k):Mt.touch&&a==="dblclick"?k=wo(t,k):"addEventListener"in t?a==="touchstart"||a==="touchmove"||a==="wheel"||a==="mousewheel"?t.addEventListener($s[a]||a,k,Mt.passiveEvents?{passive:!1}:!1):a==="mouseenter"||a==="mouseleave"?(k=function(Y){Y=Y||window.event,Xs(t,Y)&&Z(Y)},t.addEventListener($s[a],k,!1)):t.addEventListener(a,Z,!1):t.attachEvent("on"+a,k),t[$e]=t[$e]||{},t[$e][v]=k}function _i(t,a,l,p,v){v=v||a+M(l)+(p?"_"+M(p):"");var k=t[$e]&&t[$e][v];if(!k)return this;!Mt.touchNative&&Mt.pointer&&a.indexOf("touch")===0?Ao(t,a,k):Mt.touch&&a==="dblclick"?Co(t,k):"removeEventListener"in t?t.removeEventListener($s[a]||a,k,!1):t.detachEvent("on"+a,k),t[$e][v]=null}function Ci(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ws(t){return Ks(t,"wheel",Ci),this}function ln(t){return Bt(t,"mousedown touchstart dblclick contextmenu",Ci),t._leaflet_disable_click=!0,this}function ce(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ei(t){return ce(t),Ci(t),this}function tr(t){if(t.composedPath)return t.composedPath();for(var a=[],l=t.target;l;)a.push(l),l=l.parentNode;return a}function er(t,a){if(!a)return new Pt(t.clientX,t.clientY);var l=Vs(a),p=l.boundingClientRect;return new Pt((t.clientX-p.left)/l.x-a.clientLeft,(t.clientY-p.top)/l.y-a.clientTop)}var ko=Mt.linux&&Mt.chrome?window.devicePixelRatio:Mt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ir(t){return Mt.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/ko:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Xs(t,a){var l=a.relatedTarget;if(!l)return!0;try{for(;l&&l!==t;)l=l.parentNode}catch{return!1}return l!==t}var Gn={__proto__:null,on:Bt,off:Kt,stopPropagation:Ci,disableScrollPropagation:Ws,disableClickPropagation:ln,preventDefault:ce,stop:Ei,getPropagationPath:tr,getMousePosition:er,getWheelDelta:ir,isExternalTarget:Xs,addListener:Bt,removeListener:Kt},nr=en.extend({run:function(t,a,l,p){this.stop(),this._el=t,this._inProgress=!0,this._duration=l||.25,this._easeOutPower=1/Math.max(p||.5,.2),this._startPos=wi(t),this._offset=a.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=Et(this._animate,this),this._step()},_step:function(t){var a=+new Date-this._startTime,l=this._duration*1e3;a<l?this._runFrame(this._easeOut(a/l),t):(this._runFrame(1),this._complete())},_runFrame:function(t,a){var l=this._startPos.add(this._offset.multiplyBy(t));a&&l._round(),re(this._el,l),this.fire("step")},_complete:function(){Zt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ft=en.extend({options:{crs:ks,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,a){a=j(this,a),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=m(this._onResize,this),this._initEvents(),a.maxBounds&&this.setMaxBounds(a.maxBounds),a.zoom!==void 0&&(this._zoom=this._limitZoom(a.zoom)),a.center&&a.zoom!==void 0&&this.setView(Rt(a.center),a.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=an&&Mt.any3d&&!Mt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Bt(this._proxy,Xa,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,a,l){if(a=a===void 0?this._zoom:this._limitZoom(a),t=this._limitCenter(Rt(t),a,this.options.maxBounds),l=l||{},this._stop(),this._loaded&&!l.reset&&l!==!0){l.animate!==void 0&&(l.zoom=d({animate:l.animate},l.zoom),l.pan=d({animate:l.animate,duration:l.duration},l.pan));var p=this._zoom!==a?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,a,l.zoom):this._tryAnimatedPan(t,l.pan);if(p)return clearTimeout(this._sizeTimer),this}return this._resetView(t,a,l.pan&&l.pan.noMoveStart),this},setZoom:function(t,a){return this._loaded?this.setView(this.getCenter(),t,{zoom:a}):(this._zoom=t,this)},zoomIn:function(t,a){return t=t||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,a)},zoomOut:function(t,a){return t=t||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,a)},setZoomAround:function(t,a,l){var p=this.getZoomScale(a),v=this.getSize().divideBy(2),k=t instanceof Pt?t:this.latLngToContainerPoint(t),Z=k.subtract(v).multiplyBy(1-1/p),Y=this.containerPointToLatLng(v.add(Z));return this.setView(Y,a,{zoom:l})},_getBoundsCenterZoom:function(t,a){a=a||{},t=t.getBounds?t.getBounds():ae(t);var l=Ct(a.paddingTopLeft||a.padding||[0,0]),p=Ct(a.paddingBottomRight||a.padding||[0,0]),v=this.getBoundsZoom(t,!1,l.add(p));if(v=typeof a.maxZoom=="number"?Math.min(a.maxZoom,v):v,v===1/0)return{center:t.getCenter(),zoom:v};var k=p.subtract(l).divideBy(2),Z=this.project(t.getSouthWest(),v),Y=this.project(t.getNorthEast(),v),st=this.unproject(Z.add(Y).divideBy(2).add(k),v);return{center:st,zoom:v}},fitBounds:function(t,a){if(t=ae(t),!t.isValid())throw new Error("Bounds are not valid.");var l=this._getBoundsCenterZoom(t,a);return this.setView(l.center,l.zoom,a)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,a){return this.setView(t,this._zoom,{pan:a})},panBy:function(t,a){if(t=Ct(t).round(),a=a||{},!t.x&&!t.y)return this.fire("moveend");if(a.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new nr,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),a.noMoveStart||this.fire("movestart"),a.animate!==!1){Tt(this._mapPane,"leaflet-pan-anim");var l=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,l,a.duration||.25,a.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,a,l){if(l=l||{},l.animate===!1||!Mt.any3d)return this.setView(t,a,l);this._stop();var p=this.project(this.getCenter()),v=this.project(t),k=this.getSize(),Z=this._zoom;t=Rt(t),a=a===void 0?Z:a;var Y=Math.max(k.x,k.y),st=Y*this.getZoomScale(Z,a),ht=v.distanceTo(p)||1,pt=1.42,wt=pt*pt;function Ot(se){var yn=se?-1:1,Yo=se?st:Y,Qe=st*st-Y*Y+yn*wt*wt*ht*ht,Jo=2*Yo*wt*ht,Xi=Qe/Jo,ha=Math.sqrt(Xi*Xi+1)-Xi,Qo=ha<1e-9?-18:Math.log(ha);return Qo}function xe(se){return(Math.exp(se)-Math.exp(-se))/2}function ue(se){return(Math.exp(se)+Math.exp(-se))/2}function ke(se){return xe(se)/ue(se)}var ee=Ot(0);function Je(se){return Y*(ue(ee)/ue(ee+pt*se))}function oa(se){return Y*(ue(ee)*ke(ee+pt*se)-xe(ee))/wt}function as(se){return 1-Math.pow(1-se,1.5)}var yr=Date.now(),gn=(Ot(1)-ee)/pt,Xo=l.duration?1e3*l.duration:1e3*gn*.8;function Ar(){var se=(Date.now()-yr)/Xo,yn=as(se)*gn;se<=1?(this._flyToFrame=Et(Ar,this),this._move(this.unproject(p.add(v.subtract(p).multiplyBy(oa(yn)/ht)),Z),this.getScaleZoom(Y/Je(yn),Z),{flyTo:!0})):this._move(t,a)._moveEnd(!0)}return this._moveStart(!0,l.noMoveStart),Ar.call(this),this},flyToBounds:function(t,a){var l=this._getBoundsCenterZoom(t,a);return this.flyTo(l.center,l.zoom,a)},setMaxBounds:function(t){return t=ae(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var a=this.options.minZoom;return this.options.minZoom=t,this._loaded&&a!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var a=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&a!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,a){this._enforcingBounds=!0;var l=this.getCenter(),p=this._limitCenter(l,this._zoom,ae(t));return l.equals(p)||this.panTo(p,a),this._enforcingBounds=!1,this},panInside:function(t,a){a=a||{};var l=Ct(a.paddingTopLeft||a.padding||[0,0]),p=Ct(a.paddingBottomRight||a.padding||[0,0]),v=this.project(this.getCenter()),k=this.project(t),Z=this.getPixelBounds(),Y=we([Z.min.add(l),Z.max.subtract(p)]),st=Y.getSize();if(!Y.contains(k)){this._enforcingBounds=!0;var ht=k.subtract(Y.getCenter()),pt=Y.extend(k).getSize().subtract(st);v.x+=ht.x<0?-pt.x:pt.x,v.y+=ht.y<0?-pt.y:pt.y,this.panTo(this.unproject(v),a),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=d({animate:!1,pan:!0},t===!0?{animate:!0}:t);var a=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var l=this.getSize(),p=a.divideBy(2).round(),v=l.divideBy(2).round(),k=p.subtract(v);return!k.x&&!k.y?this:(t.animate&&t.pan?this.panBy(k):(t.pan&&this._rawPanBy(k),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(m(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:a,newSize:l}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=d({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var a=m(this._handleGeolocationResponse,this),l=m(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(a,l,t):navigator.geolocation.getCurrentPosition(a,l,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){if(this._container._leaflet_id){var a=t.code,l=t.message||(a===1?"permission denied":a===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:a,message:"Geolocation error: "+l+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var a=t.coords.latitude,l=t.coords.longitude,p=new Ht(a,l),v=p.toBounds(t.coords.accuracy*2),k=this._locateOptions;if(k.setView){var Z=this.getBoundsZoom(v);this.setView(p,k.maxZoom?Math.min(Z,k.maxZoom):Z)}var Y={latlng:p,bounds:v,timestamp:t.timestamp};for(var st in t.coords)typeof t.coords[st]=="number"&&(Y[st]=t.coords[st]);this.fire("locationfound",Y)}},addHandler:function(t,a){if(!a)return this;var l=this[t]=new a(this);return this._handlers.push(l),this.options[t]&&l.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&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{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Qt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Zt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)Qt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,a){var l="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),p=Nt("div",l,a||this._mapPane);return t&&(this._panes[t]=p),p},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),a=this.unproject(t.getBottomLeft()),l=this.unproject(t.getTopRight());return new Ce(a,l)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,a,l){t=ae(t),l=Ct(l||[0,0]);var p=this.getZoom()||0,v=this.getMinZoom(),k=this.getMaxZoom(),Z=t.getNorthWest(),Y=t.getSouthEast(),st=this.getSize().subtract(l),ht=we(this.project(Y,p),this.project(Z,p)).getSize(),pt=Mt.any3d?this.options.zoomSnap:1,wt=st.x/ht.x,Ot=st.y/ht.y,xe=a?Math.max(wt,Ot):Math.min(wt,Ot);return p=this.getScaleZoom(xe,p),pt&&(p=Math.round(p/(pt/100))*(pt/100),p=a?Math.ceil(p/pt)*pt:Math.floor(p/pt)*pt),Math.max(v,Math.min(k,p))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Pt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,a){var l=this._getTopLeftPoint(t,a);return new te(l,l.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,a){var l=this.options.crs;return a=a===void 0?this._zoom:a,l.scale(t)/l.scale(a)},getScaleZoom:function(t,a){var l=this.options.crs;a=a===void 0?this._zoom:a;var p=l.zoom(t*l.scale(a));return isNaN(p)?1/0:p},project:function(t,a){return a=a===void 0?this._zoom:a,this.options.crs.latLngToPoint(Rt(t),a)},unproject:function(t,a){return a=a===void 0?this._zoom:a,this.options.crs.pointToLatLng(Ct(t),a)},layerPointToLatLng:function(t){var a=Ct(t).add(this.getPixelOrigin());return this.unproject(a)},latLngToLayerPoint:function(t){var a=this.project(Rt(t))._round();return a._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Rt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(ae(t))},distance:function(t,a){return this.options.crs.distance(Rt(t),Rt(a))},containerPointToLayerPoint:function(t){return Ct(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return Ct(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var a=this.containerPointToLayerPoint(Ct(t));return this.layerPointToLatLng(a)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Rt(t)))},mouseEventToContainerPoint:function(t){return er(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 a=this._container=Ya(t);if(a){if(a._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Bt(a,"scroll",this._onScroll,this),this._containerId=M(a)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mt.any3d,Tt(t,"leaflet-container"+(Mt.touch?" leaflet-touch":"")+(Mt.retina?" leaflet-retina":"")+(Mt.ielt9?" leaflet-oldie":"")+(Mt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var a=pi(t,"position");a!=="absolute"&&a!=="relative"&&a!=="fixed"&&a!=="sticky"&&(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),re(this._mapPane,new Pt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Tt(t.markerPane,"leaflet-zoom-hide"),Tt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,a,l){re(this._mapPane,new Pt(0,0));var p=!this._loaded;this._loaded=!0,a=this._limitZoom(a),this.fire("viewprereset");var v=this._zoom!==a;this._moveStart(v,l)._move(t,a)._moveEnd(v),this.fire("viewreset"),p&&this.fire("load")},_moveStart:function(t,a){return t&&this.fire("zoomstart"),a||this.fire("movestart"),this},_move:function(t,a,l,p){a===void 0&&(a=this._zoom);var v=this._zoom!==a;return this._zoom=a,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),p?l&&l.pinch&&this.fire("zoom",l):((v||l&&l.pinch)&&this.fire("zoom",l),this.fire("move",l)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Zt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){re(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[M(this._container)]=this;var a=t?Kt:Bt;a(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&a(window,"resize",this._onResize,this),Mt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Zt(this._resizeRequest),this._resizeRequest=Et(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,a){for(var l=[],p,v=a==="mouseout"||a==="mouseover",k=t.target||t.srcElement,Z=!1;k;){if(p=this._targets[M(k)],p&&(a==="click"||a==="preclick")&&this._draggableMoved(p)){Z=!0;break}if(p&&p.listens(a,!0)&&(v&&!Xs(k,t)||(l.push(p),v))||k===this._container)break;k=k.parentNode}return!l.length&&!Z&&!v&&this.listens(a,!0)&&(l=[this]),l},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var a=t.target||t.srcElement;if(!(!this._loaded||a._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(a))){var l=t.type;l==="mousedown"&&Hs(a),this._fireDOMEvent(t,l)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,a,l){if(t.type==="click"){var p=d({},t);p.type="preclick",this._fireDOMEvent(p,p.type,l)}var v=this._findEventTargets(t,a);if(l){for(var k=[],Z=0;Z<l.length;Z++)l[Z].listens(a,!0)&&k.push(l[Z]);v=k.concat(v)}if(v.length){a==="contextmenu"&&ce(t);var Y=v[0],st={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var ht=Y.getLatLng&&(!Y._radius||Y._radius<=10);st.containerPoint=ht?this.latLngToContainerPoint(Y.getLatLng()):this.mouseEventToContainerPoint(t),st.layerPoint=this.containerPointToLayerPoint(st.containerPoint),st.latlng=ht?Y.getLatLng():this.layerPointToLatLng(st.layerPoint)}for(Z=0;Z<v.length;Z++)if(v[Z].fire(a,st,!0),st.originalEvent._stopped||v[Z].options.bubblingMouseEvents===!1&&yt(this._mouseEvents,a)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,a=this._handlers.length;t<a;t++)this._handlers[t].disable()},whenReady:function(t,a){return this._loaded?t.call(a||this,{target:this}):this.on("load",t,a),this},_getMapPanePos:function(){return wi(this._mapPane)||new Pt(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,a){var l=t&&a!==void 0?this._getNewPixelOrigin(t,a):this.getPixelOrigin();return l.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,a){var l=this.getSize()._divideBy(2);return this.project(t,a)._subtract(l)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,a,l){var p=this._getNewPixelOrigin(l,a);return this.project(t,a)._subtract(p)},_latLngBoundsToNewLayerBounds:function(t,a,l){var p=this._getNewPixelOrigin(l,a);return we([this.project(t.getSouthWest(),a)._subtract(p),this.project(t.getNorthWest(),a)._subtract(p),this.project(t.getSouthEast(),a)._subtract(p),this.project(t.getNorthEast(),a)._subtract(p)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,a,l){if(!l)return t;var p=this.project(t,a),v=this.getSize().divideBy(2),k=new te(p.subtract(v),p.add(v)),Z=this._getBoundsOffset(k,l,a);return Math.abs(Z.x)<=1&&Math.abs(Z.y)<=1?t:this.unproject(p.add(Z),a)},_limitOffset:function(t,a){if(!a)return t;var l=this.getPixelBounds(),p=new te(l.min.add(t),l.max.add(t));return t.add(this._getBoundsOffset(p,a))},_getBoundsOffset:function(t,a,l){var p=we(this.project(a.getNorthEast(),l),this.project(a.getSouthWest(),l)),v=p.min.subtract(t.min),k=p.max.subtract(t.max),Z=this._rebound(v.x,-k.x),Y=this._rebound(v.y,-k.y);return new Pt(Z,Y)},_rebound:function(t,a){return t+a>0?Math.round(t-a)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(a))},_limitZoom:function(t){var a=this.getMinZoom(),l=this.getMaxZoom(),p=Mt.any3d?this.options.zoomSnap:1;return p&&(t=Math.round(t/p)*p),Math.max(a,Math.min(l,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ne(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,a){var l=this._getCenterOffset(t)._trunc();return(a&&a.animate)!==!0&&!this.getSize().contains(l)?!1:(this.panBy(l,a),!0)},_createAnimProxy:function(){var t=this._proxy=Nt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(a){var l=Gs,p=this._proxy.style[l];bi(this._proxy,this.project(a.center,a.zoom),this.getZoomScale(a.zoom,1)),p===this._proxy.style[l]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Qt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),a=this.getZoom();bi(this._proxy,this.project(t,a),this.getZoomScale(a,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,a,l){if(this._animatingZoom)return!0;if(l=l||{},!this._zoomAnimated||l.animate===!1||this._nothingToAnimate()||Math.abs(a-this._zoom)>this.options.zoomAnimationThreshold)return!1;var p=this.getZoomScale(a),v=this._getCenterOffset(t)._divideBy(1-1/p);return l.animate!==!0&&!this.getSize().contains(v)?!1:(Et(function(){this._moveStart(!0,l.noMoveStart||!1)._animateZoom(t,a,!0)},this),!0)},_animateZoom:function(t,a,l,p){this._mapPane&&(l&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=a,Tt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:a,noUpdate:p}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(m(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ne(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function sr(t,a){return new Ft(t,a)}var St=pe.extend({options:{position:"topright"},initialize:function(t){j(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var a=this._map;return a&&a.removeControl(this),this.options.position=t,a&&a.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var a=this._container=this.onAdd(t),l=this.getPosition(),p=t._controlCorners[l];return Tt(a,"leaflet-control"),l.indexOf("bottom")!==-1?p.insertBefore(a,p.firstChild):p.appendChild(a),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Qt(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()}}),Pi=function(t){return new St(t)};Ft.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},a="leaflet-",l=this._controlContainer=Nt("div",a+"control-container",this._container);function p(v,k){var Z=a+v+" "+a+k;t[v+k]=Nt("div",Z,l)}p("top","left"),p("top","right"),p("bottom","left"),p("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Qt(this._controlCorners[t]);Qt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=St.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,a,l,p){return l<p?-1:p<l?1:0}},initialize:function(t,a,l){j(this,l),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var p in t)this._addLayer(t[p],p);for(p in a)this._addLayer(a[p],p,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var a=0;a<this._layers.length;a++)this._layers[a].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return St.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,a){return this._addLayer(t,a),this._map?this._update():this},addOverlay:function(t,a){return this._addLayer(t,a,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var a=this._getLayer(M(t));return a&&this._layers.splice(this._layers.indexOf(a),1),this._map?this._update():this},expand:function(){Tt(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?(Tt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ne(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ne(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",a=this._container=Nt("div",t),l=this.options.collapsed;a.setAttribute("aria-haspopup",!0),ln(a),Ws(a);var p=this._section=Nt("section",t+"-list");l&&(this._map.on("click",this.collapse,this),Bt(a,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var v=this._layersLink=Nt("a",t+"-toggle",a);v.href="#",v.title="Layers",v.setAttribute("role","button"),Bt(v,{keydown:function(k){k.keyCode===13&&this._expandSafely()},click:function(k){ce(k),this._expandSafely()}},this),l||this.expand(),this._baseLayersList=Nt("div",t+"-base",p),this._separator=Nt("div",t+"-separator",p),this._overlaysList=Nt("div",t+"-overlays",p),a.appendChild(p)},_getLayer:function(t){for(var a=0;a<this._layers.length;a++)if(this._layers[a]&&M(this._layers[a].layer)===t)return this._layers[a]},_addLayer:function(t,a,l){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:a,overlay:l}),this.options.sortLayers&&this._layers.sort(m(function(p,v){return this.options.sortFunction(p.layer,v.layer,p.name,v.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;rn(this._baseLayersList),rn(this._overlaysList),this._layerControlInputs=[];var t,a,l,p,v=0;for(l=0;l<this._layers.length;l++)p=this._layers[l],this._addItem(p),a=a||p.overlay,t=t||!p.overlay,v+=p.overlay?0:1;return this.options.hideSingleBase&&(t=t&&v>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=a&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var a=this._getLayer(M(t.target)),l=a.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;l&&this._map.fire(l,a)},_createRadioElement:function(t,a){var l='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(a?' checked="checked"':"")+"/>",p=document.createElement("div");return p.innerHTML=l,p.firstChild},_addItem:function(t){var a=document.createElement("label"),l=this._map.hasLayer(t.layer),p;t.overlay?(p=document.createElement("input"),p.type="checkbox",p.className="leaflet-control-layers-selector",p.defaultChecked=l):p=this._createRadioElement("leaflet-base-layers_"+M(this),l),this._layerControlInputs.push(p),p.layerId=M(t.layer),Bt(p,"click",this._onInputClick,this);var v=document.createElement("span");v.innerHTML=" "+t.name;var k=document.createElement("span");a.appendChild(k),k.appendChild(p),k.appendChild(v);var Z=t.overlay?this._overlaysList:this._baseLayersList;return Z.appendChild(a),this._checkDisabledLayers(),a},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,a,l,p=[],v=[];this._handlingClick=!0;for(var k=t.length-1;k>=0;k--)a=t[k],l=this._getLayer(a.layerId).layer,a.checked?p.push(l):a.checked||v.push(l);for(k=0;k<v.length;k++)this._map.hasLayer(v[k])&&this._map.removeLayer(v[k]);for(k=0;k<p.length;k++)this._map.hasLayer(p[k])||this._map.addLayer(p[k]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,a,l,p=this._map.getZoom(),v=t.length-1;v>=0;v--)a=t[v],l=this._getLayer(a.layerId).layer,a.disabled=l.options.minZoom!==void 0&&p<l.options.minZoom||l.options.maxZoom!==void 0&&p>l.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Bt(t,"click",ce),this.expand();var a=this;setTimeout(function(){Kt(t,"click",ce),a._preventClick=!1})}}),So=function(t,a,l){return new un(t,a,l)},zn=St.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var a="leaflet-control-zoom",l=Nt("div",a+" leaflet-bar"),p=this.options;return this._zoomInButton=this._createButton(p.zoomInText,p.zoomInTitle,a+"-in",l,this._zoomIn),this._zoomOutButton=this._createButton(p.zoomOutText,p.zoomOutTitle,a+"-out",l,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),l},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,a,l,p,v){var k=Nt("a",l,p);return k.innerHTML=t,k.href="#",k.title=a,k.setAttribute("role","button"),k.setAttribute("aria-label",a),ln(k),Bt(k,"click",Ei),Bt(k,"click",v,this),Bt(k,"click",this._refocusOnMap,this),k},_updateDisabled:function(){var t=this._map,a="leaflet-disabled";ne(this._zoomInButton,a),ne(this._zoomOutButton,a),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Tt(this._zoomOutButton,a),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Tt(this._zoomInButton,a),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ft.mergeOptions({zoomControl:!0}),Ft.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new zn,this.addControl(this.zoomControl))});var Bo=function(t){return new zn(t)},Nn=St.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var a="leaflet-control-scale",l=Nt("div",a),p=this.options;return this._addScales(p,a+"-line",l),t.on(p.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),l},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,a,l){t.metric&&(this._mScale=Nt("div",a,l)),t.imperial&&(this._iScale=Nt("div",a,l))},_update:function(){var t=this._map,a=t.getSize().y/2,l=t.distance(t.containerPointToLatLng([0,a]),t.containerPointToLatLng([this.options.maxWidth,a]));this._updateScales(l)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var a=this._getRoundNum(t),l=a<1e3?a+" m":a/1e3+" km";this._updateScale(this._mScale,l,a/t)},_updateImperial:function(t){var a=t*3.2808399,l,p,v;a>5280?(l=a/5280,p=this._getRoundNum(l),this._updateScale(this._iScale,p+" mi",p/l)):(v=this._getRoundNum(a),this._updateScale(this._iScale,v+" ft",v/a))},_updateScale:function(t,a,l){t.style.width=Math.round(this.options.maxWidth*l)+"px",t.innerHTML=a},_getRoundNum:function(t){var a=Math.pow(10,(Math.floor(t)+"").length-1),l=t/a;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:1,a*l}}),Un=function(t){return new Nn(t)},To='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ke=St.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Mt.inlineSvg?To+" ":"")+"Leaflet</a>"},initialize:function(t){j(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=Nt("div","leaflet-control-attribution"),ln(this._container);for(var a in t._layers)t._layers[a].getAttribution&&this.addAttribution(t._layers[a].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},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 a in this._attributions)this._attributions[a]&&t.push(a);var l=[];this.options.prefix&&l.push(this.options.prefix),t.length&&l.push(t.join(", ")),this._container.innerHTML=l.join(' <span aria-hidden="true">|</span> ')}}});Ft.mergeOptions({attributionControl:!0}),Ft.addInitHook(function(){this.options.attributionControl&&new Ke().addTo(this)});var ar=function(t){return new Ke(t)};St.Layers=un,St.Zoom=zn,St.Scale=Nn,St.Attribution=Ke,Pi.layers=So,Pi.zoom=Bo,Pi.scale=Un,Pi.attribution=ar;var Ae=pe.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ae.addTo=function(t,a){return t.addHandler(a,this),this};var Do={Events:De},rr=Mt.touch?"touchstart mousedown":"mousedown",mi=en.extend({options:{clickTolerance:3},initialize:function(t,a,l,p){j(this,p),this._element=t,this._dragStartTarget=a||t,this._preventOutline=l},enable:function(){this._enabled||(Bt(this._dragStartTarget,rr,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(mi._dragging===this&&this.finishDrag(!0),Kt(this._dragStartTarget,rr,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!zs(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){mi._dragging===this&&this.finishDrag();return}if(!(mi._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(mi._dragging=this,this._preventOutline&&Hs(this._element),Zs(),on(),!this._moving)){this.fire("down");var a=t.touches?t.touches[0]:t,l=Ja(this._element);this._startPoint=new Pt(a.clientX,a.clientY),this._startPos=wi(this._element),this._parentScale=Vs(l);var p=t.type==="mousedown";Bt(document,p?"mousemove":"touchmove",this._onMove,this),Bt(document,p?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var a=t.touches&&t.touches.length===1?t.touches[0]:t,l=new Pt(a.clientX,a.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)<this.options.clickTolerance||(l.x/=this._parentScale.x,l.y/=this._parentScale.y,ce(t),this._moved||(this.fire("dragstart"),this._moved=!0,Tt(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Tt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(l),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),re(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){ne(document.body,"leaflet-dragging"),this._lastTarget&&(ne(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Kt(document,"mousemove touchmove",this._onMove,this),Kt(document,"mouseup touchend touchcancel",this._onUp,this),js(),hn();var a=this._moved&&this._moving;this._moving=!1,mi._dragging=!1,a&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function or(t,a,l){var p,v=[1,4,2,8],k,Z,Y,st,ht,pt,wt,Ot;for(k=0,pt=t.length;k<pt;k++)t[k]._code=Ee(t[k],a);for(Y=0;Y<4;Y++){for(wt=v[Y],p=[],k=0,pt=t.length,Z=pt-1;k<pt;Z=k++)st=t[k],ht=t[Z],st._code&wt?ht._code&wt||(Ot=gi(ht,st,wt,a,l),Ot._code=Ee(Ot,a),p.push(Ot)):(ht._code&wt&&(Ot=gi(ht,st,wt,a,l),Ot._code=Ee(Ot,a),p.push(Ot)),p.push(st));t=p}return t}function hr(t,a){var l,p,v,k,Z,Y,st,ht,pt;if(!t||t.length===0)throw new Error("latlngs not passed");Pe(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var wt=Rt([0,0]),Ot=ae(t),xe=Ot.getNorthWest().distanceTo(Ot.getSouthWest())*Ot.getNorthEast().distanceTo(Ot.getNorthWest());xe<1700&&(wt=Ys(t));var ue=t.length,ke=[];for(l=0;l<ue;l++){var ee=Rt(t[l]);ke.push(a.project(Rt([ee.lat-wt.lat,ee.lng-wt.lng])))}for(Y=st=ht=0,l=0,p=ue-1;l<ue;p=l++)v=ke[l],k=ke[p],Z=v.y*k.x-k.y*v.x,st+=(v.x+k.x)*Z,ht+=(v.y+k.y)*Z,Y+=Z*3;Y===0?pt=ke[0]:pt=[st/Y,ht/Y];var Je=a.unproject(Ct(pt));return Rt([Je.lat+wt.lat,Je.lng+wt.lng])}function Ys(t){for(var a=0,l=0,p=0,v=0;v<t.length;v++){var k=Rt(t[v]);a+=k.lat,l+=k.lng,p++}return Rt([a/p,l/p])}var Oo={__proto__:null,clipPolygon:or,polygonCenter:hr,centroid:Ys};function lr(t,a){if(!a||!t.length)return t.slice();var l=a*a;return t=ur(t,l),t=de(t,l),t}function Js(t,a,l){return Math.sqrt(cn(t,a,l,!0))}function Io(t,a,l){return cn(t,a,l)}function de(t,a){var l=t.length,p=typeof Uint8Array<"u"?Uint8Array:Array,v=new p(l);v[0]=v[l-1]=1,_e(t,v,a,0,l-1);var k,Z=[];for(k=0;k<l;k++)v[k]&&Z.push(t[k]);return Z}function _e(t,a,l,p,v){var k=0,Z,Y,st;for(Y=p+1;Y<=v-1;Y++)st=cn(t[Y],t[p],t[v],!0),st>k&&(Z=Y,k=st);k>l&&(a[Z]=1,_e(t,a,l,p,Z),_e(t,a,l,Z,v))}function ur(t,a){for(var l=[t[0]],p=1,v=0,k=t.length;p<k;p++)Ro(t[p],t[v])>a&&(l.push(t[p]),v=p);return v<k-1&&l.push(t[k-1]),l}var ki;function Si(t,a,l,p,v){var k=p?ki:Ee(t,l),Z=Ee(a,l),Y,st,ht;for(ki=Z;;){if(!(k|Z))return[t,a];if(k&Z)return!1;Y=k||Z,st=gi(t,a,Y,l,v),ht=Ee(st,l),Y===k?(t=st,k=ht):(a=st,Z=ht)}}function gi(t,a,l,p,v){var k=a.x-t.x,Z=a.y-t.y,Y=p.min,st=p.max,ht,pt;return l&8?(ht=t.x+k*(st.y-t.y)/Z,pt=st.y):l&4?(ht=t.x+k*(Y.y-t.y)/Z,pt=Y.y):l&2?(ht=st.x,pt=t.y+Z*(st.x-t.x)/k):l&1&&(ht=Y.x,pt=t.y+Z*(Y.x-t.x)/k),new Pt(ht,pt,v)}function Ee(t,a){var l=0;return t.x<a.min.x?l|=1:t.x>a.max.x&&(l|=2),t.y<a.min.y?l|=4:t.y>a.max.y&&(l|=8),l}function Ro(t,a){var l=a.x-t.x,p=a.y-t.y;return l*l+p*p}function cn(t,a,l,p){var v=a.x,k=a.y,Z=l.x-v,Y=l.y-k,st=Z*Z+Y*Y,ht;return st>0&&(ht=((t.x-v)*Z+(t.y-k)*Y)/st,ht>1?(v=l.x,k=l.y):ht>0&&(v+=Z*ht,k+=Y*ht)),Z=t.x-v,Y=t.y-k,p?Z*Z+Y*Y:new Pt(v,k)}function Pe(t){return!ct(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Ue(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Pe(t)}function Qs(t,a){var l,p,v,k,Z,Y,st,ht;if(!t||t.length===0)throw new Error("latlngs not passed");Pe(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var pt=Rt([0,0]),wt=ae(t),Ot=wt.getNorthWest().distanceTo(wt.getSouthWest())*wt.getNorthEast().distanceTo(wt.getNorthWest());Ot<1700&&(pt=Ys(t));var xe=t.length,ue=[];for(l=0;l<xe;l++){var ke=Rt(t[l]);ue.push(a.project(Rt([ke.lat-pt.lat,ke.lng-pt.lng])))}for(l=0,p=0;l<xe-1;l++)p+=ue[l].distanceTo(ue[l+1])/2;if(p===0)ht=ue[0];else for(l=0,k=0;l<xe-1;l++)if(Z=ue[l],Y=ue[l+1],v=Z.distanceTo(Y),k+=v,k>p){st=(k-p)/v,ht=[Y.x-st*(Y.x-Z.x),Y.y-st*(Y.y-Z.y)];break}var ee=a.unproject(Ct(ht));return Rt([ee.lat+pt.lat,ee.lng+pt.lng])}var Zn={__proto__:null,simplify:lr,pointToSegmentDistance:Js,closestPointOnSegment:Io,clipSegment:Si,_getEdgeIntersection:gi,_getBitCode:Ee,_sqClosestPointOnSegment:cn,isFlat:Pe,_flat:Ue,polylineCenter:Qs},ta={project:function(t){return new Pt(t.lng,t.lat)},unproject:function(t){return new Ht(t.y,t.x)},bounds:new te([-180,-90],[180,90])},Ze={R:6378137,R_MINOR:6356752314245179e-9,bounds:new te([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var a=Math.PI/180,l=this.R,p=t.lat*a,v=this.R_MINOR/l,k=Math.sqrt(1-v*v),Z=k*Math.sin(p),Y=Math.tan(Math.PI/4-p/2)/Math.pow((1-Z)/(1+Z),k/2);return p=-l*Math.log(Math.max(Y,1e-10)),new Pt(t.lng*a*l,p)},unproject:function(t){for(var a=180/Math.PI,l=this.R,p=this.R_MINOR/l,v=Math.sqrt(1-p*p),k=Math.exp(-t.y/l),Z=Math.PI/2-2*Math.atan(k),Y=0,st=.1,ht;Y<15&&Math.abs(st)>1e-7;Y++)ht=v*Math.sin(Z),ht=Math.pow((1-ht)/(1+ht),v/2),st=Math.PI/2-2*Math.atan(k*ht)-Z,Z+=st;return new Ht(Z*a,t.x*a/l)}},We={__proto__:null,LonLat:ta,Mercator:Ze,SphericalMercator:Es},jn=d({},fi,{code:"EPSG:3395",projection:Ze,transformation:function(){var t=.5/(Math.PI*Ze.R);return sn(t,.5,-t,.5)}()}),ea=d({},fi,{code:"EPSG:4326",projection:ta,transformation:sn(1/180,1,-1/180,.5)}),ia=d({},si,{projection:ta,transformation:sn(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,a){var l=a.lng-t.lng,p=a.lat-t.lat;return Math.sqrt(l*l+p*p)},infinite:!0});si.Earth=fi,si.EPSG3395=jn,si.EPSG3857=ks,si.EPSG900913=Ea,si.EPSG4326=ea,si.Simple=ia;var ve=en.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[M(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[M(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var a=t.target;if(a.hasLayer(this)){if(this._map=a,this._zoomAnimated=a._zoomAnimated,this.getEvents){var l=this.getEvents();a.on(l,this),this.once("remove",function(){a.off(l,this)},this)}this.onAdd(a),this.fire("add"),a.fire("layeradd",{layer:this})}}});Ft.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var a=M(t);return this._layers[a]?this:(this._layers[a]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var a=M(t);return this._layers[a]?(this._loaded&&t.onRemove(this),delete this._layers[a],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return M(t)in this._layers},eachLayer:function(t,a){for(var l in this._layers)t.call(a,this._layers[l]);return this},_addLayers:function(t){t=t?ct(t)?t:[t]:[];for(var a=0,l=t.length;a<l;a++)this.addLayer(t[a])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[M(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var a=M(t);this._zoomBoundLayers[a]&&(delete this._zoomBoundLayers[a],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,a=-1/0,l=this._getZoomSpan();for(var p in this._zoomBoundLayers){var v=this._zoomBoundLayers[p].options;t=v.minZoom===void 0?t:Math.min(t,v.minZoom),a=v.maxZoom===void 0?a:Math.max(a,v.maxZoom)}this._layersMaxZoom=a===-1/0?void 0:a,this._layersMinZoom=t===1/0?void 0:t,l!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var qi=ve.extend({initialize:function(t,a){j(this,a),this._layers={};var l,p;if(t)for(l=0,p=t.length;l<p;l++)this.addLayer(t[l])},addLayer:function(t){var a=this.getLayerId(t);return this._layers[a]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var a=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[a]&&this._map.removeLayer(this._layers[a]),delete this._layers[a],this},hasLayer:function(t){var a=typeof t=="number"?t:this.getLayerId(t);return a in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var a=Array.prototype.slice.call(arguments,1),l,p;for(l in this._layers)p=this._layers[l],p[t]&&p[t].apply(p,a);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,a){for(var l in this._layers)t.call(a,this._layers[l]);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 M(t)}}),Fo=function(t,a){return new qi(t,a)},qe=qi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),qi.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),qi.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 Ce;for(var a in this._layers){var l=this._layers[a];t.extend(l.getBounds?l.getBounds():l.getLatLng())}return t}}),Go=function(t,a){return new qe(t,a)},Hi=pe.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){j(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,a){var l=this._getIconUrl(t);if(!l){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var p=this._createImg(l,a&&a.tagName==="IMG"?a:null);return this._setIconStyles(p,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(p.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),p},_setIconStyles:function(t,a){var l=this.options,p=l[a+"Size"];typeof p=="number"&&(p=[p,p]);var v=Ct(p),k=Ct(a==="shadow"&&l.shadowAnchor||l.iconAnchor||v&&v.divideBy(2,!0));t.className="leaflet-marker-"+a+" "+(l.className||""),k&&(t.style.marginLeft=-k.x+"px",t.style.marginTop=-k.y+"px"),v&&(t.style.width=v.x+"px",t.style.height=v.y+"px")},_createImg:function(t,a){return a=a||document.createElement("img"),a.src=t,a},_getIconUrl:function(t){return Mt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function zo(t){return new Hi(t)}var dn=Hi.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 typeof dn.imagePath!="string"&&(dn.imagePath=this._detectIconPath()),(this.options.imagePath||dn.imagePath)+Hi.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var a=function(l,p,v){var k=p.exec(l);return k&&k[v]};return t=a(t,/^url\((['"])?(.+)\1\)$/,2),t&&a(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=Nt("div","leaflet-default-icon-path",document.body),a=pi(t,"background-image")||pi(t,"backgroundImage");if(document.body.removeChild(t),a=this._stripUrl(a),a)return a;var l=document.querySelector('link[href$="leaflet.css"]');return l?l.href.substring(0,l.href.length-11-1):""}}),qn=Ae.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new mi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Tt(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&&ne(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var a=this._marker,l=a._map,p=this._marker.options.autoPanSpeed,v=this._marker.options.autoPanPadding,k=wi(a._icon),Z=l.getPixelBounds(),Y=l.getPixelOrigin(),st=we(Z.min._subtract(Y).add(v),Z.max._subtract(Y).subtract(v));if(!st.contains(k)){var ht=Ct((Math.max(st.max.x,k.x)-st.max.x)/(Z.max.x-st.max.x)-(Math.min(st.min.x,k.x)-st.min.x)/(Z.min.x-st.min.x),(Math.max(st.max.y,k.y)-st.max.y)/(Z.max.y-st.max.y)-(Math.min(st.min.y,k.y)-st.min.y)/(Z.min.y-st.min.y)).multiplyBy(p);l.panBy(ht,{animate:!1}),this._draggable._newPos._add(ht),this._draggable._startPos._add(ht),re(a._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=Et(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&&(Zt(this._panRequest),this._panRequest=Et(this._adjustPan.bind(this,t)))},_onDrag:function(t){var a=this._marker,l=a._shadow,p=wi(a._icon),v=a._map.layerPointToLatLng(p);l&&re(l,p),a._latlng=v,t.latlng=v,t.oldLatLng=this._oldLatLng,a.fire("move",t).fire("drag",t)},_onDragEnd:function(t){Zt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Hn=ve.extend({options:{icon:new dn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,a){j(this,a),this._latlng=Rt(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 a=this._latlng;return this._latlng=Rt(t),this.update(),this.fire("move",{oldLatLng:a,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,a="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),l=t.icon.createIcon(this._icon),p=!1;l!==this._icon&&(this._icon&&this._removeIcon(),p=!0,t.title&&(l.title=t.title),l.tagName==="IMG"&&(l.alt=t.alt||"")),Tt(l,a),t.keyboard&&(l.tabIndex="0",l.setAttribute("role","button")),this._icon=l,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Bt(l,"focus",this._panOnFocus,this);var v=t.icon.createShadow(this._shadow),k=!1;v!==this._shadow&&(this._removeShadow(),k=!0),v&&(Tt(v,a),v.alt=""),this._shadow=v,t.opacity<1&&this._updateOpacity(),p&&this.getPane().appendChild(this._icon),this._initInteraction(),v&&k&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Kt(this._icon,"focus",this._panOnFocus,this),Qt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Qt(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&re(this._icon,t),this._shadow&&re(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 a=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(a)},_initInteraction:function(){if(this.options.interactive&&(Tt(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&&Ne(this._icon,t),this._shadow&&Ne(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var a=this.options.icon.options,l=a.iconSize?Ct(a.iconSize):Ct(0,0),p=a.iconAnchor?Ct(a.iconAnchor):Ct(0,0);t.panInside(this._latlng,{paddingTopLeft:p,paddingBottomRight:l.subtract(p)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function No(t,a){return new Hn(t,a)}var ai=ve.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 j(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||0)}}),Xe=ai.extend({options:{fill:!0,radius:10},initialize:function(t,a){j(this,a),this._latlng=Rt(t),this._radius=this.options.radius},setLatLng:function(t){var a=this._latlng;return this._latlng=Rt(t),this.redraw(),this.fire("move",{oldLatLng:a,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 a=t&&t.radius||this._radius;return ai.prototype.setStyle.call(this,t),this.setRadius(a),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,a=this._radiusY||t,l=this._clickTolerance(),p=[t+l,a+l];this._pxBounds=new te(this._point.subtract(p),this._point.add(p))},_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 cr(t,a){return new Xe(t,a)}var na=Xe.extend({initialize:function(t,a,l){if(typeof a=="number"&&(a=d({},l,{radius:a})),j(this,a),this._latlng=Rt(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 Ce(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ai.prototype.setStyle,_project:function(){var t=this._latlng.lng,a=this._latlng.lat,l=this._map,p=l.options.crs;if(p.distance===fi.distance){var v=Math.PI/180,k=this._mRadius/fi.R/v,Z=l.project([a+k,t]),Y=l.project([a-k,t]),st=Z.add(Y).divideBy(2),ht=l.unproject(st).lat,pt=Math.acos((Math.cos(k*v)-Math.sin(a*v)*Math.sin(ht*v))/(Math.cos(a*v)*Math.cos(ht*v)))/v;(isNaN(pt)||pt===0)&&(pt=k/Math.cos(Math.PI/180*a)),this._point=st.subtract(l.getPixelOrigin()),this._radius=isNaN(pt)?0:st.x-l.project([ht,t-pt]).x,this._radiusY=st.y-Z.y}else{var wt=p.unproject(p.project(this._latlng).subtract([this._mRadius,0]));this._point=l.latLngToLayerPoint(this._latlng),this._radius=this._point.x-l.latLngToLayerPoint(wt).x}this._updateBounds()}});function Bi(t,a,l){return new na(t,a,l)}var ri=ai.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,a){j(this,a),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 a=1/0,l=null,p=cn,v,k,Z=0,Y=this._parts.length;Z<Y;Z++)for(var st=this._parts[Z],ht=1,pt=st.length;ht<pt;ht++){v=st[ht-1],k=st[ht];var wt=p(t,v,k,!0);wt<a&&(a=wt,l=p(t,v,k))}return l&&(l.distance=Math.sqrt(a)),l},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Qs(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,a){return a=a||this._defaultShape(),t=Rt(t),a.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Ce,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Pe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var a=[],l=Pe(t),p=0,v=t.length;p<v;p++)l?(a[p]=Rt(t[p]),this._bounds.extend(a[p])):a[p]=this._convertLatLngs(t[p]);return a},_project:function(){var t=new te;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(),a=new Pt(t,t);this._rawPxBounds&&(this._pxBounds=new te([this._rawPxBounds.min.subtract(a),this._rawPxBounds.max.add(a)]))},_projectLatlngs:function(t,a,l){var p=t[0]instanceof Ht,v=t.length,k,Z;if(p){for(Z=[],k=0;k<v;k++)Z[k]=this._map.latLngToLayerPoint(t[k]),l.extend(Z[k]);a.push(Z)}else for(k=0;k<v;k++)this._projectLatlngs(t[k],a,l)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var a=this._parts,l,p,v,k,Z,Y,st;for(l=0,v=0,k=this._rings.length;l<k;l++)for(st=this._rings[l],p=0,Z=st.length;p<Z-1;p++)Y=Si(st[p],st[p+1],t,p,!0),Y&&(a[v]=a[v]||[],a[v].push(Y[0]),(Y[1]!==st[p+1]||p===Z-2)&&(a[v].push(Y[1]),v++))}},_simplifyPoints:function(){for(var t=this._parts,a=this.options.smoothFactor,l=0,p=t.length;l<p;l++)t[l]=lr(t[l],a)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,a){var l,p,v,k,Z,Y,st=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(l=0,k=this._parts.length;l<k;l++)for(Y=this._parts[l],p=0,Z=Y.length,v=Z-1;p<Z;v=p++)if(!(!a&&p===0)&&Js(t,Y[v],Y[p])<=st)return!0;return!1}});function Uo(t,a){return new ri(t,a)}ri._flat=Ue;var yi=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()");return hr(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var a=ri.prototype._convertLatLngs.call(this,t),l=a.length;return l>=2&&a[0]instanceof Ht&&a[0].equals(a[l-1])&&a.pop(),a},_setLatLngs:function(t){ri.prototype._setLatLngs.call(this,t),Pe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Pe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,a=this.options.weight,l=new Pt(a,a);if(t=new te(t.min.subtract(l),t.max.add(l)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var p=0,v=this._rings.length,k;p<v;p++)k=or(this._rings[p],t,!0),k.length&&this._parts.push(k)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var a=!1,l,p,v,k,Z,Y,st,ht;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(k=0,st=this._parts.length;k<st;k++)for(l=this._parts[k],Z=0,ht=l.length,Y=ht-1;Z<ht;Y=Z++)p=l[Z],v=l[Y],p.y>t.y!=v.y>t.y&&t.x<(v.x-p.x)*(t.y-p.y)/(v.y-p.y)+p.x&&(a=!a);return a||ri.prototype._containsPoint.call(this,t,!0)}});function fn(t,a){return new yi(t,a)}var oi=qe.extend({initialize:function(t,a){j(this,a),this._layers={},t&&this.addData(t)},addData:function(t){var a=ct(t)?t:t.features,l,p,v;if(a){for(l=0,p=a.length;l<p;l++)v=a[l],(v.geometries||v.geometry||v.features||v.coordinates)&&this.addData(v);return this}var k=this.options;if(k.filter&&!k.filter(t))return this;var Z=Vn(t,k);return Z?(Z.feature=Yn(t),Z.defaultOptions=Z.options,this.resetStyle(Z),k.onEachFeature&&k.onEachFeature(t,Z),this.addLayer(Z)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=d({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(a){this._setLayerStyle(a,t)},this)},_setLayerStyle:function(t,a){t.setStyle&&(typeof a=="function"&&(a=a(t.feature)),t.setStyle(a))}});function Vn(t,a){var l=t.type==="Feature"?t.geometry:t,p=l?l.coordinates:null,v=[],k=a&&a.pointToLayer,Z=a&&a.coordsToLatLng||$n,Y,st,ht,pt;if(!p&&!l)return null;switch(l.type){case"Point":return Y=Z(p),dr(k,t,Y,a);case"MultiPoint":for(ht=0,pt=p.length;ht<pt;ht++)Y=Z(p[ht]),v.push(dr(k,t,Y,a));return new qe(v);case"LineString":case"MultiLineString":return st=Kn(p,l.type==="LineString"?0:1,Z),new ri(st,a);case"Polygon":case"MultiPolygon":return st=Kn(p,l.type==="Polygon"?1:2,Z),new yi(st,a);case"GeometryCollection":for(ht=0,pt=l.geometries.length;ht<pt;ht++){var wt=Vn({geometry:l.geometries[ht],type:"Feature",properties:t.properties},a);wt&&v.push(wt)}return new qe(v);case"FeatureCollection":for(ht=0,pt=l.features.length;ht<pt;ht++){var Ot=Vn(l.features[ht],a);Ot&&v.push(Ot)}return new qe(v);default:throw new Error("Invalid GeoJSON object.")}}function dr(t,a,l,p){return t?t(a,l):new Hn(l,p&&p.markersInheritOptions&&p)}function $n(t){return new Ht(t[1],t[0],t[2])}function Kn(t,a,l){for(var p=[],v=0,k=t.length,Z;v<k;v++)Z=a?Kn(t[v],a-1,l):(l||$n)(t[v]),p.push(Z);return p}function Wn(t,a){return t=Rt(t),t.alt!==void 0?[C(t.lng,a),C(t.lat,a),C(t.alt,a)]:[C(t.lng,a),C(t.lat,a)]}function Xn(t,a,l,p){for(var v=[],k=0,Z=t.length;k<Z;k++)v.push(a?Xn(t[k],Pe(t[k])?0:a-1,l,p):Wn(t[k],p));return!a&&l&&v.length>0&&v.push(v[0].slice()),v}function Vi(t,a){return t.feature?d({},t.feature,{geometry:a}):Yn(a)}function Yn(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Jn={toGeoJSON:function(t){return Vi(this,{type:"Point",coordinates:Wn(this.getLatLng(),t)})}};Hn.include(Jn),na.include(Jn),Xe.include(Jn),ri.include({toGeoJSON:function(t){var a=!Pe(this._latlngs),l=Xn(this._latlngs,a?1:0,!1,t);return Vi(this,{type:(a?"Multi":"")+"LineString",coordinates:l})}}),yi.include({toGeoJSON:function(t){var a=!Pe(this._latlngs),l=a&&!Pe(this._latlngs[0]),p=Xn(this._latlngs,l?2:a?1:0,!0,t);return a||(p=[p]),Vi(this,{type:(l?"Multi":"")+"Polygon",coordinates:p})}}),qi.include({toMultiPoint:function(t){var a=[];return this.eachLayer(function(l){a.push(l.toGeoJSON(t).geometry.coordinates)}),Vi(this,{type:"MultiPoint",coordinates:a})},toGeoJSON:function(t){var a=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(a==="MultiPoint")return this.toMultiPoint(t);var l=a==="GeometryCollection",p=[];return this.eachLayer(function(v){if(v.toGeoJSON){var k=v.toGeoJSON(t);if(l)p.push(k.geometry);else{var Z=Yn(k);Z.type==="FeatureCollection"?p.push.apply(p,Z.features):p.push(Z)}}}),l?Vi(this,{geometries:p,type:"GeometryCollection"}):{type:"FeatureCollection",features:p}}});function Qn(t,a){return new oi(t,a)}var fr=Qn,$i=ve.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,a,l){this._url=t,this._bounds=ae(a),j(this,l)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Tt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Qt(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&&Zi(this._image),this},bringToBack:function(){return this._map&&Li(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=ae(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=this._url.tagName==="IMG",a=this._image=t?this._url:Nt("img");if(Tt(a,"leaflet-image-layer"),this._zoomAnimated&&Tt(a,"leaflet-zoom-animated"),this.options.className&&Tt(a,this.options.className),a.onselectstart=b,a.onmousemove=b,a.onload=m(this.fire,this,"load"),a.onerror=m(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=a.src;return}a.src=this._url,a.alt=this.options.alt},_animateZoom:function(t){var a=this._map.getZoomScale(t.zoom),l=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;bi(this._image,l,a)},_reset:function(){var t=this._image,a=new te(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),l=a.getSize();re(t,a.min),t.style.width=l.x+"px",t.style.height=l.y+"px"},_updateOpacity:function(){Ne(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(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)},getCenter:function(){return this._bounds.getCenter()}}),Zo=function(t,a,l){return new $i(t,a,l)},pn=$i.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",a=this._image=t?this._url:Nt("video");if(Tt(a,"leaflet-image-layer"),this._zoomAnimated&&Tt(a,"leaflet-zoom-animated"),this.options.className&&Tt(a,this.options.className),a.onselectstart=b,a.onmousemove=b,a.onloadeddata=m(this.fire,this,"load"),t){for(var l=a.getElementsByTagName("source"),p=[],v=0;v<l.length;v++)p.push(l[v].src);this._url=l.length>0?p:[a.src];return}ct(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(a.style,"objectFit")&&(a.style.objectFit="fill"),a.autoplay=!!this.options.autoplay,a.loop=!!this.options.loop,a.muted=!!this.options.muted,a.playsInline=!!this.options.playsInline;for(var k=0;k<this._url.length;k++){var Z=Nt("source");Z.src=this._url[k],a.appendChild(Z)}}});function pr(t,a,l){return new pn(t,a,l)}var _r=$i.extend({_initImage:function(){var t=this._image=this._url;Tt(t,"leaflet-image-layer"),this._zoomAnimated&&Tt(t,"leaflet-zoom-animated"),this.options.className&&Tt(t,this.options.className),t.onselectstart=b,t.onmousemove=b}});function jo(t,a,l){return new _r(t,a,l)}var Ye=ve.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,a){t&&(t instanceof Ht||ct(t))?(this._latlng=Rt(t),j(this,a)):(j(this,t),this._source=a),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Ne(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Ne(this._container,1),this.bringToFront(),this.options.interactive&&(Tt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Ne(this._container,0),this._removeTimeout=setTimeout(m(Qt,void 0,this._container),200)):Qt(this._container),this.options.interactive&&(ne(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=Rt(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&&Zi(this._container),this},bringToBack:function(){return this._map&&Li(this._container),this},_prepareOpen:function(t){var a=this._source;if(!a._map)return!1;if(a instanceof qe){a=null;var l=this._source._layers;for(var p in l)if(l[p]._map){a=l[p];break}if(!a)return!1;this._source=a}if(!t)if(a.getCenter)t=a.getCenter();else if(a.getLatLng)t=a.getLatLng();else if(a.getBounds)t=a.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,a=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof a=="string")t.innerHTML=a;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(a)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),a=Ct(this.options.offset),l=this._getAnchor();this._zoomAnimated?re(this._container,t.add(l)):a=a.add(t).add(l);var p=this._containerBottom=-a.y,v=this._containerLeft=-Math.round(this._containerWidth/2)+a.x;this._container.style.bottom=p+"px",this._container.style.left=v+"px"}},_getAnchor:function(){return[0,0]}});Ft.include({_initOverlay:function(t,a,l,p){var v=a;return v instanceof t||(v=new t(p).setContent(a)),l&&v.setLatLng(l),v}}),ve.include({_initOverlay:function(t,a,l,p){var v=l;return v instanceof t?(j(v,p),v._source=this):(v=a&&!p?a:new t(p,this),v.setContent(l)),v}});var Ai=Ye.extend({options:{pane:"popupPane",offset:[0,7],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=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ye.prototype.openOn.call(this,t)},onAdd:function(t){Ye.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ai||this._source.on("preclick",Ci))},onRemove:function(t){Ye.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ai||this._source.off("preclick",Ci))},getEvents:function(){var t=Ye.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",a=this._container=Nt("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),l=this._wrapper=Nt("div",t+"-content-wrapper",a);if(this._contentNode=Nt("div",t+"-content",l),ln(a),Ws(this._contentNode),Bt(a,"contextmenu",Ci),this._tipContainer=Nt("div",t+"-tip-container",a),this._tip=Nt("div",t+"-tip",this._tipContainer),this.options.closeButton){var p=this._closeButton=Nt("a",t+"-close-button",a);p.setAttribute("role","button"),p.setAttribute("aria-label","Close popup"),p.href="#close",p.innerHTML='<span aria-hidden="true">&#215;</span>',Bt(p,"click",function(v){ce(v),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,a=t.style;a.width="",a.whiteSpace="nowrap";var l=t.offsetWidth;l=Math.min(l,this.options.maxWidth),l=Math.max(l,this.options.minWidth),a.width=l+1+"px",a.whiteSpace="",a.height="";var p=t.offsetHeight,v=this.options.maxHeight,k="leaflet-popup-scrolled";v&&p>v?(a.height=v+"px",Tt(t,k)):ne(t,k),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var a=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),l=this._getAnchor();re(this._container,a.add(l))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,a=parseInt(pi(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+a,p=this._containerWidth,v=new Pt(this._containerLeft,-l-this._containerBottom);v._add(wi(this._container));var k=t.layerPointToContainerPoint(v),Z=Ct(this.options.autoPanPadding),Y=Ct(this.options.autoPanPaddingTopLeft||Z),st=Ct(this.options.autoPanPaddingBottomRight||Z),ht=t.getSize(),pt=0,wt=0;k.x+p+st.x>ht.x&&(pt=k.x+p-ht.x+st.x),k.x-pt-Y.x<0&&(pt=k.x-Y.x),k.y+l+st.y>ht.y&&(wt=k.y+l-ht.y+st.y),k.y-wt-Y.y<0&&(wt=k.y-Y.y),(pt||wt)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([pt,wt]))}},_getAnchor:function(){return Ct(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),qo=function(t,a){return new Ai(t,a)};Ft.mergeOptions({closePopupOnClick:!0}),Ft.include({openPopup:function(t,a,l){return this._initOverlay(Ai,t,a,l).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),ve.include({bindPopup:function(t,a){return this._popup=this._initOverlay(Ai,this._popup,t,a),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){return this._popup&&(this instanceof qe||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){Ei(t);var a=t.layer||t.target;if(this._popup._source===a&&!(a instanceof ai)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=a,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var ts=Ye.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ye.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ye.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ye.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",a=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Nt("div",a),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+M(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var a,l,p=this._map,v=this._container,k=p.latLngToContainerPoint(p.getCenter()),Z=p.layerPointToContainerPoint(t),Y=this.options.direction,st=v.offsetWidth,ht=v.offsetHeight,pt=Ct(this.options.offset),wt=this._getAnchor();Y==="top"?(a=st/2,l=ht):Y==="bottom"?(a=st/2,l=0):Y==="center"?(a=st/2,l=ht/2):Y==="right"?(a=0,l=ht/2):Y==="left"?(a=st,l=ht/2):Z.x<k.x?(Y="right",a=0,l=ht/2):(Y="left",a=st+(pt.x+wt.x)*2,l=ht/2),t=t.subtract(Ct(a,l,!0)).add(pt).add(wt),ne(v,"leaflet-tooltip-right"),ne(v,"leaflet-tooltip-left"),ne(v,"leaflet-tooltip-top"),ne(v,"leaflet-tooltip-bottom"),Tt(v,"leaflet-tooltip-"+Y),re(v,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Ne(this._container,t)},_animateZoom:function(t){var a=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(a)},_getAnchor:function(){return Ct(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ho=function(t,a){return new ts(t,a)};Ft.include({openTooltip:function(t,a,l){return this._initOverlay(ts,t,a,l).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),ve.include({bindTooltip:function(t,a){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ts,this._tooltip,t,a),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 a=t?"off":"on",l={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?l.add=this._openTooltip:(l.mouseover=this._openTooltip,l.mouseout=this.closeTooltip,l.click=this._openTooltip,this._map?this._addFocusListeners():l.add=this._addFocusListeners),this._tooltip.options.sticky&&(l.mousemove=this._moveTooltip),this[a](l),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof qe||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var a=typeof t.getElement=="function"&&t.getElement();a&&(Bt(a,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),Bt(a,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var a=typeof t.getElement=="function"&&t.getElement();a&&a.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var a=this;this._map.once("moveend",function(){a._openOnceFlag=!1,a._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var a=t.latlng,l,p;this._tooltip.options.sticky&&t.originalEvent&&(l=this._map.mouseEventToContainerPoint(t.originalEvent),p=this._map.containerPointToLayerPoint(l),a=this._map.layerPointToLatLng(p)),this._tooltip.setLatLng(a)}});var mr=Hi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var a=t&&t.tagName==="DIV"?t:document.createElement("div"),l=this.options;if(l.html instanceof Element?(rn(a),a.appendChild(l.html)):a.innerHTML=l.html!==!1?l.html:"",l.bgPos){var p=Ct(l.bgPos);a.style.backgroundPosition=-p.x+"px "+-p.y+"px"}return this._setIconStyles(a,"icon"),a},createShadow:function(){return null}});function Vo(t){return new mr(t)}Hi.Default=dn;var _n=ve.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Mt.mobile,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){j(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),Qt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Zi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Li(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(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return 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=B(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 Pt?t:new Pt(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var a=this.getPane().children,l=-t(-1/0,1/0),p=0,v=a.length,k;p<v;p++)k=a[p].style.zIndex,a[p]!==this._container&&k&&(l=t(l,+k));isFinite(l)&&(this.options.zIndex=l+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Mt.ielt9){Ne(this._container,this.options.opacity);var t=+new Date,a=!1,l=!1;for(var p in this._tiles){var v=this._tiles[p];if(!(!v.current||!v.loaded)){var k=Math.min(1,(t-v.loaded)/200);Ne(v.el,k),k<1?a=!0:(v.active?l=!0:this._onOpaqueTile(v),v.active=!0)}}l&&!this._noPrune&&this._pruneTiles(),a&&(Zt(this._fadeFrame),this._fadeFrame=Et(this._updateOpacity,this))}},_onOpaqueTile:b,_initContainer:function(){this._container||(this._container=Nt("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,a=this.options.maxZoom;if(t!==void 0){for(var l in this._levels)l=Number(l),this._levels[l].el.children.length||l===t?(this._levels[l].el.style.zIndex=a-Math.abs(t-l),this._onUpdateLevel(l)):(Qt(this._levels[l].el),this._removeTilesAtZoom(l),this._onRemoveLevel(l),delete this._levels[l]);var p=this._levels[t],v=this._map;return p||(p=this._levels[t]={},p.el=Nt("div","leaflet-tile-container leaflet-zoom-animated",this._container),p.el.style.zIndex=a,p.origin=v.project(v.unproject(v.getPixelOrigin()),t).round(),p.zoom=t,this._setZoomTransform(p,v.getCenter(),v.getZoom()),b(p.el.offsetWidth),this._onCreateLevel(p)),this._level=p,p}},_onUpdateLevel:b,_onRemoveLevel:b,_onCreateLevel:b,_pruneTiles:function(){if(this._map){var t,a,l=this._map.getZoom();if(l>this.options.maxZoom||l<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)a=this._tiles[t],a.retain=a.current;for(t in this._tiles)if(a=this._tiles[t],a.current&&!a.active){var p=a.coords;this._retainParent(p.x,p.y,p.z,p.z-5)||this._retainChildren(p.x,p.y,p.z,p.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var a in this._tiles)this._tiles[a].coords.z===t&&this._removeTile(a)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)Qt(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,a,l,p){var v=Math.floor(t/2),k=Math.floor(a/2),Z=l-1,Y=new Pt(+v,+k);Y.z=+Z;var st=this._tileCoordsToKey(Y),ht=this._tiles[st];return ht&&ht.active?(ht.retain=!0,!0):(ht&&ht.loaded&&(ht.retain=!0),Z>p?this._retainParent(v,k,Z,p):!1)},_retainChildren:function(t,a,l,p){for(var v=2*t;v<2*t+2;v++)for(var k=2*a;k<2*a+2;k++){var Z=new Pt(v,k);Z.z=l+1;var Y=this._tileCoordsToKey(Z),st=this._tiles[Y];if(st&&st.active){st.retain=!0;continue}else st&&st.loaded&&(st.retain=!0);l+1<p&&this._retainChildren(v,k,l+1,p)}},_resetView:function(t){var a=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),a,a)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var a=this.options;return a.minNativeZoom!==void 0&&t<a.minNativeZoom?a.minNativeZoom:a.maxNativeZoom!==void 0&&a.maxNativeZoom<t?a.maxNativeZoom:t},_setView:function(t,a,l,p){var v=Math.round(a);this.options.maxZoom!==void 0&&v>this.options.maxZoom||this.options.minZoom!==void 0&&v<this.options.minZoom?v=void 0:v=this._clampZoom(v);var k=this.options.updateWhenZooming&&v!==this._tileZoom;(!p||k)&&(this._tileZoom=v,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),v!==void 0&&this._update(t),l||this._pruneTiles(),this._noPrune=!!l),this._setZoomTransforms(t,a)},_setZoomTransforms:function(t,a){for(var l in this._levels)this._setZoomTransform(this._levels[l],t,a)},_setZoomTransform:function(t,a,l){var p=this._map.getZoomScale(l,t.zoom),v=t.origin.multiplyBy(p).subtract(this._map._getNewPixelOrigin(a,l)).round();Mt.any3d?bi(t.el,v,p):re(t.el,v)},_resetGrid:function(){var t=this._map,a=t.options.crs,l=this._tileSize=this.getTileSize(),p=this._tileZoom,v=this._map.getPixelWorldBounds(this._tileZoom);v&&(this._globalTileRange=this._pxBoundsToTileRange(v)),this._wrapX=a.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,a.wrapLng[0]],p).x/l.x),Math.ceil(t.project([0,a.wrapLng[1]],p).x/l.y)],this._wrapY=a.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([a.wrapLat[0],0],p).y/l.x),Math.ceil(t.project([a.wrapLat[1],0],p).y/l.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var a=this._map,l=a._animatingZoom?Math.max(a._animateToZoom,a.getZoom()):a.getZoom(),p=a.getZoomScale(l,this._tileZoom),v=a.project(t,this._tileZoom).floor(),k=a.getSize().divideBy(p*2);return new te(v.subtract(k),v.add(k))},_update:function(t){var a=this._map;if(a){var l=this._clampZoom(a.getZoom());if(t===void 0&&(t=a.getCenter()),this._tileZoom!==void 0){var p=this._getTiledPixelBounds(t),v=this._pxBoundsToTileRange(p),k=v.getCenter(),Z=[],Y=this.options.keepBuffer,st=new te(v.getBottomLeft().subtract([Y,-Y]),v.getTopRight().add([Y,-Y]));if(!(isFinite(v.min.x)&&isFinite(v.min.y)&&isFinite(v.max.x)&&isFinite(v.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ht in this._tiles){var pt=this._tiles[ht].coords;(pt.z!==this._tileZoom||!st.contains(new Pt(pt.x,pt.y)))&&(this._tiles[ht].current=!1)}if(Math.abs(l-this._tileZoom)>1){this._setView(t,l);return}for(var wt=v.min.y;wt<=v.max.y;wt++)for(var Ot=v.min.x;Ot<=v.max.x;Ot++){var xe=new Pt(Ot,wt);if(xe.z=this._tileZoom,!!this._isValidTile(xe)){var ue=this._tiles[this._tileCoordsToKey(xe)];ue?ue.current=!0:Z.push(xe)}}if(Z.sort(function(ee,Je){return ee.distanceTo(k)-Je.distanceTo(k)}),Z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ke=document.createDocumentFragment();for(Ot=0;Ot<Z.length;Ot++)this._addTile(Z[Ot],ke);this._level.el.appendChild(ke)}}}},_isValidTile:function(t){var a=this._map.options.crs;if(!a.infinite){var l=this._globalTileRange;if(!a.wrapLng&&(t.x<l.min.x||t.x>l.max.x)||!a.wrapLat&&(t.y<l.min.y||t.y>l.max.y))return!1}if(!this.options.bounds)return!0;var p=this._tileCoordsToBounds(t);return ae(this.options.bounds).overlaps(p)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var a=this._map,l=this.getTileSize(),p=t.scaleBy(l),v=p.add(l),k=a.unproject(p,t.z),Z=a.unproject(v,t.z);return[k,Z]},_tileCoordsToBounds:function(t){var a=this._tileCoordsToNwSe(t),l=new Ce(a[0],a[1]);return this.options.noWrap||(l=this._map.wrapLatLngBounds(l)),l},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var a=t.split(":"),l=new Pt(+a[0],+a[1]);return l.z=+a[2],l},_removeTile:function(t){var a=this._tiles[t];a&&(Qt(a.el),delete this._tiles[t],this.fire("tileunload",{tile:a.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Tt(t,"leaflet-tile");var a=this.getTileSize();t.style.width=a.x+"px",t.style.height=a.y+"px",t.onselectstart=b,t.onmousemove=b,Mt.ielt9&&this.options.opacity<1&&Ne(t,this.options.opacity)},_addTile:function(t,a){var l=this._getTilePos(t),p=this._tileCoordsToKey(t),v=this.createTile(this._wrapCoords(t),m(this._tileReady,this,t));this._initTile(v),this.createTile.length<2&&Et(m(this._tileReady,this,t,null,v)),re(v,l),this._tiles[p]={el:v,coords:t,current:!0},a.appendChild(v),this.fire("tileloadstart",{tile:v,coords:t})},_tileReady:function(t,a,l){a&&this.fire("tileerror",{error:a,tile:l,coords:t});var p=this._tileCoordsToKey(t);l=this._tiles[p],l&&(l.loaded=+new Date,this._map._fadeAnimated?(Ne(l.el,0),Zt(this._fadeFrame),this._fadeFrame=Et(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),a||(Tt(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mt.ielt9||!this._map._fadeAnimated?Et(this._pruneTiles,this):setTimeout(m(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var a=new Pt(this._wrapX?E(t.x,this._wrapX):t.x,this._wrapY?E(t.y,this._wrapY):t.y);return a.z=t.z,a},_pxBoundsToTileRange:function(t){var a=this.getTileSize();return new te(t.min.unscaleBy(a).floor(),t.max.unscaleBy(a).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function $o(t){return new _n(t)}var Ki=_n.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,a){this._url=t,a=j(this,a),a.detectRetina&&Mt.retina&&a.maxZoom>0?(a.tileSize=Math.floor(a.tileSize/2),a.zoomReverse?(a.zoomOffset--,a.minZoom=Math.min(a.maxZoom,a.minZoom+1)):(a.zoomOffset++,a.maxZoom=Math.max(a.minZoom,a.maxZoom-1)),a.minZoom=Math.max(0,a.minZoom)):a.zoomReverse?a.minZoom=Math.min(a.maxZoom,a.minZoom):a.maxZoom=Math.max(a.minZoom,a.maxZoom),typeof a.subdomains=="string"&&(a.subdomains=a.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,a){return this._url===t&&a===void 0&&(a=!0),this._url=t,a||this.redraw(),this},createTile:function(t,a){var l=document.createElement("img");return Bt(l,"load",m(this._tileOnLoad,this,a,l)),Bt(l,"error",m(this._tileOnError,this,a,l)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(l.referrerPolicy=this.options.referrerPolicy),l.alt="",l.src=this.getTileUrl(t),l},getTileUrl:function(t){var a={r:Mt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var l=this._globalTileRange.max.y-t.y;this.options.tms&&(a.y=l),a["-y"]=l}return rt(this._url,d(a,this.options))},_tileOnLoad:function(t,a){Mt.ielt9?setTimeout(m(t,this,null,a),0):t(null,a)},_tileOnError:function(t,a,l){var p=this.options.errorTileUrl;p&&a.getAttribute("src")!==p&&(a.src=p),t(l,a)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,a=this.options.maxZoom,l=this.options.zoomReverse,p=this.options.zoomOffset;return l&&(t=a-t),t+p},_getSubdomain:function(t){var a=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[a]},_abortLoading:function(){var t,a;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(a=this._tiles[t].el,a.onload=b,a.onerror=b,!a.complete)){a.src=mt;var l=this._tiles[t].coords;Qt(a),delete this._tiles[t],this.fire("tileabort",{tile:a,coords:l})}},_removeTile:function(t){var a=this._tiles[t];if(a)return a.el.setAttribute("src",mt),_n.prototype._removeTile.call(this,t)},_tileReady:function(t,a,l){if(!(!this._map||l&&l.getAttribute("src")===mt))return _n.prototype._tileReady.call(this,t,a,l)}});function sa(t,a){return new Ki(t,a)}var es=Ki.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,a){this._url=t;var l=d({},this.defaultWmsParams);for(var p in a)p in this.options||(l[p]=a[p]);a=j(this,a);var v=a.detectRetina&&Mt.retina?2:1,k=this.getTileSize();l.width=k.x*v,l.height=k.y*v,this.wmsParams=l},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var a=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[a]=this._crs.code,Ki.prototype.onAdd.call(this,t)},getTileUrl:function(t){var a=this._tileCoordsToNwSe(t),l=this._crs,p=we(l.project(a[0]),l.project(a[1])),v=p.min,k=p.max,Z=(this._wmsVersion>=1.3&&this._crs===ea?[v.y,v.x,k.y,k.x]:[v.x,v.y,k.x,k.y]).join(","),Y=Ki.prototype.getTileUrl.call(this,t);return Y+W(this.wmsParams,Y,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Z},setParams:function(t,a){return d(this.wmsParams,t),a||this.redraw(),this}});function Ko(t,a){return new es(t,a)}Ki.WMS=es,sa.wms=Ko;var hi=ve.extend({options:{padding:.1},initialize:function(t){j(this,t),M(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Tt(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,a){var l=this._map.getZoomScale(a,this._zoom),p=this._map.getSize().multiplyBy(.5+this.options.padding),v=this._map.project(this._center,a),k=p.multiplyBy(-l).add(v).subtract(this._map._getNewPixelOrigin(t,a));Mt.any3d?bi(this._container,k,l):re(this._container,k)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in 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,a=this._map.getSize(),l=this._map.containerPointToLayerPoint(a.multiplyBy(-t)).round();this._bounds=new te(l,l.add(a.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),aa=hi.extend({options:{tolerance:0},getEvents:function(){var t=hi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){hi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Bt(t,"mousemove",this._onMouseMove,this),Bt(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Bt(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){Zt(this._redrawRequest),delete this._ctx,Qt(this._container),Kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var a in this._layers)t=this._layers[a],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){hi.prototype._update.call(this);var t=this._bounds,a=this._container,l=t.getSize(),p=Mt.retina?2:1;re(a,t.min),a.width=p*l.x,a.height=p*l.y,a.style.width=l.x+"px",a.style.height=l.y+"px",Mt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){hi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[M(t)]=t;var a=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=a),this._drawLast=a,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var a=t._order,l=a.next,p=a.prev;l?l.prev=p:this._drawLast=p,p?p.next=l:this._drawFirst=l,delete t._order,delete this._layers[M(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(typeof t.options.dashArray=="string"){var a=t.options.dashArray.split(/[, ]+/),l=[],p,v;for(v=0;v<a.length;v++){if(p=Number(a[v]),isNaN(p))return;l.push(p)}t.options._dashArray=l}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||Et(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var a=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new te,this._redrawBounds.extend(t._pxBounds.min.subtract([a,a])),this._redrawBounds.extend(t._pxBounds.max.add([a,a]))}},_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 a=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,a.x,a.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,a=this._redrawBounds;if(this._ctx.save(),a){var l=a.getSize();this._ctx.beginPath(),this._ctx.rect(a.min.x,a.min.y,l.x,l.y),this._ctx.clip()}this._drawing=!0;for(var p=this._drawFirst;p;p=p.next)t=p.layer,(!a||t._pxBounds&&t._pxBounds.intersects(a))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,a){if(this._drawing){var l,p,v,k,Z=t._parts,Y=Z.length,st=this._ctx;if(Y){for(st.beginPath(),l=0;l<Y;l++){for(p=0,v=Z[l].length;p<v;p++)k=Z[l][p],st[p?"lineTo":"moveTo"](k.x,k.y);a&&st.closePath()}this._fillStroke(st,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var a=t._point,l=this._ctx,p=Math.max(Math.round(t._radius),1),v=(Math.max(Math.round(t._radiusY),1)||p)/p;v!==1&&(l.save(),l.scale(1,v)),l.beginPath(),l.arc(a.x,a.y/v,p,0,Math.PI*2,!1),v!==1&&l.restore(),this._fillStroke(l,t)}},_fillStroke:function(t,a){var l=a.options;l.fill&&(t.globalAlpha=l.fillOpacity,t.fillStyle=l.fillColor||l.color,t.fill(l.fillRule||"evenodd")),l.stroke&&l.weight!==0&&(t.setLineDash&&t.setLineDash(a.options&&a.options._dashArray||[]),t.globalAlpha=l.opacity,t.lineWidth=l.weight,t.strokeStyle=l.color,t.lineCap=l.lineCap,t.lineJoin=l.lineJoin,t.stroke())},_onClick:function(t){for(var a=this._map.mouseEventToLayerPoint(t),l,p,v=this._drawFirst;v;v=v.next)l=v.layer,l.options.interactive&&l._containsPoint(a)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(l))&&(p=l);this._fireEvent(p?[p]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var a=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,a)}},_handleMouseOut:function(t){var a=this._hoveredLayer;a&&(ne(this._container,"leaflet-interactive"),this._fireEvent([a],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,a){if(!this._mouseHoverThrottled){for(var l,p,v=this._drawFirst;v;v=v.next)l=v.layer,l.options.interactive&&l._containsPoint(a)&&(p=l);p!==this._hoveredLayer&&(this._handleMouseOut(t),p&&(Tt(this._container,"leaflet-interactive"),this._fireEvent([p],t,"mouseover"),this._hoveredLayer=p)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(m(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,a,l){this._map._fireDOMEvent(a,l||a.type,t)},_bringToFront:function(t){var a=t._order;if(a){var l=a.next,p=a.prev;if(l)l.prev=p;else return;p?p.next=l:l&&(this._drawFirst=l),a.prev=this._drawLast,this._drawLast.next=a,a.next=null,this._drawLast=a,this._requestRedraw(t)}},_bringToBack:function(t){var a=t._order;if(a){var l=a.next,p=a.prev;if(p)p.next=l;else return;l?l.prev=p:p&&(this._drawLast=p),a.prev=null,a.next=this._drawFirst,this._drawFirst.prev=a,this._drawFirst=a,this._requestRedraw(t)}}});function is(t){return Mt.canvas?new aa(t):null}var mn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Wo={_initContainer:function(){this._container=Nt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var a=t._container=mn("shape");Tt(a,"leaflet-vml-shape "+(this.options.className||"")),a.coordsize="1 1",t._path=mn("path"),a.appendChild(t._path),this._updateStyle(t),this._layers[M(t)]=t},_addPath:function(t){var a=t._container;this._container.appendChild(a),t.options.interactive&&t.addInteractiveTarget(a)},_removePath:function(t){var a=t._container;Qt(a),t.removeInteractiveTarget(a),delete this._layers[M(t)]},_updateStyle:function(t){var a=t._stroke,l=t._fill,p=t.options,v=t._container;v.stroked=!!p.stroke,v.filled=!!p.fill,p.stroke?(a||(a=t._stroke=mn("stroke")),v.appendChild(a),a.weight=p.weight+"px",a.color=p.color,a.opacity=p.opacity,p.dashArray?a.dashStyle=ct(p.dashArray)?p.dashArray.join(" "):p.dashArray.replace(/( *, *)/g," "):a.dashStyle="",a.endcap=p.lineCap.replace("butt","flat"),a.joinstyle=p.lineJoin):a&&(v.removeChild(a),t._stroke=null),p.fill?(l||(l=t._fill=mn("fill")),v.appendChild(l),l.color=p.fillColor||p.color,l.opacity=p.fillOpacity):l&&(v.removeChild(l),t._fill=null)},_updateCircle:function(t){var a=t._point.round(),l=Math.round(t._radius),p=Math.round(t._radiusY||l);this._setPath(t,t._empty()?"M0 0":"AL "+a.x+","+a.y+" "+l+","+p+" 0,"+65535*360)},_setPath:function(t,a){t._path.v=a},_bringToFront:function(t){Zi(t._container)},_bringToBack:function(t){Li(t._container)}},Wi=Mt.vml?mn:Pa,me=hi.extend({_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Qt(this._container),Kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){hi.prototype._update.call(this);var t=this._bounds,a=t.getSize(),l=this._container;(!this._svgSize||!this._svgSize.equals(a))&&(this._svgSize=a,l.setAttribute("width",a.x),l.setAttribute("height",a.y)),re(l,t.min),l.setAttribute("viewBox",[t.min.x,t.min.y,a.x,a.y].join(" ")),this.fire("update")}},_initPath:function(t){var a=t._path=Wi("path");t.options.className&&Tt(a,t.options.className),t.options.interactive&&Tt(a,"leaflet-interactive"),this._updateStyle(t),this._layers[M(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Qt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[M(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var a=t._path,l=t.options;a&&(l.stroke?(a.setAttribute("stroke",l.color),a.setAttribute("stroke-opacity",l.opacity),a.setAttribute("stroke-width",l.weight),a.setAttribute("stroke-linecap",l.lineCap),a.setAttribute("stroke-linejoin",l.lineJoin),l.dashArray?a.setAttribute("stroke-dasharray",l.dashArray):a.removeAttribute("stroke-dasharray"),l.dashOffset?a.setAttribute("stroke-dashoffset",l.dashOffset):a.removeAttribute("stroke-dashoffset")):a.setAttribute("stroke","none"),l.fill?(a.setAttribute("fill",l.fillColor||l.color),a.setAttribute("fill-opacity",l.fillOpacity),a.setAttribute("fill-rule",l.fillRule||"evenodd")):a.setAttribute("fill","none"))},_updatePoly:function(t,a){this._setPath(t,ka(t._parts,a))},_updateCircle:function(t){var a=t._point,l=Math.max(Math.round(t._radius),1),p=Math.max(Math.round(t._radiusY),1)||l,v="a"+l+","+p+" 0 1,0 ",k=t._empty()?"M0 0":"M"+(a.x-l)+","+a.y+v+l*2+",0 "+v+-l*2+",0 ";this._setPath(t,k)},_setPath:function(t,a){t._path.setAttribute("d",a)},_bringToFront:function(t){Zi(t._path)},_bringToBack:function(t){Li(t._path)}});Mt.vml&&me.include(Wo);function Me(t){return Mt.svg||Mt.vml?new me(t):null}Ft.include({getRenderer:function(t){var a=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return a||(a=this._renderer=this._createRenderer()),this.hasLayer(a)||this.addLayer(a),a},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var a=this._paneRenderers[t];return a===void 0&&(a=this._createRenderer({pane:t}),this._paneRenderers[t]=a),a},_createRenderer:function(t){return this.options.preferCanvas&&is(t)||Me(t)}});var ra=yi.extend({initialize:function(t,a){yi.prototype.initialize.call(this,this._boundsToLatLngs(t),a)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=ae(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function He(t,a){return new ra(t,a)}me.create=Wi,me.pointsToPath=ka,oi.geometryToLayer=Vn,oi.coordsToLatLng=$n,oi.coordsToLatLngs=Kn,oi.latLngToCoords=Wn,oi.latLngsToCoords=Xn,oi.getFeature=Vi,oi.asFeature=Yn,Ft.mergeOptions({boxZoom:!0});var kt=Ae.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(){Bt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Qt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),on(),Zs(),this._startPoint=this._map.mouseEventToContainerPoint(t),Bt(document,{contextmenu:Ei,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=Nt("div","leaflet-zoom-box",this._container),Tt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var a=new te(this._point,this._startPoint),l=a.getSize();re(this._box,a.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(Qt(this._box),ne(this._container,"leaflet-crosshair")),hn(),js(),Kt(document,{contextmenu:Ei,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(m(this._resetState,this),0);var a=new Ce(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(a).fire("boxzoomend",{boxZoomBounds:a})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ft.addInitHook("addHandler","boxZoom",kt),Ft.mergeOptions({doubleClickZoom:!0});var ns=Ae.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var a=this._map,l=a.getZoom(),p=a.options.zoomDelta,v=t.originalEvent.shiftKey?l-p:l+p;a.options.doubleClickZoom==="center"?a.setZoom(v):a.setZoomAround(t.containerPoint,v)}});Ft.addInitHook("addHandler","doubleClickZoom",ns),Ft.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ss=Ae.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new mi(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))}Tt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ne(this._map._container,"leaflet-grab"),ne(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 a=ae(this._map.options.maxBounds);this._offsetLimit=we(this._map.latLngToContainerPoint(a.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(a.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 a=this._lastTime=+new Date,l=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(l),this._times.push(a),this._prunePositions(a)}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),a=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=a.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,a){return t-(t-a)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),a=this._offsetLimit;t.x<a.min.x&&(t.x=this._viscousLimit(t.x,a.min.x)),t.y<a.min.y&&(t.y=this._viscousLimit(t.y,a.min.y)),t.x>a.max.x&&(t.x=this._viscousLimit(t.x,a.max.x)),t.y>a.max.y&&(t.y=this._viscousLimit(t.y,a.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,a=Math.round(t/2),l=this._initialWorldOffset,p=this._draggable._newPos.x,v=(p-a+l)%t+a-l,k=(p+a+l)%t-a-l,Z=Math.abs(v+l)<Math.abs(k+l)?v:k;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Z},_onDragEnd:function(t){var a=this._map,l=a.options,p=!l.inertia||t.noInertia||this._times.length<2;if(a.fire("dragend",t),p)a.fire("moveend");else{this._prunePositions(+new Date);var v=this._lastPos.subtract(this._positions[0]),k=(this._lastTime-this._times[0])/1e3,Z=l.easeLinearity,Y=v.multiplyBy(Z/k),st=Y.distanceTo([0,0]),ht=Math.min(l.inertiaMaxSpeed,st),pt=Y.multiplyBy(ht/st),wt=ht/(l.inertiaDeceleration*Z),Ot=pt.multiplyBy(-wt/2).round();!Ot.x&&!Ot.y?a.fire("moveend"):(Ot=a._limitOffset(Ot,a.options.maxBounds),Et(function(){a.panBy(Ot,{duration:wt,easeLinearity:Z,noMoveStart:!0,animate:!0})}))}}});Ft.addInitHook("addHandler","dragging",ss),Ft.mergeOptions({keyboard:!0,keyboardPanDelta:80});var li=Ae.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"),Bt(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(),Kt(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,a=document.documentElement,l=t.scrollTop||a.scrollTop,p=t.scrollLeft||a.scrollLeft;this._map._container.focus(),window.scrollTo(p,l)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var a=this._panKeys={},l=this.keyCodes,p,v;for(p=0,v=l.left.length;p<v;p++)a[l.left[p]]=[-1*t,0];for(p=0,v=l.right.length;p<v;p++)a[l.right[p]]=[t,0];for(p=0,v=l.down.length;p<v;p++)a[l.down[p]]=[0,t];for(p=0,v=l.up.length;p<v;p++)a[l.up[p]]=[0,-1*t]},_setZoomDelta:function(t){var a=this._zoomKeys={},l=this.keyCodes,p,v;for(p=0,v=l.zoomIn.length;p<v;p++)a[l.zoomIn[p]]=t;for(p=0,v=l.zoomOut.length;p<v;p++)a[l.zoomOut[p]]=-t},_addHooks:function(){Bt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Kt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var a=t.keyCode,l=this._map,p;if(a in this._panKeys){if(!l._panAnim||!l._panAnim._inProgress)if(p=this._panKeys[a],t.shiftKey&&(p=Ct(p).multiplyBy(3)),l.options.maxBounds&&(p=l._limitOffset(Ct(p),l.options.maxBounds)),l.options.worldCopyJump){var v=l.wrapLatLng(l.unproject(l.project(l.getCenter()).add(p)));l.panTo(v)}else l.panBy(p)}else if(a in this._zoomKeys)l.setZoom(l.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[a]);else if(a===27&&l._popup&&l._popup.options.closeOnEscapeKey)l.closePopup();else return;Ei(t)}}});Ft.addInitHook("addHandler","keyboard",li),Ft.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var le=Ae.extend({addHooks:function(){Bt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Kt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var a=ir(t),l=this._map.options.wheelDebounceTime;this._delta+=a,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var p=Math.max(l-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(m(this._performZoom,this),p),Ei(t)},_performZoom:function(){var t=this._map,a=t.getZoom(),l=this._map.options.zoomSnap||0;t._stop();var p=this._delta/(this._map.options.wheelPxPerZoomLevel*4),v=4*Math.log(2/(1+Math.exp(-Math.abs(p))))/Math.LN2,k=l?Math.ceil(v/l)*l:v,Z=t._limitZoom(a+(this._delta>0?k:-k))-a;this._delta=0,this._startTime=null,Z&&(t.options.scrollWheelZoom==="center"?t.setZoom(a+Z):t.setZoomAround(this._lastMousePos,a+Z))}});Ft.addInitHook("addHandler","scrollWheelZoom",le);var gr=600;Ft.mergeOptions({tapHold:Mt.touchNative&&Mt.safari&&Mt.mobile,tapTolerance:15});var Oe=Ae.extend({addHooks:function(){Bt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var a=t.touches[0];this._startPos=this._newPos=new Pt(a.clientX,a.clientY),this._holdTimeout=setTimeout(m(function(){this._cancel(),this._isTapValid()&&(Bt(document,"touchend",ce),Bt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",a))},this),gr),Bt(document,"touchend touchcancel contextmenu",this._cancel,this),Bt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Kt(document,"touchend",ce),Kt(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Kt(document,"touchend touchcancel contextmenu",this._cancel,this),Kt(document,"touchmove",this._onMove,this)},_onMove:function(t){var a=t.touches[0];this._newPos=new Pt(a.clientX,a.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,a){var l=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY});l._simulated=!0,a.target.dispatchEvent(l)}});Ft.addInitHook("addHandler","tapHold",Oe),Ft.mergeOptions({touchZoom:Mt.touch,bounceAtZoomLimits:!0});var Ie=Ae.extend({addHooks:function(){Tt(this._map._container,"leaflet-touch-zoom"),Bt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ne(this._map._container,"leaflet-touch-zoom"),Kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var a=this._map;if(!(!t.touches||t.touches.length!==2||a._animatingZoom||this._zooming)){var l=a.mouseEventToContainerPoint(t.touches[0]),p=a.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=a.getSize()._divideBy(2),this._startLatLng=a.containerPointToLatLng(this._centerPoint),a.options.touchZoom!=="center"&&(this._pinchStartLatLng=a.containerPointToLatLng(l.add(p)._divideBy(2))),this._startDist=l.distanceTo(p),this._startZoom=a.getZoom(),this._moved=!1,this._zooming=!0,a._stop(),Bt(document,"touchmove",this._onTouchMove,this),Bt(document,"touchend touchcancel",this._onTouchEnd,this),ce(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var a=this._map,l=a.mouseEventToContainerPoint(t.touches[0]),p=a.mouseEventToContainerPoint(t.touches[1]),v=l.distanceTo(p)/this._startDist;if(this._zoom=a.getScaleZoom(v,this._startZoom),!a.options.bounceAtZoomLimits&&(this._zoom<a.getMinZoom()&&v<1||this._zoom>a.getMaxZoom()&&v>1)&&(this._zoom=a._limitZoom(this._zoom)),a.options.touchZoom==="center"){if(this._center=this._startLatLng,v===1)return}else{var k=l._add(p)._divideBy(2)._subtract(this._centerPoint);if(v===1&&k.x===0&&k.y===0)return;this._center=a.unproject(a.project(this._pinchStartLatLng,this._zoom).subtract(k),this._zoom)}this._moved||(a._moveStart(!0,!1),this._moved=!0),Zt(this._animRequest);var Z=m(a._move,a,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Et(Z,this,!0),ce(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Zt(this._animRequest),Kt(document,"touchmove",this._onTouchMove,this),Kt(document,"touchend touchcancel",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))}});Ft.addInitHook("addHandler","touchZoom",Ie),Ft.BoxZoom=kt,Ft.DoubleClickZoom=ns,Ft.Drag=ss,Ft.Keyboard=li,Ft.ScrollWheelZoom=le,Ft.TapHold=Oe,Ft.TouchZoom=Ie,r.Bounds=te,r.Browser=Mt,r.CRS=si,r.Canvas=aa,r.Circle=na,r.CircleMarker=Xe,r.Class=pe,r.Control=St,r.DivIcon=mr,r.DivOverlay=Ye,r.DomEvent=Gn,r.DomUtil=Po,r.Draggable=mi,r.Evented=en,r.FeatureGroup=qe,r.GeoJSON=oi,r.GridLayer=_n,r.Handler=Ae,r.Icon=Hi,r.ImageOverlay=$i,r.LatLng=Ht,r.LatLngBounds=Ce,r.Layer=ve,r.LayerGroup=qi,r.LineUtil=Zn,r.Map=Ft,r.Marker=Hn,r.Mixin=Do,r.Path=ai,r.Point=Pt,r.PolyUtil=Oo,r.Polygon=yi,r.Polyline=ri,r.Popup=Ai,r.PosAnimation=nr,r.Projection=We,r.Rectangle=ra,r.Renderer=hi,r.SVG=me,r.SVGOverlay=_r,r.TileLayer=Ki,r.Tooltip=ts,r.Transformation=Ps,r.Util=be,r.VideoOverlay=pn,r.bind=m,r.bounds=we,r.canvas=is,r.circle=Bi,r.circleMarker=cr,r.control=Pi,r.divIcon=Vo,r.extend=d,r.featureGroup=Go,r.geoJSON=Qn,r.geoJson=fr,r.gridLayer=$o,r.icon=zo,r.imageOverlay=Zo,r.latLng=Rt,r.latLngBounds=ae,r.layerGroup=Fo,r.map=sr,r.marker=No,r.point=Ct,r.polygon=fn,r.polyline=Uo,r.popup=qo,r.rectangle=He,r.setOptions=j,r.stamp=M,r.svg=Me,r.svgOverlay=jo,r.tileLayer=sa,r.tooltip=Ho,r.transformation=sn,r.version=u,r.videoOverlay=pr;var Ti=window.L;r.noConflict=function(){return window.L=Ti,this},window.L=r})}(da,da.exports)),da.exports}var U=ah();(function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){const e=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(E,b,C,D,G){var j=b||new L.Point(0,0);if(!D)return b=j._round(),e.setTransform.apply(this,arguments);j=j.rotateFrom(D,G),E.style[L.DomUtil.TRANSFORM]="translate3d("+j.x+"px,"+j.y+"px,0)"+(C?" scale("+C+")":"")+" rotate("+D+"rad)"},setPosition:function(E,b,C,D,G){if(!C&&!G)return e.setPosition.apply(this,arguments);E._leaflet_pos=b,L.Browser.any3d?L.DomUtil.setTransform(E,b,G,C,D):(E.style.left=b.x+"px",E.style.top=b.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({}),L.extend(L.Point.prototype,{rotate:function(E){return this.rotateFrom(E,new L.Point(0,0))},rotateFrom:function(E,b){if(!E)return this;var C=Math.sin(E),D=Math.cos(E),G=b.x,j=b.y,W=this.x-G,at=this.y-j;return new L.Point(W*D-at*C+G,W*C+at*D+j)}});const n=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(n.getEvents.apply(this,arguments),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map&&(n._updatePosition.apply(this,arguments),this._map&&this._map._rotate&&this._zoomAnimated)){var E=this._getAnchor(),b=L.DomUtil.getPosition(this._container).subtract(E);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(b).add(E))}}});const r=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(E){if(r._animateZoom.apply(this,arguments),this._map&&this._map._rotate){var b=this._getAnchor(),C=L.DomUtil.getPosition(this._container).subtract(b);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(C).add(b))}},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){if(this._autopanning){this._autopanning=!1;return}var E=this._map,b=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,C=this._container.offsetHeight+b,D=this._containerWidth,G=new L.Point(this._containerLeft,-C-this._containerBottom);G._add(L.DomUtil.getPosition(this._container));var j=G._add(this._map._getMapPanePos()),W=L.point(this.options.autoPanPadding),at=L.point(this.options.autoPanPaddingTopLeft||W),rt=L.point(this.options.autoPanPaddingBottomRight||W),ct=E.getSize(),yt=0,mt=0;j.x+D+rt.x>ct.x&&(yt=j.x+D-ct.x+rt.x),j.x-yt-at.x<0&&(yt=j.x-at.x),j.y+C+rt.y>ct.y&&(mt=j.y+C-ct.y+rt.y),j.y-mt-at.y<0&&(mt=j.y-at.y),(yt||mt)&&(this.options.keepInView&&(this._autopanning=!0),E.fire("autopanstart").panBy([yt,mt]))}}});const u=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_animateZoom:function(E){if(!this._map._rotate)return u._animateZoom.apply(this,arguments);var b=this._map._latLngToNewLayerPoint(this._latlng,E.zoom,E.center);b=this._map.rotatedPointToMapPanePoint(b),this._setPosition(b)},_updatePosition:function(){if(!this._map._rotate)return u._updatePosition.apply(this,arguments);var E=this._map.latLngToLayerPoint(this._latlng);E=this._map.rotatedPointToMapPanePoint(E),this._setPosition(E)}}),L.extend({},L.Icon.prototype),L.Icon.include({_setIconStyles:function(E,b){var C=this.options,D=C[b+"Size"];typeof D=="number"&&(D=[D,D]);var G=L.point(D),j=L.point(b==="shadow"&&C.shadowAnchor||C.iconAnchor||G&&G.divideBy(2,!0));E.className="leaflet-marker-"+b+" "+(C.className||""),j&&(E.style.marginLeft=-j.x+"px",E.style.marginTop=-j.y+"px",E.style[L.DomUtil.TRANSFORM+"Origin"]=j.x+"px "+j.y+"px 0px"),G&&(E.style.width=G.x+"px",E.style.height=G.y+"px")}});const d=L.extend({},L.Marker.prototype);L.Marker.mergeOptions({rotation:0,rotateWithView:!1,scale:void 0});var f,m={_onDrag:function(E){var b=this._marker,C=b.options.rotation||b.options.rotateWithView,D=b._shadow,G=L.DomUtil.getPosition(b._icon);!C&&D&&L.DomUtil.setPosition(D,G),b._map._rotate&&(G=b._map.mapPanePointToRotatedPoint(G));var j=b._map.layerPointToLatLng(G);b._latlng=j,E.latlng=j,E.oldLatLng=this._oldLatLng,C?b.setLatLng(j):b.fire("move",E),b.fire("drag",E)},_onDragEnd:function(E){this._marker._map._rotate&&this._marker.update(),f._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents:function(){return L.extend(d.getEvents.apply(this,arguments),{rotate:this.update})},_initInteraction:function(){var E=d._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(f=f||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:m._onDrag.bind(this.dragging),_onDragEnd:m._onDragEnd.bind(this.dragging)}),this.dragging.enable()),E},_setPos:function(E){this._map._rotate&&(E=this._map.rotatedPointToMapPanePoint(E));var b=this.options.rotation||0;this.options.rotateWithView&&(b+=this._map._bearing),this._icon&&L.DomUtil.setPosition(this._icon,E,b,E,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,E,b,E,this.options.scale),this._zIndex=E.y+this.options.zIndexOffset,this._resetZIndex()},setRotation:function(E){this.options.rotation=E,this.update()}});const g=L.extend({},L.GridLayer.prototype);L.GridLayer.include({getEvents:function(){var E=g.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),E.rotate=this._onRotate),E},_getTiledPixelBounds:function(E){return this._map._rotate?this._map._getNewPixelBounds(E,this._tileZoom):g._getTiledPixelBounds.apply(this,arguments)}});const M=L.extend({},L.Renderer.prototype);L.Renderer.include({getEvents:function(){return L.extend(M.getEvents.apply(this,arguments),{rotate:this._update})},onAdd:function(){M.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform:function(E,b){if(!this._map._rotate)return M._updateTransform.apply(this,arguments);var C=this._map.getZoomScale(b,this._zoom),D=this._map._latLngToNewLayerPoint(this._topLeft,b,E);L.DomUtil.setTransform(this._container,D,C)},_update:function(){if(!this._map._rotate)return M._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const B=L.extend({},L.Map.prototype);L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(E,b){b.rotate&&(this._rotate=!0,this._bearing=0),B.initialize.apply(this,arguments),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(E){return this._rotate?L.point(E).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):B.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint:function(E){return this._rotate?L.point(E).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):B.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint:function(E){return L.point(E).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(E){return L.point(E)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds:function(E){if(!this._rotate&&B.mapBoundsToContainerBounds)return B.mapBoundsToContainerBounds.apply(this,arguments);const b=this.getPixelOrigin(),C=this.layerPointToContainerPoint(this.project(E.getNorthWest())._subtract(b)),D=this.layerPointToContainerPoint(this.project(E.getNorthEast())._subtract(b)),G=this.layerPointToContainerPoint(this.project(E.getSouthWest())._subtract(b)),j=this.layerPointToContainerPoint(this.project(E.getSouthEast())._subtract(b));return L.bounds([L.point(Math.min(C.x,D.x,j.x,G.x),Math.min(C.y,D.y,j.y,G.y)),L.point(Math.max(C.x,D.x,j.x,G.x),Math.max(C.y,D.y,j.y,G.y))])},getBounds:function(){if(!this._rotate)return B.getBounds.apply(this,arguments);var E=this.getSize();return new L.LatLngBounds([this.containerPointToLatLng([0,0]),this.containerPointToLatLng([E.x,0]),this.containerPointToLatLng([E.x,E.y]),this.containerPointToLatLng([0,E.y])])},setBearing:function(E){if(!(!L.Browser.any3d||!this._rotate)){var b=L.Util.wrapNum(E,[0,360])*L.DomUtil.DEG_TO_RAD,C=this._getPixelCenter(),D=this._getRotatePanePos().rotateFrom(-this._bearing,C),G=D.rotateFrom(b,C);L.DomUtil.setPosition(this._rotatePane,D,b,C),this._pivot=C,this._bearing=b,this._rotatePanePos=G,this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var E=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(E.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(E.shadowPane,"leaflet-zoom-hide"))},panInside(E,b){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return B.panInside.apply(this,arguments);b=b||{};const C=L.point(b.paddingTopLeft||b.padding||[0,0]),D=L.point(b.paddingBottomRight||b.padding||[0,0]),G=this._container.getBoundingClientRect(),j=this.latLngToContainerPoint(E),W=L.bounds([L.point(G),L.point(G).add(this.getSize())]),at=W.getCenter(),rt=L.bounds([W.min.add(C),W.max.subtract(D)]),ct=rt.getSize();if(!rt.contains(j)){this._enforcingBounds=!0;const yt=j.subtract(rt.getCenter()),mt=rt.extend(j).getSize().subtract(ct);at.x+=yt.x<0?-mt.x:mt.x,at.y+=yt.y<0?-mt.y:mt.y,this.panTo(this.containerPointToLatLng(at),b),this._enforcingBounds=!1}return this},getBoundsZoom(E,b,C){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return B.getBoundsZoom.apply(this,arguments);E=L.latLngBounds(E),C=L.point(C||[0,0]);let D=this.getZoom()||0;const G=this.getMinZoom(),j=this.getMaxZoom(),W=this.getSize().subtract(C),at=this.mapBoundsToContainerBounds(E).getSize(),rt=this.options.zoomSnap,ct=W.x/at.x,yt=W.y/at.y,mt=b?Math.max(ct,yt):Math.min(ct,yt);return D=this.getScaleZoom(mt,D),rt&&(D=Math.round(D/(rt/100))*(rt/100),D=b?Math.ceil(D/rt)*rt:Math.floor(D/rt)*rt),Math.max(G,Math.min(j,D))},_getCenterOffset:function(E){var b=B._getCenterOffset.apply(this,arguments);return this._rotate&&(b=b.rotate(this._bearing)),b},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(E,b){if(!this._rotate)return B._getNewPixelOrigin.apply(this,arguments);var C=this.getSize()._divideBy(2);return this.project(E,b).rotate(this._bearing)._subtract(C)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_getNewPixelBounds:function(E,b){if(E=E||this.getCenter(),b=b||this.getZoom(),!this._rotate&&B._getNewPixelBounds)return B._getNewPixelBounds.apply(this,arguments);var C=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),D=this.getZoomScale(C,b),G=this.project(E,b).floor(),j=this.getSize(),W=new L.Bounds([this.containerPointToLayerPoint([0,0]).floor(),this.containerPointToLayerPoint([j.x,0]).floor(),this.containerPointToLayerPoint([0,j.y]).floor(),this.containerPointToLayerPoint([j.x,j.y]).floor()]).getSize().divideBy(D*2);return new L.Bounds(G.subtract(W),G.add(W))},_getPixelCenter:function(){return!this._rotate&&B._getPixelCenter?B._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds:function(E){if(!this._rotate&&B._getPaddedPixelBounds)return B._getPaddedPixelBounds.apply(this,arguments);var b=E,C=this.getSize(),D=C.multiplyBy(-b),G=C.multiplyBy(1+b);return new L.Bounds([this.containerPointToLayerPoint([D.x,D.y]).floor(),this.containerPointToLayerPoint([D.x,G.y]).floor(),this.containerPointToLayerPoint([G.x,D.y]).floor(),this.containerPointToLayerPoint([G.x,G.y]).floor()])},_handleGeolocationResponse:function(E){if(this._container._leaflet_id){var b=E.coords.latitude,C=E.coords.longitude,D=E.coords.heading,G=new L.LatLng(b,C),j=G.toBounds(E.coords.accuracy),W=this._locateOptions;if(W.setView){var at=this.getBoundsZoom(j);this.setView(G,W.maxZoom?Math.min(at,W.maxZoom):at)}var rt={latlng:G,bounds:j,timestamp:E.timestamp,heading:D};for(var ct in E.coords)typeof E.coords[ct]=="number"&&(rt[ct]=E.coords[ct]);this.fire("locationfound",rt)}}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(E){this._map=E,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks:function(){this._map._rotate&&this.__deviceOrientationEvent?L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this):this.disable()},removeHooks:function(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation:function(E){var b=E.webkitCompassHeading||E.alpha,C=0;!E.absolute&&E.webkitCompassHeading&&(b=360-b),!E.absolute&&typeof window.orientation<"u"&&(C=window.orientation),this._map.setBearing(b-C)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks:function(){this._observer.disconnect()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(E){this._map=E,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(E){var b=this._map;if(!(!E.touches||E.touches.length!==2||b._animatingZoom||this._zooming||this._rotating)){var C=b.mouseEventToContainerPoint(E.touches[0]),D=b.mouseEventToContainerPoint(E.touches[1]),G=C.subtract(D);this._centerPoint=b.getSize()._divideBy(2),this._startLatLng=b.containerPointToLatLng(this._centerPoint),this.zoom?(b.options.touchZoom!=="center"&&(this._pinchStartLatLng=b.containerPointToLatLng(C.add(D)._divideBy(2))),this._startDist=C.distanceTo(D),this._startZoom=b.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(G.x/G.y),this._startBearing=b.getBearing(),G.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,b._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(E)}},_onTouchMove:function(E){if(!(!E.touches||E.touches.length!==2||!(this._zooming||this._rotating))){var b=this._map,C=b.mouseEventToContainerPoint(E.touches[0]),D=b.mouseEventToContainerPoint(E.touches[1]),G=C.subtract(D),j=C.distanceTo(D)/this._startDist,W;if(this._rotating){var at=Math.atan(G.x/G.y),rt=(at-this._startTheta)*L.DomUtil.RAD_TO_DEG;G.y<0&&(rt+=180),rt&&b.setBearing(this._startBearing-rt)}if(this._zooming)if(this._zoom=b.getScaleZoom(j,this._startZoom),!b.options.bounceAtZoomLimits&&(this._zoom<b.getMinZoom()&&j<1||this._zoom>b.getMaxZoom()&&j>1)&&(this._zoom=b._limitZoom(this._zoom)),b.options.touchZoom==="center"){if(this._center=this._startLatLng,j===1)return}else{if(W=C._add(D)._divideBy(2)._subtract(this._centerPoint),j===1&&W.x===0&&W.y===0)return;var ct=-b.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=b.unproject(b.project(this._pinchStartLatLng).subtract(W.rotate(ct)))}this._moved||(b._moveStart(!0,!1),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var yt=b._move.bind(b,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=L.Util.requestAnimFrame(yt,this,!0),L.DomEvent.preventDefault(E)}},_onTouchEnd:function(){if(!this._moved||!(this._zooming||this._rotating)){this._zooming=!1;return}this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(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)))}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(E){E.shiftKey?(E.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+Math.sign(E.deltaY)*5)):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.addInitHook(function(){this.scrollWheelZoom.enabled()&&this.shiftKeyRotate.enabled()&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())}),L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(E){var b=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),C=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");C.style.backgroundImage=`url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")`,C.style.cursor="grab",C.style.display="block",C.style.width="100%",C.style.height="100%",C.style.backgroundRepeat="no-repeat",C.style.backgroundPosition="50%";var D=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",b);return D.appendChild(C),D.href="#",D.title="Rotate map",L.DomEvent.on(D,"dblclick",L.DomEvent.stopPropagation).on(D,"mousedown",this._handleMouseDown,this).on(D,"click",L.DomEvent.stop).on(D,"click",this._cycleState,this).on(D,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(D,"leaflet-disabled"),this._restyle(),E.on("rotate",this._restyle,this),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&E.getBearing()===0&&(b.style.display="none"),b},onRemove:function(E){E.off("rotate",this._restyle,this)},_handleMouseDown:function(E){L.DomEvent.stop(E),this.dragging=!0,this.dragstartX=E.pageX,this.dragstartY=E.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(E){L.DomEvent.stop(E),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(E){if(this.dragging){var b=E.clientX-this.dragstartX;this._map.setBearing(b)}},_cycleState:function(E){if(this._map){var b=this._map;!b.touchRotate.enabled()&&!b.compassBearing.enabled()?b.touchRotate.enable():b.compassBearing.enabled()?(b.compassBearing.disable(),b.setBearing(0),this.options.closeOnZeroBearing&&b.touchRotate.enable()):(b.touchRotate.disable(),(DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission():Promise.resolve("granted")).then(C=>C==="granted"&&b.compassBearing.enable())),this._restyle()}},_restyle:function(){if(!this._map.options.rotate)L.DomUtil.addClass(this._link,"leaflet-disabled");else{var E=this._map,b=E.getBearing();this._arrow.style.transform="rotate("+b+"deg)",b&&this.options.closeOnZeroBearing&&(this._container.style.display="block"),E.compassBearing.enabled()?this._link.style.backgroundColor="orange":E.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",b===0&&this.options.closeOnZeroBearing&&(this._container.style.display="none"))}}}),L.control.rotate=function(E){return new L.Control.Rotate(E)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook(function(){if(this.options.rotateControl){var E=typeof this.options.rotateControl=="object"?this.options.rotateControl:{};this.rotateControl=L.control.rotate(E),this.addControl(this.rotateControl)}})}),(()=>{var dl,fl;var e=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,m=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports),g=(i,s,o,h)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of u(s))!f.call(i,c)&&c!==o&&n(i,c,{get:()=>s[c],enumerable:!(h=r(s,c))||h.enumerable});return i},M=(i,s,o)=>(o=i!=null?e(d(i)):{},g(s||!i||!i.__esModule?n(o,"default",{value:i,enumerable:!0}):o,i)),B=m((i,s)=>{function o(){this.__data__=[],this.size=0}s.exports=o}),E=m((i,s)=>{function o(h,c){return h===c||h!==h&&c!==c}s.exports=o}),b=m((i,s)=>{var o=E();function h(c,_){for(var y=c.length;y--;)if(o(c[y][0],_))return y;return-1}s.exports=h}),C=m((i,s)=>{var o=b(),h=Array.prototype,c=h.splice;function _(y){var A=this.__data__,x=o(A,y);if(x<0)return!1;var P=A.length-1;return x==P?A.pop():c.call(A,x,1),--this.size,!0}s.exports=_}),D=m((i,s)=>{var o=b();function h(c){var _=this.__data__,y=o(_,c);return y<0?void 0:_[y][1]}s.exports=h}),G=m((i,s)=>{var o=b();function h(c){return o(this.__data__,c)>-1}s.exports=h}),j=m((i,s)=>{var o=b();function h(c,_){var y=this.__data__,A=o(y,c);return A<0?(++this.size,y.push([c,_])):y[A][1]=_,this}s.exports=h}),W=m((i,s)=>{var o=B(),h=C(),c=D(),_=G(),y=j();function A(x){var P=-1,N=x==null?0:x.length;for(this.clear();++P<N;){var F=x[P];this.set(F[0],F[1])}}A.prototype.clear=o,A.prototype.delete=h,A.prototype.get=c,A.prototype.has=_,A.prototype.set=y,s.exports=A}),at=m((i,s)=>{var o=W();function h(){this.__data__=new o,this.size=0}s.exports=h}),rt=m((i,s)=>{function o(h){var c=this.__data__,_=c.delete(h);return this.size=c.size,_}s.exports=o}),ct=m((i,s)=>{function o(h){return this.__data__.get(h)}s.exports=o}),yt=m((i,s)=>{function o(h){return this.__data__.has(h)}s.exports=o}),mt=m((i,s)=>{var o=typeof vn=="object"&&vn&&vn.Object===Object&&vn;s.exports=o}),xt=m((i,s)=>{var o=mt(),h=typeof self=="object"&&self&&self.Object===Object&&self,c=o||h||Function("return this")();s.exports=c}),Dt=m((i,s)=>{var o=xt(),h=o.Symbol;s.exports=h}),It=m((i,s)=>{var o=Dt(),h=Object.prototype,c=h.hasOwnProperty,_=h.toString,y=o?o.toStringTag:void 0;function A(x){var P=c.call(x,y),N=x[y];try{x[y]=void 0;var F=!0}catch{}var tt=_.call(x);return F&&(P?x[y]=N:delete x[y]),tt}s.exports=A}),zt=m((i,s)=>{var o=Object.prototype,h=o.toString;function c(_){return h.call(_)}s.exports=c}),Yt=m((i,s)=>{var o=Dt(),h=It(),c=zt(),_="[object Null]",y="[object Undefined]",A=o?o.toStringTag:void 0;function x(P){return P==null?P===void 0?y:_:A&&A in Object(P)?h(P):c(P)}s.exports=x}),Et=m((i,s)=>{function o(h){var c=typeof h;return h!=null&&(c=="object"||c=="function")}s.exports=o}),Zt=m((i,s)=>{var o=Yt(),h=Et(),c="[object AsyncFunction]",_="[object Function]",y="[object GeneratorFunction]",A="[object Proxy]";function x(P){if(!h(P))return!1;var N=o(P);return N==_||N==y||N==c||N==A}s.exports=x}),be=m((i,s)=>{var o=xt(),h=o["__core-js_shared__"];s.exports=h}),pe=m((i,s)=>{var o=be(),h=function(){var _=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}();function c(_){return!!h&&h in _}s.exports=c}),ao=m((i,s)=>{var o=Function.prototype,h=o.toString;function c(_){if(_!=null){try{return h.call(_)}catch{}try{return _+""}catch{}}return""}s.exports=c}),De=m((i,s)=>{var o=Zt(),h=pe(),c=Et(),_=ao(),y=/[\\^$.*+?()[\]{}|]/g,A=/^\[object .+?Constructor\]$/,x=Function.prototype,P=Object.prototype,N=x.toString,F=P.hasOwnProperty,tt=RegExp("^"+N.call(F).replace(y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function it(lt){if(!c(lt)||h(lt))return!1;var ft=o(lt)?tt:A;return ft.test(_(lt))}s.exports=it}),en=m((i,s)=>{function o(h,c){return h==null?void 0:h[c]}s.exports=o}),Pt=m((i,s)=>{var o=De(),h=en();function c(_,y){var A=h(_,y);return o(A)?A:void 0}s.exports=c}),Cs=m((i,s)=>{var o=Pt(),h=xt(),c=o(h,"Map");s.exports=c}),Ct=m((i,s)=>{var o=Pt(),h=o(Object,"create");s.exports=h}),te=m((i,s)=>{var o=Ct();function h(){this.__data__=o?o(null):{},this.size=0}s.exports=h}),we=m((i,s)=>{function o(h){var c=this.has(h)&&delete this.__data__[h];return this.size-=c?1:0,c}s.exports=o}),Ce=m((i,s)=>{var o=Ct(),h="__lodash_hash_undefined__",c=Object.prototype,_=c.hasOwnProperty;function y(A){var x=this.__data__;if(o){var P=x[A];return P===h?void 0:P}return _.call(x,A)?x[A]:void 0}s.exports=y}),ae=m((i,s)=>{var o=Ct(),h=Object.prototype,c=h.hasOwnProperty;function _(y){var A=this.__data__;return o?A[y]!==void 0:c.call(A,y)}s.exports=_}),Ht=m((i,s)=>{var o=Ct(),h="__lodash_hash_undefined__";function c(_,y){var A=this.__data__;return this.size+=this.has(_)?0:1,A[_]=o&&y===void 0?h:y,this}s.exports=c}),Rt=m((i,s)=>{var o=te(),h=we(),c=Ce(),_=ae(),y=Ht();function A(x){var P=-1,N=x==null?0:x.length;for(this.clear();++P<N;){var F=x[P];this.set(F[0],F[1])}}A.prototype.clear=o,A.prototype.delete=h,A.prototype.get=c,A.prototype.has=_,A.prototype.set=y,s.exports=A}),si=m((i,s)=>{var o=Rt(),h=W(),c=Cs();function _(){this.size=0,this.__data__={hash:new o,map:new(c||h),string:new o}}s.exports=_}),fi=m((i,s)=>{function o(h){var c=typeof h;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?h!=="__proto__":h===null}s.exports=o}),nn=m((i,s)=>{var o=fi();function h(c,_){var y=c.__data__;return o(_)?y[typeof _=="string"?"string":"hash"]:y.map}s.exports=h}),Es=m((i,s)=>{var o=nn();function h(c){var _=o(this,c).delete(c);return this.size-=_?1:0,_}s.exports=h}),Ps=m((i,s)=>{var o=nn();function h(c){return o(this,c).get(c)}s.exports=h}),sn=m((i,s)=>{var o=nn();function h(c){return o(this,c).has(c)}s.exports=h}),ks=m((i,s)=>{var o=nn();function h(c,_){var y=o(this,c),A=y.size;return y.set(c,_),this.size+=y.size==A?0:1,this}s.exports=h}),Ea=m((i,s)=>{var o=si(),h=Es(),c=Ps(),_=sn(),y=ks();function A(x){var P=-1,N=x==null?0:x.length;for(this.clear();++P<N;){var F=x[P];this.set(F[0],F[1])}}A.prototype.clear=o,A.prototype.delete=h,A.prototype.get=c,A.prototype.has=_,A.prototype.set=y,s.exports=A}),Pa=m((i,s)=>{var o=W(),h=Cs(),c=Ea(),_=200;function y(A,x){var P=this.__data__;if(P instanceof o){var N=P.__data__;if(!h||N.length<_-1)return N.push([A,x]),this.size=++P.size,this;P=this.__data__=new c(N)}return P.set(A,x),this.size=P.size,this}s.exports=y}),ka=m((i,s)=>{var o=W(),h=at(),c=rt(),_=ct(),y=yt(),A=Pa();function x(P){var N=this.__data__=new o(P);this.size=N.size}x.prototype.clear=h,x.prototype.delete=c,x.prototype.get=_,x.prototype.has=y,x.prototype.set=A,s.exports=x}),Sn=m((i,s)=>{var o=Pt(),h=function(){try{var c=o(Object,"defineProperty");return c({},"",{}),c}catch{}}();s.exports=h}),Gi=m((i,s)=>{var o=Sn();function h(c,_,y){_=="__proto__"&&o?o(c,_,{configurable:!0,enumerable:!0,value:y,writable:!0}):c[_]=y}s.exports=h}),Sa=m((i,s)=>{var o=Gi(),h=E();function c(_,y,A){(A!==void 0&&!h(_[y],A)||A===void 0&&!(y in _))&&o(_,y,A)}s.exports=c}),Ba=m((i,s)=>{function o(h){return function(c,_,y){for(var A=-1,x=Object(c),P=y(c),N=P.length;N--;){var F=P[h?N:++A];if(_(x[F],F,x)===!1)break}return c}}s.exports=o}),Ss=m((i,s)=>{var o=Ba(),h=o();s.exports=h}),Ta=m((i,s)=>{var o=xt(),h=typeof i=="object"&&i&&!i.nodeType&&i,c=h&&typeof s=="object"&&s&&!s.nodeType&&s,_=c&&c.exports===h,y=_?o.Buffer:void 0,A=y?y.allocUnsafe:void 0;function x(P,N){if(N)return P.slice();var F=P.length,tt=A?A(F):new P.constructor(F);return P.copy(tt),tt}s.exports=x}),Da=m((i,s)=>{var o=xt(),h=o.Uint8Array;s.exports=h}),ro=m((i,s)=>{var o=Da();function h(c){var _=new c.constructor(c.byteLength);return new o(_).set(new o(c)),_}s.exports=h}),oo=m((i,s)=>{var o=ro();function h(c,_){var y=_?o(c.buffer):c.buffer;return new c.constructor(y,c.byteOffset,c.length)}s.exports=h}),Bs=m((i,s)=>{function o(h,c){var _=-1,y=h.length;for(c||(c=Array(y));++_<y;)c[_]=h[_];return c}s.exports=o}),Oa=m((i,s)=>{var o=Et(),h=Object.create,c=function(){function _(){}return function(y){if(!o(y))return{};if(h)return h(y);_.prototype=y;var A=new _;return _.prototype=void 0,A}}();s.exports=c}),Ia=m((i,s)=>{function o(h,c){return function(_){return h(c(_))}}s.exports=o}),Ra=m((i,s)=>{var o=Ia(),h=o(Object.getPrototypeOf,Object);s.exports=h}),Ts=m((i,s)=>{var o=Object.prototype;function h(c){var _=c&&c.constructor,y=typeof _=="function"&&_.prototype||o;return c===y}s.exports=h}),Fa=m((i,s)=>{var o=Oa(),h=Ra(),c=Ts();function _(y){return typeof y.constructor=="function"&&!c(y)?o(h(y)):{}}s.exports=_}),zi=m((i,s)=>{function o(h){return h!=null&&typeof h=="object"}s.exports=o}),Ga=m((i,s)=>{var o=Yt(),h=zi(),c="[object Arguments]";function _(y){return h(y)&&o(y)==c}s.exports=_}),Bn=m((i,s)=>{var o=Ga(),h=zi(),c=Object.prototype,_=c.hasOwnProperty,y=c.propertyIsEnumerable,A=o(function(){return arguments}())?o:function(x){return h(x)&&_.call(x,"callee")&&!y.call(x,"callee")};s.exports=A}),Ni=m((i,s)=>{var o=Array.isArray;s.exports=o}),za=m((i,s)=>{var o=9007199254740991;function h(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=o}s.exports=h}),xi=m((i,s)=>{var o=Zt(),h=za();function c(_){return _!=null&&h(_.length)&&!o(_)}s.exports=c}),ho=m((i,s)=>{var o=xi(),h=zi();function c(_){return h(_)&&o(_)}s.exports=c}),lo=m((i,s)=>{function o(){return!1}s.exports=o}),Ds=m((i,s)=>{var o=xt(),h=lo(),c=typeof i=="object"&&i&&!i.nodeType&&i,_=c&&typeof s=="object"&&s&&!s.nodeType&&s,y=_&&_.exports===c,A=y?o.Buffer:void 0,x=A?A.isBuffer:void 0,P=x||h;s.exports=P}),Na=m((i,s)=>{var o=Yt(),h=Ra(),c=zi(),_="[object Object]",y=Function.prototype,A=Object.prototype,x=y.toString,P=A.hasOwnProperty,N=x.call(Object);function F(tt){if(!c(tt)||o(tt)!=_)return!1;var it=h(tt);if(it===null)return!0;var lt=P.call(it,"constructor")&&it.constructor;return typeof lt=="function"&&lt instanceof lt&&x.call(lt)==N}s.exports=F}),Ua=m((i,s)=>{var o=Yt(),h=za(),c=zi(),_="[object Arguments]",y="[object Array]",A="[object Boolean]",x="[object Date]",P="[object Error]",N="[object Function]",F="[object Map]",tt="[object Number]",it="[object Object]",lt="[object RegExp]",ft="[object Set]",At="[object String]",Gt="[object WeakMap]",z="[object ArrayBuffer]",q="[object DataView]",K="[object Float32Array]",nt="[object Float64Array]",X="[object Int8Array]",et="[object Int16Array]",w="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",I="[object Uint32Array]",R={};R[K]=R[nt]=R[X]=R[et]=R[w]=R[S]=R[O]=R[T]=R[I]=!0,R[_]=R[y]=R[z]=R[A]=R[q]=R[x]=R[P]=R[N]=R[F]=R[tt]=R[it]=R[lt]=R[ft]=R[At]=R[Gt]=!1;function V(H){return c(H)&&h(H.length)&&!!R[o(H)]}s.exports=V}),uo=m((i,s)=>{function o(h){return function(c){return h(c)}}s.exports=o}),co=m((i,s)=>{var o=mt(),h=typeof i=="object"&&i&&!i.nodeType&&i,c=h&&typeof s=="object"&&s&&!s.nodeType&&s,_=c&&c.exports===h,y=_&&o.process,A=function(){try{var x=c&&c.require&&c.require("util").types;return x||y&&y.binding&&y.binding("util")}catch{}}();s.exports=A}),Za=m((i,s)=>{var o=Ua(),h=uo(),c=co(),_=c&&c.isTypedArray,y=_?h(_):o;s.exports=y}),ja=m((i,s)=>{function o(h,c){if(!(c==="constructor"&&typeof h[c]=="function")&&c!="__proto__")return h[c]}s.exports=o}),fo=m((i,s)=>{var o=Gi(),h=E(),c=Object.prototype,_=c.hasOwnProperty;function y(A,x,P){var N=A[x];(!(_.call(A,x)&&h(N,P))||P===void 0&&!(x in A))&&o(A,x,P)}s.exports=y}),po=m((i,s)=>{var o=fo(),h=Gi();function c(_,y,A,x){var P=!A;A||(A={});for(var N=-1,F=y.length;++N<F;){var tt=y[N],it=x?x(A[tt],_[tt],tt,A,_):void 0;it===void 0&&(it=_[tt]),P?h(A,tt,it):o(A,tt,it)}return A}s.exports=c}),Os=m((i,s)=>{function o(h,c){for(var _=-1,y=Array(h);++_<h;)y[_]=c(_);return y}s.exports=o}),qa=m((i,s)=>{var o=9007199254740991,h=/^(?:0|[1-9]\d*)$/;function c(_,y){var A=typeof _;return y=y??o,!!y&&(A=="number"||A!="symbol"&&h.test(_))&&_>-1&&_%1==0&&_<y}s.exports=c}),_o=m((i,s)=>{var o=Os(),h=Bn(),c=Ni(),_=Ds(),y=qa(),A=Za(),x=Object.prototype,P=x.hasOwnProperty;function N(F,tt){var it=c(F),lt=!it&&h(F),ft=!it&&!lt&&_(F),At=!it&&!lt&&!ft&&A(F),Gt=it||lt||ft||At,z=Gt?o(F.length,String):[],q=z.length;for(var K in F)(tt||P.call(F,K))&&!(Gt&&(K=="length"||ft&&(K=="offset"||K=="parent")||At&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||y(K,q)))&&z.push(K);return z}s.exports=N}),mo=m((i,s)=>{function o(h){var c=[];if(h!=null)for(var _ in Object(h))c.push(_);return c}s.exports=o}),go=m((i,s)=>{var o=Et(),h=Ts(),c=mo(),_=Object.prototype,y=_.hasOwnProperty;function A(x){if(!o(x))return c(x);var P=h(x),N=[];for(var F in x)F=="constructor"&&(P||!y.call(x,F))||N.push(F);return N}s.exports=A}),je=m((i,s)=>{var o=_o(),h=go(),c=xi();function _(y){return c(y)?o(y,!0):h(y)}s.exports=_}),Mt=m((i,s)=>{var o=po(),h=je();function c(_){return o(_,h(_))}s.exports=c}),Ha=m((i,s)=>{var o=Sa(),h=Ta(),c=oo(),_=Bs(),y=Fa(),A=Bn(),x=Ni(),P=ho(),N=Ds(),F=Zt(),tt=Et(),it=Na(),lt=Za(),ft=ja(),At=Mt();function Gt(z,q,K,nt,X,et,w){var S=ft(z,K),O=ft(q,K),T=w.get(O);if(T){o(z,K,T);return}var I=et?et(S,O,K+"",z,q,w):void 0,R=I===void 0;if(R){var V=x(O),H=!V&&N(O),$=!V&&!H&&lt(O);I=O,V||H||$?x(S)?I=S:P(S)?I=_(S):H?(R=!1,I=h(O,!0)):$?(R=!1,I=c(O,!0)):I=[]:it(O)||A(O)?(I=S,A(S)?I=At(S):(!tt(S)||F(S))&&(I=y(O))):R=!1}R&&(w.set(O,I),X(I,O,nt,et,w),w.delete(O)),o(z,K,I)}s.exports=Gt}),Va=m((i,s)=>{var o=ka(),h=Sa(),c=Ss(),_=Ha(),y=Et(),A=je(),x=ja();function P(N,F,tt,it,lt){N!==F&&c(F,function(ft,At){if(lt||(lt=new o),y(ft))_(N,F,At,tt,P,it,lt);else{var Gt=it?it(x(N,At),ft,At+"",N,F,lt):void 0;Gt===void 0&&(Gt=ft),h(N,At,Gt)}},A)}s.exports=P}),Is=m((i,s)=>{function o(h){return h}s.exports=o}),$a=m((i,s)=>{function o(h,c,_){switch(_.length){case 0:return h.call(c);case 1:return h.call(c,_[0]);case 2:return h.call(c,_[0],_[1]);case 3:return h.call(c,_[0],_[1],_[2])}return h.apply(c,_)}s.exports=o}),Rs=m((i,s)=>{var o=$a(),h=Math.max;function c(_,y,A){return y=h(y===void 0?_.length-1:y,0),function(){for(var x=arguments,P=-1,N=h(x.length-y,0),F=Array(N);++P<N;)F[P]=x[y+P];P=-1;for(var tt=Array(y+1);++P<y;)tt[P]=x[P];return tt[y]=A(F),o(_,this,tt)}}s.exports=c}),Ka=m((i,s)=>{function o(h){return function(){return h}}s.exports=o}),Ui=m((i,s)=>{var o=Ka(),h=Sn(),c=Is(),_=h?function(y,A){return h(y,"toString",{configurable:!0,enumerable:!1,value:o(A),writable:!0})}:c;s.exports=_}),Wa=m((i,s)=>{var o=800,h=16,c=Date.now;function _(y){var A=0,x=0;return function(){var P=c(),N=h-(P-x);if(x=P,N>0){if(++A>=o)return arguments[0]}else A=0;return y.apply(void 0,arguments)}}s.exports=_}),yo=m((i,s)=>{var o=Ui(),h=Wa(),c=h(o);s.exports=c}),Ao=m((i,s)=>{var o=Is(),h=Rs(),c=yo();function _(y,A){return c(h(y,A,o),y+"")}s.exports=_}),vo=m((i,s)=>{var o=E(),h=xi(),c=qa(),_=Et();function y(A,x,P){if(!_(P))return!1;var N=typeof x;return(N=="number"?h(P)&&c(x,P.length):N=="string"&&x in P)?o(P[x],A):!1}s.exports=y}),Mo=m((i,s)=>{var o=Ao(),h=vo();function c(_){return o(function(y,A){var x=-1,P=A.length,N=P>1?A[P-1]:void 0,F=P>2?A[2]:void 0;for(N=_.length>3&&typeof N=="function"?(P--,N):void 0,F&&h(A[0],A[1],F)&&(N=P<3?void 0:N,P=1),y=Object(y);++x<P;){var tt=A[x];tt&&_(y,tt,x,N)}return y})}s.exports=c}),Tn=m((i,s)=>{var o=Va(),h=Mo(),c=h(function(_,y,A){o(_,y,A)});s.exports=c}),Fs=m((i,s)=>{var o=Yt(),h=zi(),c="[object Symbol]";function _(y){return typeof y=="symbol"||h(y)&&o(y)==c}s.exports=_}),Dn=m((i,s)=>{var o=Ni(),h=Fs(),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_=/^\w*$/;function y(A,x){if(o(A))return!1;var P=typeof A;return P=="number"||P=="symbol"||P=="boolean"||A==null||h(A)?!0:_.test(A)||!c.test(A)||x!=null&&A in Object(x)}s.exports=y}),xo=m((i,s)=>{var o=Ea(),h="Expected a function";function c(_,y){if(typeof _!="function"||y!=null&&typeof y!="function")throw new TypeError(h);var A=function(){var x=arguments,P=y?y.apply(this,x):x[0],N=A.cache;if(N.has(P))return N.get(P);var F=_.apply(this,x);return A.cache=N.set(P,F)||N,F};return A.cache=new(c.Cache||o),A}c.Cache=o,s.exports=c}),Lo=m((i,s)=>{var o=xo(),h=500;function c(_){var y=o(_,function(x){return A.size===h&&A.clear(),x}),A=y.cache;return y}s.exports=c}),bo=m((i,s)=>{var o=Lo(),h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,_=o(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(h,function(x,P,N,F){A.push(N?F.replace(c,"$1"):P||x)}),A});s.exports=_}),wo=m((i,s)=>{function o(h,c){for(var _=-1,y=h==null?0:h.length,A=Array(y);++_<y;)A[_]=c(h[_],_,h);return A}s.exports=o}),Co=m((i,s)=>{var o=Dt(),h=wo(),c=Ni(),_=Fs(),y=o?o.prototype:void 0,A=y?y.toString:void 0;function x(P){if(typeof P=="string")return P;if(c(P))return h(P,x)+"";if(_(P))return A?A.call(P):"";var N=P+"";return N=="0"&&1/P==-1/0?"-0":N}s.exports=x}),Gs=m((i,s)=>{var o=Co();function h(c){return c==null?"":o(c)}s.exports=h}),an=m((i,s)=>{var o=Ni(),h=Dn(),c=bo(),_=Gs();function y(A,x){return o(A)?A:h(A,x)?[A]:c(_(A))}s.exports=y}),Xa=m((i,s)=>{var o=Fs();function h(c){if(typeof c=="string"||o(c))return c;var _=c+"";return _=="0"&&1/c==-1/0?"-0":_}s.exports=h}),Ya=m((i,s)=>{var o=an(),h=Xa();function c(_,y){y=o(y,_);for(var A=0,x=y.length;_!=null&&A<x;)_=_[h(y[A++])];return A&&A==x?_:void 0}s.exports=c}),pi=m((i,s)=>{var o=Ya();function h(c,_,y){var A=c==null?void 0:o(c,_);return A===void 0?y:A}s.exports=h}),Nt=m((i,s)=>{(function(o,h){typeof i=="object"&&typeof s<"u"?s.exports=h():(o=o||self).RBush=h()})(i,function(){function o(z,q,K,nt,X){(function et(w,S,O,T,I){for(;T>O;){if(T-O>600){var R=T-O+1,V=S-O+1,H=Math.log(R),$=.5*Math.exp(2*H/3),Q=.5*Math.sqrt(H*$*(R-$)/R)*(V-R/2<0?-1:1),J=Math.max(O,Math.floor(S-V*$/R+Q)),ot=Math.min(T,Math.floor(S+(R-V)*$/R+Q));et(w,S,J,ot,I)}var gt=w[S],vt=O,bt=T;for(h(w,O,S),I(w[T],gt)>0&&h(w,O,T);vt<bt;){for(h(w,vt,bt),vt++,bt--;I(w[vt],gt)<0;)vt++;for(;I(w[bt],gt)>0;)bt--}I(w[O],gt)===0?h(w,O,bt):h(w,++bt,T),bt<=S&&(O=bt+1),S<=bt&&(T=bt-1)}})(z,q,K||0,nt||z.length-1,X||c)}function h(z,q,K){var nt=z[q];z[q]=z[K],z[K]=nt}function c(z,q){return z<q?-1:z>q?1:0}var _=function(z){z===void 0&&(z=9),this._maxEntries=Math.max(4,z),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function y(z,q,K){if(!K)return q.indexOf(z);for(var nt=0;nt<q.length;nt++)if(K(z,q[nt]))return nt;return-1}function A(z,q){x(z,0,z.children.length,q,z)}function x(z,q,K,nt,X){X||(X=At(null)),X.minX=1/0,X.minY=1/0,X.maxX=-1/0,X.maxY=-1/0;for(var et=q;et<K;et++){var w=z.children[et];P(X,z.leaf?nt(w):w)}return X}function P(z,q){return z.minX=Math.min(z.minX,q.minX),z.minY=Math.min(z.minY,q.minY),z.maxX=Math.max(z.maxX,q.maxX),z.maxY=Math.max(z.maxY,q.maxY),z}function N(z,q){return z.minX-q.minX}function F(z,q){return z.minY-q.minY}function tt(z){return(z.maxX-z.minX)*(z.maxY-z.minY)}function it(z){return z.maxX-z.minX+(z.maxY-z.minY)}function lt(z,q){return z.minX<=q.minX&&z.minY<=q.minY&&q.maxX<=z.maxX&&q.maxY<=z.maxY}function ft(z,q){return q.minX<=z.maxX&&q.minY<=z.maxY&&q.maxX>=z.minX&&q.maxY>=z.minY}function At(z){return{children:z,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Gt(z,q,K,nt,X){for(var et=[q,K];et.length;)if(!((K=et.pop())-(q=et.pop())<=nt)){var w=q+Math.ceil((K-q)/nt/2)*nt;o(z,w,q,K,X),et.push(q,w,w,K)}}return _.prototype.all=function(){return this._all(this.data,[])},_.prototype.search=function(z){var q=this.data,K=[];if(!ft(z,q))return K;for(var nt=this.toBBox,X=[];q;){for(var et=0;et<q.children.length;et++){var w=q.children[et],S=q.leaf?nt(w):w;ft(z,S)&&(q.leaf?K.push(w):lt(z,S)?this._all(w,K):X.push(w))}q=X.pop()}return K},_.prototype.collides=function(z){var q=this.data;if(!ft(z,q))return!1;for(var K=[];q;){for(var nt=0;nt<q.children.length;nt++){var X=q.children[nt],et=q.leaf?this.toBBox(X):X;if(ft(z,et)){if(q.leaf||lt(z,et))return!0;K.push(X)}}q=K.pop()}return!1},_.prototype.load=function(z){if(!z||!z.length)return this;if(z.length<this._minEntries){for(var q=0;q<z.length;q++)this.insert(z[q]);return this}var K=this._build(z.slice(),0,z.length-1,0);if(this.data.children.length)if(this.data.height===K.height)this._splitRoot(this.data,K);else{if(this.data.height<K.height){var nt=this.data;this.data=K,K=nt}this._insert(K,this.data.height-K.height-1,!0)}else this.data=K;return this},_.prototype.insert=function(z){return z&&this._insert(z,this.data.height-1),this},_.prototype.clear=function(){return this.data=At([]),this},_.prototype.remove=function(z,q){if(!z)return this;for(var K,nt,X,et=this.data,w=this.toBBox(z),S=[],O=[];et||S.length;){if(et||(et=S.pop(),nt=S[S.length-1],K=O.pop(),X=!0),et.leaf){var T=y(z,et.children,q);if(T!==-1)return et.children.splice(T,1),S.push(et),this._condense(S),this}X||et.leaf||!lt(et,w)?nt?(K++,et=nt.children[K],X=!1):et=null:(S.push(et),O.push(K),K=0,nt=et,et=et.children[0])}return this},_.prototype.toBBox=function(z){return z},_.prototype.compareMinX=function(z,q){return z.minX-q.minX},_.prototype.compareMinY=function(z,q){return z.minY-q.minY},_.prototype.toJSON=function(){return this.data},_.prototype.fromJSON=function(z){return this.data=z,this},_.prototype._all=function(z,q){for(var K=[];z;)z.leaf?q.push.apply(q,z.children):K.push.apply(K,z.children),z=K.pop();return q},_.prototype._build=function(z,q,K,nt){var X,et=K-q+1,w=this._maxEntries;if(et<=w)return A(X=At(z.slice(q,K+1)),this.toBBox),X;nt||(nt=Math.ceil(Math.log(et)/Math.log(w)),w=Math.ceil(et/Math.pow(w,nt-1))),(X=At([])).leaf=!1,X.height=nt;var S=Math.ceil(et/w),O=S*Math.ceil(Math.sqrt(w));Gt(z,q,K,O,this.compareMinX);for(var T=q;T<=K;T+=O){var I=Math.min(T+O-1,K);Gt(z,T,I,S,this.compareMinY);for(var R=T;R<=I;R+=S){var V=Math.min(R+S-1,I);X.children.push(this._build(z,R,V,nt-1))}}return A(X,this.toBBox),X},_.prototype._chooseSubtree=function(z,q,K,nt){for(;nt.push(q),!q.leaf&&nt.length-1!==K;){for(var X=1/0,et=1/0,w=void 0,S=0;S<q.children.length;S++){var O=q.children[S],T=tt(O),I=(R=z,V=O,(Math.max(V.maxX,R.maxX)-Math.min(V.minX,R.minX))*(Math.max(V.maxY,R.maxY)-Math.min(V.minY,R.minY))-T);I<et?(et=I,X=T<X?T:X,w=O):I===et&&T<X&&(X=T,w=O)}q=w||q.children[0]}var R,V;return q},_.prototype._insert=function(z,q,K){var nt=K?z:this.toBBox(z),X=[],et=this._chooseSubtree(nt,this.data,q,X);for(et.children.push(z),P(et,nt);q>=0&&X[q].children.length>this._maxEntries;)this._split(X,q),q--;this._adjustParentBBoxes(nt,X,q)},_.prototype._split=function(z,q){var K=z[q],nt=K.children.length,X=this._minEntries;this._chooseSplitAxis(K,X,nt);var et=this._chooseSplitIndex(K,X,nt),w=At(K.children.splice(et,K.children.length-et));w.height=K.height,w.leaf=K.leaf,A(K,this.toBBox),A(w,this.toBBox),q?z[q-1].children.push(w):this._splitRoot(K,w)},_.prototype._splitRoot=function(z,q){this.data=At([z,q]),this.data.height=z.height+1,this.data.leaf=!1,A(this.data,this.toBBox)},_.prototype._chooseSplitIndex=function(z,q,K){for(var nt,X,et,w,S,O,T,I=1/0,R=1/0,V=q;V<=K-q;V++){var H=x(z,0,V,this.toBBox),$=x(z,V,K,this.toBBox),Q=(X=H,et=$,w=void 0,S=void 0,O=void 0,T=void 0,w=Math.max(X.minX,et.minX),S=Math.max(X.minY,et.minY),O=Math.min(X.maxX,et.maxX),T=Math.min(X.maxY,et.maxY),Math.max(0,O-w)*Math.max(0,T-S)),J=tt(H)+tt($);Q<I?(I=Q,nt=V,R=J<R?J:R):Q===I&&J<R&&(R=J,nt=V)}return nt||K-q},_.prototype._chooseSplitAxis=function(z,q,K){var nt=z.leaf?this.compareMinX:N,X=z.leaf?this.compareMinY:F;this._allDistMargin(z,q,K,nt)<this._allDistMargin(z,q,K,X)&&z.children.sort(nt)},_.prototype._allDistMargin=function(z,q,K,nt){z.children.sort(nt);for(var X=this.toBBox,et=x(z,0,q,X),w=x(z,K-q,K,X),S=it(et)+it(w),O=q;O<K-q;O++){var T=z.children[O];P(et,z.leaf?X(T):T),S+=it(et)}for(var I=K-q-1;I>=q;I--){var R=z.children[I];P(w,z.leaf?X(R):R),S+=it(w)}return S},_.prototype._adjustParentBBoxes=function(z,q,K){for(var nt=K;nt>=0;nt--)P(q[nt],z)},_.prototype._condense=function(z){for(var q=z.length-1,K=void 0;q>=0;q--)z[q].children.length===0?q>0?(K=z[q-1].children).splice(K.indexOf(z[q]),1):this.clear():A(z[q],this.toBBox)},_})}),Qt=m(i=>{Object.defineProperty(i,"__esModule",{value:!0}),i.earthRadius=63710088e-1,i.factors={centimeters:i.earthRadius*100,centimetres:i.earthRadius*100,degrees:i.earthRadius/111325,feet:i.earthRadius*3.28084,inches:i.earthRadius*39.37,kilometers:i.earthRadius/1e3,kilometres:i.earthRadius/1e3,meters:i.earthRadius,metres:i.earthRadius,miles:i.earthRadius/1609.344,millimeters:i.earthRadius*1e3,millimetres:i.earthRadius*1e3,nauticalmiles:i.earthRadius/1852,radians:1,yards:i.earthRadius*1.0936},i.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/i.earthRadius,yards:1.0936133},i.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(T,I,R){R===void 0&&(R={});var V={type:"Feature"};return(R.id===0||R.id)&&(V.id=R.id),R.bbox&&(V.bbox=R.bbox),V.properties=I||{},V.geometry=T,V}i.feature=s;function o(T,I,R){switch(T){case"Point":return h(I).geometry;case"LineString":return A(I).geometry;case"Polygon":return _(I).geometry;case"MultiPoint":return F(I).geometry;case"MultiLineString":return N(I).geometry;case"MultiPolygon":return tt(I).geometry;default:throw new Error(T+" is invalid")}}i.geometry=o;function h(T,I,R){if(R===void 0&&(R={}),!T)throw new Error("coordinates is required");if(!Array.isArray(T))throw new Error("coordinates must be an Array");if(T.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!et(T[0])||!et(T[1]))throw new Error("coordinates must contain numbers");var V={type:"Point",coordinates:T};return s(V,I,R)}i.point=h;function c(T,I,R){return R===void 0&&(R={}),P(T.map(function(V){return h(V,I)}),R)}i.points=c;function _(T,I,R){R===void 0&&(R={});for(var V=0,H=T;V<H.length;V++){var $=H[V];if($.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var Q=0;Q<$[$.length-1].length;Q++)if($[$.length-1][Q]!==$[0][Q])throw new Error("First and last Position are not equivalent.")}var J={type:"Polygon",coordinates:T};return s(J,I,R)}i.polygon=_;function y(T,I,R){return R===void 0&&(R={}),P(T.map(function(V){return _(V,I)}),R)}i.polygons=y;function A(T,I,R){if(R===void 0&&(R={}),T.length<2)throw new Error("coordinates must be an array of two or more positions");var V={type:"LineString",coordinates:T};return s(V,I,R)}i.lineString=A;function x(T,I,R){return R===void 0&&(R={}),P(T.map(function(V){return A(V,I)}),R)}i.lineStrings=x;function P(T,I){I===void 0&&(I={});var R={type:"FeatureCollection"};return I.id&&(R.id=I.id),I.bbox&&(R.bbox=I.bbox),R.features=T,R}i.featureCollection=P;function N(T,I,R){R===void 0&&(R={});var V={type:"MultiLineString",coordinates:T};return s(V,I,R)}i.multiLineString=N;function F(T,I,R){R===void 0&&(R={});var V={type:"MultiPoint",coordinates:T};return s(V,I,R)}i.multiPoint=F;function tt(T,I,R){R===void 0&&(R={});var V={type:"MultiPolygon",coordinates:T};return s(V,I,R)}i.multiPolygon=tt;function it(T,I,R){R===void 0&&(R={});var V={type:"GeometryCollection",geometries:T};return s(V,I,R)}i.geometryCollection=it;function lt(T,I){if(I===void 0&&(I=0),I&&!(I>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,I||0);return Math.round(T*R)/R}i.round=lt;function ft(T,I){I===void 0&&(I="kilometers");var R=i.factors[I];if(!R)throw new Error(I+" units is invalid");return T*R}i.radiansToLength=ft;function At(T,I){I===void 0&&(I="kilometers");var R=i.factors[I];if(!R)throw new Error(I+" units is invalid");return T/R}i.lengthToRadians=At;function Gt(T,I){return q(At(T,I))}i.lengthToDegrees=Gt;function z(T){var I=T%360;return I<0&&(I+=360),I}i.bearingToAzimuth=z;function q(T){var I=T%(2*Math.PI);return I*180/Math.PI}i.radiansToDegrees=q;function K(T){var I=T%360;return I*Math.PI/180}i.degreesToRadians=K;function nt(T,I,R){if(I===void 0&&(I="kilometers"),R===void 0&&(R="kilometers"),!(T>=0))throw new Error("length must be a positive number");return ft(At(T,I),R)}i.convertLength=nt;function X(T,I,R){if(I===void 0&&(I="meters"),R===void 0&&(R="kilometers"),!(T>=0))throw new Error("area must be a positive number");var V=i.areaFactors[I];if(!V)throw new Error("invalid original units");var H=i.areaFactors[R];if(!H)throw new Error("invalid final units");return T/V*H}i.convertArea=X;function et(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}i.isNumber=et;function w(T){return!!T&&T.constructor===Object}i.isObject=w;function S(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(I){if(!et(I))throw new Error("bbox must only contain numbers")})}i.validateBBox=S;function O(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}i.validateId=O}),rn=m(i=>{Object.defineProperty(i,"__esModule",{value:!0});var s=Qt();function o(q,K,nt){if(q!==null)for(var X,et,w,S,O,T,I,R=0,V=0,H,$=q.type,Q=$==="FeatureCollection",J=$==="Feature",ot=Q?q.features.length:1,gt=0;gt<ot;gt++){I=Q?q.features[gt].geometry:J?q.geometry:q,H=I?I.type==="GeometryCollection":!1,O=H?I.geometries.length:1;for(var vt=0;vt<O;vt++){var bt=0,Vt=0;if(S=H?I.geometries[vt]:I,S!==null){T=S.coordinates;var Wt=S.type;switch(R=nt&&(Wt==="Polygon"||Wt==="MultiPolygon")?1:0,Wt){case null:break;case"Point":if(K(T,V,gt,bt,Vt)===!1)return!1;V++,bt++;break;case"LineString":case"MultiPoint":for(X=0;X<T.length;X++){if(K(T[X],V,gt,bt,Vt)===!1)return!1;V++,Wt==="MultiPoint"&&bt++}Wt==="LineString"&&bt++;break;case"Polygon":case"MultiLineString":for(X=0;X<T.length;X++){for(et=0;et<T[X].length-R;et++){if(K(T[X][et],V,gt,bt,Vt)===!1)return!1;V++}Wt==="MultiLineString"&&bt++,Wt==="Polygon"&&Vt++}Wt==="Polygon"&&bt++;break;case"MultiPolygon":for(X=0;X<T.length;X++){for(Vt=0,et=0;et<T[X].length;et++){for(w=0;w<T[X][et].length-R;w++){if(K(T[X][et][w],V,gt,bt,Vt)===!1)return!1;V++}Vt++}bt++}break;case"GeometryCollection":for(X=0;X<S.geometries.length;X++)if(o(S.geometries[X],K,nt)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function h(q,K,nt,X){var et=nt;return o(q,function(w,S,O,T,I){S===0&&nt===void 0?et=w:et=K(et,w,S,O,T,I)},X),et}function c(q,K){var nt;switch(q.type){case"FeatureCollection":for(nt=0;nt<q.features.length&&K(q.features[nt].properties,nt)!==!1;nt++);break;case"Feature":K(q.properties,0);break}}function _(q,K,nt){var X=nt;return c(q,function(et,w){w===0&&nt===void 0?X=et:X=K(X,et,w)}),X}function y(q,K){if(q.type==="Feature")K(q,0);else if(q.type==="FeatureCollection")for(var nt=0;nt<q.features.length&&K(q.features[nt],nt)!==!1;nt++);}function A(q,K,nt){var X=nt;return y(q,function(et,w){w===0&&nt===void 0?X=et:X=K(X,et,w)}),X}function x(q){var K=[];return o(q,function(nt){K.push(nt)}),K}function P(q,K){var nt,X,et,w,S,O,T,I,R,V,H=0,$=q.type==="FeatureCollection",Q=q.type==="Feature",J=$?q.features.length:1;for(nt=0;nt<J;nt++){for(O=$?q.features[nt].geometry:Q?q.geometry:q,I=$?q.features[nt].properties:Q?q.properties:{},R=$?q.features[nt].bbox:Q?q.bbox:void 0,V=$?q.features[nt].id:Q?q.id:void 0,T=O?O.type==="GeometryCollection":!1,S=T?O.geometries.length:1,et=0;et<S;et++){if(w=T?O.geometries[et]:O,w===null){if(K(null,H,I,R,V)===!1)return!1;continue}switch(w.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(K(w,H,I,R,V)===!1)return!1;break}case"GeometryCollection":{for(X=0;X<w.geometries.length;X++)if(K(w.geometries[X],H,I,R,V)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}H++}}function N(q,K,nt){var X=nt;return P(q,function(et,w,S,O,T){w===0&&nt===void 0?X=et:X=K(X,et,w,S,O,T)}),X}function F(q,K){P(q,function(nt,X,et,w,S){var O=nt===null?null:nt.type;switch(O){case null:case"Point":case"LineString":case"Polygon":return K(s.feature(nt,et,{bbox:w,id:S}),X,0)===!1?!1:void 0}var T;switch(O){case"MultiPoint":T="Point";break;case"MultiLineString":T="LineString";break;case"MultiPolygon":T="Polygon";break}for(var I=0;I<nt.coordinates.length;I++){var R=nt.coordinates[I],V={type:T,coordinates:R};if(K(s.feature(V,et),X,I)===!1)return!1}})}function tt(q,K,nt){var X=nt;return F(q,function(et,w,S){w===0&&S===0&&nt===void 0?X=et:X=K(X,et,w,S)}),X}function it(q,K){F(q,function(nt,X,et){var w=0;if(nt.geometry){var S=nt.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var O,T=0,I=0,R=0;if(o(nt,function(V,H,$,Q,J){if(O===void 0||X>T||Q>I||J>R){O=V,T=X,I=Q,R=J,w=0;return}var ot=s.lineString([O,V],nt.properties);if(K(ot,X,et,J,w)===!1)return!1;w++,O=V})===!1)return!1}}})}function lt(q,K,nt){var X=nt,et=!1;return it(q,function(w,S,O,T,I){et===!1&&nt===void 0?X=w:X=K(X,w,S,O,T,I),et=!0}),X}function ft(q,K){if(!q)throw new Error("geojson is required");F(q,function(nt,X,et){if(nt.geometry!==null){var w=nt.geometry.type,S=nt.geometry.coordinates;switch(w){case"LineString":if(K(nt,X,et,0,0)===!1)return!1;break;case"Polygon":for(var O=0;O<S.length;O++)if(K(s.lineString(S[O],nt.properties),X,et,O)===!1)return!1;break}}})}function At(q,K,nt){var X=nt;return ft(q,function(et,w,S,O){w===0&&nt===void 0?X=et:X=K(X,et,w,S,O)}),X}function Gt(q,K){if(K=K||{},!s.isObject(K))throw new Error("options is invalid");var nt=K.featureIndex||0,X=K.multiFeatureIndex||0,et=K.geometryIndex||0,w=K.segmentIndex||0,S=K.properties,O;switch(q.type){case"FeatureCollection":nt<0&&(nt=q.features.length+nt),S=S||q.features[nt].properties,O=q.features[nt].geometry;break;case"Feature":S=S||q.properties,O=q.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=q;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var T=O.coordinates;switch(O.type){case"Point":case"MultiPoint":return null;case"LineString":return w<0&&(w=T.length+w-1),s.lineString([T[w],T[w+1]],S,K);case"Polygon":return et<0&&(et=T.length+et),w<0&&(w=T[et].length+w-1),s.lineString([T[et][w],T[et][w+1]],S,K);case"MultiLineString":return X<0&&(X=T.length+X),w<0&&(w=T[X].length+w-1),s.lineString([T[X][w],T[X][w+1]],S,K);case"MultiPolygon":return X<0&&(X=T.length+X),et<0&&(et=T[X].length+et),w<0&&(w=T[X][et].length-w-1),s.lineString([T[X][et][w],T[X][et][w+1]],S,K)}throw new Error("geojson is invalid")}function z(q,K){if(K=K||{},!s.isObject(K))throw new Error("options is invalid");var nt=K.featureIndex||0,X=K.multiFeatureIndex||0,et=K.geometryIndex||0,w=K.coordIndex||0,S=K.properties,O;switch(q.type){case"FeatureCollection":nt<0&&(nt=q.features.length+nt),S=S||q.features[nt].properties,O=q.features[nt].geometry;break;case"Feature":S=S||q.properties,O=q.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=q;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var T=O.coordinates;switch(O.type){case"Point":return s.point(T,S,K);case"MultiPoint":return X<0&&(X=T.length+X),s.point(T[X],S,K);case"LineString":return w<0&&(w=T.length+w),s.point(T[w],S,K);case"Polygon":return et<0&&(et=T.length+et),w<0&&(w=T[et].length+w),s.point(T[et][w],S,K);case"MultiLineString":return X<0&&(X=T.length+X),w<0&&(w=T[X].length+w),s.point(T[X][w],S,K);case"MultiPolygon":return X<0&&(X=T.length+X),et<0&&(et=T[X].length+et),w<0&&(w=T[X][et].length-w),s.point(T[X][et][w],S,K)}throw new Error("geojson is invalid")}i.coordAll=x,i.coordEach=o,i.coordReduce=h,i.featureEach=y,i.featureReduce=A,i.findPoint=z,i.findSegment=Gt,i.flattenEach=F,i.flattenReduce=tt,i.geomEach=P,i.geomReduce=N,i.lineEach=ft,i.lineReduce=At,i.propEach=c,i.propReduce=_,i.segmentEach=it,i.segmentReduce=lt}),Zi=m(i=>{Object.defineProperty(i,"__esModule",{value:!0});var s=rn();function o(h){var c=[1/0,1/0,-1/0,-1/0];return s.coordEach(h,function(_){c[0]>_[0]&&(c[0]=_[0]),c[1]>_[1]&&(c[1]=_[1]),c[2]<_[0]&&(c[2]=_[0]),c[3]<_[1]&&(c[3]=_[1])}),c}o.default=o,i.default=o}),Li=m((i,s)=>{var o=Nt(),h=Qt(),c=rn(),_=Zi().default,y=c.featureEach;c.coordEach,h.polygon;var A=h.featureCollection;function x(P){var N=new o(P);return N.insert=function(F){if(F.type!=="Feature")throw new Error("invalid feature");return F.bbox=F.bbox?F.bbox:_(F),o.prototype.insert.call(this,F)},N.load=function(F){var tt=[];return Array.isArray(F)?F.forEach(function(it){if(it.type!=="Feature")throw new Error("invalid features");it.bbox=it.bbox?it.bbox:_(it),tt.push(it)}):y(F,function(it){if(it.type!=="Feature")throw new Error("invalid features");it.bbox=it.bbox?it.bbox:_(it),tt.push(it)}),o.prototype.load.call(this,tt)},N.remove=function(F,tt){if(F.type!=="Feature")throw new Error("invalid feature");return F.bbox=F.bbox?F.bbox:_(F),o.prototype.remove.call(this,F,tt)},N.clear=function(){return o.prototype.clear.call(this)},N.search=function(F){var tt=o.prototype.search.call(this,this.toBBox(F));return A(tt)},N.collides=function(F){return o.prototype.collides.call(this,this.toBBox(F))},N.all=function(){var F=o.prototype.all.call(this);return A(F)},N.toJSON=function(){return o.prototype.toJSON.call(this)},N.fromJSON=function(F){return o.prototype.fromJSON.call(this,F)},N.toBBox=function(F){var tt;if(F.bbox)tt=F.bbox;else if(Array.isArray(F)&&F.length===4)tt=F;else if(Array.isArray(F)&&F.length===6)tt=[F[0],F[1],F[3],F[4]];else if(F.type==="Feature")tt=_(F);else if(F.type==="FeatureCollection")tt=_(F);else throw new Error("invalid geojson");return{minX:tt[0],minY:tt[1],maxX:tt[2],maxY:tt[3]}},N}s.exports=x,s.exports.default=x});Array.prototype.findIndex=Array.prototype.findIndex||function(i){if(this===null)throw new TypeError("Array.prototype.findIndex called on null or undefined");if(typeof i!="function")throw new TypeError("callback must be a function");for(var s=Object(this),o=s.length>>>0,h=arguments[1],c=0;c<o;c++)if(i.call(h,s[c],c,s))return c;return-1},Array.prototype.find=Array.prototype.find||function(i){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof i!="function")throw new TypeError("callback must be a function");for(var s=Object(this),o=s.length>>>0,h=arguments[1],c=0;c<o;c++){var _=s[c];if(i.call(h,_,c,s))return _}},typeof Object.assign!="function"&&(Object.assign=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");i=Object(i);for(var s=1;s<arguments.length;s++){var o=arguments[s];if(o!=null)for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(i[h]=o[h])}return i}),function(i){i.forEach(function(s){s.hasOwnProperty("remove")||Object.defineProperty(s,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype]),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(i,s){if(this==null)throw new TypeError('"this" is null or not defined');var o=Object(this),h=o.length>>>0;if(h===0)return!1;var c=s|0,_=Math.max(c>=0?c:h-Math.abs(c),0);function y(A,x){return A===x||typeof A=="number"&&typeof x=="number"&&isNaN(A)&&isNaN(x)}for(;_<h;){if(y(o[_],i))return!0;_++}return!1}});var zs={version:"2.18.3"},Tt=M(Tn()),ne={tooltips:{placeMarker:"Click to place marker",firstVertex:"Click to place first vertex",continueLine:"Click to continue drawing",finishLine:"Click any existing marker to finish",finishPoly:"Click first marker to finish",finishRect:"Click to finish",startCircle:"Click to place circle center",finishCircle:"Click to finish circle",placeCircleMarker:"Click to place circle marker",placeText:"Click to place text",selectFirstLayerFor:"Select first layer for {action}",selectSecondLayerFor:"Select second layer for {action}"},actions:{finish:"Finish",cancel:"Cancel",removeLastVertex:"Remove Last Vertex"},buttonTitles:{drawMarkerButton:"Draw Marker",drawPolyButton:"Draw Polygons",drawLineButton:"Draw Polyline",drawCircleButton:"Draw Circle",drawRectButton:"Draw Rectangle",editButton:"Edit Layers",dragButton:"Drag Layers",cutButton:"Cut Layers",deleteButton:"Remove Layers",drawCircleMarkerButton:"Draw Circle Marker",snappingButton:"Snap dragged marker to other layers and vertices",pinningButton:"Pin shared vertices together",rotateButton:"Rotate Layers",drawTextButton:"Draw Text",scaleButton:"Scale Layers",autoTracingButton:"Auto trace Line",snapGuidesButton:"Show SnapGuides",unionButton:"Union layers",differenceButton:"Subtract layers"},measurements:{totalLength:"Length",segmentLength:"Segment length",area:"Area",radius:"Radius",perimeter:"Perimeter",height:"Height",width:"Width",coordinates:"Position",coordinatesMarker:"Position Marker"}},Ns={tooltips:{placeMarker:"Platziere den Marker mit Klick",firstVertex:"Platziere den ersten Marker mit Klick",continueLine:"Klicke, um weiter zu zeichnen",finishLine:"Beende mit Klick auf existierenden Marker",finishPoly:"Beende mit Klick auf ersten Marker",finishRect:"Beende mit Klick",startCircle:"Platziere das Kreiszentrum mit Klick",finishCircle:"Beende den Kreis mit Klick",placeCircleMarker:"Platziere den Kreismarker mit Klick",placeText:"Platziere den Text mit Klick"},actions:{finish:"Beenden",cancel:"Abbrechen",removeLastVertex:"Letzten Vertex löschen"},buttonTitles:{drawMarkerButton:"Marker zeichnen",drawPolyButton:"Polygon zeichnen",drawLineButton:"Polyline zeichnen",drawCircleButton:"Kreis zeichnen",drawRectButton:"Rechteck zeichnen",editButton:"Layer editieren",dragButton:"Layer bewegen",cutButton:"Layer schneiden",deleteButton:"Layer löschen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verknüpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"Länge",segmentLength:"Segment Länge",area:"Fläche",radius:"Radius",perimeter:"Umfang",height:"Höhe",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},On={tooltips:{placeMarker:"Clicca per posizionare un Marker",firstVertex:"Clicca per posizionare il primo vertice",continueLine:"Clicca per continuare a disegnare",finishLine:"Clicca qualsiasi marker esistente per terminare",finishPoly:"Clicca il primo marker per terminare",finishRect:"Clicca per terminare",startCircle:"Clicca per posizionare il punto centrale del cerchio",finishCircle:"Clicca per terminare il cerchio",placeCircleMarker:"Clicca per posizionare un Marker del cherchio"},actions:{finish:"Termina",cancel:"Annulla",removeLastVertex:"Rimuovi l'ultimo vertice"},buttonTitles:{drawMarkerButton:"Disegna Marker",drawPolyButton:"Disegna Poligoni",drawLineButton:"Disegna Polilinea",drawCircleButton:"Disegna Cerchio",drawRectButton:"Disegna Rettangolo",editButton:"Modifica Livelli",dragButton:"Sposta Livelli",cutButton:"Ritaglia Livelli",deleteButton:"Elimina Livelli",drawCircleMarkerButton:"Disegna Marker del Cerchio",snappingButton:"Snap ha trascinato il pennarello su altri strati e vertici",pinningButton:"Pin condiviso vertici insieme",rotateButton:"Ruota livello"}},Ne={tooltips:{placeMarker:"Klik untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},Eo={tooltips:{placeMarker:"Adaugă un punct",firstVertex:"Apasă aici pentru a adăuga primul Vertex",continueLine:"Apasă aici pentru a continua desenul",finishLine:"Apasă pe orice obiect pentru a finisa desenul",finishPoly:"Apasă pe primul obiect pentru a finisa",finishRect:"Apasă pentru a finisa",startCircle:"Apasă pentru a desena un cerc",finishCircle:"Apasă pentru a finisa un cerc",placeCircleMarker:"Adaugă un punct"},actions:{finish:"Termină",cancel:"Anulează",removeLastVertex:"Șterge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaugă o bulină",drawPolyButton:"Desenează un poligon",drawLineButton:"Desenează o linie",drawCircleButton:"Desenează un cerc",drawRectButton:"Desenează un dreptunghi",editButton:"Editează straturile",dragButton:"Mută straturile",cutButton:"Taie straturile",deleteButton:"Șterge straturile",drawCircleMarkerButton:"Desenează marcatorul cercului",snappingButton:"Fixați marcatorul glisat pe alte straturi și vârfuri",pinningButton:"Fixați vârfurile partajate împreună",rotateButton:"Rotiți stratul"}},In={tooltips:{placeMarker:"Нажмите, чтобы нанести маркер",firstVertex:"Нажмите, чтобы нанести первый объект",continueLine:"Нажмите, чтобы продолжить рисование",finishLine:"Нажмите любой существующий маркер для завершения",finishPoly:"Выберите первую точку, чтобы закончить",finishRect:"Нажмите, чтобы закончить",startCircle:"Нажмите, чтобы добавить центр круга",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Нажмите, чтобы нанести круговой маркер"},actions:{finish:"Завершить",cancel:"Отменить",removeLastVertex:"Отменить последнее действие"},buttonTitles:{drawMarkerButton:"Добавить маркер",drawPolyButton:"Рисовать полигон",drawLineButton:"Рисовать кривую",drawCircleButton:"Рисовать круг",drawRectButton:"Рисовать прямоугольник",editButton:"Редактировать слой",dragButton:"Перенести слой",cutButton:"Вырезать слой",deleteButton:"Удалить слой",drawCircleMarkerButton:"Добавить круговой маркер",snappingButton:"Привязать перетаскиваемый маркер к другим слоям и вершинам",pinningButton:"Связать общие точки вместе",rotateButton:"Поворот слоя"}},bi={tooltips:{placeMarker:"Presiona para colocar un marcador",firstVertex:"Presiona para colocar el primer vértice",continueLine:"Presiona para continuar dibujando",finishLine:"Presiona cualquier marcador existente para finalizar",finishPoly:"Presiona el primer marcador para finalizar",finishRect:"Presiona para finalizar",startCircle:"Presiona para colocar el centro del círculo",finishCircle:"Presiona para finalizar el círculo",placeCircleMarker:"Presiona para colocar un marcador de círculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar último vértice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Polígono",drawLineButton:"Dibujar Línea",drawCircleButton:"Dibujar Círculo",drawRectButton:"Dibujar Rectángulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de Círculo",snappingButton:"El marcador de Snap arrastrado a otras capas y vértices",pinningButton:"Fijar juntos los vértices compartidos",rotateButton:"Rotar capa"}},re={tooltips:{placeMarker:"Klik om een marker te plaatsen",firstVertex:"Klik om het eerste punt te plaatsen",continueLine:"Klik om te blijven tekenen",finishLine:"Klik op een bestaand punt om te beëindigen",finishPoly:"Klik op het eerst punt om te beëindigen",finishRect:"Klik om te beëindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te beëindigen",placeCircleMarker:"Klik om een marker te plaatsen"},actions:{finish:"Bewaar",cancel:"Annuleer",removeLastVertex:"Verwijder laatste punt"},buttonTitles:{drawMarkerButton:"Plaats Marker",drawPolyButton:"Teken een vlak",drawLineButton:"Teken een lijn",drawCircleButton:"Teken een cirkel",drawRectButton:"Teken een vierkant",editButton:"Bewerk",dragButton:"Verplaats",cutButton:"Knip",deleteButton:"Verwijder",drawCircleMarkerButton:"Plaats Marker",snappingButton:"Snap gesleepte marker naar andere lagen en hoekpunten",pinningButton:"Speld gedeelde hoekpunten samen",rotateButton:"Laag roteren"}},wi={tooltips:{placeMarker:"Cliquez pour placer un marqueur",firstVertex:"Cliquez pour placer le premier sommet",continueLine:"Cliquez pour continuer à dessiner",finishLine:"Cliquez sur n'importe quel marqueur pour terminer",finishPoly:"Cliquez sur le premier marqueur pour terminer",finishRect:"Cliquez pour terminer",startCircle:"Cliquez pour placer le centre du cercle",finishCircle:"Cliquez pour finir le cercle",placeCircleMarker:"Cliquez pour placer le marqueur circulaire"},actions:{finish:"Terminer",cancel:"Annuler",removeLastVertex:"Retirer le dernier sommet"},buttonTitles:{drawMarkerButton:"Placer des marqueurs",drawPolyButton:"Dessiner des polygones",drawLineButton:"Dessiner des polylignes",drawCircleButton:"Dessiner un cercle",drawRectButton:"Dessiner un rectangle",editButton:"Éditer des calques",dragButton:"Déplacer des calques",cutButton:"Couper des calques",deleteButton:"Supprimer des calques",drawCircleMarkerButton:"Dessiner un marqueur circulaire",snappingButton:"Glisser le marqueur vers d'autres couches et sommets",pinningButton:"Épingler ensemble les sommets partagés",rotateButton:"Tourner des calques"}},on={tooltips:{placeMarker:"单击放置标记",firstVertex:"单击放置首个顶点",continueLine:"单击继续绘制",finishLine:"单击任何存在的标记以完成",finishPoly:"单击第一个标记以完成",finishRect:"单击完成",startCircle:"单击放置圆心",finishCircle:"单击完成圆形",placeCircleMarker:"点击放置圆形标记"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最后的顶点"},buttonTitles:{drawMarkerButton:"绘制标记",drawPolyButton:"绘制多边形",drawLineButton:"绘制线段",drawCircleButton:"绘制圆形",drawRectButton:"绘制长方形",editButton:"编辑图层",dragButton:"拖拽图层",cutButton:"剪切图层",deleteButton:"删除图层",drawCircleMarkerButton:"画圆圈标记",snappingButton:"将拖动的标记捕捉到其他图层和顶点",pinningButton:"将共享顶点固定在一起",rotateButton:"旋转图层"}},hn={tooltips:{placeMarker:"單擊放置標記",firstVertex:"單擊放置第一個頂點",continueLine:"單擊繼續繪製",finishLine:"單擊任何存在的標記以完成",finishPoly:"單擊第一個標記以完成",finishRect:"單擊完成",startCircle:"單擊放置圓心",finishCircle:"單擊完成圓形",placeCircleMarker:"點擊放置圓形標記"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最後一個頂點"},buttonTitles:{drawMarkerButton:"放置標記",drawPolyButton:"繪製多邊形",drawLineButton:"繪製線段",drawCircleButton:"繪製圓形",drawRectButton:"繪製方形",editButton:"編輯圖形",dragButton:"移動圖形",cutButton:"裁切圖形",deleteButton:"刪除圖形",drawCircleMarkerButton:"畫圓圈標記",snappingButton:"將拖動的標記對齊到其他圖層和頂點",pinningButton:"將共享頂點固定在一起",rotateButton:"旋轉圖形"}},Us={tooltips:{placeMarker:"Clique para posicionar o marcador",firstVertex:"Clique para posicionar o primeiro vértice",continueLine:"Clique para continuar desenhando",finishLine:"Clique em qualquer marcador existente para finalizar",finishPoly:"Clique no primeiro marcador para finalizar",finishRect:"Clique para finalizar",startCircle:"Clique para posicionar o centro do círculo",finishCircle:"Clique para finalizar o círculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover último vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},ji={tooltips:{placeMarker:"Clique para colocar marcador",firstVertex:"Clique para colocar primeiro vértice",continueLine:"Clique para continuar a desenhar",finishLine:"Clique num marcador existente para terminar",finishPoly:"Clique no primeiro marcador para terminar",finishRect:"Clique para terminar",startCircle:"Clique para colocar o centro do círculo",finishCircle:"Clique para terminar o círculo",placeCircleMarker:"Clique para colocar marcador de círculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover Último Vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},Zs={tooltips:{placeMarker:"Kliknij, aby umieścić znacznik",firstVertex:"Kliknij, aby umieścić pierwszy wierzchołek",continueLine:"Kliknij, aby kontynuować rysowanie",finishLine:"Kliknij dowolny istniejący znacznik, aby zakończyć",finishPoly:"Kliknij pierwszy znacznik, aby zakończyć",finishRect:"Kliknij, aby zakończyć",startCircle:"Kliknij, aby umieścić środek okręgu",finishCircle:"Kliknij, aby zakończyć okrąg",placeCircleMarker:"Kliknij, aby umieścić znacznik okręgu",placeText:"Kliknij, aby umieścić tekst"},actions:{finish:"Zakończ",cancel:"Anuluj",removeLastVertex:"Usuń ostatni wierzchołek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielokąt",drawLineButton:"Rysuj linię",drawCircleButton:"Rysuj okrąg",drawRectButton:"Rysuj prostokąt",editButton:"Edytuj warstwy",dragButton:"Przeciągnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usuń warstwy",drawCircleMarkerButton:"Rysuj znacznik okrągły",snappingButton:"Przyciągnij przenoszony znacznik do innych warstw i wierzchołków",pinningButton:"Przypnij wspólne wierzchołki razem",rotateButton:"Obróć warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne śledzenie linii"},measurements:{totalLength:"Długość",segmentLength:"Długość odcinka",area:"Obszar",radius:"Promień",perimeter:"Obwód",height:"Wysokość",width:"Szerokość",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},js={tooltips:{placeMarker:"Klicka för att placera markör",firstVertex:"Klicka för att placera första hörnet",continueLine:"Klicka för att fortsätta rita",finishLine:"Klicka på en existerande punkt för att slutföra",finishPoly:"Klicka på den första punkten för att slutföra",finishRect:"Klicka för att slutföra",startCircle:"Klicka för att placera cirkelns centrum",finishCircle:"Klicka för att slutföra cirkeln",placeCircleMarker:"Klicka för att placera cirkelmarkör"},actions:{finish:"Slutför",cancel:"Avbryt",removeLastVertex:"Ta bort sista hörnet"},buttonTitles:{drawMarkerButton:"Rita Markör",drawPolyButton:"Rita Polygoner",drawLineButton:"Rita Linje",drawCircleButton:"Rita Cirkel",drawRectButton:"Rita Rektangel",editButton:"Redigera Lager",dragButton:"Dra Lager",cutButton:"Klipp i Lager",deleteButton:"Ta bort Lager",drawCircleMarkerButton:"Rita Cirkelmarkör",snappingButton:"Snäpp dra markören till andra lager och hörn",pinningButton:"Fäst delade hörn tillsammans",rotateButton:"Rotera lagret"}},Rn={tooltips:{placeMarker:"Κάντε κλικ για να τοποθετήσετε Δείκτη",firstVertex:"Κάντε κλικ για να τοποθετήσετε το πρώτο σημείο",continueLine:"Κάντε κλικ για να συνεχίσετε να σχεδιάζετε",finishLine:"Κάντε κλικ σε οποιονδήποτε υπάρχον σημείο για να ολοκληρωθεί",finishPoly:"Κάντε κλικ στο πρώτο σημείο για να τελειώσετε",finishRect:"Κάντε κλικ για να τελειώσετε",startCircle:"Κάντε κλικ για να τοποθετήσετε κέντρο Κύκλου",finishCircle:"Κάντε κλικ για να ολοκληρώσετε τον Κύκλο",placeCircleMarker:"Κάντε κλικ για να τοποθετήσετε Κυκλικό Δείκτη"},actions:{finish:"Τέλος",cancel:"Ακύρωση",removeLastVertex:"Κατάργηση τελευταίου σημείου"},buttonTitles:{drawMarkerButton:"Σχεδίαση Δείκτη",drawPolyButton:"Σχεδίαση Πολυγώνου",drawLineButton:"Σχεδίαση Γραμμής",drawCircleButton:"Σχεδίαση Κύκλου",drawRectButton:"Σχεδίαση Ορθογωνίου",editButton:"Επεξεργασία Επιπέδων",dragButton:"Μεταφορά Επιπέδων",cutButton:"Αποκοπή Επιπέδων",deleteButton:"Κατάργηση Επιπέδων",drawCircleMarkerButton:"Σχεδίαση Κυκλικού Δείκτη",snappingButton:"Προσκόλληση του Δείκτη μεταφοράς σε άλλα Επίπεδα και Κορυφές",pinningButton:"Περικοπή κοινών κορυφών μαζί",rotateButton:"Περιστρέψτε το στρώμα"}},qs={tooltips:{placeMarker:"Kattintson a jelölő elhelyezéséhez",firstVertex:"Kattintson az első pont elhelyezéséhez",continueLine:"Kattintson a következő pont elhelyezéséhez",finishLine:"A befejezéshez kattintson egy meglévő pontra",finishPoly:"A befejezéshez kattintson az első pontra",finishRect:"Kattintson a befejezéshez",startCircle:"Kattintson a kör középpontjának elhelyezéséhez",finishCircle:"Kattintson a kör befejezéséhez",placeCircleMarker:"Kattintson a körjelölő elhelyezéséhez"},actions:{finish:"Befejezés",cancel:"Mégse",removeLastVertex:"Utolsó pont eltávolítása"},buttonTitles:{drawMarkerButton:"Jelölő rajzolása",drawPolyButton:"Poligon rajzolása",drawLineButton:"Vonal rajzolása",drawCircleButton:"Kör rajzolása",drawRectButton:"Négyzet rajzolása",editButton:"Elemek szerkesztése",dragButton:"Elemek mozgatása",cutButton:"Elemek vágása",deleteButton:"Elemek törlése",drawCircleMarkerButton:"Kör jelölő rajzolása",snappingButton:"Kapcsolja a jelöltőt másik elemhez vagy ponthoz",pinningButton:"Közös pontok összekötése",rotateButton:"Fólia elforgatása"}},Hs={tooltips:{placeMarker:"Tryk for at placere en markør",firstVertex:"Tryk for at placere det første punkt",continueLine:"Tryk for at fortsætte linjen",finishLine:"Tryk på et eksisterende punkt for at afslutte",finishPoly:"Tryk på det første punkt for at afslutte",finishRect:"Tryk for at afslutte",startCircle:"Tryk for at placere cirklens center",finishCircle:"Tryk for at afslutte cirklen",placeCircleMarker:"Tryk for at placere en cirkelmarkør"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer markør",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Træk",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmarkør",snappingButton:"Fastgør trukket markør til andre elementer",pinningButton:"Sammenlæg delte elementer",rotateButton:"Roter laget"}},Fn={tooltips:{placeMarker:"Klikk for å plassere punkt",firstVertex:"Klikk for å plassere første punkt",continueLine:"Klikk for å tegne videre",finishLine:"Klikk på et eksisterende punkt for å fullføre",finishPoly:"Klikk første punkt for å fullføre",finishRect:"Klikk for å fullføre",startCircle:"Klikk for å sette sirkel midtpunkt",finishCircle:"Klikk for å fullføre sirkel",placeCircleMarker:"Klikk for å plassere sirkel",placeText:"Klikk for å plassere tekst"},actions:{finish:"Fullfør",cancel:"Kanseller",removeLastVertex:"Fjern forrige punkt"},buttonTitles:{drawMarkerButton:"Tegn punkt",drawPolyButton:"Tegn flate",drawLineButton:"Tegn linje",drawCircleButton:"Tegn sirkel",drawRectButton:"Tegn rektangel",editButton:"Rediger objekter",dragButton:"Dra objekter",cutButton:"Kutt objekter",deleteButton:"Fjern objekter",drawCircleMarkerButton:"Tegn sirkel-punkt",snappingButton:"Fest dratt punkt til andre objekter og punkt",pinningButton:"Pin delte punkter sammen",rotateButton:"Rotér objekter",drawTextButton:"Tegn tekst",scaleButton:"Skalér objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Område",radius:"Radius",perimeter:"Omriss",height:"Høyde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmarkør"}},Ja={tooltips:{placeMarker:"کلیک برای جانمایی نشان",firstVertex:"کلیک برای رسم اولین رأس",continueLine:"کلیک برای ادامه رسم",finishLine:"کلیک روی هر نشان موجود برای پایان",finishPoly:"کلیک روی اولین نشان برای پایان",finishRect:"کلیک برای پایان",startCircle:"کلیک برای رسم مرکز دایره",finishCircle:"کلیک برای پایان رسم دایره",placeCircleMarker:"کلیک برای رسم نشان دایره",placeText:"کلیک برای نوشتن متن"},actions:{finish:"پایان",cancel:"لفو",removeLastVertex:"حذف آخرین رأس"},buttonTitles:{drawMarkerButton:"درج نشان",drawPolyButton:"رسم چندضلعی",drawLineButton:"رسم خط",drawCircleButton:"رسم دایره",drawRectButton:"رسم چهارضلعی",editButton:"ویرایش لایه‌ها",dragButton:"جابجایی لایه‌ها",cutButton:"برش لایه‌ها",deleteButton:"حذف لایه‌ها",drawCircleMarkerButton:"رسم نشان دایره",snappingButton:"نشانگر را به لایه‌ها و رئوس دیگر بکشید",pinningButton:"رئوس مشترک را با هم پین کنید",rotateButton:"چرخش لایه",drawTextButton:"رسم متن",scaleButton:"مقیاس‌گذاری",autoTracingButton:"ردیاب خودکار"},measurements:{totalLength:"طول",segmentLength:"طول بخش",area:"ناحیه",radius:"شعاع",perimeter:"محیط",height:"ارتفاع",width:"عرض",coordinates:"موقعیت",coordinatesMarker:"موقعیت نشان"}},Vs={tooltips:{placeMarker:"Натисніть, щоб нанести маркер",firstVertex:"Натисніть, щоб нанести першу вершину",continueLine:"Натисніть, щоб продовжити малювати",finishLine:"Натисніть будь-який існуючий маркер для завершення",finishPoly:"Виберіть перший маркер, щоб завершити",finishRect:"Натисніть, щоб завершити",startCircle:"Натисніть, щоб додати центр кола",finishCircle:"Натисніть, щоб завершити коло",placeCircleMarker:"Натисніть, щоб нанести круговий маркер"},actions:{finish:"Завершити",cancel:"Відмінити",removeLastVertex:"Видалити попередню вершину"},buttonTitles:{drawMarkerButton:"Малювати маркер",drawPolyButton:"Малювати полігон",drawLineButton:"Малювати криву",drawCircleButton:"Малювати коло",drawRectButton:"Малювати прямокутник",editButton:"Редагувати шари",dragButton:"Перенести шари",cutButton:"Вирізати шари",deleteButton:"Видалити шари",drawCircleMarkerButton:"Малювати круговий маркер",snappingButton:"Прив’язати перетягнутий маркер до інших шарів та вершин",pinningButton:"Зв'язати спільні вершини разом",rotateButton:"Повернути шар"}},Po={tooltips:{placeMarker:"İşaretçi yerleştirmek için tıklayın",firstVertex:"İlk tepe noktasını yerleştirmek için tıklayın",continueLine:"Çizime devam etmek için tıklayın",finishLine:"Bitirmek için mevcut herhangi bir işaretçiyi tıklayın",finishPoly:"Bitirmek için ilk işaretçiyi tıklayın",finishRect:"Bitirmek için tıklayın",startCircle:"Daire merkezine yerleştirmek için tıklayın",finishCircle:"Daireyi bitirmek için tıklayın",placeCircleMarker:"Daire işaretçisi yerleştirmek için tıklayın"},actions:{finish:"Bitir",cancel:"İptal",removeLastVertex:"Son köşeyi kaldır"},buttonTitles:{drawMarkerButton:"Çizim İşaretçisi",drawPolyButton:"Çokgenler çiz",drawLineButton:"Çoklu çizgi çiz",drawCircleButton:"Çember çiz",drawRectButton:"Dikdörtgen çiz",editButton:"Katmanları düzenle",dragButton:"Katmanları sürükle",cutButton:"Katmanları kes",deleteButton:"Katmanları kaldır",drawCircleMarkerButton:"Daire işaretçisi çiz",snappingButton:"Sürüklenen işaretçiyi diğer katmanlara ve köşelere yapıştır",pinningButton:"Paylaşılan köşeleri birbirine sabitle",rotateButton:"Katmanı döndür"}},Bt={tooltips:{placeMarker:"Kliknutím vytvoříte značku",firstVertex:"Kliknutím vytvoříte první objekt",continueLine:"Kliknutím pokračujte v kreslení",finishLine:"Kliknutí na libovolnou existující značku pro dokončení",finishPoly:"Vyberte první bod pro dokončení",finishRect:"Klikněte pro dokončení",startCircle:"Kliknutím přidejte střed kruhu",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Kliknutím nastavte poloměr"},actions:{finish:"Dokončit",cancel:"Zrušit",removeLastVertex:"Zrušit poslední akci"},buttonTitles:{drawMarkerButton:"Přidat značku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit křivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obdélník",editButton:"Upravit vrstvu",dragButton:"Přeneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"Přidat kruhovou značku",snappingButton:"Navázat tažnou značku k dalším vrstvám a vrcholům",pinningButton:"Spojit společné body dohromady",rotateButton:"Otočte vrstvu"}},$e={tooltips:{placeMarker:"クリックしてマーカーを配置",firstVertex:"クリックして最初の頂点を配置",continueLine:"クリックして描画を続ける",finishLine:"任意のマーカーをクリックして終了",finishPoly:"最初のマーカーをクリックして終了",finishRect:"クリックして終了",startCircle:"クリックして円の中心を配置",finishCircle:"クリックして円の描画を終了",placeCircleMarker:"クリックして円マーカーを配置",placeText:"クリックしてテキストを配置"},actions:{finish:"終了",cancel:"キャンセル",removeLastVertex:"最後の頂点を削除"},buttonTitles:{drawMarkerButton:"マーカーを描画",drawPolyButton:"ポリゴンを描画",drawLineButton:"折れ線を描画",drawCircleButton:"円を描画",drawRectButton:"矩形を描画",editButton:"レイヤーを編集",dragButton:"レイヤーをドラッグ",cutButton:"レイヤーを切り取り",deleteButton:"レイヤーを削除",drawCircleMarkerButton:"円マーカーを描画",snappingButton:"ドラッグしたマーカーを他のレイヤーや頂点にスナップする",pinningButton:"共有する頂点を同時に動かす",rotateButton:"レイヤーを回転",drawTextButton:"テキストを描画"}},Kt={tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimmäisen osuuden",continueLine:"Klikkaa jatkaaksesi piirtämistä",finishLine:"Klikkaa olemassa olevaa merkkiä lopettaaksesi",finishPoly:"Klikkaa ensimmäistä merkkiä lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyrän keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyrän",placeCircleMarker:"Klikkaa asettaaksesi ympyrämerkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirrä merkkejä",drawPolyButton:"Piirrä monikulmioita",drawLineButton:"Piirrä viivoja",drawCircleButton:"Piirrä ympyrä",drawRectButton:"Piirrä neliskulmioita",editButton:"Muokkaa",dragButton:"Siirrä",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirrä ympyrämerkki",snappingButton:"Kiinnitä siirrettävä merkki toisiin muotoihin",pinningButton:"Kiinnitä jaetut muodot yhteen",rotateButton:"Käännä",drawTextButton:"Piirrä tekstiä"}},Qa={tooltips:{placeMarker:"마커 위치를 클릭하세요",firstVertex:"첫번째 꼭지점 위치을 클릭하세요",continueLine:"계속 그리려면 클릭하세요",finishLine:"끝내려면 기존 마커를 클릭하세요",finishPoly:"끝내려면 처음 마커를 클릭하세요",finishRect:"끝내려면 클릭하세요",startCircle:"원의 중심이 될 위치를 클릭하세요",finishCircle:"원을 끝내려면 클릭하세요",placeCircleMarker:"원 마커 위치를 클릭하세요",placeText:"텍스트 위치를 클릭하세요"},actions:{finish:"끝내기",cancel:"취소",removeLastVertex:"마지막 꼭지점 제거"},buttonTitles:{drawMarkerButton:"마커 그리기",drawPolyButton:"다각형 그리기",drawLineButton:"다각선 그리기",drawCircleButton:"원 그리기",drawRectButton:"직사각형 그리기",editButton:"레이어 편집하기",dragButton:"레이어 끌기",cutButton:"레이어 자르기",deleteButton:"레이어 제거하기",drawCircleMarkerButton:"원 마커 그리기",snappingButton:"잡아끈 마커를 다른 레이어 및 꼭지점에 들러붙게 하기",pinningButton:"공유 꼭지점을 함께 찍기",rotateButton:"레이어 회전하기",drawTextButton:"텍스트 그리기"}},$s={tooltips:{placeMarker:"Маркерди жайгаштыруу үчүн басыңыз",firstVertex:"Биринчи чокуну жайгаштырууну үчүн басыңыз",continueLine:"Сүрөт тартууну улантуу үчүн басыңыз",finishLine:"Аяктоо үчүн учурдагы маркерди басыңыз",finishPoly:"Бүтүрүү үчүн биринчи маркерди басыңыз",finishRect:"Бүтүрүү үчүн басыңыз",startCircle:"Айлананын борборун жайгаштырууну үчүн басыңыз",finishCircle:"Айлананы бүтүрүү үчүн басыңыз",placeCircleMarker:"Тегерек маркерди жайгаштыруу үчүн басыңыз",placeText:"Текстти жайгаштыруу үчүн басыңыз"},actions:{finish:"Аягы",cancel:"Жок кылуу",removeLastVertex:"Акыркы чокуну өчүрүү"},buttonTitles:{drawMarkerButton:"Маркерди чизуу",drawPolyButton:"Полигон чизуу",drawLineButton:"Полилиния чизуу",drawCircleButton:"Дайынды чизуу",drawRectButton:"Прямоугольник чизуу",editButton:"Слоопту түзөтүү",dragButton:"Слоопту карап сүйлөү",cutButton:"Слооптун башын кесүү",deleteButton:"Слооптун өчүрүү",drawCircleMarkerButton:"Дайынды маркерди чизуу",snappingButton:"Башка слооптордун жана вертекстердин арасына чекилдөө",pinningButton:"Бөлүшкөн вертекстерди бирге тутуштуруу",rotateButton:"Слооптун өзгөртүү",drawTextButton:"Текст чизуу",scaleButton:"Слооптун өлчөмүн өзгөртүү",autoTracingButton:"Автоматтык тизмеги чизуу"},measurements:{totalLength:"Узундук",segmentLength:"Сегмент узундугу",area:"Аймак",radius:"Радиус",perimeter:"Периметр",height:"Диаметр",width:"Кенчилик",coordinates:"Координаттар",coordinatesMarker:"Маркердин координаттары"}},Ks=ji,_i={en:ne,de:Ns,it:On,id:Ne,ro:Eo,ru:In,es:bi,nl:re,fr:wi,pt:Ks,pt_br:Us,pt_pt:ji,zh:on,zh_tw:hn,pl:Zs,sv:js,el:Rn,hu:qs,da:Hs,no:Fn,fa:Ja,ua:Vs,tr:Po,cz:Bt,ja:$e,fi:Kt,ko:Qa,ky:$s},Ci={_globalEditModeEnabled:!1,enableGlobalEditMode(i){let s={...i};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(o=>{this._isRelevantForEdit(o)&&o.pm.enable(s)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(i=>{i.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(i=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(i)},handleLayerAdditionInGlobalEditMode(){let i=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let s in i){let o=i[s];this._isRelevantForEdit(o)&&o.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:i}){this._addedLayersEdit[L.stamp(i)]=i},_isRelevantForEdit(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowEditing}},Ws=Ci,ln={_globalDragModeEnabled:!1,enableGlobalDragMode(){let i=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},i.forEach(s=>{this._isRelevantForDrag(s)&&s.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let i=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,i.forEach(s=>{s.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let i=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let s in i){let o=i[s];this._isRelevantForDrag(o)&&o.pm.enableLayerDrag()}},_layerAddedDrag({layer:i}){this._addedLayersDrag[L.stamp(i)]=i},_isRelevantForDrag(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.draggable}},ce=ln,Ei={_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(i=>{this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(i=>{i.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(i){let s=i.target;this._isRelevantForRemoval(s)&&!s.pm.dragging()&&(s.removeFrom(this.map.pm._getContainingLayer()),s.remove(),s instanceof L.LayerGroup?(this._fireRemoveLayerGroup(s),this._fireRemoveLayerGroup(this.map,s)):(s.pm._fireRemove(s),s.pm._fireRemove(this.map,s)))},_isRelevantForRemoval(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowRemoval},handleLayerAdditionInGlobalRemovalMode(){let i=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let s in i){let o=i[s];this._isRelevantForRemoval(o)&&(o.pm.enabled()&&o.pm.disable(),o.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:i}){this._addedLayersRemoval[L.stamp(i)]=i}},tr=Ei,er={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(i=>i instanceof L.Polyline).forEach(i=>{this._isRelevantForRotate(i)&&i.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(i=>i instanceof L.Polyline).forEach(i=>{i.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate(i){return i.pm&&i instanceof L.Polyline&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowRotation},handleLayerAdditionInGlobalRotateMode(){let i=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let s in i){let o=i[s];this._isRelevantForRemoval(o)&&o.pm.enableRotate()}},_layerAddedRotate({layer:i}){this._addedLayersRotate[L.stamp(i)]=i}},ko=er,ir=M(Tn()),Xs={_fireDrawStart(i="Draw",s={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},i,s)},_fireDrawEnd(i="Draw",s={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},i,s)},_fireCreate(i,s="Draw",o={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:i,layer:i},s,o)},_fireCenterPlaced(i="Draw",s={}){let o=i==="Draw"?this._layer:void 0,h=i!=="Draw"?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:o,layer:h,latlng:this._layer.getLatLng()},i,s)},_fireCut(i,s,o,h="Draw",c={}){this.__fire(i,"pm:cut",{shape:this._shape,layer:s,originalLayer:o},h,c)},_fireEdit(i=this._layer,s="Edit",o={}){this.__fire(i,"pm:edit",{layer:this._layer,shape:this.getShape()},s,o)},_fireEnable(i="Edit",s={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},i,s)},_fireDisable(i="Edit",s={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},i,s)},_fireUpdate(i="Edit",s={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},i,s)},_fireMarkerDragStart(i,s=void 0,o="Edit",h={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s},o,h)},_fireMarkerDrag(i,s=void 0,o="Edit",h={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s},o,h)},_fireMarkerDragEnd(i,s=void 0,o=void 0,h="Edit",c={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s,intersectionReset:o},h,c)},_fireDragStart(i="Edit",s={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},i,s)},_fireDrag(i,s="Edit",o={}){this.__fire(this._layer,"pm:drag",{...i,shape:this.getShape()},s,o)},_fireDragEnd(i="Edit",s={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},i,s)},_fireDragEnable(i="Edit",s={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},i,s)},_fireDragDisable(i="Edit",s={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},i,s)},_fireRemove(i,s=i,o="Edit",h={}){this.__fire(i,"pm:remove",{layer:s,shape:this.getShape()},o,h)},_fireVertexAdded(i,s,o,h="Edit",c={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:i,indexPath:s,latlng:o,shape:this.getShape()},h,c)},_fireVertexRemoved(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:i,indexPath:s,shape:this.getShape()},o,h)},_fireVertexClick(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:i,indexPath:s,shape:this.getShape()},o,h)},_fireIntersect(i,s=this._layer,o="Edit",h={}){this.__fire(s,"pm:intersect",{layer:this._layer,intersection:i,shape:this.getShape()},o,h)},_fireLayerReset(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:i,indexPath:s,shape:this.getShape()},o,h)},_fireChange(i,s="Edit",o={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:i,shape:this.getShape()},s,o)},_fireTextChange(i,s="Edit",o={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:i,shape:this.getShape()},s,o)},_fireTextFocus(i="Edit",s={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},i,s)},_fireTextBlur(i="Edit",s={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},i,s)},_fireSnapDrag(i,s,o="Snapping",h={}){this.__fire(i,"pm:snapdrag",s,o,h)},_fireSnap(i,s,o="Snapping",h={}){this.__fire(i,"pm:snap",s,o,h)},_fireUnsnap(i,s,o="Snapping",h={}){this.__fire(i,"pm:unsnap",s,o,h)},_fireRotationEnable(i,s,o="Rotation",h={}){this.__fire(i,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},o,h)},_fireRotationDisable(i,s="Rotation",o={}){this.__fire(i,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},s,o)},_fireRotationStart(i,s,o="Rotation",h={}){this.__fire(i,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:s},o,h)},_fireRotation(i,s,o,h=this._rotationLayer,c="Rotation",_={}){this.__fire(i,"pm:rotate",{layer:h,helpLayer:this._layer,startAngle:this._startAngle,angle:h.pm.getAngle(),angleDiff:s,oldLatLngs:o,newLatLngs:h.getLatLngs()},c,_)},_fireRotationEnd(i,s,o,h="Rotation",c={}){this.__fire(i,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:s,angle:this._rotationLayer.pm.getAngle(),originLatLngs:o,newLatLngs:this._rotationLayer.getLatLngs()},h,c)},_fireActionClick(i,s,o,h="Toolbar",c={}){this.__fire(this._map,"pm:actionclick",{text:i.text,action:i,btnName:s,button:o},h,c)},_fireButtonClick(i,s,o="Toolbar",h={}){this.__fire(this._map,"pm:buttonclick",{btnName:i,button:s},o,h)},_fireLangChange(i,s,o,h,c="Global",_={}){this.__fire(this.map,"pm:langchange",{oldLang:i,activeLang:s,fallback:o,translations:h},c,_)},_fireGlobalDragModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalEditModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalRemovalModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalCutModeToggled(i="Global",s={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},i,s)},_fireGlobalDrawModeToggled(i="Global",s={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},i,s)},_fireGlobalRotateModeToggled(i="Global",s={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},i,s)},_fireRemoveLayerGroup(i,s=i,o="Edit",h={}){this.__fire(i,"pm:remove",{layer:s,shape:void 0},o,h)},_fireKeyeventEvent(i,s,o,h="Global",c={}){this.__fire(this.map,"pm:keyevent",{event:i,eventType:s,focusOn:o},h,c)},__fire(i,s,o,h,c={}){o=(0,ir.default)(o,c,{source:h}),L.PM.Utils._fireEvent(i,s,o)}},Gn=Xs,nr=()=>({_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(i){this.map=i,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),i.once("unload",this._unbindKeyListenerEvents,this)},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(i){let s="document";this.map.getContainer().contains(i.target)&&(s="map");let o={event:i,eventType:i.type,focusOn:s};this._lastEvents[i.type]=o,this._lastEvents.current=o,this.map.pm._fireKeyeventEvent(i,i.type,s)},_onBlur(i){i.altKey=!1;let s={event:i,eventType:i.type,focusOn:"document"};this._lastEvents[i.type]=s,this._lastEvents.current=s},getLastKeyEvent(i="current"){return this._lastEvents[i]},isShiftKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.shiftKey},isAltKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.altKey},isCtrlKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.ctrlKey},isMetaKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.metaKey},getPressedKey(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.key}}),Ft=nr,sr=M(pi());function St(i){let s=L.PM.activeLang;return(0,sr.default)(_i[s],i)||(0,sr.default)(_i.en,i)||i}function Pi(i){for(let s=0;s<i.length;s+=1){let o=i[s];if(Array.isArray(o)){if(Pi(o))return!0}else if(o!=null&&o!=="")return!0}return!1}function un(i){return i.reduce((s,o)=>{if(o.length!==0){let h=Array.isArray(o)?un(o):o;Array.isArray(h)?h.length!==0&&s.push(h):s.push(h)}return s},[])}function So(i,s,o){let h={a:L.CRS.Earth.R,b:63567523142e-4,f:.0033528106647474805},{a:c,b:_,f:y}=h,A=i.lng,x=i.lat,P=o,N=Math.PI,F=s*N/180,tt=Math.sin(F),it=Math.cos(F),lt=(1-y)*Math.tan(x*N/180),ft=1/Math.sqrt(1+lt*lt),At=lt*ft,Gt=Math.atan2(lt,it),z=ft*tt,q=1-z*z,K=q*(c*c-_*_)/(_*_),nt=1+K/16384*(4096+K*(-768+K*(320-175*K))),X=K/1024*(256+K*(-128+K*(74-47*K))),et=P/(_*nt),w=2*Math.PI,S,O,T;for(;Math.abs(et-w)>1e-12;){S=Math.cos(2*Gt+et),O=Math.sin(et),T=Math.cos(et);let ot=X*O*(S+X/4*(T*(-1+2*S*S)-X/6*S*(-3+4*O*O)*(-3+4*S*S)));w=et,et=P/(_*nt)+ot}let I=At*O-ft*T*it,R=Math.atan2(At*T+ft*O*it,(1-y)*Math.sqrt(z*z+I*I)),V=Math.atan2(O*tt,ft*T-At*O*it),H=y/16*q*(4+y*(4-3*q)),$=V-(1-H)*y*z*(et+H*O*(S+H*T*(-1+2*S*S))),Q=A+$*180/N,J=R*180/N;return L.latLng(Q,J)}function zn(i,s,o,h,c=!0){let _,y,A,x=[];for(let P=0;P<o;P+=1){if(c)_=P*360/o+h,y=So(i,_,s),A=L.latLng(y.lng,y.lat);else{let N=i.lat+Math.cos(2*P*Math.PI/o)*s,F=i.lng+Math.sin(2*P*Math.PI/o)*s;A=L.latLng(N,F)}x.push(A)}return x}function Bo(i,s,o){s=(s+360)%360;let h=Math.PI/180,c=180/Math.PI,{R:_}=L.CRS.Earth,y=i.lng*h,A=i.lat*h,x=s*h,P=Math.sin(A),N=Math.cos(A),F=Math.cos(o/_),tt=Math.sin(o/_),it=Math.asin(P*F+N*tt*Math.cos(x)),lt=y+Math.atan2(Math.sin(x)*tt*N,F-P*Math.sin(it));lt*=c;let ft=lt-360,At=lt<-180?lt+360:lt;return lt=lt>180?ft:At,L.latLng([it*c,lt])}function Nn(i,s,o){let h=i.latLngToContainerPoint(s),c=i.latLngToContainerPoint(o),_=Math.atan2(c.y-h.y,c.x-h.x)*180/Math.PI+90;return _+=_<0?360:0,_}function Un(i,s,o,h){let c=Nn(i,s,o);return Bo(s,c,h)}function To(i,s,o="asc"){if(!s||Object.keys(s).length===0)return(x,P)=>x-P;let h=Object.keys(s),c,_=h.length-1,y={};for(;_>=0;)c=h[_],y[c.toLowerCase()]=s[c],_-=1;function A(x){if(x instanceof L.Marker)return"Marker";if(x instanceof L.Circle)return"Circle";if(x instanceof L.CircleMarker)return"CircleMarker";if(x instanceof L.Rectangle)return"Rectangle";if(x instanceof L.Polygon)return"Polygon";if(x instanceof L.Polyline)return"Line"}return(x,P)=>{let N,F;if(N=A(x.layer).toLowerCase(),F=A(P.layer).toLowerCase(),!N||!F)return 0;let tt=N in y?y[N]:Number.MAX_SAFE_INTEGER,it=F in y?y[F]:Number.MAX_SAFE_INTEGER,lt=0;return tt<it?lt=-1:tt>it&&(lt=1),o==="desc"?lt*-1:lt}}function Ke(i,s=i.getLatLngs()){return i instanceof L.Polygon?L.polygon(s).getLatLngs():L.polyline(s).getLatLngs()}function ar(i,s){var o,h,c,_;if((h=(o=s.options.crs)==null?void 0:o.projection)!=null&&h.MAX_LATITUDE){let y=(_=(c=s.options.crs)==null?void 0:c.projection)==null?void 0:_.MAX_LATITUDE;i.lat=Math.max(Math.min(y,i.lat),-y)}return i}function Ae(i){return i.options.renderer||i._map&&(i._map._getPaneRenderer(i.options.pane)||i._map.options.renderer||i._map._renderer)||i._renderer}var Do=L.Class.extend({includes:[Ws,ce,tr,ko,Gn],initialize(i){this.map=i,this.Draw=new L.PM.Draw(i),this.Toolbar=new L.PM.Toolbar(i),this.Keyboard=Ft(),this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0},this.Keyboard._initKeyListener(i)},setLang(i="en",s,o="en"){if(i=i.trim().toLowerCase(),!/^[a-z]{2}$/.test(i)){let c=i.replace(/[-_\s]/g,"-").replace(/^(\w{2})$/,"$1-").match(/([a-z]{2})-?([a-z]{2})?/);if(c){let _=[`${c[1]}_${c[2]}`,`${c[1]}`];for(let y of _)if(_i[y]){i=y;break}}}let h=L.PM.activeLang;s&&(_i[i]=(0,Tt.default)(_i[o],s)),L.PM.activeLang=i,this.map.pm.Toolbar.reinit(),this._fireLangChange(h,i,o,_i[i])},addControls(i){this.Toolbar.addControls(i)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(i="Polygon",s){i==="Poly"&&(i="Polygon"),this.Draw.enable(i,s)},disableDraw(i="Polygon"){i==="Poly"&&(i="Polygon"),this.Draw.disable(i)},setPathOptions(i,s={}){let o=s.ignoreShapes||[],h=s.merge||!1;this.map.pm.Draw.shapes.forEach(c=>{o.indexOf(c)===-1&&this.map.pm.Draw[c].setPathOptions(i,h)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(i){let s=(0,Tt.default)(this.globalOptions,i);s.editable&&(s.resizeableCircleMarker=s.editable,delete s.editable);let o=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!s.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),o=!0);let h=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!s.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),h=!0),this.map.pm.Draw.shapes.forEach(c=>{this.map.pm.Draw[c].setOptions(s)}),o&&this.map.pm.Draw.CircleMarker.enable(),h&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(c=>{c.pm.setOptions(s)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=s,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(i=>{i.pm.enabled()&&i.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(i){return this.Draw.Cut.enable(i)},toggleGlobalCutMode(i){return this.Draw.Cut.toggle(i)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(i=!1){let s=L.PM.Utils.findLayers(this.map);if(!i)return s;let o=L.featureGroup();return o._pmTempLayer=!0,s.forEach(h=>{o.addLayer(h)}),o},getGeomanDrawLayers(i=!1){let s=L.PM.Utils.findLayers(this.map).filter(h=>h._drawnByGeoman===!0);if(!i)return s;let o=L.featureGroup();return o._pmTempLayer=!0,s.forEach(h=>{o.addLayer(h)}),o},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(i){this._touchEventCounter===0&&(L.DomEvent.on(i,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(i,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(i){this._touchEventCounter===1&&(L.DomEvent.off(i,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(i,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(i){Ae(this.map)._onMouseMove(this._createMouseEvent("mousemove",i))},_canvasTouchClick(i){let s="";i.type==="touchstart"||i.type==="pointerdown"?s="mousedown":(i.type==="touchend"||i.type==="pointerup"||i.type==="touchcancel"||i.type==="pointercancel")&&(s="mouseup"),s&&Ae(this.map)._onClick(this._createMouseEvent(s,i))},_createMouseEvent(i,s){let o,h=s.touches[0]||s.changedTouches[0];try{o=new MouseEvent(i,{bubbles:s.bubbles,cancelable:s.cancelable,view:s.view,detail:h.detail,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY,ctrlKey:s.ctrlKey,altKey:s.altKey,shiftKey:s.shiftKey,metaKey:s.metaKey,button:s.button,relatedTarget:s.relatedTarget})}catch{o=document.createEvent("MouseEvents"),o.initMouseEvent(i,s.bubbles,s.cancelable,s.view,h.detail,h.screenX,h.screenY,h.clientX,h.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget)}return o}}),rr=Do,mi=L.Control.extend({includes:[Gn],options:{position:"topleft",disableByOtherButtons:!0},initialize(i){this._button=L.Util.extend({},this.options,i)},onAdd(i){return this._map=i,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):this._button.tool==="edit"?this._container=this._map.pm.Toolbar.editContainer:this._button.tool==="options"?this._container=this._map.pm.Toolbar.optionsContainer:this._button.tool==="custom"?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let i=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),i?i.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(i){return typeof i=="boolean"?this._button.toggleStatus=i:this._button.toggleStatus=!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(i){i&&i.preventDefault(),!this._button.disabled&&(this._button.onClick(i,{button:this,event:i}),this._clicked(i),this._button.afterClick(i,{button:this,event:i}))},_makeButton(i){let s=this.options.position.indexOf("right")>-1?"pos-right":"",o=L.DomUtil.create("div",`button-container ${s}`,this._container);i.title&&o.setAttribute("title",i.title);let h=L.DomUtil.create("a","leaflet-buttons-control-button",o);h.setAttribute("role","button"),h.setAttribute("tabindex","0"),h.href="#";let c=L.DomUtil.create("div",`leaflet-pm-actions-container ${s}`,o),_=i.actions,y={cancel:{text:St("actions.cancel"),title:St("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:St("actions.finish"),title:St("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:St("actions.removeLastVertex"),title:St("actions.removeLastVertex"),onClick(){this._map.pm.Draw[i.jsClass]._removeLastVertex()}},finish:{text:St("actions.finish"),title:St("actions.finish"),onClick(x){this._map.pm.Draw[i.jsClass]._finishShape(x)}}};i._preparedActions=_.map(x=>{let P=typeof x=="string"?x:x.name,N;if(y[P])N=y[P];else if(x.text)N=x;else return N;let F=L.DomUtil.create("a",`leaflet-pm-action ${s} action-${P}`,c);if(F.setAttribute("role","button"),F.setAttribute("tabindex","0"),F.href="#",N.title&&(F.title=N.title),F.innerHTML=N.text,L.DomEvent.disableClickPropagation(F),L.DomEvent.on(F,"click",L.DomEvent.stop),N._node=F,!i.disabled&&N.onClick){let tt=it=>{it.preventDefault();let lt="",{buttons:ft}=this._map.pm.Toolbar;for(let At in ft)if(ft[At]._button===i){lt=At;break}this._fireActionClick(N,lt,i)};L.DomEvent.addListener(F,"click",tt,this),L.DomEvent.addListener(F,"click",N.onClick,this),L.DomEvent.addListener(F,"click",()=>this._updateActiveAction(i))}return N}),this._updateActiveAction(i),i.toggleStatus&&L.DomUtil.addClass(o,"active");let A=L.DomUtil.create("div","control-icon",h);return i.iconUrl&&A.setAttribute("src",i.iconUrl),i.className&&L.DomUtil.addClass(A,i.className),L.DomEvent.disableClickPropagation(h),L.DomEvent.on(h,"click",L.DomEvent.stop),i.disabled||(L.DomEvent.addListener(h,"click",this._onBtnClick,this),L.DomEvent.addListener(h,"click",this._triggerClick,this)),i.disabled&&(L.DomUtil.addClass(h,"pm-disabled"),h.setAttribute("aria-disabled","true")),o},_applyStyleClasses(){this._container&&(!this._button.toggleStatus||this._button.cssToggle===!1?(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")):(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let i="",{buttons:s}=this._map.pm.Toolbar;for(let o in s)if(s[o]._button===this._button){i=o;break}this._fireButtonClick(i,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let i="pm-disabled",s=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(s,i),s.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(s,i),s.setAttribute("aria-disabled","false"))},_updateActiveAction(i){var s;(s=i._preparedActions)==null||s.forEach(o=>{o!=null&&o._node&&(o.isActive&&o.isActive.call(this)?L.DomUtil.addClass(o._node,"active-action"):L.DomUtil.removeClass(o._node,"active-action"))})}}),or=mi;L.Control.PMButton=or;var hr=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(i){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(i)},reinit(){let i=this.isVisible;this.removeControls(),this._defineButtons(),i&&this.addControls()},init(i){this.map=i,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(i){let s=`${i}Container`;return this[s]||(this[s]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${i} leaflet-bar leaflet-control`)),this[s]},getButtons(){return this.buttons},addControls(i=this.options){typeof i.editPolygon<"u"&&(i.editMode=i.editPolygon),typeof i.deleteLayer<"u"&&(i.removalMode=i.deleteLayer),L.Util.setOptions(this,i),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let i=this.getButtons(),s={geomanIcons:{drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"}};for(let o in i){let h=i[o];L.Util.setOptions(h,{className:s.geomanIcons[o]})}},removeControls(){let i=this.getButtons();for(let s in i)i[s].remove();this.isVisible=!1},toggleControls(i=this.options){this.isVisible?this.removeControls():this.addControls(i)},_addButton(i,s){return this.buttons[i]=s,this.options[i]=!!this.options[i]||!1,this.buttons[i]},triggerClickOnToggledButtons(i){for(let s in this.buttons){let o=this.buttons[s];o._button.disableByOtherButtons&&o!==i&&o.toggled()&&o._triggerClick()}},toggleButton(i,s,o=!0){i==="editPolygon"&&(i="editMode"),i==="deleteLayer"&&(i="removalMode");let h=i;return o&&this.triggerClickOnToggledButtons(this.buttons[h]),this.buttons[h]?this.buttons[h].toggle(s):!1},_defineButtons(){let i={className:"control-icon leaflet-pm-icon-marker",title:St("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:St("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},o={className:"control-icon leaflet-pm-icon-polyline",title:St("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},h={title:St("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},c={title:St("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},_={title:St("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},y={title:St("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},A={title:St("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},x={title:St("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},P={title:St("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},N={title:St("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},F={className:"control-icon leaflet-pm-icon-text",title:St("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(i)),this._addButton("drawPolyline",new L.Control.PMButton(o)),this._addButton("drawRectangle",new L.Control.PMButton(_)),this._addButton("drawPolygon",new L.Control.PMButton(s)),this._addButton("drawCircle",new L.Control.PMButton(h)),this._addButton("drawCircleMarker",new L.Control.PMButton(c)),this._addButton("drawText",new L.Control.PMButton(F)),this._addButton("editMode",new L.Control.PMButton(y)),this._addButton("dragMode",new L.Control.PMButton(A)),this._addButton("cutPolygon",new L.Control.PMButton(x)),this._addButton("removalMode",new L.Control.PMButton(P)),this._addButton("rotateMode",new L.Control.PMButton(N))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let i=this.getButtons(),s=[];this.options.drawControls===!1&&(s=s.concat(Object.keys(i).filter(o=>!i[o]._button.tool))),this.options.editControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="edit"))),this.options.optionsControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="options"))),this.options.customControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="custom")));for(let o in i)if(this.options[o]&&s.indexOf(o)===-1){let h=i[o]._button.tool;h||(h="draw"),i[o].setPosition(this._getBtnPosition(h)),i[o].addTo(this.map)}},_getBtnPosition(i){return this.options.positions&&this.options.positions[i]?this.options.positions[i]:this.options.position},setBlockPosition(i,s){this.options.positions[i]=s,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(i,s){if(s)typeof s!="object"&&(s={name:s});else throw new TypeError("Button has no name");let o=this._btnNameMapping(i);if(!s.name)throw new TypeError("Button has no name");if(this.buttons[s.name])throw new TypeError("Button with this name already exists");let h=this.map.pm.Draw.createNewDrawInstance(s.name,o);s={...this.buttons[o]._button,...s};let c=this.createCustomControl(s);return{drawInstance:h,control:c}},createCustomControl(i){if(!i.name)throw new TypeError("Button has no name");if(this.buttons[i.name])throw new TypeError("Button with this name already exists");i.onClick||(i.onClick=()=>{}),i.afterClick||(i.afterClick=()=>{}),i.toggle!==!1&&(i.toggle=!0),i.block&&(i.block=i.block.toLowerCase()),(!i.block||i.block==="draw")&&(i.block=""),i.className?i.className.indexOf("control-icon")===-1&&(i.className=`control-icon ${i.className}`):i.className="control-icon";let s={tool:i.block,className:i.className,title:i.title||"",jsClass:i.name,onClick:i.onClick,afterClick:i.afterClick,doToggle:i.toggle,toggleStatus:!1,disableOtherButtons:i.disableOtherButtons??!0,disableByOtherButtons:i.disableByOtherButtons??!0,cssToggle:i.toggle,position:this.options.position,actions:i.actions||[],disabled:!!i.disabled};this.options[i.name]!==!1&&(this.options[i.name]=!0);let o=this._addButton(i.name,new L.Control.PMButton(s));return this.changeControlOrder(),o},controlExists(i){return!!this.getButton(i)},getButton(i){return this.getButtons()[i]},getButtonsInBlock(i){let s={};if(i)for(let o in this.getButtons()){let h=this.getButtons()[o];(h._button.tool===i||i==="draw"&&!h._button.tool)&&(s[o]=h)}return s},changeControlOrder(i=[]){let s=this._shapeMapping(),o=[];i.forEach(_=>{s[_]?o.push(s[_]):o.push(_)});let h=this.getButtons(),c={};o.forEach(_=>{h[_]&&(c[_]=h[_])}),Object.keys(h).filter(_=>!h[_]._button.tool||h[_]._button.tool==="draw").forEach(_=>{o.indexOf(_)===-1&&(c[_]=h[_])}),Object.keys(h).filter(_=>h[_]._button.tool==="edit").forEach(_=>{o.indexOf(_)===-1&&(c[_]=h[_])}),Object.keys(h).filter(_=>h[_]._button.tool==="options").forEach(_=>{o.indexOf(_)===-1&&(c[_]=h[_])}),Object.keys(h).filter(_=>h[_]._button.tool==="custom").forEach(_=>{o.indexOf(_)===-1&&(c[_]=h[_])}),Object.keys(h).forEach(_=>{o.indexOf(_)===-1&&(c[_]=h[_])}),this.map.pm.Toolbar.buttons=c,this._showHideButtons()},getControlOrder(){let i=this.getButtons(),s=[];for(let o in i)s.push(o);return s},changeActionsOfControl(i,s){let o=this._btnNameMapping(i);if(!o)throw new TypeError("No name passed");if(!s)throw new TypeError("No actions passed");if(!this.buttons[o])throw new TypeError("Button with this name not exists");this.buttons[o]._button.actions=s,this.changeControlOrder()},setButtonDisabled(i,s){let o=this._btnNameMapping(i);s?this.buttons[o].disable():this.buttons[o].enable()},_shapeMapping(){return{Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}},_btnNameMapping(i){let s=this._shapeMapping();return s[i]?s[i]:i}}),Ys=hr,Oo=M(Tn()),lr={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(i){i.forEach(s=>{if(Array.isArray(s)){this._assignEvents(s);return}s.off("drag",this._handleSnapping,this),s.on("drag",this._handleSnapping,this),s.off("dragend",this._cleanupSnapping,this),s.on("dragend",this._cleanupSnapping,this)})},_cleanupSnapping(i){if(i){let s=i.target;s._snapped=!1}delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(s=>{s.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(i){var A,x,P;let s=i.target;if(s._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),((A=i==null?void 0:i.originalEvent)==null?void 0:A.altKey)||((P=(x=this._map)==null?void 0:x.pm)==null?void 0:P.Keyboard.isAltKeyPressed())||(this._snapList===void 0&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),this._snapList.length<=0))return!1;let o=this._calcClosestLayer(s.getLatLng(),this._snapList);if(Object.keys(o).length===0)return!1;let h=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment,c;h?c=o.latlng:c=this._checkPrioritiySnapping(o);let _=this.options.snapDistance,y={marker:s,shape:this._shape,snapLatLng:c,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(y.marker,y),this._fireSnapDrag(this._layer,y),o.distance<_){s._orgLatLng=s.getLatLng(),s.setLatLng(c),s._snapped=!0,s._snapInfo=y;let N=()=>{this._snapLatLng=c,this._fireSnap(s,y),this._fireSnap(this._layer,y)},F=this._snapLatLng||{},tt=c||{};(F.lat!==tt.lat||F.lng!==tt.lng)&&N()}else this._snapLatLng&&(this._unsnap(y),s._snapped=!1,s._snapInfo=void 0,this._fireUnsnap(y.marker,y),this._fireUnsnap(this._layer,y));return!0},_createSnapList(){let i=[],s=[],o=this._map;o.off("layerremove",this._handleSnapLayerRemoval,this),o.on("layerremove",this._handleSnapLayerRemoval,this),o.eachLayer(h=>{if((h instanceof L.Polyline||h instanceof L.Marker||h instanceof L.CircleMarker||h instanceof L.ImageOverlay)&&h.options.snapIgnore!==!0){if(h.options.snapIgnore===void 0&&(!L.PM.optIn&&h.options.pmIgnore===!0||L.PM.optIn&&h.options.pmIgnore!==!1))return;(h instanceof L.Circle||h instanceof L.CircleMarker)&&h.pm&&h.pm._hiddenPolyCircle?i.push(h.pm._hiddenPolyCircle):h instanceof L.ImageOverlay&&(h=L.rectangle(h.getBounds())),i.push(h);let c=L.polyline([],{color:"red",pmIgnore:!0});c._pmTempLayer=!0,s.push(c),(h instanceof L.Circle||h instanceof L.CircleMarker)&&s.push(c)}}),i=i.filter(h=>this._layer!==h),i=i.filter(h=>h._latlng||h._latlngs&&Pi(h._latlngs)),i=i.filter(h=>!h._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let h=L.polyline([],{color:"red",pmIgnore:!0});h._pmTempLayer=!0,s.push(h)}),this._snapList=i.concat(this._otherSnapLayers)):this._snapList=i,this.debugIndicatorLines=s},_handleSnapLayerRemoval({layer:i}){if(!i._leaflet_id)return;let s=this._snapList.findIndex(o=>o._leaflet_id===i._leaflet_id);s>-1&&this._snapList.splice(s,1)},_calcClosestLayer(i,s){return this._calcClosestLayers(i,s,1)[0]},_calcClosestLayers(i,s,o=1){let h=[],c={};s.forEach((y,A)=>{var P;if(y._parentCopy&&y._parentCopy===this._layer||((P=y.getLatLngs)==null?void 0:P.call(y).flat(5).length)<2)return;let x=this._calcLayerDistances(i,y);if(x.distance=Math.floor(x.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[A]){let N=L.polyline([],{color:"red",pmIgnore:!0});N._pmTempLayer=!0,this.debugIndicatorLines[A]=N}this.debugIndicatorLines[A].setLatLngs([i,x.latlng])}o===1&&(c.distance===void 0||x.distance-5<=c.distance)?(x.distance+5<c.distance&&(h=[]),c=x,c.layer=y,h.push(c)):o!==1&&(c={},c=x,c.layer=y,h.push(c))}),o!==1&&(h=h.sort((y,A)=>y.distance-A.distance)),o===-1&&(o=h.length);let _=this._getClosestLayerByPriority(h,o);return L.Util.isArray(_)?_:[_]},_calcLayerDistances(i,s){let o=this._map,h=s instanceof L.Marker||s instanceof L.CircleMarker,c=s instanceof L.Polygon,_=i;if(h){let y=s.getLatLng();return{latlng:{...y},distance:this._getDistance(o,y,_)}}return this._calcLatLngDistances(_,s.getLatLngs(),o,c)},_calcLatLngDistances(i,s,o,h=!1){let c,_,y,A=x=>{x.forEach((P,N)=>{if(Array.isArray(P)){A(P);return}if(this.options.snapSegment){let F=P,tt;h?tt=N+1===x.length?0:N+1:tt=N+1===x.length?void 0:N+1;let it=x[tt];if(it){let lt=this._getDistanceToSegment(o,i,F,it);(_===void 0||lt<_)&&(_=lt,y=[F,it])}}else{let F=this._getDistance(o,i,P);(_===void 0||F<_)&&(_=F,c=P)}})};return A(s),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(o,i,y[0],y[1])},segment:y,distance:_}:{latlng:c,distance:_}},_getClosestLayerByPriority(i,s=1){i=i.sort((y,A)=>y._leaflet_id-A._leaflet_id);let o=["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],h=this._map.pm.globalOptions.snappingOrder||[],c=0,_={};return h.concat(o).forEach(y=>{_[y]||(c+=1,_[y]=c)}),i.sort(To("instanceofShape",_)),s===1?i[0]||{}:i.slice(0,s)},_checkPrioritiySnapping(i){let s=this._map,o=i.segment[0],h=i.segment[1],c=i.latlng,_=c;if(this.options.snapVertex){let y=this._getDistance(s,o,c),A=this._getDistance(s,h,c),x=y<A?o:h,P=y<A?y:A;if(this.options.snapMiddle){let F=L.PM.Utils.calcMiddleLatLng(s,o,h),tt=this._getDistance(s,F,c);tt<y&&tt<A&&(x=F,P=tt)}let N=this.options.snapDistance;P<N&&(_=x)}return{..._}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(i,s,o,h){let c=i.getMaxZoom();c===1/0&&(c=i.getZoom());let _=i.project(s,c),y=i.project(o,c),A=i.project(h,c),x=L.LineUtil.closestPointOnSegment(_,y,A);return i.unproject(x,c)},_getDistanceToSegment(i,s,o,h){let c=i.latLngToContainerPoint(s),_=i.latLngToContainerPoint(o),y=i.latLngToContainerPoint(h);return L.LineUtil.pointToSegmentDistance(c,_,y)},_getDistance(i,s,o){return i.latLngToContainerPoint(s).distanceTo(i.latLngToContainerPoint(o))}},Js=lr,Io=L.Class.extend({includes:[Js,Gn],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(i){L.Util.setOptions(this,i),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(i){let s=new L.Icon.Default;s.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=s,this._map=i,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(o=>{this[o]=new L.PM.Draw[o](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(i,s=!1){s?this.options.pathOptions=(0,Oo.default)(this.options.pathOptions,i):this.options.pathOptions=i},getShapes(){return this.shapes},getShape(){return this._shape},enable(i,s){if(!i)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[i].enable(s)},disable(){this.shapes.forEach(i=>{this[i].disable()})},addControls(){this.shapes.forEach(i=>{this[i].addButton()})},getActiveShape(){let i;return this.shapes.forEach(s=>{this[s]._enabled&&(i=s)}),i},_setGlobalDrawMode(){this._shape==="Cut"?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let i=[];this._map.eachLayer(s=>{(s instanceof L.Polyline||s instanceof L.Marker||s instanceof L.Circle||s instanceof L.CircleMarker||s instanceof L.ImageOverlay)&&(s._pmTempLayer||i.push(s))}),this._enabled?i.forEach(s=>{L.PM.Utils.disablePopup(s)}):i.forEach(s=>{L.PM.Utils.enablePopup(s)})},createNewDrawInstance(i,s){let o=this._getShapeFromBtnName(s);if(this[i])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[o])throw new TypeError(`There is no class L.PM.Draw.${o}`);return this[i]=new L.PM.Draw[o](this._map),this[i].toolbarButtonName=i,this[i]._shape=i,this.shapes.push(i),this[s]&&this[i].setOptions(this[s].options),this[i].setOptions(this[i].options),this[i]},_getShapeFromBtnName(i){let s={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return s[i]?s[i]:this[i]?this[i]._shape:i},_finishLayer(i){i.pm&&(i.pm.setOptions(this.options),i.pm._shape=this._shape,i.pm._map=this._map),this._addDrawnLayerProp(i)},_addDrawnLayerProp(i){i._drawnByGeoman=!0},_setPane(i,s){s==="layerPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":s==="vertexPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":s==="markerPane"&&(i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return(this._map||this._layer._map).pm.getGeomanLayers().length===0}}),de=Io;de.Marker=de.extend({initialize(i){this._map=i,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer(s=>{this.isRelevantMarker(s)&&s.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this),this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},isRelevantMarker(i){return i instanceof L.Marker&&i.pm&&!i._pmTempLayer&&!i.pm._initTextMarker},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let s=i;s.target=this._hintMarker,this._handleSnapping(s)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(i){if(!i.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=new L.Marker(s,this.options.markerStyle);this._setPane(o,"markerPane"),this._finishLayer(o),o.pm||(o.options.draggable=!1),o.addTo(this._map.pm._getContainingLayer()),o.pm&&this.options.markerEditable?o.pm.enable():o.dragging&&o.dragging.disable(),this._fireCreate(o),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){var i,s;(i=this.options.markerStyle)!=null&&i.icon&&((s=this._hintMarker)==null||s.setIcon(this.options.markerStyle.icon))}});var _e=63710088e-1,ur={centimeters:_e*100,centimetres:_e*100,degrees:_e/111325,feet:_e*3.28084,inches:_e*39.37,kilometers:_e/1e3,kilometres:_e/1e3,meters:_e,metres:_e,miles:_e/1609.344,millimeters:_e*1e3,millimetres:_e*1e3,nauticalmiles:_e/1852,radians:1,yards:_e*1.0936};function ki(i,s,o){o===void 0&&(o={});var h={type:"Feature"};return(o.id===0||o.id)&&(h.id=o.id),o.bbox&&(h.bbox=o.bbox),h.properties=s||{},h.geometry=i,h}function Si(i,s,o){if(o===void 0&&(o={}),!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Qs(i[0])||!Qs(i[1]))throw new Error("coordinates must contain numbers");var h={type:"Point",coordinates:i};return ki(h,s,o)}function gi(i,s,o){if(o===void 0&&(o={}),i.length<2)throw new Error("coordinates must be an array of two or more positions");var h={type:"LineString",coordinates:i};return ki(h,s,o)}function Ee(i,s){s===void 0&&(s={});var o={type:"FeatureCollection"};return s.id&&(o.id=s.id),s.bbox&&(o.bbox=s.bbox),o.features=i,o}function Ro(i,s){s===void 0&&(s="kilometers");var o=ur[s];if(!o)throw new Error(s+" units is invalid");return i*o}function cn(i,s){s===void 0&&(s="kilometers");var o=ur[s];if(!o)throw new Error(s+" units is invalid");return i/o}function Pe(i){var s=i%(2*Math.PI);return s*180/Math.PI}function Ue(i){var s=i%360;return s*Math.PI/180}function Qs(i){return!isNaN(i)&&i!==null&&!Array.isArray(i)}function Zn(i){var s,o,h={type:"FeatureCollection",features:[]};if(i.type==="Feature"?o=i.geometry:o=i,o.type==="LineString")s=[o.coordinates];else if(o.type==="MultiLineString")s=o.coordinates;else if(o.type==="MultiPolygon")s=[].concat.apply([],o.coordinates);else if(o.type==="Polygon")s=o.coordinates;else throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return s.forEach(function(c){s.forEach(function(_){for(var y=0;y<c.length-1;y++)for(var A=y;A<_.length-1;A++)if(!(c===_&&(Math.abs(y-A)===1||y===0&&A===c.length-2&&c[y][0]===c[c.length-1][0]&&c[y][1]===c[c.length-1][1]))){var x=ta(c[y][0],c[y][1],c[y+1][0],c[y+1][1],_[A][0],_[A][1],_[A+1][0],_[A+1][1]);x&&h.features.push(Si([x[0],x[1]]))}})}),h}function ta(i,s,o,h,c,_,y,A){var x,P,N,F,tt,it={x:null,y:null,onLine1:!1,onLine2:!1};return x=(A-_)*(o-i)-(y-c)*(h-s),x===0?it.x!==null&&it.y!==null?it:!1:(P=s-_,N=i-c,F=(y-c)*P-(A-_)*N,tt=(o-i)*P-(h-s)*N,P=F/x,N=tt/x,it.x=i+P*(o-i),it.y=s+P*(h-s),P>=0&&P<=1&&(it.onLine1=!0),N>=0&&N<=1&&(it.onLine2=!0),it.onLine1&&it.onLine2?[it.x,it.y]:!1)}de.Line=de.extend({initialize(i){this._map=i,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&this.options.finishOn!=="snap"&&this._map.on(this.options.finishOn,this._finishShape,this),this.options.finishOn==="dblclick"&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&this.options.finishOn!=="snap"&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_syncHintLine(){let i=this._layer.getLatLngs();if(i.length>0){let s=i[i.length-1];this._hintline.setLatLngs([s,this._hintMarker.getLatLng()])}},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let s=this._layer._defaultShape().slice();s.push(this._hintMarker.getLatLng()),this._change(s)},hasSelfIntersection(){return Zn(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(i,s){let o=L.polyline(this._layer.getLatLngs());i&&(s||(s=this._hintMarker.getLatLng()),o.addLatLng(s));let h=Zn(o.toGeoJSON(15));this._doesSelfIntersect=h.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(h,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(i){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,i.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=this._layer.getLatLngs(),h=o[o.length-1];if(s.equals(o[0])||o.length>0&&s.equals(h)){this._finishShape();return}this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:s,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(s);let c=this._createMarker(s);this._setTooltipText(),this._setHintLineAfterNewVertex(s),this._fireVertexAdded(c,void 0,s,"Draw"),this._change(this._layer.getLatLngs()),this.options.finishOn==="snap"&&this._hintMarker._snapped&&this._finishShape(i)},_setHintLineAfterNewVertex(i){this._hintline.setLatLngs([i,i])},_removeLastVertex(){let i=this._markers;if(i.length<=1){this.disable();return}let s=this._layer.getLatLngs(),o=i[i.length-1],{indexPath:h}=L.PM.Utils.findDeepMarkerIndex(i,o);i.pop(),this._layerGroup.removeLayer(o);let c=i[i.length-1],_=s.indexOf(c.getLatLng());s=s.slice(0,_+1),this._layer.setLatLngs(s),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(o,h,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=1)return;let s=L.polyline(i,this.options.pathOptions);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),this._fireCreate(s),this.options.snappable&&this._cleanupSnapping();let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_createMarker(i){let s=new L.Marker(i,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this._layerGroup.addLayer(s),this._markers.push(s),s.on("click",this._finishShape,this),s},_setTooltipText(){let{length:i}=this._layer.getLatLngs().flat(),s="";i<=1?s=St("tooltips.continueLine"):s=St("tooltips.finishLine"),this._hintMarker.setTooltipContent(s)},_change(i){this._fireChange(i,"Draw")},setStyle(){var i,s;(i=this._layer)==null||i.setStyle(this.options.templineStyle),(s=this._hintline)==null||s.setStyle(this.options.hintlineStyle)}}),de.Polygon=de.Line.extend({initialize(i){this._map=i,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(i){L.PM.Draw.Line.prototype.enable.call(this,i),this._layer.pm._shape="Polygon"},_createMarker(i){let s=new L.Marker(i,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this._layerGroup.addLayer(s),this._markers.push(s),this._layer.getLatLngs().flat().length===1?(s.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(s)-1,this.options.snappable&&this._cleanupSnapping()):s.on("click",()=>1),s},_setTooltipText(){let{length:i}=this._layer.getLatLngs().flat(),s="";i<=2?s=St("tooltips.continueLine"):s=St("tooltips.finishPoly"),this._hintMarker.setTooltipContent(s)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=2)return;let s=L.polygon(i,this.options.pathOptions);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),this._fireCreate(s),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))}}),de.Rectangle=de.extend({initialize(i){this._map=i,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(i){if(L.Util.setOptions(this,i),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:this.options.cursorMarker?1:0}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let s=0;s<2;s+=1){let o=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(o,"vertexPane"),o._pmTempLayer=!0,this._layerGroup.addLayer(o),this._styleMarkers.push(o)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_placeStartingMarkers(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(s),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(o=>{L.DomUtil.addClass(o._icon,"visible"),o.setLatLng(s)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(St("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let i=this._startMarker.getLatLng();i&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([i,i]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}let s=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(s,"Draw")},_syncRectangleSize(){let i=ar(this._startMarker.getLatLng(),this._map),s=ar(this._hintMarker.getLatLng(),this._map),o=L.PM.Utils._getRotatedRectangle(i,s,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(o),this.options.cursorMarker&&this._styleMarkers){let h=[];o.forEach(c=>{!c.equals(i,1e-8)&&!c.equals(s,1e-8)&&h.push(c)}),h.forEach((c,_)=>{try{this._styleMarkers[_].setLatLng(c)}catch{}})}},_findCorners(){let i=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(i[0],i[2],this.options.rectangleAngle||0,this._map)},_finishShape(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||o.equals(s))return;let h=L.rectangle([o,s],this.options.pathOptions);if(this.options.rectangleAngle){let _=L.PM.Utils._getRotatedRectangle(o,s,this.options.rectangleAngle||0,this._map);h.setLatLngs(_),h.pm&&h.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(h,"layerPane"),this._finishLayer(h),h.addTo(this._map.pm._getContainingLayer()),this._fireCreate(h);let c=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(c))},setStyle(){var i;(i=this._layer)==null||i.setStyle(this.options.pathOptions)}}),de.CircleMarker=de.extend({initialize(i){this._map=i,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(i){if(L.Util.setOptions(this,i),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let s={};L.extend(s,this.options.templineStyle),s.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),s),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.disable()})},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_placeCenterMarker(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let s=this._hintMarker.getLatLng();this._centerMarker.setLatLng(s),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let i=this._centerMarker.getLatLng();i&&(this._layer.setLatLng(i),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(St("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let i=this._centerMarker.getLatLng(),s=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([i,s])},_syncCircleRadius(){let i=this._centerMarker.getLatLng(),s=this._hintMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(o)},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}this._handleHintMarkerSnapping();let s=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(s,"Draw")},isRelevantMarker(i){return i instanceof L.CircleMarker&&!(i instanceof L.Circle)&&i.pm&&!i._pmTempLayer},_createMarker(i){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!i.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=new this._BaseCircleClass(s,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(o,"layerPane"),this._finishLayer(o),o.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(o),this._fireCreate(o),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(i){i.pm&&this.options.markerEditable&&i.pm.enable()},_finishShape(i){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._centerMarker.getLatLng(),o=this._defaultRadius;if(this.options[this._editableOption]){let y=this._hintMarker.getLatLng();o=this._distanceCalculation(s,y),this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?o=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(o=this.options[this._maxRadiusOption])}let h={...this.options.pathOptions,radius:o},c=new this._BaseCircleClass(s,h);this._setPane(c,"layerPane"),this._finishLayer(c),c.addTo(this._map.pm._getContainingLayer()),c.pm&&c.pm._updateHiddenPolyCircle(),this._fireCreate(c);let _=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(_))},_getNewDestinationOfHintMarker(){let i=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return i;let s=this._centerMarker.getLatLng(),o=this._distanceCalculation(s,i);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?i=Un(this._map,s,i,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(i=Un(this._map,s,i,this._getMaxDistanceInMeter()))}return i},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let i=this._centerMarker.getLatLng(),s=this._hintMarker.getLatLng(),o=this._distanceCalculation(i,s);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._hintMarker.setLatLng(this._hintMarker._orgLatLng):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){var s,o;let i={};L.extend(i,this.options.templineStyle),this.options[this._editableOption]&&(i.radius=0),(s=this._layer)==null||s.setStyle(i),(o=this._hintline)==null||o.setStyle(this.options.hintlineStyle)},_distanceCalculation(i,s){return this._map.project(i).distanceTo(this._map.project(s))}}),de.Circle=de.CircleMarker.extend({initialize(i){this._map=i,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(i,s){return this._map.distance(i,s)}});function Ze(i){if(!i)throw new Error("coord is required");if(!Array.isArray(i)){if(i.type==="Feature"&&i.geometry!==null&&i.geometry.type==="Point")return i.geometry.coordinates;if(i.type==="Point")return i.coordinates}if(Array.isArray(i)&&i.length>=2&&!Array.isArray(i[0])&&!Array.isArray(i[1]))return i;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function We(i){if(Array.isArray(i))return i;if(i.type==="Feature"){if(i.geometry!==null)return i.geometry.coordinates}else if(i.coordinates)return i.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function jn(i){return i.type==="Feature"?i.geometry:i}function ea(i,s){return i.type==="FeatureCollection"?"FeatureCollection":i.type==="GeometryCollection"?"GeometryCollection":i.type==="Feature"&&i.geometry!==null?i.geometry.type:i.type}function ia(i,s,o){if(i!==null)for(var h,c,_,y,A,x,P,N=0,F=0,tt,it=i.type,lt=it==="FeatureCollection",ft=it==="Feature",At=lt?i.features.length:1,Gt=0;Gt<At;Gt++){P=lt?i.features[Gt].geometry:ft?i.geometry:i,tt=P?P.type==="GeometryCollection":!1,A=tt?P.geometries.length:1;for(var z=0;z<A;z++){var q=0,K=0;if(y=tt?P.geometries[z]:P,y!==null){x=y.coordinates;var nt=y.type;switch(N=0,nt){case null:break;case"Point":if(s(x,F,Gt,q,K)===!1)return!1;F++,q++;break;case"LineString":case"MultiPoint":for(h=0;h<x.length;h++){if(s(x[h],F,Gt,q,K)===!1)return!1;F++,nt==="MultiPoint"&&q++}nt==="LineString"&&q++;break;case"Polygon":case"MultiLineString":for(h=0;h<x.length;h++){for(c=0;c<x[h].length-N;c++){if(s(x[h][c],F,Gt,q,K)===!1)return!1;F++}nt==="MultiLineString"&&q++,nt==="Polygon"&&K++}nt==="Polygon"&&q++;break;case"MultiPolygon":for(h=0;h<x.length;h++){for(K=0,c=0;c<x[h].length;c++){for(_=0;_<x[h][c].length-N;_++){if(s(x[h][c][_],F,Gt,q,K)===!1)return!1;F++}K++}q++}break;case"GeometryCollection":for(h=0;h<y.geometries.length;h++)if(ia(y.geometries[h],s)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ve(i,s){if(i.type==="Feature")s(i,0);else if(i.type==="FeatureCollection")for(var o=0;o<i.features.length&&s(i.features[o],o)!==!1;o++);}function qi(i,s,o){var h=o;return ve(i,function(c,_){_===0&&o===void 0?h=c:h=s(h,c,_)}),h}function Fo(i,s){var o,h,c,_,y,A,x,P,N,F,tt=0,it=i.type==="FeatureCollection",lt=i.type==="Feature",ft=it?i.features.length:1;for(o=0;o<ft;o++){for(A=it?i.features[o].geometry:lt?i.geometry:i,P=it?i.features[o].properties:lt?i.properties:{},N=it?i.features[o].bbox:lt?i.bbox:void 0,F=it?i.features[o].id:lt?i.id:void 0,x=A?A.type==="GeometryCollection":!1,y=x?A.geometries.length:1,c=0;c<y;c++){if(_=x?A.geometries[c]:A,_===null){if(s(null,tt,P,N,F)===!1)return!1;continue}switch(_.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(s(_,tt,P,N,F)===!1)return!1;break}case"GeometryCollection":{for(h=0;h<_.geometries.length;h++)if(s(_.geometries[h],tt,P,N,F)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}tt++}}function qe(i,s){Fo(i,function(o,h,c,_,y){var A=o===null?null:o.type;switch(A){case null:case"Point":case"LineString":case"Polygon":return s(ki(o,c,{bbox:_,id:y}),h,0)===!1?!1:void 0}var x;switch(A){case"MultiPoint":x="Point";break;case"MultiLineString":x="LineString";break;case"MultiPolygon":x="Polygon";break}for(var P=0;P<o.coordinates.length;P++){var N=o.coordinates[P],F={type:x,coordinates:N};if(s(ki(F,c),h,P)===!1)return!1}})}function Go(i){if(!i)throw new Error("geojson is required");var s=[];return qe(i,function(o){Hi(o,s)}),Ee(s)}function Hi(i,s){var o=[],h=i.geometry;if(h!==null){switch(h.type){case"Polygon":o=We(h);break;case"LineString":o=[We(h)]}o.forEach(function(c){var _=zo(c,i.properties);_.forEach(function(y){y.id=s.length,s.push(y)})})}}function zo(i,s){var o=[];return i.reduce(function(h,c){var _=gi([h,c],s);return _.bbox=dn(h,c),o.push(_),c}),o}function dn(i,s){var o=i[0],h=i[1],c=s[0],_=s[1],y=o<c?o:c,A=h<_?h:_,x=o>c?o:c,P=h>_?h:_;return[y,A,x,P]}var qn=Go,Hn=M(Li(),1);function No(i,s){var o={},h=[];if(i.type==="LineString"&&(i=ki(i)),s.type==="LineString"&&(s=ki(s)),i.type==="Feature"&&s.type==="Feature"&&i.geometry!==null&&s.geometry!==null&&i.geometry.type==="LineString"&&s.geometry.type==="LineString"&&i.geometry.coordinates.length===2&&s.geometry.coordinates.length===2){var c=ai(i,s);return c&&h.push(c),Ee(h)}var _=(0,Hn.default)();return _.load(qn(s)),ve(qn(i),function(y){ve(_.search(y),function(A){var x=ai(y,A);if(x){var P=We(x).join(",");o[P]||(o[P]=!0,h.push(x))}})}),Ee(h)}function ai(i,s){var o=We(i),h=We(s);if(o.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(h.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var c=o[0][0],_=o[0][1],y=o[1][0],A=o[1][1],x=h[0][0],P=h[0][1],N=h[1][0],F=h[1][1],tt=(F-P)*(y-c)-(N-x)*(A-_),it=(N-x)*(_-P)-(F-P)*(c-x),lt=(y-c)*(_-P)-(A-_)*(c-x);if(tt===0)return null;var ft=it/tt,At=lt/tt;if(ft>=0&&ft<=1&&At>=0&&At<=1){var Gt=c+ft*(y-c),z=_+ft*(A-_);return Si([Gt,z])}return null}var Xe=No,cr=M(Li(),1);function na(i,s,o){o===void 0&&(o={});var h=Ze(i),c=Ze(s),_=Ue(c[1]-h[1]),y=Ue(c[0]-h[0]),A=Ue(h[1]),x=Ue(c[1]),P=Math.pow(Math.sin(_/2),2)+Math.pow(Math.sin(y/2),2)*Math.cos(A)*Math.cos(x);return Ro(2*Math.atan2(Math.sqrt(P),Math.sqrt(1-P)),o.units)}var Bi=na;function ri(i){var s=i[0],o=i[1],h=i[2],c=i[3],_=Bi(i.slice(0,2),[h,o]),y=Bi(i.slice(0,2),[s,c]);if(_>=y){var A=(o+c)/2;return[s,A-(h-s)/2,h,A+(h-s)/2]}else{var x=(s+h)/2;return[x-(c-o)/2,o,x+(c-o)/2,c]}}var Uo=ri;function yi(i){var s=[1/0,1/0,-1/0,-1/0];return ia(i,function(o){s[0]>o[0]&&(s[0]=o[0]),s[1]>o[1]&&(s[1]=o[1]),s[2]<o[0]&&(s[2]=o[0]),s[3]<o[1]&&(s[3]=o[1])}),s}yi.default=yi;var fn=yi;function oi(i,s){s===void 0&&(s={});var o=s.precision,h=s.coordinates,c=s.mutate;if(o=o==null||isNaN(o)?6:o,h=h==null||isNaN(h)?3:h,!i)throw new Error("<geojson> is required");if(typeof o!="number")throw new Error("<precision> must be a number");if(typeof h!="number")throw new Error("<coordinates> must be a number");(c===!1||c===void 0)&&(i=JSON.parse(JSON.stringify(i)));var _=Math.pow(10,o);return ia(i,function(y){Vn(y,_,h)}),i}function Vn(i,s,o){i.length>o&&i.splice(o,i.length);for(var h=0;h<i.length;h++)i[h]=Math.round(i[h]*s)/s;return i}var dr=oi;function $n(i,s,o){if(o===void 0&&(o={}),o.final===!0)return Kn(i,s);var h=Ze(i),c=Ze(s),_=Ue(h[0]),y=Ue(c[0]),A=Ue(h[1]),x=Ue(c[1]),P=Math.sin(y-_)*Math.cos(x),N=Math.cos(A)*Math.sin(x)-Math.sin(A)*Math.cos(x)*Math.cos(y-_);return Pe(Math.atan2(P,N))}function Kn(i,s){var o=$n(s,i);return o=(o+180)%360,o}function Wn(i,s,o,h){h===void 0&&(h={});var c=Ze(i),_=Ue(c[0]),y=Ue(c[1]),A=Ue(o),x=cn(s,h.units),P=Math.asin(Math.sin(y)*Math.cos(x)+Math.cos(y)*Math.sin(x)*Math.cos(A)),N=_+Math.atan2(Math.sin(A)*Math.sin(x)*Math.cos(y),Math.cos(x)-Math.sin(y)*Math.sin(P)),F=Pe(N),tt=Pe(P);return Si([F,tt],h.properties)}function Xn(i,s,o){o===void 0&&(o={});var h=Si([1/0,1/0],{dist:1/0}),c=0;return qe(i,function(_){for(var y=We(_),A=0;A<y.length-1;A++){var x=Si(y[A]);x.properties.dist=Bi(s,x,o);var P=Si(y[A+1]);P.properties.dist=Bi(s,P,o);var N=Bi(x,P,o),F=Math.max(x.properties.dist,P.properties.dist),tt=$n(x,P),it=Wn(s,F,tt+90,o),lt=Wn(s,F,tt-90,o),ft=Xe(gi([it.geometry.coordinates,lt.geometry.coordinates]),gi([x.geometry.coordinates,P.geometry.coordinates])),At=null;ft.features.length>0&&(At=ft.features[0],At.properties.dist=Bi(s,At,o),At.properties.location=c+Bi(x,At,o)),x.properties.dist<h.properties.dist&&(h=x,h.properties.index=A,h.properties.location=c),P.properties.dist<h.properties.dist&&(h=P,h.properties.index=A+1,h.properties.location=c+N),At&&At.properties.dist<h.properties.dist&&(h=At,h.properties.index=A),c+=N}}),h}var Vi=Xn;function Yn(i,s){if(!i)throw new Error("line is required");if(!s)throw new Error("splitter is required");var o=ea(i),h=ea(s);if(o!=="LineString")throw new Error("line must be LineString");if(h==="FeatureCollection")throw new Error("splitter cannot be a FeatureCollection");if(h==="GeometryCollection")throw new Error("splitter cannot be a GeometryCollection");var c=dr(s,{precision:7});switch(h){case"Point":return Qn(i,c);case"MultiPoint":return Jn(i,c);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Jn(i,Xe(i,c))}}function Jn(i,s){var o=[],h=(0,cr.default)();return qe(s,function(c){if(o.forEach(function(A,x){A.id=x}),!o.length)o=Qn(i,c).features,o.forEach(function(A){A.bbox||(A.bbox=Uo(fn(A)))}),h.load(Ee(o));else{var _=h.search(c);if(_.features.length){var y=fr(c,_);o=o.filter(function(A){return A.id!==y.id}),h.remove(y),ve(Qn(y,c),function(A){o.push(A),h.insert(A)})}}}),Ee(o)}function Qn(i,s){var o=[],h=We(i)[0],c=We(i)[i.geometry.coordinates.length-1];if($i(h,Ze(s))||$i(c,Ze(s)))return Ee([i]);var _=(0,cr.default)(),y=qn(i);_.load(y);var A=_.search(s);if(!A.features.length)return Ee([i]);var x=fr(s,A),P=[h],N=qi(y,function(F,tt,it){var lt=We(tt)[1],ft=Ze(s);return it===x.id?(F.push(ft),o.push(gi(F)),$i(ft,lt)?[ft]:[ft,lt]):(F.push(lt),F)},P);return N.length>1&&o.push(gi(N)),Ee(o)}function fr(i,s){if(!s.features.length)throw new Error("lines must contain features");if(s.features.length===1)return s.features[0];var o,h=1/0;return ve(s,function(c){var _=Vi(c,i),y=_.properties.dist;y<h&&(o=c,h=y)}),o}function $i(i,s){return i[0]===s[0]&&i[1]===s[1]}var Zo=Yn;function pn(i,s,o){if(o===void 0&&(o={}),!i)throw new Error("point is required");if(!s)throw new Error("polygon is required");var h=Ze(i),c=jn(s),_=c.type,y=s.bbox,A=c.coordinates;if(y&&_r(h,y)===!1)return!1;_==="Polygon"&&(A=[A]);for(var x=!1,P=0;P<A.length&&!x;P++)if(pr(h,A[P][0],o.ignoreBoundary)){for(var N=!1,F=1;F<A[P].length&&!N;)pr(h,A[P][F],!o.ignoreBoundary)&&(N=!0),F++;N||(x=!0)}return x}function pr(i,s,o){var h=!1;s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1]&&(s=s.slice(0,s.length-1));for(var c=0,_=s.length-1;c<s.length;_=c++){var y=s[c][0],A=s[c][1],x=s[_][0],P=s[_][1],N=i[1]*(y-x)+A*(x-i[0])+P*(i[0]-y)===0&&(y-i[0])*(x-i[0])<=0&&(A-i[1])*(P-i[1])<=0;if(N)return!o;var F=A>i[1]!=P>i[1]&&i[0]<(x-y)*(i[1]-A)/(P-A)+y;F&&(h=!h)}return h}function _r(i,s){return s[0]<=i[0]&&s[1]<=i[1]&&s[2]>=i[0]&&s[3]>=i[1]}function jo(i,s,o){o===void 0&&(o={});for(var h=Ze(i),c=We(s),_=0;_<c.length-1;_++){var y=!1;if(o.ignoreEndVertices&&(_===0&&(y="start"),_===c.length-2&&(y="end"),_===0&&_+1===c.length-1&&(y="both")),Ye(c[_],c[_+1],h,y,typeof o.epsilon>"u"?null:o.epsilon))return!0}return!1}function Ye(i,s,o,h,c){var _=o[0],y=o[1],A=i[0],x=i[1],P=s[0],N=s[1],F=o[0]-A,tt=o[1]-x,it=P-A,lt=N-x,ft=F*lt-tt*it;if(c!==null){if(Math.abs(ft)>c)return!1}else if(ft!==0)return!1;if(h){if(h==="start")return Math.abs(it)>=Math.abs(lt)?it>0?A<_&&_<=P:P<=_&&_<A:lt>0?x<y&&y<=N:N<=y&&y<x;if(h==="end")return Math.abs(it)>=Math.abs(lt)?it>0?A<=_&&_<P:P<_&&_<=A:lt>0?x<=y&&y<N:N<y&&y<=x;if(h==="both")return Math.abs(it)>=Math.abs(lt)?it>0?A<_&&_<P:P<_&&_<A:lt>0?x<y&&y<N:N<y&&y<x}else return Math.abs(it)>=Math.abs(lt)?it>0?A<=_&&_<=P:P<=_&&_<=A:lt>0?x<=y&&y<=N:N<=y&&y<=x;return!1}var Ai=jo;function qo(i,s){var o=jn(i),h=jn(s),c=o.type,_=h.type,y=o.coordinates,A=h.coordinates;switch(c){case"Point":switch(_){case"Point":return es(y,A);default:throw new Error("feature2 "+_+" geometry not supported")}case"MultiPoint":switch(_){case"Point":return ts(o,h);case"MultiPoint":return Ho(o,h);default:throw new Error("feature2 "+_+" geometry not supported")}case"LineString":switch(_){case"Point":return Ai(h,o,{ignoreEndVertices:!0});case"LineString":return _n(o,h);case"MultiPoint":return mr(o,h);default:throw new Error("feature2 "+_+" geometry not supported")}case"Polygon":switch(_){case"Point":return pn(h,o,{ignoreBoundary:!0});case"LineString":return $o(o,h);case"Polygon":return Ki(o,h);case"MultiPoint":return Vo(o,h);default:throw new Error("feature2 "+_+" geometry not supported")}default:throw new Error("feature1 "+c+" geometry not supported")}}function ts(i,s){var o,h=!1;for(o=0;o<i.coordinates.length;o++)if(es(i.coordinates[o],s.coordinates)){h=!0;break}return h}function Ho(i,s){for(var o=0,h=s.coordinates;o<h.length;o++){for(var c=h[o],_=!1,y=0,A=i.coordinates;y<A.length;y++){var x=A[y];if(es(c,x)){_=!0;break}}if(!_)return!1}return!0}function mr(i,s){for(var o=!1,h=0,c=s.coordinates;h<c.length;h++){var _=c[h];if(Ai(_,i,{ignoreEndVertices:!0})&&(o=!0),!Ai(_,i))return!1}return!!o}function Vo(i,s){for(var o=0,h=s.coordinates;o<h.length;o++){var c=h[o];if(!pn(c,i,{ignoreBoundary:!0}))return!1}return!0}function _n(i,s){for(var o=!1,h=0,c=s.coordinates;h<c.length;h++){var _=c[h];if(Ai({type:"Point",coordinates:_},i,{ignoreEndVertices:!0})&&(o=!0),!Ai({type:"Point",coordinates:_},i,{ignoreEndVertices:!1}))return!1}return o}function $o(i,s){var o=!1,h=0,c=fn(i),_=fn(s);if(!sa(c,_))return!1;for(h;h<s.coordinates.length-1;h++){var y=Ko(s.coordinates[h],s.coordinates[h+1]);if(pn({type:"Point",coordinates:y},i,{ignoreBoundary:!0})){o=!0;break}}return o}function Ki(i,s){if(i.type==="Feature"&&i.geometry===null||s.type==="Feature"&&s.geometry===null)return!1;var o=fn(i),h=fn(s);if(!sa(o,h))return!1;for(var c=jn(s).coordinates,_=0,y=c;_<y.length;_++)for(var A=y[_],x=0,P=A;x<P.length;x++){var N=P[x];if(!pn(N,i))return!1}return!0}function sa(i,s){return!(i[0]>s[0]||i[2]<s[2]||i[1]>s[1]||i[3]<s[3])}function es(i,s){return i[0]===s[0]&&i[1]===s[1]}function Ko(i,s){return[(i[0]+s[0])/2,(i[1]+s[1])/2]}var hi=M(pi()),aa=i=>()=>i,is=i=>{let s=i?(o,h)=>h.minus(o).abs().isLessThanOrEqualTo(i):aa(!1);return(o,h)=>s(o,h)?0:o.comparedTo(h)};function mn(i){let s=i?(o,h,c,_,y)=>o.exponentiatedBy(2).isLessThanOrEqualTo(_.minus(h).exponentiatedBy(2).plus(y.minus(c).exponentiatedBy(2)).times(i)):aa(!1);return(o,h,c)=>{let _=o.x,y=o.y,A=c.x,x=c.y,P=y.minus(x).times(h.x.minus(A)).minus(_.minus(A).times(h.y.minus(x)));return s(P,_,y,A,x)?0:P.comparedTo(0)}}var Wo=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Wi=Math.ceil,me=Math.floor,Me="[BigNumber Error] ",ra=Me+"Number primitive has more than 15 significant digits: ",He=1e14,kt=14,ns=9007199254740991,ss=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],li=1e7,le=1e9;function gr(i){var s,o,h,c=z.prototype={constructor:z,toString:null,valueOf:null},_=new z(1),y=20,A=4,x=-7,P=21,N=-1e7,F=1e7,tt=!1,it=1,lt=0,ft={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},At="0123456789abcdefghijklmnopqrstuvwxyz",Gt=!0;function z(w,S){var O,T,I,R,V,H,$,Q,J=this;if(!(J instanceof z))return new z(w,S);if(S==null){if(w&&w._isBigNumber===!0){J.s=w.s,!w.c||w.e>F?J.c=J.e=null:w.e<N?J.c=[J.e=0]:(J.e=w.e,J.c=w.c.slice());return}if((H=typeof w=="number")&&w*0==0){if(J.s=1/w<0?(w=-w,-1):1,w===~~w){for(R=0,V=w;V>=10;V/=10,R++);R>F?J.c=J.e=null:(J.e=R,J.c=[w]);return}Q=String(w)}else{if(!Wo.test(Q=String(w)))return h(J,Q,H);J.s=Q.charCodeAt(0)==45?(Q=Q.slice(1),-1):1}(R=Q.indexOf("."))>-1&&(Q=Q.replace(".","")),(V=Q.search(/e/i))>0?(R<0&&(R=V),R+=+Q.slice(V+1),Q=Q.substring(0,V)):R<0&&(R=Q.length)}else{if(t(S,2,At.length,"Base"),S==10&&Gt)return J=new z(w),X(J,y+J.e+1,A);if(Q=String(w),H=typeof w=="number"){if(w*0!=0)return h(J,Q,H,S);if(J.s=1/w<0?(Q=Q.slice(1),-1):1,z.DEBUG&&Q.replace(/^0\.0*|\./,"").length>15)throw Error(ra+w)}else J.s=Q.charCodeAt(0)===45?(Q=Q.slice(1),-1):1;for(O=At.slice(0,S),R=V=0,$=Q.length;V<$;V++)if(O.indexOf(T=Q.charAt(V))<0){if(T=="."){if(V>R){R=$;continue}}else if(!I&&(Q==Q.toUpperCase()&&(Q=Q.toLowerCase())||Q==Q.toLowerCase()&&(Q=Q.toUpperCase()))){I=!0,V=-1,R=0;continue}return h(J,String(w),H,S)}H=!1,Q=o(Q,S,10,J.s),(R=Q.indexOf("."))>-1?Q=Q.replace(".",""):R=Q.length}for(V=0;Q.charCodeAt(V)===48;V++);for($=Q.length;Q.charCodeAt(--$)===48;);if(Q=Q.slice(V,++$)){if($-=V,H&&z.DEBUG&&$>15&&(w>ns||w!==me(w)))throw Error(ra+J.s*w);if((R=R-V-1)>F)J.c=J.e=null;else if(R<N)J.c=[J.e=0];else{if(J.e=R,J.c=[],V=(R+1)%kt,R<0&&(V+=kt),V<$){for(V&&J.c.push(+Q.slice(0,V)),$-=kt;V<$;)J.c.push(+Q.slice(V,V+=kt));V=kt-(Q=Q.slice(V)).length}else V-=$;for(;V--;Q+="0");J.c.push(+Q)}}else J.c=[J.e=0]}z.clone=gr,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(w){var S,O;if(w!=null)if(typeof w=="object"){if(w.hasOwnProperty(S="DECIMAL_PLACES")&&(O=w[S],t(O,0,le,S),y=O),w.hasOwnProperty(S="ROUNDING_MODE")&&(O=w[S],t(O,0,8,S),A=O),w.hasOwnProperty(S="EXPONENTIAL_AT")&&(O=w[S],O&&O.pop?(t(O[0],-le,0,S),t(O[1],0,le,S),x=O[0],P=O[1]):(t(O,-le,le,S),x=-(P=O<0?-O:O))),w.hasOwnProperty(S="RANGE"))if(O=w[S],O&&O.pop)t(O[0],-le,-1,S),t(O[1],1,le,S),N=O[0],F=O[1];else if(t(O,-le,le,S),O)N=-(F=O<0?-O:O);else throw Error(Me+S+" cannot be zero: "+O);if(w.hasOwnProperty(S="CRYPTO"))if(O=w[S],O===!!O)if(O)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))tt=O;else throw tt=!O,Error(Me+"crypto unavailable");else tt=O;else throw Error(Me+S+" not true or false: "+O);if(w.hasOwnProperty(S="MODULO_MODE")&&(O=w[S],t(O,0,9,S),it=O),w.hasOwnProperty(S="POW_PRECISION")&&(O=w[S],t(O,0,le,S),lt=O),w.hasOwnProperty(S="FORMAT"))if(O=w[S],typeof O=="object")ft=O;else throw Error(Me+S+" not an object: "+O);if(w.hasOwnProperty(S="ALPHABET"))if(O=w[S],typeof O=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(O))Gt=O.slice(0,10)=="0123456789",At=O;else throw Error(Me+S+" invalid: "+O)}else throw Error(Me+"Object expected: "+w);return{DECIMAL_PLACES:y,ROUNDING_MODE:A,EXPONENTIAL_AT:[x,P],RANGE:[N,F],CRYPTO:tt,MODULO_MODE:it,POW_PRECISION:lt,FORMAT:ft,ALPHABET:At}},z.isBigNumber=function(w){if(!w||w._isBigNumber!==!0)return!1;if(!z.DEBUG)return!0;var S,O,T=w.c,I=w.e,R=w.s;t:if({}.toString.call(T)=="[object Array]"){if((R===1||R===-1)&&I>=-le&&I<=le&&I===me(I)){if(T[0]===0){if(I===0&&T.length===1)return!0;break t}if(S=(I+1)%kt,S<1&&(S+=kt),String(T[0]).length==S){for(S=0;S<T.length;S++)if(O=T[S],O<0||O>=He||O!==me(O))break t;if(O!==0)return!0}}}else if(T===null&&I===null&&(R===null||R===1||R===-1))return!0;throw Error(Me+"Invalid BigNumber: "+w)},z.maximum=z.max=function(){return K(arguments,-1)},z.minimum=z.min=function(){return K(arguments,1)},z.random=function(){var w=9007199254740992,S=Math.random()*w&2097151?function(){return me(Math.random()*w)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(O){var T,I,R,V,H,$=0,Q=[],J=new z(_);if(O==null?O=y:t(O,0,le),V=Wi(O/kt),tt)if(crypto.getRandomValues){for(T=crypto.getRandomValues(new Uint32Array(V*=2));$<V;)H=T[$]*131072+(T[$+1]>>>11),H>=9e15?(I=crypto.getRandomValues(new Uint32Array(2)),T[$]=I[0],T[$+1]=I[1]):(Q.push(H%1e14),$+=2);$=V/2}else if(crypto.randomBytes){for(T=crypto.randomBytes(V*=7);$<V;)H=(T[$]&31)*281474976710656+T[$+1]*1099511627776+T[$+2]*4294967296+T[$+3]*16777216+(T[$+4]<<16)+(T[$+5]<<8)+T[$+6],H>=9e15?crypto.randomBytes(7).copy(T,$):(Q.push(H%1e14),$+=7);$=V/7}else throw tt=!1,Error(Me+"crypto unavailable");if(!tt)for(;$<V;)H=S(),H<9e15&&(Q[$++]=H%1e14);for(V=Q[--$],O%=kt,V&&O&&(H=ss[kt-O],Q[$]=me(V/H)*H);Q[$]===0;Q.pop(),$--);if($<0)Q=[R=0];else{for(R=-1;Q[0]===0;Q.splice(0,1),R-=kt);for($=1,H=Q[0];H>=10;H/=10,$++);$<kt&&(R-=kt-$)}return J.e=R,J.c=Q,J}}(),z.sum=function(){for(var w=1,S=arguments,O=new z(S[0]);w<S.length;)O=O.plus(S[w++]);return O},o=function(){var w="0123456789";function S(O,T,I,R){for(var V,H=[0],$,Q=0,J=O.length;Q<J;){for($=H.length;$--;H[$]*=T);for(H[0]+=R.indexOf(O.charAt(Q++)),V=0;V<H.length;V++)H[V]>I-1&&(H[V+1]==null&&(H[V+1]=0),H[V+1]+=H[V]/I|0,H[V]%=I)}return H.reverse()}return function(O,T,I,R,V){var H,$,Q,J,ot,gt,vt,bt,Vt=O.indexOf("."),Wt=y,Ut=A;for(Vt>=0&&(J=lt,lt=0,O=O.replace(".",""),bt=new z(T),gt=bt.pow(O.length-Vt),lt=J,bt.c=S(p(Ie(gt.c),gt.e,"0"),10,I,w),bt.e=bt.c.length),vt=S(O,T,I,V?(H=At,w):(H=w,At)),Q=J=vt.length;vt[--J]==0;vt.pop());if(!vt[0])return H.charAt(0);if(Vt<0?--Q:(gt.c=vt,gt.e=Q,gt.s=R,gt=s(gt,bt,Wt,Ut,I),vt=gt.c,ot=gt.r,Q=gt.e),$=Q+Wt+1,Vt=vt[$],J=I/2,ot=ot||$<0||vt[$+1]!=null,ot=Ut<4?(Vt!=null||ot)&&(Ut==0||Ut==(gt.s<0?3:2)):Vt>J||Vt==J&&(Ut==4||ot||Ut==6&&vt[$-1]&1||Ut==(gt.s<0?8:7)),$<1||!vt[0])O=ot?p(H.charAt(1),-Wt,H.charAt(0)):H.charAt(0);else{if(vt.length=$,ot)for(--I;++vt[--$]>I;)vt[$]=0,$||(++Q,vt=[1].concat(vt));for(J=vt.length;!vt[--J];);for(Vt=0,O="";Vt<=J;O+=H.charAt(vt[Vt++]));O=p(O,Q,H.charAt(0))}return O}}(),s=function(){function w(T,I,R){var V,H,$,Q,J=0,ot=T.length,gt=I%li,vt=I/li|0;for(T=T.slice();ot--;)$=T[ot]%li,Q=T[ot]/li|0,V=vt*$+Q*gt,H=gt*$+V%li*li+J,J=(H/R|0)+(V/li|0)+vt*Q,T[ot]=H%R;return J&&(T=[J].concat(T)),T}function S(T,I,R,V){var H,$;if(R!=V)$=R>V?1:-1;else for(H=$=0;H<R;H++)if(T[H]!=I[H]){$=T[H]>I[H]?1:-1;break}return $}function O(T,I,R,V){for(var H=0;R--;)T[R]-=H,H=T[R]<I[R]?1:0,T[R]=H*V+T[R]-I[R];for(;!T[0]&&T.length>1;T.splice(0,1));}return function(T,I,R,V,H){var $,Q,J,ot,gt,vt,bt,Vt,Wt,Ut,Xt,Se,br,eh,ih,vi,ua,ti=T.s==I.s?1:-1,Re=T.c,oe=I.c;if(!Re||!Re[0]||!oe||!oe[0])return new z(!T.s||!I.s||(Re?oe&&Re[0]==oe[0]:!oe)?NaN:Re&&Re[0]==0||!oe?ti*0:ti/0);for(Vt=new z(ti),Wt=Vt.c=[],Q=T.e-I.e,ti=R+Q+1,H||(H=He,Q=Oe(T.e/kt)-Oe(I.e/kt),ti=ti/kt|0),J=0;oe[J]==(Re[J]||0);J++);if(oe[J]>(Re[J]||0)&&Q--,ti<0)Wt.push(1),ot=!0;else{for(eh=Re.length,vi=oe.length,J=0,ti+=2,gt=me(H/(oe[0]+1)),gt>1&&(oe=w(oe,gt,H),Re=w(Re,gt,H),vi=oe.length,eh=Re.length),br=vi,Ut=Re.slice(0,vi),Xt=Ut.length;Xt<vi;Ut[Xt++]=0);ua=oe.slice(),ua=[0].concat(ua),ih=oe[0],oe[1]>=H/2&&ih++;do{if(gt=0,$=S(oe,Ut,vi,Xt),$<0){if(Se=Ut[0],vi!=Xt&&(Se=Se*H+(Ut[1]||0)),gt=me(Se/ih),gt>1)for(gt>=H&&(gt=H-1),vt=w(oe,gt,H),bt=vt.length,Xt=Ut.length;S(vt,Ut,bt,Xt)==1;)gt--,O(vt,vi<bt?ua:oe,bt,H),bt=vt.length,$=1;else gt==0&&($=gt=1),vt=oe.slice(),bt=vt.length;if(bt<Xt&&(vt=[0].concat(vt)),O(Ut,vt,Xt,H),Xt=Ut.length,$==-1)for(;S(oe,Ut,vi,Xt)<1;)gt++,O(Ut,vi<Xt?ua:oe,Xt,H),Xt=Ut.length}else $===0&&(gt++,Ut=[0]);Wt[J++]=gt,Ut[0]?Ut[Xt++]=Re[br]||0:(Ut=[Re[br]],Xt=1)}while((br++<eh||Ut[0]!=null)&&ti--);ot=Ut[0]!=null,Wt[0]||Wt.splice(0,1)}if(H==He){for(J=1,ti=Wt[0];ti>=10;ti/=10,J++);X(Vt,R+(Vt.e=J+Q*kt-1)+1,V,ot)}else Vt.e=Q,Vt.r=+ot;return Vt}}();function q(w,S,O,T){var I,R,V,H,$;if(O==null?O=A:t(O,0,8),!w.c)return w.toString();if(I=w.c[0],V=w.e,S==null)$=Ie(w.c),$=T==1||T==2&&(V<=x||V>=P)?l($,V):p($,V,"0");else if(w=X(new z(w),S,O),R=w.e,$=Ie(w.c),H=$.length,T==1||T==2&&(S<=R||R<=x)){for(;H<S;$+="0",H++);$=l($,R)}else if(S-=V,$=p($,R,"0"),R+1>H){if(--S>0)for($+=".";S--;$+="0");}else if(S+=R-H,S>0)for(R+1==H&&($+=".");S--;$+="0");return w.s<0&&I?"-"+$:$}function K(w,S){for(var O,T,I=1,R=new z(w[0]);I<w.length;I++)T=new z(w[I]),(!T.s||(O=Ti(R,T))===S||O===0&&R.s===S)&&(R=T);return R}function nt(w,S,O){for(var T=1,I=S.length;!S[--I];S.pop());for(I=S[0];I>=10;I/=10,T++);return(O=T+O*kt-1)>F?w.c=w.e=null:O<N?w.c=[w.e=0]:(w.e=O,w.c=S),w}h=function(){var w=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,O=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(R,V,H,$){var Q,J=H?V:V.replace(I,"");if(T.test(J))R.s=isNaN(J)?null:J<0?-1:1;else{if(!H&&(J=J.replace(w,function(ot,gt,vt){return Q=(vt=vt.toLowerCase())=="x"?16:vt=="b"?2:8,!$||$==Q?gt:ot}),$&&(Q=$,J=J.replace(S,"$1").replace(O,"0.$1")),V!=J))return new z(J,Q);if(z.DEBUG)throw Error(Me+"Not a"+($?" base "+$:"")+" number: "+V);R.s=null}R.c=R.e=null}}();function X(w,S,O,T){var I,R,V,H,$,Q,J,ot=w.c,gt=ss;if(ot){t:{for(I=1,H=ot[0];H>=10;H/=10,I++);if(R=S-I,R<0)R+=kt,V=S,$=ot[Q=0],J=me($/gt[I-V-1]%10);else if(Q=Wi((R+1)/kt),Q>=ot.length)if(T){for(;ot.length<=Q;ot.push(0));$=J=0,I=1,R%=kt,V=R-kt+1}else break t;else{for($=H=ot[Q],I=1;H>=10;H/=10,I++);R%=kt,V=R-kt+I,J=V<0?0:me($/gt[I-V-1]%10)}if(T=T||S<0||ot[Q+1]!=null||(V<0?$:$%gt[I-V-1]),T=O<4?(J||T)&&(O==0||O==(w.s<0?3:2)):J>5||J==5&&(O==4||T||O==6&&(R>0?V>0?$/gt[I-V]:0:ot[Q-1])%10&1||O==(w.s<0?8:7)),S<1||!ot[0])return ot.length=0,T?(S-=w.e+1,ot[0]=gt[(kt-S%kt)%kt],w.e=-S||0):ot[0]=w.e=0,w;if(R==0?(ot.length=Q,H=1,Q--):(ot.length=Q+1,H=gt[kt-R],ot[Q]=V>0?me($/gt[I-V]%gt[V])*H:0),T)for(;;)if(Q==0){for(R=1,V=ot[0];V>=10;V/=10,R++);for(V=ot[0]+=H,H=1;V>=10;V/=10,H++);R!=H&&(w.e++,ot[0]==He&&(ot[0]=1));break}else{if(ot[Q]+=H,ot[Q]!=He)break;ot[Q--]=0,H=1}for(R=ot.length;ot[--R]===0;ot.pop());}w.e>F?w.c=w.e=null:w.e<N&&(w.c=[w.e=0])}return w}function et(w){var S,O=w.e;return O===null?w.toString():(S=Ie(w.c),S=O<=x||O>=P?l(S,O):p(S,O,"0"),w.s<0?"-"+S:S)}return c.absoluteValue=c.abs=function(){var w=new z(this);return w.s<0&&(w.s=1),w},c.comparedTo=function(w,S){return Ti(this,new z(w,S))},c.decimalPlaces=c.dp=function(w,S){var O,T,I,R=this;if(w!=null)return t(w,0,le),S==null?S=A:t(S,0,8),X(new z(R),w+R.e+1,S);if(!(O=R.c))return null;if(T=((I=O.length-1)-Oe(this.e/kt))*kt,I=O[I])for(;I%10==0;I/=10,T--);return T<0&&(T=0),T},c.dividedBy=c.div=function(w,S){return s(this,new z(w,S),y,A)},c.dividedToIntegerBy=c.idiv=function(w,S){return s(this,new z(w,S),0,1)},c.exponentiatedBy=c.pow=function(w,S){var O,T,I,R,V,H,$,Q,J,ot=this;if(w=new z(w),w.c&&!w.isInteger())throw Error(Me+"Exponent not an integer: "+et(w));if(S!=null&&(S=new z(S)),H=w.e>14,!ot.c||!ot.c[0]||ot.c[0]==1&&!ot.e&&ot.c.length==1||!w.c||!w.c[0])return J=new z(Math.pow(+et(ot),H?w.s*(2-a(w)):+et(w))),S?J.mod(S):J;if($=w.s<0,S){if(S.c?!S.c[0]:!S.s)return new z(NaN);T=!$&&ot.isInteger()&&S.isInteger(),T&&(ot=ot.mod(S))}else{if(w.e>9&&(ot.e>0||ot.e<-1||(ot.e==0?ot.c[0]>1||H&&ot.c[1]>=24e7:ot.c[0]<8e13||H&&ot.c[0]<=9999975e7)))return R=ot.s<0&&a(w)?-0:0,ot.e>-1&&(R=1/R),new z($?1/R:R);lt&&(R=Wi(lt/kt+2))}for(H?(O=new z(.5),$&&(w.s=1),Q=a(w)):(I=Math.abs(+et(w)),Q=I%2),J=new z(_);;){if(Q){if(J=J.times(ot),!J.c)break;R?J.c.length>R&&(J.c.length=R):T&&(J=J.mod(S))}if(I){if(I=me(I/2),I===0)break;Q=I%2}else if(w=w.times(O),X(w,w.e+1,1),w.e>14)Q=a(w);else{if(I=+et(w),I===0)break;Q=I%2}ot=ot.times(ot),R?ot.c&&ot.c.length>R&&(ot.c.length=R):T&&(ot=ot.mod(S))}return T?J:($&&(J=_.div(J)),S?J.mod(S):R?X(J,lt,A,V):J)},c.integerValue=function(w){var S=new z(this);return w==null?w=A:t(w,0,8),X(S,S.e+1,w)},c.isEqualTo=c.eq=function(w,S){return Ti(this,new z(w,S))===0},c.isFinite=function(){return!!this.c},c.isGreaterThan=c.gt=function(w,S){return Ti(this,new z(w,S))>0},c.isGreaterThanOrEqualTo=c.gte=function(w,S){return(S=Ti(this,new z(w,S)))===1||S===0},c.isInteger=function(){return!!this.c&&Oe(this.e/kt)>this.c.length-2},c.isLessThan=c.lt=function(w,S){return Ti(this,new z(w,S))<0},c.isLessThanOrEqualTo=c.lte=function(w,S){return(S=Ti(this,new z(w,S)))===-1||S===0},c.isNaN=function(){return!this.s},c.isNegative=function(){return this.s<0},c.isPositive=function(){return this.s>0},c.isZero=function(){return!!this.c&&this.c[0]==0},c.minus=function(w,S){var O,T,I,R,V=this,H=V.s;if(w=new z(w,S),S=w.s,!H||!S)return new z(NaN);if(H!=S)return w.s=-S,V.plus(w);var $=V.e/kt,Q=w.e/kt,J=V.c,ot=w.c;if(!$||!Q){if(!J||!ot)return J?(w.s=-S,w):new z(ot?V:NaN);if(!J[0]||!ot[0])return ot[0]?(w.s=-S,w):new z(J[0]?V:A==3?-0:0)}if($=Oe($),Q=Oe(Q),J=J.slice(),H=$-Q){for((R=H<0)?(H=-H,I=J):(Q=$,I=ot),I.reverse(),S=H;S--;I.push(0));I.reverse()}else for(T=(R=(H=J.length)<(S=ot.length))?H:S,H=S=0;S<T;S++)if(J[S]!=ot[S]){R=J[S]<ot[S];break}if(R&&(I=J,J=ot,ot=I,w.s=-w.s),S=(T=ot.length)-(O=J.length),S>0)for(;S--;J[O++]=0);for(S=He-1;T>H;){if(J[--T]<ot[T]){for(O=T;O&&!J[--O];J[O]=S);--J[O],J[T]+=He}J[T]-=ot[T]}for(;J[0]==0;J.splice(0,1),--Q);return J[0]?nt(w,J,Q):(w.s=A==3?-1:1,w.c=[w.e=0],w)},c.modulo=c.mod=function(w,S){var O,T,I=this;return w=new z(w,S),!I.c||!w.s||w.c&&!w.c[0]?new z(NaN):!w.c||I.c&&!I.c[0]?new z(I):(it==9?(T=w.s,w.s=1,O=s(I,w,0,3),w.s=T,O.s*=T):O=s(I,w,0,it),w=I.minus(O.times(w)),!w.c[0]&&it==1&&(w.s=I.s),w)},c.multipliedBy=c.times=function(w,S){var O,T,I,R,V,H,$,Q,J,ot,gt,vt,bt,Vt,Wt,Ut=this,Xt=Ut.c,Se=(w=new z(w,S)).c;if(!Xt||!Se||!Xt[0]||!Se[0])return!Ut.s||!w.s||Xt&&!Xt[0]&&!Se||Se&&!Se[0]&&!Xt?w.c=w.e=w.s=null:(w.s*=Ut.s,!Xt||!Se?w.c=w.e=null:(w.c=[0],w.e=0)),w;for(T=Oe(Ut.e/kt)+Oe(w.e/kt),w.s*=Ut.s,$=Xt.length,ot=Se.length,$<ot&&(bt=Xt,Xt=Se,Se=bt,I=$,$=ot,ot=I),I=$+ot,bt=[];I--;bt.push(0));for(Vt=He,Wt=li,I=ot;--I>=0;){for(O=0,gt=Se[I]%Wt,vt=Se[I]/Wt|0,V=$,R=I+V;R>I;)Q=Xt[--V]%Wt,J=Xt[V]/Wt|0,H=vt*Q+J*gt,Q=gt*Q+H%Wt*Wt+bt[R]+O,O=(Q/Vt|0)+(H/Wt|0)+vt*J,bt[R--]=Q%Vt;bt[R]=O}return O?++T:bt.splice(0,1),nt(w,bt,T)},c.negated=function(){var w=new z(this);return w.s=-w.s||null,w},c.plus=function(w,S){var O,T=this,I=T.s;if(w=new z(w,S),S=w.s,!I||!S)return new z(NaN);if(I!=S)return w.s=-S,T.minus(w);var R=T.e/kt,V=w.e/kt,H=T.c,$=w.c;if(!R||!V){if(!H||!$)return new z(I/0);if(!H[0]||!$[0])return $[0]?w:new z(H[0]?T:I*0)}if(R=Oe(R),V=Oe(V),H=H.slice(),I=R-V){for(I>0?(V=R,O=$):(I=-I,O=H),O.reverse();I--;O.push(0));O.reverse()}for(I=H.length,S=$.length,I-S<0&&(O=$,$=H,H=O,S=I),I=0;S;)I=(H[--S]=H[S]+$[S]+I)/He|0,H[S]=He===H[S]?0:H[S]%He;return I&&(H=[I].concat(H),++V),nt(w,H,V)},c.precision=c.sd=function(w,S){var O,T,I,R=this;if(w!=null&&w!==!!w)return t(w,1,le),S==null?S=A:t(S,0,8),X(new z(R),w,S);if(!(O=R.c))return null;if(I=O.length-1,T=I*kt+1,I=O[I]){for(;I%10==0;I/=10,T--);for(I=O[0];I>=10;I/=10,T++);}return w&&R.e+1>T&&(T=R.e+1),T},c.shiftedBy=function(w){return t(w,-ns,ns),this.times("1e"+w)},c.squareRoot=c.sqrt=function(){var w,S,O,T,I,R=this,V=R.c,H=R.s,$=R.e,Q=y+4,J=new z("0.5");if(H!==1||!V||!V[0])return new z(!H||H<0&&(!V||V[0])?NaN:V?R:1/0);if(H=Math.sqrt(+et(R)),H==0||H==1/0?(S=Ie(V),(S.length+$)%2==0&&(S+="0"),H=Math.sqrt(+S),$=Oe(($+1)/2)-($<0||$%2),H==1/0?S="5e"+$:(S=H.toExponential(),S=S.slice(0,S.indexOf("e")+1)+$),O=new z(S)):O=new z(H+""),O.c[0]){for($=O.e,H=$+Q,H<3&&(H=0);;)if(I=O,O=J.times(I.plus(s(R,I,Q,1))),Ie(I.c).slice(0,H)===(S=Ie(O.c)).slice(0,H))if(O.e<$&&--H,S=S.slice(H-3,H+1),S=="9999"||!T&&S=="4999"){if(!T&&(X(I,I.e+y+2,0),I.times(I).eq(R))){O=I;break}Q+=4,H+=4,T=1}else{(!+S||!+S.slice(1)&&S.charAt(0)=="5")&&(X(O,O.e+y+2,1),w=!O.times(O).eq(R));break}}return X(O,O.e+y+1,A,w)},c.toExponential=function(w,S){return w!=null&&(t(w,0,le),w++),q(this,w,S,1)},c.toFixed=function(w,S){return w!=null&&(t(w,0,le),w=w+this.e+1),q(this,w,S)},c.toFormat=function(w,S,O){var T,I=this;if(O==null)w!=null&&S&&typeof S=="object"?(O=S,S=null):w&&typeof w=="object"?(O=w,w=S=null):O=ft;else if(typeof O!="object")throw Error(Me+"Argument not an object: "+O);if(T=I.toFixed(w,S),I.c){var R,V=T.split("."),H=+O.groupSize,$=+O.secondaryGroupSize,Q=O.groupSeparator||"",J=V[0],ot=V[1],gt=I.s<0,vt=gt?J.slice(1):J,bt=vt.length;if($&&(R=H,H=$,$=R,bt-=R),H>0&&bt>0){for(R=bt%H||H,J=vt.substr(0,R);R<bt;R+=H)J+=Q+vt.substr(R,H);$>0&&(J+=Q+vt.slice(R)),gt&&(J="-"+J)}T=ot?J+(O.decimalSeparator||"")+(($=+O.fractionGroupSize)?ot.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(O.fractionGroupSeparator||"")):ot):J}return(O.prefix||"")+T+(O.suffix||"")},c.toFraction=function(w){var S,O,T,I,R,V,H,$,Q,J,ot,gt,vt=this,bt=vt.c;if(w!=null&&(H=new z(w),!H.isInteger()&&(H.c||H.s!==1)||H.lt(_)))throw Error(Me+"Argument "+(H.isInteger()?"out of range: ":"not an integer: ")+et(H));if(!bt)return new z(vt);for(S=new z(_),Q=O=new z(_),T=$=new z(_),gt=Ie(bt),R=S.e=gt.length-vt.e-1,S.c[0]=ss[(V=R%kt)<0?kt+V:V],w=!w||H.comparedTo(S)>0?R>0?S:Q:H,V=F,F=1/0,H=new z(gt),$.c[0]=0;J=s(H,S,0,1),I=O.plus(J.times(T)),I.comparedTo(w)!=1;)O=T,T=I,Q=$.plus(J.times(I=Q)),$=I,S=H.minus(J.times(I=S)),H=I;return I=s(w.minus(O),T,0,1),$=$.plus(I.times(Q)),O=O.plus(I.times(T)),$.s=Q.s=vt.s,R=R*2,ot=s(Q,T,R,A).minus(vt).abs().comparedTo(s($,O,R,A).minus(vt).abs())<1?[Q,T]:[$,O],F=V,ot},c.toNumber=function(){return+et(this)},c.toPrecision=function(w,S){return w!=null&&t(w,1,le),q(this,w,S,2)},c.toString=function(w){var S,O=this,T=O.s,I=O.e;return I===null?T?(S="Infinity",T<0&&(S="-"+S)):S="NaN":(w==null?S=I<=x||I>=P?l(Ie(O.c),I):p(Ie(O.c),I,"0"):w===10&&Gt?(O=X(new z(O),y+I+1,A),S=p(Ie(O.c),O.e,"0")):(t(w,2,At.length,"Base"),S=o(p(Ie(O.c),I,"0"),10,w,T,!0)),T<0&&O.c[0]&&(S="-"+S)),S},c.valueOf=c.toJSON=function(){return et(this)},c._isBigNumber=!0,c[Symbol.toStringTag]="BigNumber",c[Symbol.for("nodejs.util.inspect.custom")]=c.valueOf,i!=null&&z.set(i),z}function Oe(i){var s=i|0;return i>0||i===s?s:s-1}function Ie(i){for(var s,o,h=1,c=i.length,_=i[0]+"";h<c;){for(s=i[h++]+"",o=kt-s.length;o--;s="0"+s);_+=s}for(c=_.length;_.charCodeAt(--c)===48;);return _.slice(0,c+1||1)}function Ti(i,s){var o,h,c=i.c,_=s.c,y=i.s,A=s.s,x=i.e,P=s.e;if(!y||!A)return null;if(o=c&&!c[0],h=_&&!_[0],o||h)return o?h?0:-A:y;if(y!=A)return y;if(o=y<0,h=x==P,!c||!_)return h?0:!c^o?1:-1;if(!h)return x>P^o?1:-1;for(A=(x=c.length)<(P=_.length)?x:P,y=0;y<A;y++)if(c[y]!=_[y])return c[y]>_[y]^o?1:-1;return x==P?0:x>P^o?1:-1}function t(i,s,o,h){if(i<s||i>o||i!==me(i))throw Error(Me+(h||"Argument")+(typeof i=="number"?i<s||i>o?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function a(i){var s=i.c.length-1;return Oe(i.e/kt)==s&&i.c[s]%2!=0}function l(i,s){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(s<0?"e":"e+")+s}function p(i,s,o){var h,c;if(s<0){for(c=o+".";++s;c+=o);i=c+i}else if(h=i.length,++s>h){for(c=o,s-=h;--s;c+=o);i+=c}else s<h&&(i=i.slice(0,s)+"."+i.slice(s));return i}var v=gr(),k=v,Z=class{constructor(i){Lt(this,"key");Lt(this,"left",null);Lt(this,"right",null);this.key=i}},Y=class extends Z{constructor(i){super(i)}},st=class{constructor(){Lt(this,"size",0);Lt(this,"modificationCount",0);Lt(this,"splayCount",0)}splay(i){let s=this.root;if(s==null)return this.compare(i,i),-1;let o=null,h=null,c=null,_=null,y=s,A=this.compare,x;for(;;)if(x=A(y.key,i),x>0){let P=y.left;if(P==null||(x=A(P.key,i),x>0&&(y.left=P.right,P.right=y,y=P,P=y.left,P==null)))break;o==null?h=y:o.left=y,o=y,y=P}else if(x<0){let P=y.right;if(P==null||(x=A(P.key,i),x<0&&(y.right=P.left,P.left=y,y=P,P=y.right,P==null)))break;c==null?_=y:c.right=y,c=y,y=P}else break;return c!=null&&(c.right=y.left,y.left=_),o!=null&&(o.left=y.right,y.right=h),this.root!==y&&(this.root=y,this.splayCount++),x}splayMin(i){let s=i,o=s.left;for(;o!=null;){let h=o;s.left=h.right,h.right=s,s=h,o=s.left}return s}splayMax(i){let s=i,o=s.right;for(;o!=null;){let h=o;s.right=h.left,h.left=s,s=h,o=s.right}return s}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let s=this.root,o=s,h=s.left;if(this.size--,h==null)this.root=s.right;else{let c=s.right;s=this.splayMax(h),s.right=c,this.root=s}return this.modificationCount++,o}addNewRoot(i,s){this.size++,this.modificationCount++;let o=this.root;if(o==null){this.root=i;return}s<0?(i.left=o,i.right=o.right,o.right=null):(i.right=o,i.left=o.left,o.left=null),this.root=i}_first(){let i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){let i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,s)=>i<s?-1:i>s?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},ht=class ca extends st{constructor(o,h){super();Lt(this,"root",null);Lt(this,"compare");Lt(this,"validKey");Lt(this,dl,"[object Set]");this.compare=o??this.defaultCompare(),this.validKey=h??(c=>c!=null&&c!=null)}delete(o){return this.validKey(o)?this._delete(o)!=null:!1}deleteAll(o){for(let h of o)this.delete(h)}forEach(o){let h=this[Symbol.iterator](),c;for(;c=h.next(),!c.done;)o(c.value,c.value,this)}add(o){let h=this.splay(o);return h!=0&&this.addNewRoot(new Y(o),h),this}addAndReturn(o){let h=this.splay(o);return h!=0&&this.addNewRoot(new Y(o),h),this.root.key}addAll(o){for(let h of o)this.add(h)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(o){if(o==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(o)<0)return this.root.key;let h=this.root.left;if(h==null)return null;let c=h.right;for(;c!=null;)h=c,c=h.right;return h.key}firstAfter(o){if(o==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(o)>0)return this.root.key;let h=this.root.right;if(h==null)return null;let c=h.left;for(;c!=null;)h=c,c=h.left;return h.key}retainAll(o){let h=new ca(this.compare,this.validKey),c=this.modificationCount;for(let _ of o){if(c!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(_)&&this.splay(_)==0&&h.add(this.root.key)}h.size!=this.size&&(this.root=h.root,this.size=h.size,this.modificationCount++)}lookup(o){return!this.validKey(o)||this.splay(o)!=0?null:this.root.key}intersection(o){let h=new ca(this.compare,this.validKey);for(let c of this)o.has(c)&&h.add(c);return h}difference(o){let h=new ca(this.compare,this.validKey);for(let c of this)o.has(c)||h.add(c);return h}union(o){let h=this.clone();return h.addAll(o),h}clone(){let o=new ca(this.compare,this.validKey);return o.size=this.size,o.root=this.copyNode(this.root),o}copyNode(o){if(o==null)return null;function h(_,y){let A,x;do{if(A=_.left,x=_.right,A!=null){let P=new Y(A.key);y.left=P,h(A,P)}if(x!=null){let P=new Y(x.key);y.right=P,_=x,y=P}}while(x!=null)}let c=new Y(o.key);return h(o,c),c}toSet(){return this.clone()}entries(){return new Ot(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(fl=Symbol.iterator,dl=Symbol.toStringTag,fl)](){return new wt(this.wrap())}},pt=class{constructor(i){Lt(this,"tree");Lt(this,"path",new Array);Lt(this,"modificationCount",null);Lt(this,"splayCount");this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let o=this.tree.getRoot();for(;o!=null;)this.path.push(o),o=o.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],s=i.right;if(s!=null){for(;s!=null;)this.path.push(s),s=s.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},wt=class extends pt{getValue(i){return i.key}},Ot=class extends pt{getValue(i){return[i.key,i.key]}},xe=i=>i,ue=i=>{if(i){let s=new ht(is(i)),o=new ht(is(i)),h=(_,y)=>y.addAndReturn(_),c=_=>({x:h(_.x,s),y:h(_.y,o)});return c({x:new k(0),y:new k(0)}),c}return xe},ke=i=>({set:s=>{ee=ke(s)},reset:()=>ke(i),compare:is(i),snap:ue(i),orient:mn(i)}),ee=ke(),Je=(i,s)=>i.ll.x.isLessThanOrEqualTo(s.x)&&s.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(s.y)&&s.y.isLessThanOrEqualTo(i.ur.y),oa=(i,s)=>{if(s.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(s.ll.x)||s.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(s.ll.y))return null;let o=i.ll.x.isLessThan(s.ll.x)?s.ll.x:i.ll.x,h=i.ur.x.isLessThan(s.ur.x)?i.ur.x:s.ur.x,c=i.ll.y.isLessThan(s.ll.y)?s.ll.y:i.ll.y,_=i.ur.y.isLessThan(s.ur.y)?i.ur.y:s.ur.y;return{ll:{x:o,y:c},ur:{x:h,y:_}}},as=(i,s)=>i.x.times(s.y).minus(i.y.times(s.x)),yr=(i,s)=>i.x.times(s.x).plus(i.y.times(s.y)),gn=i=>yr(i,i).sqrt(),Xo=(i,s,o)=>{let h={x:s.x.minus(i.x),y:s.y.minus(i.y)},c={x:o.x.minus(i.x),y:o.y.minus(i.y)};return as(c,h).div(gn(c)).div(gn(h))},Ar=(i,s,o)=>{let h={x:s.x.minus(i.x),y:s.y.minus(i.y)},c={x:o.x.minus(i.x),y:o.y.minus(i.y)};return yr(c,h).div(gn(c)).div(gn(h))},se=(i,s,o)=>s.y.isZero()?null:{x:i.x.plus(s.x.div(s.y).times(o.minus(i.y))),y:o},yn=(i,s,o)=>s.x.isZero()?null:{x:o,y:i.y.plus(s.y.div(s.x).times(o.minus(i.x)))},Yo=(i,s,o,h)=>{if(s.x.isZero())return yn(o,h,i.x);if(h.x.isZero())return yn(i,s,o.x);if(s.y.isZero())return se(o,h,i.y);if(h.y.isZero())return se(i,s,o.y);let c=as(s,h);if(c.isZero())return null;let _={x:o.x.minus(i.x),y:o.y.minus(i.y)},y=as(_,s).div(c),A=as(_,h).div(c),x=i.x.plus(A.times(s.x)),P=o.x.plus(y.times(h.x)),N=i.y.plus(A.times(s.y)),F=o.y.plus(y.times(h.y)),tt=x.plus(P).div(2),it=N.plus(F).div(2);return{x:tt,y:it}},Qe=class pl{constructor(s,o){Lt(this,"point");Lt(this,"isLeft");Lt(this,"segment");Lt(this,"otherSE");Lt(this,"consumedBy");s.events===void 0?s.events=[this]:s.events.push(this),this.point=s,this.isLeft=o}static compare(s,o){let h=pl.comparePoints(s.point,o.point);return h!==0?h:(s.point!==o.point&&s.link(o),s.isLeft!==o.isLeft?s.isLeft?1:-1:Xi.compare(s.segment,o.segment))}static comparePoints(s,o){return s.x.isLessThan(o.x)?-1:s.x.isGreaterThan(o.x)?1:s.y.isLessThan(o.y)?-1:s.y.isGreaterThan(o.y)?1:0}link(s){if(s.point===this.point)throw new Error("Tried to link already linked events");let o=s.point.events;for(let h=0,c=o.length;h<c;h++){let _=o[h];this.point.events.push(_),_.point=this.point}this.checkForConsuming()}checkForConsuming(){let s=this.point.events.length;for(let o=0;o<s;o++){let h=this.point.events[o];if(h.segment.consumedBy===void 0)for(let c=o+1;c<s;c++){let _=this.point.events[c];_.consumedBy===void 0&&h.otherSE.point.events===_.otherSE.point.events&&h.segment.consume(_.segment)}}}getAvailableLinkedEvents(){let s=[];for(let o=0,h=this.point.events.length;o<h;o++){let c=this.point.events[o];c!==this&&!c.segment.ringOut&&c.segment.isInResult()&&s.push(c)}return s}getLeftmostComparator(s){let o=new Map,h=c=>{let _=c.otherSE;o.set(c,{sine:Xo(this.point,s.point,_.point),cosine:Ar(this.point,s.point,_.point)})};return(c,_)=>{o.has(c)||h(c),o.has(_)||h(_);let{sine:y,cosine:A}=o.get(c),{sine:x,cosine:P}=o.get(_);return y.isGreaterThanOrEqualTo(0)&&x.isGreaterThanOrEqualTo(0)?A.isLessThan(P)?1:A.isGreaterThan(P)?-1:0:y.isLessThan(0)&&x.isLessThan(0)?A.isLessThan(P)?-1:A.isGreaterThan(P)?1:0:x.isLessThan(y)?-1:x.isGreaterThan(y)?1:0}}},Jo=0,Xi=class wr{constructor(s,o,h,c){Lt(this,"id");Lt(this,"leftSE");Lt(this,"rightSE");Lt(this,"rings");Lt(this,"windings");Lt(this,"ringOut");Lt(this,"consumedBy");Lt(this,"prev");Lt(this,"_prevInResult");Lt(this,"_beforeState");Lt(this,"_afterState");Lt(this,"_isInResult");this.id=++Jo,this.leftSE=s,s.segment=this,s.otherSE=o,this.rightSE=o,o.segment=this,o.otherSE=s,this.rings=h,this.windings=c}static compare(s,o){let h=s.leftSE.point.x,c=o.leftSE.point.x,_=s.rightSE.point.x,y=o.rightSE.point.x;if(y.isLessThan(h))return 1;if(_.isLessThan(c))return-1;let A=s.leftSE.point.y,x=o.leftSE.point.y,P=s.rightSE.point.y,N=o.rightSE.point.y;if(h.isLessThan(c)){if(x.isLessThan(A)&&x.isLessThan(P))return 1;if(x.isGreaterThan(A)&&x.isGreaterThan(P))return-1;let F=s.comparePoint(o.leftSE.point);if(F<0)return 1;if(F>0)return-1;let tt=o.comparePoint(s.rightSE.point);return tt!==0?tt:-1}if(h.isGreaterThan(c)){if(A.isLessThan(x)&&A.isLessThan(N))return-1;if(A.isGreaterThan(x)&&A.isGreaterThan(N))return 1;let F=o.comparePoint(s.leftSE.point);if(F!==0)return F;let tt=s.comparePoint(o.rightSE.point);return tt<0?1:tt>0?-1:1}if(A.isLessThan(x))return-1;if(A.isGreaterThan(x))return 1;if(_.isLessThan(y)){let F=o.comparePoint(s.rightSE.point);if(F!==0)return F}if(_.isGreaterThan(y)){let F=s.comparePoint(o.rightSE.point);if(F<0)return 1;if(F>0)return-1}if(!_.eq(y)){let F=P.minus(A),tt=_.minus(h),it=N.minus(x),lt=y.minus(c);if(F.isGreaterThan(tt)&&it.isLessThan(lt))return 1;if(F.isLessThan(tt)&&it.isGreaterThan(lt))return-1}return _.isGreaterThan(y)?1:_.isLessThan(y)||P.isLessThan(N)?-1:P.isGreaterThan(N)?1:s.id<o.id?-1:s.id>o.id?1:0}static fromRing(s,o,h){let c,_,y,A=Qe.comparePoints(s,o);if(A<0)c=s,_=o,y=1;else if(A>0)c=o,_=s,y=-1;else throw new Error(`Tried to create degenerate segment at [${s.x}, ${s.y}]`);let x=new Qe(c,!0),P=new Qe(_,!1);return new wr(x,P,[h],[y])}replaceRightSE(s){this.rightSE=s,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let s=this.leftSE.point.y,o=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:s.isLessThan(o)?s:o},ur:{x:this.rightSE.point.x,y:s.isGreaterThan(o)?s:o}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(s){return s.x.eq(this.leftSE.point.x)&&s.y.eq(this.leftSE.point.y)||s.x.eq(this.rightSE.point.x)&&s.y.eq(this.rightSE.point.y)}comparePoint(s){return ee.orient(this.leftSE.point,s,this.rightSE.point)}getIntersection(s){let o=this.bbox(),h=s.bbox(),c=oa(o,h);if(c===null)return null;let _=this.leftSE.point,y=this.rightSE.point,A=s.leftSE.point,x=s.rightSE.point,P=Je(o,A)&&this.comparePoint(A)===0,N=Je(h,_)&&s.comparePoint(_)===0,F=Je(o,x)&&this.comparePoint(x)===0,tt=Je(h,y)&&s.comparePoint(y)===0;if(N&&P)return tt&&!F?y:!tt&&F?x:null;if(N)return F&&_.x.eq(x.x)&&_.y.eq(x.y)?null:_;if(P)return tt&&y.x.eq(A.x)&&y.y.eq(A.y)?null:A;if(tt&&F)return null;if(tt)return y;if(F)return x;let it=Yo(_,this.vector(),A,s.vector());return it===null||!Je(c,it)?null:ee.snap(it)}split(s){let o=[],h=s.events!==void 0,c=new Qe(s,!0),_=new Qe(s,!1),y=this.rightSE;this.replaceRightSE(_),o.push(_),o.push(c);let A=new wr(c,y,this.rings.slice(),this.windings.slice());return Qe.comparePoints(A.leftSE.point,A.rightSE.point)>0&&A.swapEvents(),Qe.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),h&&(c.checkForConsuming(),_.checkForConsuming()),o}swapEvents(){let s=this.rightSE;this.rightSE=this.leftSE,this.leftSE=s,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let o=0,h=this.windings.length;o<h;o++)this.windings[o]*=-1}consume(s){let o=this,h=s;for(;o.consumedBy;)o=o.consumedBy;for(;h.consumedBy;)h=h.consumedBy;let c=wr.compare(o,h);if(c!==0){if(c>0){let _=o;o=h,h=_}if(o.prev===h){let _=o;o=h,h=_}for(let _=0,y=h.rings.length;_<y;_++){let A=h.rings[_],x=h.windings[_],P=o.rings.indexOf(A);P===-1?(o.rings.push(A),o.windings.push(x)):o.windings[P]+=x}h.rings=null,h.windings=null,h.consumedBy=o,h.leftSE.consumedBy=o.leftSE,h.rightSE.consumedBy=o.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let s=this.prev.consumedBy||this.prev;this._beforeState=s.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let s=this.beforeState();this._afterState={rings:s.rings.slice(0),windings:s.windings.slice(0),multiPolys:[]};let o=this._afterState.rings,h=this._afterState.windings,c=this._afterState.multiPolys;for(let A=0,x=this.rings.length;A<x;A++){let P=this.rings[A],N=this.windings[A],F=o.indexOf(P);F===-1?(o.push(P),h.push(N)):h[F]+=N}let _=[],y=[];for(let A=0,x=o.length;A<x;A++){if(h[A]===0)continue;let P=o[A],N=P.poly;if(y.indexOf(N)===-1)if(P.isExterior)_.push(N);else{y.indexOf(N)===-1&&y.push(N);let F=_.indexOf(P.poly);F!==-1&&_.splice(F,1)}}for(let A=0,x=_.length;A<x;A++){let P=_[A].multiPoly;c.indexOf(P)===-1&&c.push(P)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let s=this.beforeState().multiPolys,o=this.afterState().multiPolys;switch(vr.type){case"union":{let h=s.length===0,c=o.length===0;this._isInResult=h!==c;break}case"intersection":{let h,c;s.length<o.length?(h=s.length,c=o.length):(h=o.length,c=s.length),this._isInResult=c===vr.numMultiPolys&&h<c;break}case"xor":{let h=Math.abs(s.length-o.length);this._isInResult=h%2===1;break}case"difference":{let h=c=>c.length===1&&c[0].isSubject;this._isInResult=h(s)!==h(o);break}}return this._isInResult}},ha=class{constructor(i,s,o){Lt(this,"poly");Lt(this,"isExterior");Lt(this,"segments");Lt(this,"bbox");if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=s,this.isExterior=o,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let h=ee.snap({x:new k(i[0][0]),y:new k(i[0][1])});this.bbox={ll:{x:h.x,y:h.y},ur:{x:h.x,y:h.y}};let c=h;for(let _=1,y=i.length;_<y;_++){if(typeof i[_][0]!="number"||typeof i[_][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let A=ee.snap({x:new k(i[_][0]),y:new k(i[_][1])});A.x.eq(c.x)&&A.y.eq(c.y)||(this.segments.push(Xi.fromRing(c,A,this)),A.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=A.x),A.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=A.y),A.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=A.x),A.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=A.y),c=A)}(!h.x.eq(c.x)||!h.y.eq(c.y))&&this.segments.push(Xi.fromRing(c,h,this))}getSweepEvents(){let i=[];for(let s=0,o=this.segments.length;s<o;s++){let h=this.segments[s];i.push(h.leftSE),i.push(h.rightSE)}return i}},Qo=class{constructor(i,s){Lt(this,"multiPoly");Lt(this,"exteriorRing");Lt(this,"interiorRings");Lt(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new ha(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let o=1,h=i.length;o<h;o++){let c=new ha(i[o],this,!1);c.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=c.bbox.ll.x),c.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=c.bbox.ll.y),c.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=c.bbox.ur.x),c.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=c.bbox.ur.y),this.interiorRings.push(c)}this.multiPoly=s}getSweepEvents(){let i=this.exteriorRing.getSweepEvents();for(let s=0,o=this.interiorRings.length;s<o;s++){let h=this.interiorRings[s].getSweepEvents();for(let c=0,_=h.length;c<_;c++)i.push(h[c])}return i}},al=class{constructor(i,s){Lt(this,"isSubject");Lt(this,"polys");Lt(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new k(Number.POSITIVE_INFINITY),y:new k(Number.POSITIVE_INFINITY)},ur:{x:new k(Number.NEGATIVE_INFINITY),y:new k(Number.NEGATIVE_INFINITY)}};for(let o=0,h=i.length;o<h;o++){let c=new Qo(i[o],this);c.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=c.bbox.ll.x),c.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=c.bbox.ll.y),c.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=c.bbox.ur.x),c.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=c.bbox.ur.y),this.polys.push(c)}this.isSubject=s}getSweepEvents(){let i=[];for(let s=0,o=this.polys.length;s<o;s++){let h=this.polys[s].getSweepEvents();for(let c=0,_=h.length;c<_;c++)i.push(h[c])}return i}},Ef=class nh{constructor(s){Lt(this,"events");Lt(this,"poly");Lt(this,"_isExteriorRing");Lt(this,"_enclosingRing");this.events=s;for(let o=0,h=s.length;o<h;o++)s[o].segment.ringOut=this;this.poly=null}static factory(s){let o=[];for(let h=0,c=s.length;h<c;h++){let _=s[h];if(!_.isInResult()||_.ringOut)continue;let y=null,A=_.leftSE,x=_.rightSE,P=[A],N=A.point,F=[];for(;y=A,A=x,P.push(A),A.point!==N;)for(;;){let tt=A.getAvailableLinkedEvents();if(tt.length===0){let ft=P[0].point,At=P[P.length-1].point;throw new Error(`Unable to complete output ring starting at [${ft.x}, ${ft.y}]. Last matching segment found ends at [${At.x}, ${At.y}].`)}if(tt.length===1){x=tt[0].otherSE;break}let it=null;for(let ft=0,At=F.length;ft<At;ft++)if(F[ft].point===A.point){it=ft;break}if(it!==null){let ft=F.splice(it)[0],At=P.splice(ft.index);At.unshift(At[0].otherSE),o.push(new nh(At.reverse()));continue}F.push({index:P.length,point:A.point});let lt=A.getLeftmostComparator(y);x=tt.sort(lt)[0].otherSE;break}o.push(new nh(P))}return o}getGeom(){let s=this.events[0].point,o=[s];for(let P=1,N=this.events.length-1;P<N;P++){let F=this.events[P].point,tt=this.events[P+1].point;ee.orient(F,s,tt)!==0&&(o.push(F),s=F)}if(o.length===1)return null;let h=o[0],c=o[1];ee.orient(h,s,c)===0&&o.shift(),o.push(o[0]);let _=this.isExteriorRing()?1:-1,y=this.isExteriorRing()?0:o.length-1,A=this.isExteriorRing()?o.length:-1,x=[];for(let P=y;P!=A;P+=_)x.push([o[P].x.toNumber(),o[P].y.toNumber()]);return x}isExteriorRing(){if(this._isExteriorRing===void 0){let s=this.enclosingRing();this._isExteriorRing=s?!s.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var c,_;let s=this.events[0];for(let y=1,A=this.events.length;y<A;y++){let x=this.events[y];Qe.compare(s,x)>0&&(s=x)}let o=s.segment.prevInResult(),h=o?o.prevInResult():null;for(;;){if(!o)return null;if(!h)return o.ringOut;if(h.ringOut!==o.ringOut)return((c=h.ringOut)==null?void 0:c.enclosingRing())!==o.ringOut?o.ringOut:(_=o.ringOut)==null?void 0:_.enclosingRing();o=h.prevInResult(),h=o?o.prevInResult():null}}},rl=class{constructor(i){Lt(this,"exteriorRing");Lt(this,"interiorRings");this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){let i=this.exteriorRing.getGeom();if(i===null)return null;let s=[i];for(let o=0,h=this.interiorRings.length;o<h;o++){let c=this.interiorRings[o].getGeom();c!==null&&s.push(c)}return s}},Pf=class{constructor(i){Lt(this,"rings");Lt(this,"polys");this.rings=i,this.polys=this._composePolys(i)}getGeom(){let i=[];for(let s=0,o=this.polys.length;s<o;s++){let h=this.polys[s].getGeom();h!==null&&i.push(h)}return i}_composePolys(i){var o;let s=[];for(let h=0,c=i.length;h<c;h++){let _=i[h];if(!_.poly)if(_.isExteriorRing())s.push(new rl(_));else{let y=_.enclosingRing();y!=null&&y.poly||s.push(new rl(y)),(o=y==null?void 0:y.poly)==null||o.addInterior(_)}}return s}},kf=class{constructor(i,s=Xi.compare){Lt(this,"queue");Lt(this,"tree");Lt(this,"segments");this.queue=i,this.tree=new ht(s),this.segments=[]}process(i){let s=i.segment,o=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(s),o;i.isLeft&&this.tree.add(s);let h=s,c=s;do h=this.tree.lastBefore(h);while(h!=null&&h.consumedBy!=null);do c=this.tree.firstAfter(c);while(c!=null&&c.consumedBy!=null);if(i.isLeft){let _=null;if(h){let A=h.getIntersection(s);if(A!==null&&(s.isAnEndpoint(A)||(_=A),!h.isAnEndpoint(A))){let x=this._splitSafely(h,A);for(let P=0,N=x.length;P<N;P++)o.push(x[P])}}let y=null;if(c){let A=c.getIntersection(s);if(A!==null&&(s.isAnEndpoint(A)||(y=A),!c.isAnEndpoint(A))){let x=this._splitSafely(c,A);for(let P=0,N=x.length;P<N;P++)o.push(x[P])}}if(_!==null||y!==null){let A=null;_===null?A=y:y===null?A=_:A=Qe.comparePoints(_,y)<=0?_:y,this.queue.delete(s.rightSE),o.push(s.rightSE);let x=s.split(A);for(let P=0,N=x.length;P<N;P++)o.push(x[P])}o.length>0?(this.tree.delete(s),o.push(i)):(this.segments.push(s),s.prev=h)}else{if(h&&c){let _=h.getIntersection(c);if(_!==null){if(!h.isAnEndpoint(_)){let y=this._splitSafely(h,_);for(let A=0,x=y.length;A<x;A++)o.push(y[A])}if(!c.isAnEndpoint(_)){let y=this._splitSafely(c,_);for(let A=0,x=y.length;A<x;A++)o.push(y[A])}}}this.tree.delete(s)}return o}_splitSafely(i,s){this.tree.delete(i);let o=i.rightSE;this.queue.delete(o);let h=i.split(s);return h.push(o),i.consumedBy===void 0&&this.tree.add(i),h}},Sf=class{constructor(){Lt(this,"type");Lt(this,"numMultiPolys")}run(i,s,o){la.type=i;let h=[new al(s,!0)];for(let x=0,P=o.length;x<P;x++)h.push(new al(o[x],!1));if(la.numMultiPolys=h.length,la.type==="difference"){let x=h[0],P=1;for(;P<h.length;)oa(h[P].bbox,x.bbox)!==null?P++:h.splice(P,1)}if(la.type==="intersection")for(let x=0,P=h.length;x<P;x++){let N=h[x];for(let F=x+1,tt=h.length;F<tt;F++)if(oa(N.bbox,h[F].bbox)===null)return[]}let c=new ht(Qe.compare);for(let x=0,P=h.length;x<P;x++){let N=h[x].getSweepEvents();for(let F=0,tt=N.length;F<tt;F++)c.add(N[F])}let _=new kf(c),y=null;for(c.size!=0&&(y=c.first(),c.delete(y));y;){let x=_.process(y);for(let P=0,N=x.length;P<N;P++){let F=x[P];F.consumedBy===void 0&&c.add(F)}c.size!=0?(y=c.first(),c.delete(y)):y=null}ee.reset();let A=Ef.factory(_.segments);return new Pf(A).getGeom()}},la=new Sf,vr=la,Bf=(i,...s)=>vr.run("intersection",i,s),Tf=(i,...s)=>vr.run("difference",i,s);ee.set;function Mr(i){let s={type:"Feature"};return s.geometry=i,s}function xr(i){return i.type==="Feature"?i.geometry:i}function ol(i){return i&&i.geometry&&i.geometry.coordinates?i.geometry.coordinates:i}function Df(i){return Mr({type:"LineString",coordinates:i})}function Of(i){return Mr({type:"MultiLineString",coordinates:i})}function hl(i){return Mr({type:"Polygon",coordinates:i})}function ll(i){return Mr({type:"MultiPolygon",coordinates:i})}function If(i,s){let o=xr(i),h=xr(s),c=Bf(o.coordinates,h.coordinates);return c.length===0?null:c.length===1?hl(c[0]):ll(c)}function Rf(i,s){let o=xr(i),h=xr(s),c=Tf(o.coordinates,h.coordinates);return c.length===0?null:c.length===1?hl(c[0]):ll(c)}function ul(i){return Array.isArray(i)?1+ul(i[0]):-1}function Ff(i){i instanceof L.Polyline&&(i=i.toGeoJSON(15));let s=ol(i),o=ul(s),h=[];return o>1?s.forEach(c=>{h.push(Df(c))}):h.push(i),h}function Gf(i){let s=[];return i.eachLayer(o=>{s.push(ol(o.toGeoJSON(15)))}),Of(s)}de.Cut=de.Polygon.extend({initialize(i){this._map=i,this._shape="Cut",this.toolbarButtonName="cutPolygon"},_finishShape(){if(this._editedLayers=[],!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=2)return;let s=L.polygon(i,this.options.pathOptions);s._latlngInfos=this._layer._latlngInfo,this.cut(s),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:h,originalLayer:c})=>{this._fireCut(c,h,c),this._fireCut(this._map,h,c),c.pm._fireEdit()}),this._editedLayers=[];let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},cut(i){let s=this._map._layers,o=i._latlngInfos||[];Object.keys(s).map(h=>s[h]).filter(h=>h.pm).filter(h=>!h._pmTempLayer).filter(h=>!L.PM.optIn&&!h.options.pmIgnore||L.PM.optIn&&h.options.pmIgnore===!1).filter(h=>h instanceof L.Polyline).filter(h=>h!==i).filter(h=>h.pm.options.allowCutting).filter(h=>this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0?this.options.layersToCut.indexOf(h)>-1:!0).filter(h=>!this._layerGroup.hasLayer(h)).filter(h=>{try{let c=!!Xe(i.toGeoJSON(15),h.toGeoJSON(15)).features.length>0;return c||h instanceof L.Polyline&&!(h instanceof L.Polygon)?c:!!If(i.toGeoJSON(15),h.toGeoJSON(15))}catch{return h instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(h=>{let c;if(h instanceof L.Polygon){c=L.polygon(h.getLatLngs());let x=c.getLatLngs();o.forEach(P=>{if(P&&P.snapInfo){let{latlng:N}=P,F=this._calcClosestLayer(N,[c]);if(F&&F.segment&&F.distance<this.options.snapDistance){let{segment:tt}=F;if(tt&&tt.length===2){let{indexPath:it,parentPath:lt,newIndex:ft}=L.PM.Utils._getIndexFromSegment(x,tt);(it.length>1?(0,hi.default)(x,lt):x).splice(ft,0,N)}}}})}else c=h;let _=this._cutLayer(i,c),y=L.geoJSON(_,h.options);y.getLayers().length===1&&([y]=y.getLayers()),this._setPane(y,"layerPane");let A=y.addTo(this._map.pm._getContainingLayer());if(A.pm.enable(h.pm.options),A.pm.disable(),h._pmTempLayer=!0,i._pmTempLayer=!0,h.remove(),h.removeFrom(this._map.pm._getContainingLayer()),i.remove(),i.removeFrom(this._map.pm._getContainingLayer()),A.getLayers&&A.getLayers().length===0&&this._map.pm.removeLayer({target:A}),A instanceof L.LayerGroup?(A.eachLayer(x=>{this._addDrawnLayerProp(x)}),this._addDrawnLayerProp(A)):this._addDrawnLayerProp(A),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let x=this.options.layersToCut.indexOf(h);x>-1&&this.options.layersToCut.splice(x,1)}this._editedLayers.push({layer:A,originalLayer:h})})},_cutLayer(i,s){let o=L.geoJSON(),h;if(s instanceof L.Polygon)h=Rf(s.toGeoJSON(15),i.toGeoJSON(15));else{let c=Ff(s);c.forEach(_=>{let y=Zo(_,i.toGeoJSON(15)),A;y&&y.features.length>0?A=L.geoJSON(y):A=L.geoJSON(_),A.getLayers().forEach(x=>{qo(i.toGeoJSON(15),x.toGeoJSON(15))||x.addTo(o)})}),c.length>1?h=Gf(o):h=o.toGeoJSON(15)}return h},_change:L.Util.falseFn}),de.Text=de.extend({initialize(i){this._map=i,this._shape="Text",this.toolbarButtonName="drawText"},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){var i;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),(i=this._hintMarker)==null||i.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let s=i;s.target=this._hintMarker,this._handleSnapping(s)}},_createMarker(i){var c,_,y,A;if(!i.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),(c=this.options.textOptions)==null?void 0:c.className){let x=this.options.textOptions.className.split(" ");this.textArea.classList.add(...x)}let o=this._createTextIcon(this.textArea),h=new L.Marker(s,{textMarker:!0,_textMarkerOverPM:!0,icon:o});if(this._setPane(h,"markerPane"),this._finishLayer(h),h.pm||(h.options.draggable=!1),h.addTo(this._map.pm._getContainingLayer()),h.pm){h.pm.textArea=this.textArea,L.setOptions(h.pm,{removeIfEmpty:((_=this.options.textOptions)==null?void 0:_.removeIfEmpty)??!0});let x=((y=this.options.textOptions)==null?void 0:y.focusAfterDraw)??!0;h.pm._createTextMarker(x),(A=this.options.textOptions)!=null&&A.text&&h.pm.setText(this.options.textOptions.text)}this._fireCreate(h),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(i){this.enable(),this._hintMarker.setLatLng(i.latlng)},_createTextArea(){let i=document.createElement("textarea");return i.readOnly=!0,i.classList.add("pm-textarea","pm-disabled"),i},_createTextIcon(i){return L.divIcon({className:"pm-text-marker",html:i})}});var zf={enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,Ae(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let i=this._getDOMElem();i&&(Ae(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(i)):L.DomEvent.on(i,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,Ae(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let i=this._getDOMElem();i&&(Ae(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(i)):L.DomEvent.off(i,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(i){let s=i.touches?i.touches[0]:i,o={originalEvent:s,target:this._layer};return o.containerPoint=this._map.mouseEventToContainerPoint(s),o.latlng=this._map.containerPointToLatLng(o.containerPoint),this._dragMixinOnMouseDown(o),!1},_simulateMouseMoveEvent(i){let s=i.touches?i.touches[0]:i,o={originalEvent:s,target:this._layer};return o.containerPoint=this._map.mouseEventToContainerPoint(s),o.latlng=this._map.containerPointToLatLng(o.containerPoint),this._dragMixinOnMouseMove(o),!1},_simulateMouseUpEvent(i){let s={originalEvent:i.touches?i.touches[0]:i,target:this._layer};return i.type.indexOf("touch")===-1&&(s.containerPoint=this._map.mouseEventToContainerPoint(i),s.latlng=this._map.containerPointToLatLng(s.containerPoint)),this._dragMixinOnMouseUp(s),!1},_dragMixinOnMouseDown(i){if(i.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(i);let s=i._fromLayerSync,o=this._syncLayers("_dragMixinOnMouseDown",i);if(this._layer instanceof L.Marker&&(this.options.snappable&&!s&&!o?this._initSnappableMarkers():this._disableSnapping()),this._layer instanceof L.CircleMarker){let h="resizeableCircleMarker";this._layer instanceof L.Circle&&(h="resizeableCircle"),this.options.snappable&&!s&&!o?this._layer.pm.options[h]||this._initSnappableMarkersDrag():this._layer.pm.options[h]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=i.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(i){this._overwriteEventIfItComesFromMarker(i);let s=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",i),this._dragging||(this._dragging=!0,L.DomUtil.addClass(s,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=i.latlng),this._onLayerDrag(i),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(i){let s=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",i),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),this._dragging?(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,s&&L.DomUtil.removeClass(s,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0):!1},_onLayerDrag(i){let{latlng:s}=i,o={lat:s.lat-this._tempDragCoord.lat,lng:s.lng-this._tempDragCoord.lng},h=c=>c.map(_=>{if(Array.isArray(_))return h(_);let y={lat:_.lat+o.lat,lng:_.lng+o.lng};return(_.alt||_.alt===0)&&(y.alt=_.alt),y});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let c=h([this._layer.getLatLng()]);this._layer.setLatLng(c[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let c=this._layer.getLatLng();this._layer._snapped&&(c=this._layer._orgLatLng);let _=h([c]);this._layer.setLatLng(_[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let c=h([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(c),this._fireChange(this._layer.getBounds(),"Edit")}else{let c=h(this._layer.getLatLngs());this._layer.setLatLngs(c),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=s,i.layer=this._layer,this._fireDrag(i)},addDraggingClass(){let i=this._getDOMElem();i&&L.DomUtil.addClass(i,"leaflet-pm-draggable")},removeDraggingClass(){let i=this._getDOMElem();i&&L.DomUtil.removeClass(i,"leaflet-pm-draggable")},_getDOMElem(){let i=null;return this._layer._path?i=this._layer._path:this._layer._renderer&&this._layer._renderer._container?i=this._layer._renderer._container:this._layer._image?i=this._layer._image:this._layer._icon&&(i=this._layer._icon),i},_overwriteEventIfItComesFromMarker(i){i.target.getLatLng&&(!i.target._radius||i.target._radius<=10)&&(i.containerPoint=this._map.mouseEventToContainerPoint(i.originalEvent),i.latlng=this._map.containerPointToLatLng(i.containerPoint))},_syncLayers(i,s){if(this.enabled())return!1;if(!s._fromLayerSync&&this._layer===s.target&&this.options.syncLayersOnDrag){s._fromLayerSync=!0;let o=[];if(L.Util.isArray(this.options.syncLayersOnDrag))o=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(h=>{h instanceof L.LayerGroup&&(o=o.concat(h.pm.getLayers(!0)))});else if(this.options.syncLayersOnDrag===!0&&this._parentLayerGroup)for(let h in this._parentLayerGroup){let c=this._parentLayerGroup[h];c.pm&&(o=c.pm.getLayers(!0))}return L.Util.isArray(o)&&o.length>0&&(o=o.filter(h=>!!h.pm).filter(h=>!!h.pm.options.draggable),o.forEach(h=>{h!==this._layer&&h.pm[i]&&(h._snapped=!1,h.pm[i](s))})),o.length>0}return!1},_stopDOMImageDrag(i){return i.preventDefault(),!1}},Nf=zf,Uf=M(pi());function Zf(i,s,o,h){return o.unproject(s.transform(o.project(i,h)),h)}function cl(i,s,o){let h=o.getMaxZoom();if(h===1/0&&(h=o.getZoom()),L.Util.isArray(i)){let c=[];return i.forEach(_=>{c.push(cl(_,s,o))}),c}return i instanceof L.LatLng?Zf(i,s,o,h):null}function rs(i,s){s instanceof L.Layer&&(s=s.getLatLng());let o=i.getMaxZoom();return o===1/0&&(o=i.getZoom()),i.project(s,o)}function Lr(i,s){let o=i.getMaxZoom();return o===1/0&&(o=i.getZoom()),i.unproject(s,o)}var jf={_onRotateStart(i){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=rs(this._map,this._rotationOriginLatLng),this._rotationStartPoint=rs(this._map,i.target.getLatLng()),this._initialRotateLatLng=Ke(this._layer),this._startAngle=this.getAngle();let s=Ke(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,s),this._fireRotationStart(this._map,s)},_onRotate(i){let s=rs(this._map,i.target.getLatLng()),o=this._rotationStartPoint,h=this._rotationOriginPoint,c=Math.atan2(s.y-h.y,s.x-h.x)-Math.atan2(o.y-h.y,o.x-h.x);this._layer.setLatLngs(this._rotateLayer(c,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let _=this;function y(N,F=[],tt=-1){if(tt>-1&&F.push(tt),L.Util.isArray(N[0]))N.forEach((it,lt)=>y(it,F.slice(),lt));else{let it=F.length>0?(0,Uf.default)(_._markers,F):_._markers[0];N.forEach((lt,ft)=>{it[ft].setLatLng(lt)})}}y(this._layer.getLatLngs());let A=Ke(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(c,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let x=c*180/Math.PI;x=x<0?x+360:x;let P=x+this._startAngle;this._setAngle(P),this._rotationLayer.pm._setAngle(P),this._fireRotation(this._rotationLayer,x,A),this._fireRotation(this._map,x,A),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let i=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let s=Ke(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=Ke(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,i,s),this._fireRotationEnd(this._map,i,s),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(i,s,o,h,c){let _=rs(c,o);return this._matrix=h.clone().rotate(i,_).flip(),cl(s,this._matrix,c)},_setAngle(i){i=i<0?i+360:i,this._angle=i%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let i=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),s=i.getCenter();return i.removeFrom(this._layer._map),s},enableRotate(){if(!this.options.allowRotation){this.disableRotate();return}this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&this._angle===void 0&&this.setInitAngle(Nn(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let i={fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0};this._rotatePoly=L.polygon(this._layer.getLatLngs(),i),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=Ke(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(i){let s=this.getAngle(),o=this._layer.getLatLngs(),h=i*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(h,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+i),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(h,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let c=this.getAngle()-s;c=c<0?c+360:c,this._startAngle=s,this._fireRotation(this._layer,c,o,this._layer),this._fireRotation(this._map||this._layer._map,c,o,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(i){let s=i-this.getAngle();this.rotateLayer(s)},getAngle(){return this._angle||0},setInitAngle(i){this._setAngle(i)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(i){this._rotationCenter=i,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(i)}},qf=jf,Hf=L.Class.extend({includes:[Nf,Js,qf,Gn],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(i){L.Util.setOptions(this,i)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(i,s){s==="layerPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":s==="vertexPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":s==="markerPane"&&(i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(i,s){let o=s.target,h={layer:this._layer,marker:o,event:s},c="";return i==="move"?c="moveVertexValidation":i==="add"?c="addVertexValidation":i==="remove"&&(c="removeVertexValidation"),this.options[c]&&typeof this.options[c]=="function"&&!this.options[c](h)?(i==="move"&&(o._cancelDragEventChain=o.getLatLng()),!1):(o._cancelDragEventChain=null,!0)},_vertexValidationDrag(i){return i._cancelDragEventChain?(i._latlng=i._cancelDragEventChain,i.update(),!1):!0},_vertexValidationDragEnd(i){return i._cancelDragEventChain?(i._cancelDragEventChain=null,!1):!0}}),ge=Hf;ge.LayerGroup=L.Class.extend({initialize(i){this._layerGroup=i,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(h=>this._initLayer(h));let s=h=>{if(h.layer._pmTempLayer)return;this._layers=this.getLayers();let c=this._layers.filter(_=>!_.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in _.pm._parentLayerGroup));c.forEach(_=>{this._initLayer(_)}),c.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(s,100,this),this),this._layerGroup.on("layerremove",h=>{this._removeLayerFromGroup(h.target)},this);let o=h=>{h.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(o,100,this),this)},enable(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this._options=i,this._layers.forEach(o=>{o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.enable(i,s)):o.pm.enable(i)})},disable(i=[]){i.length===0&&(this._layers=this.getLayers()),this._layers.forEach(s=>{s instanceof L.LayerGroup?i.indexOf(s._leaflet_id)===-1&&(i.push(s._leaflet_id),s.pm.disable(i)):s.pm.disable()})},enabled(i=[]){return i.length===0&&(this._layers=this.getLayers()),!!this._layers.find(s=>s instanceof L.LayerGroup?i.indexOf(s._leaflet_id)===-1?(i.push(s._leaflet_id),s.pm.enabled(i)):!1:s.pm.enabled())},toggleEdit(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this._options=i,this._layers.forEach(o=>{o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.toggleEdit(i,s)):o.pm.toggleEdit(i)})},_initLayer(i){let s=L.Util.stamp(this._layerGroup);i.pm._parentLayerGroup||(i.pm._parentLayerGroup={}),i.pm._parentLayerGroup[s]=this._layerGroup},_removeLayerFromGroup(i){if(i.pm&&i.pm._layerGroup){let s=L.Util.stamp(this._layerGroup);delete i.pm._layerGroup[s]}},dragging(){return this._layers=this.getLayers(),this._layers?!!this._layers.find(i=>i.pm.dragging()):!1},getOptions(){return this.options},_getMap(){var i;return this._map||((i=this._layers.find(s=>!!s._map))==null?void 0:i._map)||null},getLayers(i=!1,s=!0,o=!0,h=[]){let c=[];return i?this._layerGroup.getLayers().forEach(_=>{c.push(_),_ instanceof L.LayerGroup&&h.indexOf(_._leaflet_id)===-1&&(h.push(_._leaflet_id),c=c.concat(_.pm.getLayers(!0,!0,!0,h)))}):c=this._layerGroup.getLayers(),o&&(c=c.filter(_=>!(_ instanceof L.LayerGroup))),s&&(c=c.filter(_=>!!_.pm),c=c.filter(_=>!_._pmTempLayer),c=c.filter(_=>!L.PM.optIn&&!_.options.pmIgnore||L.PM.optIn&&_.options.pmIgnore===!1)),c},setOptions(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this.options=i,this._layers.forEach(o=>{o.pm&&(o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.setOptions(i,s)):o.pm.setOptions(i))})}}),ge.Marker=ge.extend({_shape:"Marker",initialize(i){this._layer=i,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(i={draggable:!0}){if(L.Util.setOptions(this,i),!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._fireEnable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(i){let s=i.target;s.remove(),this._fireRemove(s),this._fireRemove(this._map,s)},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)}});var Yi=M(pi()),Vf={filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let i=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=i.filter((s,o,h)=>h.indexOf(s)===o)},_removeFromCache(i){let s=this.markerCache.indexOf(i);s>-1&&this.markerCache.splice(s,1)},renderLimits(i){this.markerCache.forEach(s=>{i.includes(s)?this._markerGroup.addLayer(s):this._markerGroup.removeLayer(s)})},applyLimitFilters({latlng:i={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let s=[...this._filterClosestMarkers(i)];this.renderLimits(s)},_filterClosestMarkers(i){let s=[...this.markerCache],o=this.options.limitMarkersToCount;return o===-1?s:(s.sort((h,c)=>{let _=h._latlng.distanceTo(i),y=c._latlng.distanceTo(i);return _-y}),s.filter((h,c)=>o>-1?c<o:!0))},_preventRenderMarkers:!1,_preventRenderingMarkers(i){this._preventRenderMarkers=!!i}},$f=Vf;ge.Line=ge.extend({includes:[$f],_shape:"Line",initialize(i){this._layer=i,this._enabled=!1},enable(i){if(L.Util.setOptions(this,i),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}this.enabled()&&this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.on("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this),this.options.allowSelfIntersection?this.cachedColor=void 0:(this._layer.options.color!=="#f00000ff"?(this.cachedColor=this._layer.options.color,this.isRed=!1):this.isRed=!0,this._handleLayerStyle()),this._fireEnable()}},disable(){if(!this.enabled()||this._dragging)return;this._enabled=!1,this._markerGroup.clearLayers(),this._markerGroup.removeFrom(this._map),this._layer.off("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);let i=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(i,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(i){return this.enabled()?this.disable():this.enable(i),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let i=this._map,s=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(i),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let o=h=>{if(Array.isArray(h[0]))return h.map(o,this);let c=h.map(this._createMarker,this);return this.options.hideMiddleMarkers!==!0&&h.map((_,y)=>{let A=this.isPolygon()?(y+1)%h.length:y+1;return this._createMiddleMarker(c[y],c[A])}),c};this._markers=o(s),this.filterMarkerGroup(),i.addLayer(this._markerGroup)},_createMarker(i){let s=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this.options.rotate?(s.on("dragstart",this._onRotateStart,this),s.on("drag",this._onRotate,this),s.on("dragend",this._onRotateEnd,this)):(s.on("click",this._onVertexClick,this),s.on("dragstart",this._onMarkerDragStart,this),s.on("move",this._onMarkerDrag,this),s.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||s.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(s),s},_createMiddleMarker(i,s){if(!i||!s)return!1;let o=L.PM.Utils.calcMiddleLatLng(this._map,i.getLatLng(),s.getLatLng()),h=this._createMarker(o),c=L.divIcon({className:"marker-icon marker-icon-middle"});return h.setIcon(c),h.leftM=i,h.rightM=s,i._middleMarkerNext=h,s._middleMarkerPrev=h,h.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),h.on("movestart",this._onMiddleMarkerMoveStart,this),h},_onMiddleMarkerClick(i){let s=i.target;if(!this._vertexValidation("add",i))return;let o=L.divIcon({className:"marker-icon"});s.setIcon(o),this._addMarker(s,s.leftM,s.rightM)},_onMiddleMarkerMoveStart(i){let s=i.target;if(s.on("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidation("add",i)){s.on("move",this._onMiddleMarkerMovePrevent,this);return}s._dragging=!0,this._addMarker(s,s.leftM,s.rightM)},_onMiddleMarkerMovePrevent(i){let s=i.target;this._vertexValidationDrag(s)},_onMiddleMarkerMoveEnd(i){let s=i.target;if(s.off("move",this._onMiddleMarkerMovePrevent,this),s.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(s))return;let o=L.divIcon({className:"marker-icon"});s.setIcon(o),setTimeout(()=>{delete s._dragging},100)},_addMarker(i,s,o){i.off("movestart",this._onMiddleMarkerMoveStart,this),i.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let h=i.getLatLng(),c=this._layer._latlngs;delete i.leftM,delete i.rightM;let{indexPath:_,index:y,parentPath:A}=L.PM.Utils.findDeepMarkerIndex(this._markers,s),x=_.length>1?(0,Yi.default)(c,A):c,P=_.length>1?(0,Yi.default)(this._markers,A):this._markers;x.splice(y+1,0,h),P.splice(y+1,0,i),this._layer.setLatLngs(c),this.options.hideMiddleMarkers!==!0&&(this._createMiddleMarker(s,i),this._createMiddleMarker(i,o)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(i,L.PM.Utils.findDeepMarkerIndex(this._markers,i).indexPath,h),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return Zn(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(i){let s=this._layer,o,h;if(this.options.allowSelfIntersection?o=!1:(h=Zn(this._layer.toGeoJSON(15)),o=h.features.length>0),o){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return o;i?this._flashLayer():(s.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(h)}else s.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return o},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(i,s){i.forEach(o=>{Array.isArray(o)?this._updateDisabledMarkerStyle(o,s):o._icon&&(s&&!this._checkMarkerAllowedToDrag(o)?L.DomUtil.addClass(o._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(o._icon,"vertexmarker-disabled"))})},_removeMarker(i){let s=i.target;if(!this._vertexValidation("remove",i))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=Ke(this._layer,this._layer.getLatLngs()));let o=this._layer.getLatLngs(),{indexPath:h,index:c,parentPath:_}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);if(!h)return;let y=h.length>1?(0,Yi.default)(o,_):o,A=h.length>1?(0,Yi.default)(this._markers,_):this._markers,x=_[_.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!x&&(y.length<=2||this.isPolygon()&&y.length<=3)){this._flashLayer();return}y.splice(c,1),this._layer.setLatLngs(o),this.isPolygon()&&y.length<=2&&y.splice(0,y.length);let P=!1;if(y.length<=1&&(y.splice(0,y.length),_.length>1&&h.length>1&&(o=un(o)),this._layer.setLatLngs(o),this._initMarkers(),P=!0),Pi(o)||this._layer.remove(),o=un(o),this._layer.setLatLngs(o),this._markers=un(this._markers),!P&&(A=h.length>1?(0,Yi.default)(this._markers,_):this._markers,s._middleMarkerPrev&&(this._markerGroup.removeLayer(s._middleMarkerPrev),this._removeFromCache(s._middleMarkerPrev)),s._middleMarkerNext&&(this._markerGroup.removeLayer(s._middleMarkerNext),this._removeFromCache(s._middleMarkerNext)),this._markerGroup.removeLayer(s),this._removeFromCache(s),A)){let N,F;if(this.isPolygon()?(N=(c+1)%A.length,F=(c+(A.length-1))%A.length):(F=c-1<0?void 0:c-1,N=c+1>=A.length?void 0:c+1),N!==F){let tt=A[F],it=A[N];this.options.hideMiddleMarkers!==!0&&this._createMiddleMarker(tt,it)}A.splice(c,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(s,h),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(i){let s=this._layer.getLatLngs(),o=i.getLatLng(),{indexPath:h,index:c,parentPath:_}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);(h.length>1?(0,Yi.default)(s,_):s).splice(c,1,o),this._layer.setLatLngs(s)},_getNeighborMarkers(i){let{indexPath:s,index:o,parentPath:h}=L.PM.Utils.findDeepMarkerIndex(this._markers,i),c=s.length>1?(0,Yi.default)(this._markers,h):this._markers,_=(o+1)%c.length,y=(o+(c.length-1))%c.length,A=c[y],x=c[_];return{prevMarker:A,nextMarker:x}},_checkMarkerAllowedToDrag(i){let{prevMarker:s,nextMarker:o}=this._getNeighborMarkers(i),h=L.polyline([s.getLatLng(),i.getLatLng()]),c=L.polyline([i.getLatLng(),o.getLatLng()]),_=Xe(this._layer.toGeoJSON(15),h.toGeoJSON(15)).features.length,y=Xe(this._layer.toGeoJSON(15),c.toGeoJSON(15)).features.length;return i.getLatLng()===this._markers[0][0].getLatLng()?y+=1:i.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(_+=1),!(_<=2&&y<=2)},_onMarkerDragStart(i){let s=i.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",i))return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragStart(i,o),this.options.allowSelfIntersection||(this._coordsBeforeEdit=Ke(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(s):this._markerAllowedToDrag=null},_onMarkerDrag(i){let s=i.target;if(!this._vertexValidationDrag(s))return;let{indexPath:o,index:h,parentPath:c}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);if(!o)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&this._markerAllowedToDrag===!1){this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),this._handleLayerStyle();return}this.updatePolygonCoordsFromMarkerDrag(s);let _=o.length>1?(0,Yi.default)(this._markers,c):this._markers,y=(h+1)%_.length,A=(h+(_.length-1))%_.length,x=s.getLatLng(),P=_[A].getLatLng(),N=_[y].getLatLng();if(s._middleMarkerNext){let F=L.PM.Utils.calcMiddleLatLng(this._map,x,N);s._middleMarkerNext.setLatLng(F)}if(s._middleMarkerPrev){let F=L.PM.Utils.calcMiddleLatLng(this._map,x,P);s._middleMarkerPrev.setLatLng(F)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(i,o),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(i){let s=i.target;if(!this._vertexValidationDragEnd(s))return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s),h=!this.options.allowSelfIntersection&&this.hasSelfIntersection();h&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(h=!1);let c=!this.options.allowSelfIntersection&&h;if(this._fireMarkerDragEnd(i,o,c),c){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(i,o);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(i){let s=i.target;if(s._dragging)return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireVertexClick(i,o)}}),ge.Polygon=ge.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(i){let{prevMarker:s,nextMarker:o}=this._getNeighborMarkers(i),h=L.polyline([s.getLatLng(),i.getLatLng()]),c=L.polyline([i.getLatLng(),o.getLatLng()]),_=Xe(this._layer.toGeoJSON(15),h.toGeoJSON(15)).features.length,y=Xe(this._layer.toGeoJSON(15),c.toGeoJSON(15)).features.length;return!(_<=2&&y<=2)}}),ge.Rectangle=ge.Polygon.extend({_shape:"Rectangle",_initMarkers(){let i=this._map,s=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,i.addLayer(this._markerGroup),this._markers=[],this._markers[0]=s.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((o,h)=>{let c=this._cornerMarkers.find(_=>_._index===h);c&&c.setLatLng(o)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(i,s){let o=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(o,"vertexPane"),o._origLatLng=i,o._index=s,o._pmTempLayer=!0,o.on("click",this._onVertexClick,this),this._markerGroup.addLayer(o),o},_addMarkerEvents(){this._markers[0].forEach(i=>{i.on("dragstart",this._onMarkerDragStart,this),i.on("drag",this._onMarkerDrag,this),i.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||i.on("contextmenu",this._removeMarker,this)})},_removeMarker(){return null},_onMarkerDragStart(i){if(!this._vertexValidation("move",i))return;let s=i.target,o=this._cornerMarkers;s._oppositeCornerLatLng=o.find(c=>c._index===(s._index+2)%4).getLatLng(),s._snapped=!1;let{indexPath:h}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragStart(i,h)},_onMarkerDrag(i){let s=i.target;if(!this._vertexValidationDrag(s)||s._index===void 0)return;this._adjustRectangleForMarkerMove(s);let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDrag(i,o),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(i){let s=i.target;if(!this._vertexValidationDragEnd(s))return;this._cornerMarkers.forEach(h=>{delete h._oppositeCornerLatLng});let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragEnd(i,o),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(i){L.extend(i._origLatLng,i._latlng);let s=L.PM.Utils._getRotatedRectangle(i.getLatLng(),i._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(s),this._adjustAllMarkers(i),this._layer.redraw()},_adjustAllMarkers(i){let s=this._layer.getLatLngs()[0];if(s&&s.length!==4&&s.length>0)s.forEach((o,h)=>{this._cornerMarkers[h].setLatLng(o)}),this._cornerMarkers.slice(s.length).forEach(o=>{o.setLatLng(s[0])});else if(!s||!s.length)console.error("The layer has no LatLngs");else{let o=s.findIndex(h=>i.getLatLng().equals(h));o>-1?(this._cornerMarkers[(i._index+1)%4].setLatLng(s[(o+1)%4]),this._cornerMarkers[(i._index+2)%4].setLatLng(s[(o+2)%4]),this._cornerMarkers[(i._index+3)%4].setLatLng(s[(o+3)%4])):this._cornerMarkers.forEach(h=>{h.setLatLng(s[h._index])})}},_findCorners(){this._angle===void 0&&this.setInitAngle(Nn(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let i=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(i[0],i[2],this.getAngle(),this._map||this)}}),ge.CircleMarker=ge.extend({_shape:"CircleMarker",initialize(i){this._layer=i,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(i={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,i),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let i=this._map;this._helperLayers&&(this._helperLayers.removeFrom(i),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(i);let s=this._layer.getLatLng(),o=this._layer._radius,h=this._getLatLngOnCircle(s,o);this._centerMarker=this._createCenterMarker(s),this._outerMarker=this._createOuterMarker(h),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(i,s){let o=this._map.project(i),h=L.point(o.x+s,o.y);return this._map.unproject(h)},_createHintLine(i,s){let o=i.getLatLng(),h=s.getLatLng();this._hintline=L.polyline([o,h],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(i){let s=this._createMarker(i);return this.options.draggable?(L.DomUtil.addClass(s._icon,"leaflet-pm-draggable"),s.on("move",this._moveCircle,this)):s.dragging.disable(),s},_createOuterMarker(i){let s=this._createMarker(i);return s.on("drag",this._resizeCircle,this),s},_createMarker(i){let s=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._origLatLng=i,s._pmTempLayer=!0,s.on("dragstart",this._onMarkerDragStart,this),s.on("drag",this._onMarkerDrag,this),s.on("dragend",this._onMarkerDragEnd,this),s.on("click",this._onVertexClick,this),this._helperLayers.addLayer(s),s},_moveCircle(i){if(i.target._cancelDragEventChain)return;let s=this._centerMarker.getLatLng();this._layer.setLatLng(s);let o=this._layer._radius,h=this._getLatLngOnCircle(s,o);this._outerMarker._latlng=h,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let i=this._layer.getLatLng(),s=this._layer._radius,o=this._getLatLngOnCircle(i,s);this._outerMarker.setLatLng(o),this._centerMarker.setLatLng(i),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(o),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng();this._hintline.setLatLngs([i,s])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(i){this._vertexValidation("move",i)&&this._fireMarkerDragStart(i)},_onMarkerDrag(i){let s=i.target;s instanceof L.Marker&&!this._vertexValidationDrag(s)||this._fireMarkerDrag(i)},_onMarkerDragEnd(i){this._extedingMarkerDragEnd();let s=i.target;this._vertexValidationDragEnd(s)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(i))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let i=this._layer._map||this._map;if(i){let s=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),i,this._layer.getLatLng()),o=L.circle(this._layer.getLatLng(),this._layer.options);o.setRadius(s);let h=i&&i.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(o,200,!h).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(o,200,!h),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);return this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?s=Un(this._map,i,s,this._getMinDistanceInMeter(i)):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(s=Un(this._map,i,s,this._getMaxDistanceInMeter(i))),s},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._outerMarker.setLatLng(this._outerMarker._orgLatLng):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(i,s){return this._map.project(i).distanceTo(this._map.project(s))},_getMinDistanceInMeter(i){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,i)},_getMaxDistanceInMeter(i){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,i)},_onVertexClick(i){i.target._dragging||this._fireVertexClick(i,void 0)}}),ge.Circle=ge.CircleMarker.extend({_shape:"Circle",initialize(i){this._layer=i,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(i){L.PM.Edit.CircleMarker.prototype.enable.call(this,i||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let i=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(i,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let i=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!i).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!i),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(i,s){return this._map.distance(i,s)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(i){i.target._dragging||this._fireVertexClick(i,void 0)}}),ge.ImageOverlay=ge.extend({_shape:"ImageOverlay",initialize(i){this._layer=i,this._enabled=!1},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},enabled(){return this._enabled},enable(i={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,i),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let i=this._layer.getBounds(),s=i.getNorthWest(),o=i.getNorthEast(),h=i.getSouthEast(),c=i.getSouthWest();return[s,o,h,c]}}),ge.Text=ge.extend({_shape:"Text",initialize(i){this._layer=i,this._enabled=!1},enable(i){if(L.Util.setOptions(this,i),!!this.textArea){if(!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),L.DomEvent.off(document,"click",this._documentClick,this),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let i=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),i.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let i=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,s=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${i}px`,this.textArea.style.width=`${s}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&L.DomEvent.on(document,"click",this._documentClick,this)},100)},_documentClick(i){i.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(i={}){let s=this._hasFocus;this._hasFocus=i.type==="focus",!s!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(i){i&&(this.textArea.value=i),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let s=this.options.className.split(" ");this.textArea.classList.add(...s)}let i=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(i),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(i=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),i===!0&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(i){i.preventDefault()}});var th=function(i,s,o,h,c,_){this._matrix=[i,s,o,h,c,_]};th.init=()=>new L.PM.Matrix(1,0,0,1,0,0),th.prototype={transform(i){return this._transform(i.clone())},_transform(i){let s=this._matrix,{x:o,y:h}=i;return i.x=s[0]*o+s[1]*h+s[4],i.y=s[2]*o+s[3]*h+s[5],i},untransform(i){let s=this._matrix;return new L.Point((i.x/s[0]-s[4])/s[0],(i.y/s[2]-s[5])/s[2])},clone(){let i=this._matrix;return new L.PM.Matrix(i[0],i[1],i[2],i[3],i[4],i[5])},translate(i){if(i===void 0)return new L.Point(this._matrix[4],this._matrix[5]);let s,o;return typeof i=="number"?(s=i,o=i):(s=i.x,o=i.y),this._add(1,0,0,1,s,o)},scale(i,s){if(i===void 0)return new L.Point(this._matrix[0],this._matrix[3]);let o,h;return s=s||L.point(0,0),typeof i=="number"?(o=i,h=i):(o=i.x,h=i.y),this._add(o,0,0,h,s.x,s.y)._add(1,0,0,1,-s.x,-s.y)},rotate(i,s){let o=Math.cos(i),h=Math.sin(i);return s=s||new L.Point(0,0),this._add(o,h,-h,o,s.x,s.y)._add(1,0,0,1,-s.x,-s.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(i,s,o,h,c,_){let y=[[],[],[]],A=this._matrix,x=[[A[0],A[2],A[4]],[A[1],A[3],A[5]],[0,0,1]],P=[[i,o,c],[s,h,_],[0,0,1]],N;i&&i instanceof L.PM.Matrix&&(A=i._matrix,P=[[A[0],A[2],A[4]],[A[1],A[3],A[5]],[0,0,1]]);for(let F=0;F<3;F+=1)for(let tt=0;tt<3;tt+=1){N=0;for(let it=0;it<3;it+=1)N+=x[F][it]*P[it][tt];y[F][tt]=N}return this._matrix=[y[0][0],y[1][0],y[0][1],y[1][1],y[0][2],y[1][2]],this}};var Kf=th,Wf={calcMiddleLatLng(i,s,o){let h=i.project(s),c=i.project(o);return i.unproject(h._add(c)._divideBy(2))},findLayers(i){let s=[];return i.eachLayer(o=>{(o instanceof L.Polyline||o instanceof L.Marker||o instanceof L.Circle||o instanceof L.CircleMarker||o instanceof L.ImageOverlay)&&s.push(o)}),s=s.filter(o=>!!o.pm),s=s.filter(o=>!o._pmTempLayer),s=s.filter(o=>!L.PM.optIn&&!o.options.pmIgnore||L.PM.optIn&&o.options.pmIgnore===!1),s},circleToPolygon(i,s=60,o=!0){let h=i.getLatLng(),c=i.getRadius(),_=zn(h,c,s,0,o),y=[];for(let A=0;A<_.length;A+=1){let x=[_[A].lat,_[A].lng];y.push(x)}return L.polygon(y,i.options)},disablePopup(i){i.getPopup()&&(i._tempPopupCopy=i.getPopup(),i.unbindPopup())},enablePopup(i){i._tempPopupCopy&&(i.bindPopup(i._tempPopupCopy),delete i._tempPopupCopy)},_fireEvent(i,s,o,h=!1){i.fire(s,o,h);let{groups:c}=this.getAllParentGroups(i);c.forEach(_=>{_.fire(s,o,h)})},getAllParentGroups(i){let s=[],o=[],h=c=>{for(let _ in c._eventParents)if(s.indexOf(_)===-1){s.push(_);let y=c._eventParents[_];o.push(y),h(y)}};return!i._pmLastGroupFetch||!i._pmLastGroupFetch.time||new Date().getTime()-i._pmLastGroupFetch.time>1e3?(h(i),i._pmLastGroupFetch={time:new Date().getTime(),groups:o,groupIds:s},{groupIds:s,groups:o}):{groups:i._pmLastGroupFetch.groups,groupIds:i._pmLastGroupFetch.groupIds}},createGeodesicPolygon:zn,getTranslation:St,findDeepCoordIndex(i,s,o=!0){let h,c=y=>(A,x)=>{let P=y.concat(x);if(o){if(A.lat&&A.lat===s.lat&&A.lng===s.lng)return h=P,!0}else if(A.lat&&L.latLng(A).equals(s))return h=P,!0;return Array.isArray(A)&&A.some(c(P))};i.some(c([]));let _={};return h&&(_={indexPath:h,index:h[h.length-1],parentPath:h.slice(0,h.length-1)}),_},findDeepMarkerIndex(i,s){let o,h=_=>(y,A)=>{let x=_.concat(A);return y._leaflet_id===s._leaflet_id?(o=x,!0):Array.isArray(y)&&y.some(h(x))};i.some(h([]));let c={};return o&&(c={indexPath:o,index:o[o.length-1],parentPath:o.slice(0,o.length-1)}),c},_getIndexFromSegment(i,s){if(s&&s.length===2){let o=this.findDeepCoordIndex(i,s[0]),h=this.findDeepCoordIndex(i,s[1]),c=Math.max(o.index,h.index);return(o.index===0||h.index===0)&&c!==1&&(c+=1),{indexA:o,indexB:h,newIndex:c,indexPath:o.indexPath,parentPath:o.parentPath}}return null},_getRotatedRectangle(i,s,o,h){let c=rs(h,i),_=rs(h,s),y=o*Math.PI/180,A=Math.cos(y),x=Math.sin(y),P=(_.x-c.x)*A+(_.y-c.y)*x,N=(_.y-c.y)*A-(_.x-c.x)*x,F=P*A+c.x,tt=P*x+c.y,it=-N*x+c.x,lt=N*A+c.y,ft=Lr(h,c),At=Lr(h,{x:F,y:tt}),Gt=Lr(h,_),z=Lr(h,{x:it,y:lt});return[ft,At,Gt,z]},pxRadiusToMeterRadius(i,s,o){let h=s.project(o),c=L.point(h.x+i,h.y);return s.distance(s.unproject(c),o)}},Xf=Wf;L.PM=L.PM||{version:zs.version,Map:rr,Toolbar:Ys,Draw:de,Edit:ge,Utils:Xf,Matrix:Kf,activeLang:"en",optIn:!1,initialize(i){this.addInitHooks(i)},setOptIn(i){this.optIn=!!i},addInitHooks(){function i(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}L.Map.addInitHook(i);function s(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}L.LayerGroup.addInitHook(s);function o(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}L.Marker.addInitHook(o);function h(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}L.CircleMarker.addInitHook(h);function c(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}L.Polyline.addInitHook(c);function _(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}L.Polygon.addInitHook(_);function y(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}L.Rectangle.addInitHook(y);function A(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}L.Circle.addInitHook(A);function x(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))}L.ImageOverlay.addInitHook(x)},reInitLayer(i){i instanceof L.LayerGroup&&i.eachLayer(s=>{this.reInitLayer(s)}),i.pm||L.PM.optIn&&i.options.pmIgnore!==!1||i.options.pmIgnore||(i instanceof L.Map?i.pm=new L.PM.Map(i):i instanceof L.Marker?i.options.textMarker?(i.pm=new L.PM.Edit.Text(i),i.pm._initTextMarker(),i.pm._createTextMarker(!1)):i.pm=new L.PM.Edit.Marker(i):i instanceof L.Circle?i.pm=new L.PM.Edit.Circle(i):i instanceof L.CircleMarker?i.pm=new L.PM.Edit.CircleMarker(i):i instanceof L.Rectangle?i.pm=new L.PM.Edit.Rectangle(i):i instanceof L.Polygon?i.pm=new L.PM.Edit.Polygon(i):i instanceof L.Polyline?i.pm=new L.PM.Edit.Line(i):i instanceof L.LayerGroup?i.pm=new L.PM.Edit.LayerGroup(i):i instanceof L.ImageOverlay&&(i.pm=new L.PM.Edit.ImageOverlay(i)))}},L.version==="1.7.1"&&L.Canvas.include({_onClick(i){let s=this._map.mouseEventToLayerPoint(i),o,h;for(let c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(s)&&(!(i.type==="click"||i.type==="preclick")||!this._map._draggableMoved(o))&&(h=o);h&&(L.DomEvent.fakeStop(i),this._fireEvent([h],i))}}),L.PM.initialize()})();const yl={en_US:{showEagle:"Show Eagle Map",hideEagle:"Hide Eagle Map"},zh_CN:{showEagle:"显示鹰眼图",hideEagle:"隐藏鹰眼图"}},Al={en_US:{coordinate:"Coordinate",zoomLevel:"Zoom Level",FPS:"FPS"},zh_CN:{coordinate:"坐标",zoomLevel:"层级",FPS:"每秒帧数"}},Cr={en_US:{home:"Go Home",capture:"Screen Capture",center:"View Full",north:"Move North",south:"Move South",east:"Move East",west:"Move West",zoomIn:"Zoom In",zoomOut:"Zoom Out",zoom:"Zoom to this level",dragZoom:"Drag to zoom",more:"More",draw:"Plot",layer:"Layer Manager",lng:"Longitude",lat:"Latitude"},zh_CN:{home:"回到初始位置",capture:"截屏",center:"查看全图",north:"向上平移",south:"向下平移",east:"向右平移",west:"向左平移",zoomIn:"放大一级",zoomOut:"缩小一级",zoom:"缩放到此级别",dragZoom:"拖动缩放",more:"更多",draw:"标绘",layer:"图层管理",lng:"经度",lat:"纬度"}},Er=U.Control.extend({options:{position:"bottomleft",coordinateUnit:"decimal",showCoordinate:!0,showLevel:!0,showFPS:!0},initialize(e){U.setOptions(this,e),this.lastTime=+new Date,this.frames=0,U.Control.prototype.initialize.call(this,this.options)},onAdd(e){this.map=e,this.lang=e.lang,this.langDic=Al,this._container=U.DomUtil.create("div",`${e.clsPrefix}-statusbar`),this.zoom=e.getZoom();const n=e.getCenter();return this.lng=n.lng,this.lat=n.lat,this.options.showCoordinate&&(this._latlngContainer=U.DomUtil.create("div",`${e.clsPrefix}-statusbar-item coordinate`,this._container),this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng)},${this.getCoordinate(this.lat)}`),this.options.showLevel&&(this._levelContainer=U.DomUtil.create("div",`${e.clsPrefix}-statusbar-item level`,this._container),this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`),this.options.showFPS&&(this._fpsContainer=U.DomUtil.create("div",`${e.clsPrefix}-statusbar-item fps`,this._container),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b>60`),this.initEvt(),this._container},initEvt(){this.map.on("mousemove",e=>{this.lat=e.latlng.lat,this.lng=e.latlng.lng,this._latlngContainer&&(this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng,"lng")},${this.getCoordinate(this.lat,"lat")}`)}),this.map.on("zoomend",()=>{this.zoom=this.map.getZoom(),this._levelContainer&&(this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`)}),this.options.showFPS&&this.calcFPS()},getCoordinate(e,n="lng"){switch(this.options.coordinateUnit){case"decimal":return e.toFixed(6);case"radian":return(e*Math.PI/180).toFixed(10);case"degrees":return this._formatDeg(e,n)}},_formatDeg(e,n){const r=parseFloat(e),u=parseInt(r);let d="";n==="lng"?d=u>0?"E":"W":n==="lat"&&(d=u>0?"N":"S");let f=parseInt((r-u)*60),m=(r-u)*3600-f*60;return u+"°"+f+"′"+m.toFixed(2)+"″"+d},calcFPS(){if(this.frames++,this.frames>=30){const e=Date.now()-this.lastTime,n=Math.round(1e3/(e/this.frames));this._fpsContainer&&(this.frames=0,this.lastTime=Date.now(),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b><span>${n}</span>`)}requestAnimationFrame(this.calcFPS.bind(this))}}),Pr=U.Control.extend({includes:U.Evented?U.Evented.prototype:U.Mixin.Events,options:{position:"bottomright",toggleDisplay:!0,zoomLevelOffset:5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:100,height:100,collapsedWidth:22,collapsedHeight:22,aimingRectOptions:{color:"#ff7800",weight:1,interactive:!1},shadowRectOptions:{color:"#000000",weight:1,interactive:!1,opacity:0,fillOpacity:0},strings:{},mapOptions:{rotate:!0,rotateControl:!1}},initialize(e,n){U.Util.setOptions(this,n),this.options.aimingRectOptions.interactive=!1,this.options.shadowRectOptions.interactive=!1,this._layer=e},onAdd(e){this._mainMap=e,this.lang=e.options.lang??this.options.lang??"zh_CN",this.langDic=yl,this.options.strings={hideText:this.langDic[this.lang].hideEagle,showText:this.langDic[this.lang].showEagle},this._container=U.DomUtil.create("div",`${e.clsPrefix}-eaglemap`),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",U.DomEvent.disableClickPropagation(this._container),U.DomEvent.on(this._container,"mousewheel",U.DomEvent.stopPropagation);let n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs,rotateControl:e.options.rotateControl,rotate:e.options.rotate,bearing:e.options.bearing,lang:this.lang};return n=U.Util.extend(this.options.mapOptions,n),this._eagleMap=new U.Map(this._container,n),this._layer instanceof U.Layer&&this._eagleMap.addLayer(this._layer),this._mainMapMoving=!1,this._eagleMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._eagleMap.whenReady(U.Util.bind(function(){this._aimingRect=new U.Rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._eagleMap),this._shadowRect=new U.Rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._eagleMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._eagleMap.on("movestart",this._onEagleMapMoveStarted,this),this._eagleMap.on("move",this._onEagleMapMoving,this),this._eagleMap.on("moveend",this._onEagleMapMoved,this)},this)),this._container},addTo(e){U.Control.prototype.addTo.call(this,e);const n=this.options.centerFixed||this._mainMap.getCenter();return this._eagleMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove(e){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._eagleMap.off("moveend",this._onEagleMapMoved,this),this._eagleMap.removeLayer(this._layer)},changeLayer(e){this._eagleMap.removeLayer(this._layer),this._layer=e,this._eagleMap.addLayer(this._layer)},_addToggleButton(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),`${this._mainMap.clsPrefix}-eaglemap-toggle-display ${this._mainMap.clsPrefix}-eaglemap-toggle-display-`+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText(){return this.options.minimized?this.langDic[this.lang].showEagle:this.langDic[this.lang].hideEagle},_createButton(e,n,r,u,d,f){const m=U.DomUtil.create("a",r,u);m.innerHTML=e,m.href="#",m.title=n;const g=U.DomEvent.stopPropagation;return U.DomEvent.on(m,"click",g).on(m,"mousedown",g).on(m,"dblclick",g).on(m,"click",U.DomEvent.preventDefault).on(m,"click",d,f),m},_toggleDisplayButtonClicked(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay(e){e!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved(e){if(this._eagleMapMoving)this._eagleMapMoving=!1;else{const n=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._eagleMap.setView(n,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving(e){this._aimingRect.setBounds(this._mainMap.getBounds())},_onEagleMapMoveStarted(e){if(!this.options.centerFixed){const n=this._aimingRect.getBounds(),r=this._eagleMap.latLngToContainerPoint(n.getSouthWest()),u=this._eagleMap.latLngToContainerPoint(n.getNorthEast());this._lastAimingRectPosition={sw:r,ne:u}}},_onEagleMapMoving(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new U.LatLngBounds(this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onEagleMapMoved(e){this._mainMapMoving?this._mainMapMoving=!1:(this._eagleMapMoving=!0,this._mainMap.setView(this._eagleMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed(){const e=this.options.zoomLevelFixed;return this._isDefined(e)&&this._isInteger(e)},_decideZoom(e){if(this._isZoomLevelFixed())return e?this.options.zoomLevelFixed:this._mainMap.getZoom();if(e)return this._mainMap.getZoom()-this.options.zoomLevelOffset;{const n=this._eagleMap.getZoom()-this._mainMap.getZoom(),r=this._eagleMap.getZoom()+this.options.zoomLevelOffset;let u;return n<this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._eagleMap.getMinZoom()+this.options.zoomLevelOffset?this._eagleMap.getZoom()>this._lastEagleMapZoom?(u=this._mainMap.getZoom()+1,this._eagleMap.setZoom(this._eagleMap.getZoom()-1)):u=this._mainMap.getZoom():u=r,this._lastEagleMapZoom=this._eagleMap.getZoom(),u}},_decideMinimized(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._eagleMap.getBounds()):this._minimized},_isInteger(e){return typeof e=="number"},_isDefined(e){return typeof e<"u"},_onToggle(){U.Util.requestAnimFrame(function(){U.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),U.Browser.any3d||U.Util.requestAnimFrame(this._fireToggleEvents,this)},this)},_fireToggleEvents(){U.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);const e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}}),kr=L.FeatureGroup.extend({initialize(e,n){this.markers=[],L.Util.setOptions(this,n);const r=typeof this.options.cssClass=="string"?this.options.cssClass:"vertex-marker",u=this.options.iconSize!==void 0?this.options.iconSize:[24,24],d=this.options.iconAnchor!==void 0?this.options.iconAnchor:[12,12],f=this.options.textFn,m=typeof this.options.firstVertex=="boolean"?this.options.firstVertex:!0,g=typeof this.options.lastVertex=="boolean"?this.options.lastVertex:!0;this.dragable=this.options.dragable||!1;let M=e;typeof e.getLatLngs=="function"&&(M=e.getLatLngs());for(let C=m?0:1,D=M.length-(g?0:1);C<D;C++){const G=M[C];var B=typeof f=="function"?f.call(this,C,M):f||"",E=L.divIcon({className:r,html:B,iconSize:u,iconAnchor:d}),b=L.marker(G,{icon:E,pmIgnore:!0,index:C});this.markers.push(b)}L.FeatureGroup.prototype.initialize.call(this,this.markers)},onAdd(e){this.markers.forEach(n=>{L.FeatureGroup.prototype.addLayer.call(this,n)}),L.FeatureGroup.prototype.onAdd.call(this,e)},onRemove(e){this.markers.forEach(n=>{L.FeatureGroup.prototype.removeLayer.call(this,n)}),L.FeatureGroup.prototype.onRemove.call(this,e)}});class os extends L[L.Layer?"Layer":"Class"]{constructor(n,r,u,d,f){super(),L.setOptions(this,f),this._latlng=n,this._measurement=r,this._title=u,this._rotation=d,this.MEASUREDDATA=null,this.tempAcCurrDrawPoints=null}addTo(n){return n.addLayer(this),this}onAdd(n){this._map=n;const r=this.getPane?this.getPane():n.getPanes().markerPane,u=this._element=L.DomUtil.create("div","leaflet-zoom-animated leaflet-measure-path-measurement",r),d=L.DomUtil.create("div","",u);d.title=this._title,d.innerHTML=this._measurement,n.on("zoomanim",this._animateZoom,this),this._setPosition()}onRemove(n){n.off("zoomanim",this._animateZoom,this),(this.getPane?this.getPane():n.getPanes().markerPane).removeChild(this._element),this._map=null}_setPosition(){L.DomUtil.setPosition(this._element,this._map.latLngToLayerPoint(this._latlng)),this._element.style.transform+=" rotate("+this._rotation+"rad)"}_animateZoom(n){const r=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();L.DomUtil.setPosition(this._element,r),this._element.style.transform+=" rotate("+this._rotation+"rad)"}}U.Map.addInitHook(function(){var e,n,r;this.pm&&this.pm.setLang(this.options.lang.split("_")[0]),(e=this.options.eagleMapControl)!=null&&e.show&&(this.eagleMapControl=new Pr(this.options.eagleMapControl),this.addControl(this.eagleMapControl)),(n=this.options.statusBarControl)!=null&&n.show&&(this.statusBarControl=new Er(this.options.statusBarControl),this.addControl(this.statusBarControl)),(r=this.options.scaleControl)!=null&&r.show&&(this.scaleControl=new U.Control.Scale(Object.assign({position:"bottomleft",maxWidth:100,metric:!0,imperial:!1},this.options.scaleControl)),this.addControl(this.scaleControl)),this.keyboard.disable()}),U.Marker.addInitHook(function(){let n=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;n&&(n=n[0]+"px "+n[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||n||"center bottom",this.on("drag",r=>{r.target._applyRotation()})}),U.Marker.mergeOptions({scale:1,rotation:0,minZoom:0,maxZoom:16,hideOnMinZoom:!0,minificationScale:.6}),U.Marker.include({_setPos(e){this._icon.style.display="initial";const{rotation:n,minZoom:r,maxZoom:u,hideOnMinZoom:d,minificationScale:f}=this.options;if(r&&u&&u-r>0){const m=parseFloat(((1-f)/(u-r)).toFixed(2));this._map._zoom>=u?this.options.scale=1:this._map._zoom>r&this._map._zoom<u?this.options.scale=1-(u-this._map._zoom)*m:this._map._zoom<=r&&d?this._icon.style.display="none":this._map._zoom<=r&&!d&&(this.options.scale=f)}this._map._rotate&&(e=this._map.rotatedPointToMapPanePoint(e)),this._icon&&U.DomUtil.setPosition(this._icon,e,n,e,this.options.scale),this._shadow&&U.DomUtil.setPosition(this._shadow,e,n,e,this.options.scale),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_applyRotation(){this.options.rotation&&(this._icon.style[U.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,U.DomUtil.TRANSFORM==="msTransform"?this._icon.style[U.DomUtil.TRANSFORM]="rotate("+this.options.rotation+"deg)":this._icon.style[U.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotation+"deg)")},startTwinkle(e,n){this.twinkle(e,n)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(e=200,n=1/0){let r=!1,u=0;const d=()=>{u++,n&&e&&u>Math.floor(n/e)?(this.setOpacity(1),this.twinkleTimer=void 0):(r?(this.setOpacity(0),r=!1):(this.setOpacity(1),r=!0),this.twinkleTimer=setTimeout(d,e))};d()}}),U.Map.include({hasLayer:function(e){return e&&U.Util.stamp(e)in this._layers},removeLayerById:function(e){const n=this.getLayer(e);n&&this.removeLayer(n)}}),U.Path.addInitHook(function(){this.options.color&&(this.color=$t.Color.from(this.options.color)),this.options.fillColor&&(this.fillColor=$t.Color.from(this.options.fillColor))}),U.Polyline.addInitHook(function(){this.options.showMeasurements&&this.showMeasurements()}),U.Circle.include({toGeoJSON(){return{type:"Feature",properties:{},geometry:{type:"Circle",radius:this.getRadius(),coordinates:[this._latlng.lng,this._latlng.lat]}}}}),U.Layer.addInitHook(function(){this._leaflet_id=this.options.id||U.stamp({})}),U.LayerGroup.include({getLayerId(e){return e._leaflet_id},hasLayer(e){return e?(["number","string"].includes(typeof e)?e:this.getLayerId(e))in this._layers:!1}}),U.GridLayer.include({_setZoomTransform:function(e,u,r){var d=u,u=(d!=null&&this.options&&(this.options.corrdType=="gcj02"?d=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng):this.options.corrdType=="bd09"&&(u=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng),d=$t.CoordsUtil.bdEncrypt(u.lat,u.lng))),this._map.getZoomScale(r,e.zoom)),d=e.origin.multiplyBy(u).subtract(this._map._getNewPixelOrigin(d,r)).round();U.Browser.any3d?U.DomUtil.setTransform(e.el,d,u):U.DomUtil.setPosition(e.el,d)},_getTiledPixelBounds:function(u){var r=u,u=(r!=null&&this.options&&(this.options.corrdType=="gcj02"?r=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng):this.options.corrdType=="bd09"&&(u=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng),r=$t.CoordsUtil.bdEncrypt(u.lat,u.lng))),this._map),n=u._animatingZoom?Math.max(u._animateToZoom,u.getZoom()):u.getZoom(),n=u.getZoomScale(n,this._tileZoom),r=u.project(r,this._tileZoom).floor(),u=u.getSize().divideBy(2*n);return new U.Bounds(r.subtract(u),r.add(u))}}),U.TileLayer.addInitHook(function(){this.on("add",function(e){this._container.style.filter=Object.keys(this.options.style||{}).map(n=>`${n}(${this.options.style[n]})`).join(" ")})}),U.Polyline.include({_originalOnAdd:U.Polyline.prototype.onAdd,_originalOnRemove:U.Polyline.prototype.onRemove,_originalSetLatLngs:U.Polyline.prototype.setLatLngs,_originalAddLatLng:U.Polyline.prototype.addLatLng,setLatLngs:function(e){var n=this._map&&this._vertexMarkers&&this._latlngs.length!==e.length;this._originalSetLatLngs(e),n&&(this.removeVertexMarkers(),this.destroyVertexMarkers(),this.createVertexMarkers()),this.options.showMeasurements&&this.updateMeasurements()},removeVertexMarkers:function(){this._map&&this._vertexMarkers&&(this._map.removeLayer(this._vertexMarkers),this._vertexMarkers=void 0)},onAdd:function(e){this._originalOnAdd(e),this.createVertexMarkers(),this.options.showMeasurements&&this.showMeasurements(this.options.measurementOptions)},createVertexMarkers:function(){if(this._map){var e=this.options.vertexMarkers||{};this._vertexMarkers===void 0&&this.options.vertexMarkers&&(this._vertexMarkers=new kr(this,e).addTo(this._map))}},destroyVertexMarkers:function(){this._vertexMarkers&&(this._vertexMarkers=void 0)},onRemove:function(e){this.removeVertexMarkers(),this._originalOnRemove(e),this.options.showMeasurements&&this.hideMeasurements()},showMeasurements(e){if(!this._map||this._measurementLayer)return this;this._measurementOptions=U.extend({showCloseButton:!1,minPixelDistance:30,showDistances:!0,showArea:!0,showAggregate:!0,lang:{totalLength:"Total length",totalArea:"Total area",segmentLength:"Segment length"},map:this._map},e||{}),this._measurementLayer=new U.LayerGroup().addTo(this._map);debugger;return console.log(111,this),this.updateMeasurements(),this._map.on("zoomend",this.updateMeasurements,this),this},hideMeasurements(){return this._map.off("zoomend",this.updateMeasurements,this),this._measurementLayer?(this._map.removeLayer(this._measurementLayer),this._measurementLayer=null,this):this},tempFormatDistance(e){const n=this._map.options.crs,r=new Array;for(let D=0;D<e.length;D++){const G=n.project(e[D]);r.push(G)}const u=r.length;let d=0,f,m,g,M,B,E;for(let D=0;D<u-1;D++)f=r[D],g=f.x,M=f.y,m=r[D+1],B=m.x,E=m.y,d+=Math.sqrt((g-B)*(g-B)+(M-E)*(M-E));const b=d;let C="";return b>1e3?C="总长:"+Number(b/1e3).toFixed(1)+"公里":C="总长:"+Math.round(b)+"米",C},tempMoveFormatDistance(e,n){const r=this._map.options.crs;e=r.project(e),e=new Array(e),n=r.project(n),e.push(n);const u=e.length;let d=0,f,m,g,M,B,E;for(let D=0;D<u-1;D++)f=e[D],g=f.x,M=f.y,m=e[D+1],B=m.x,E=m.y,d+=Math.sqrt((g-B)*(g-B)+(M-E)*(M-E));const b=d;let C="";return b>1e3?C=Number(b/1e3).toFixed(1)+"公里":C=Math.round(b)+"米",C},tempFormatArea(e){const n=this._map.options.crs,r=new Array;for(let j=0;j<e.length;j++){const W=n.project(e[j]);r.push(W)}let u=!0;for(var d=0;d<r.length-1;d++){r[d].x>180?u=!0:u=!1;break}const f=r.length;let m=0,g,M,B=0,E=0,b=0,C=0;if(r!=null){let j;if(u)for(var d=0;d<f;d++)j=(d+1)%f,g=r[d],M=r[j],m+=g.x*M.y,m-=g.y*M.x;else{let at,rt=0,ct=0;for(var d=0;d<f;d++)g=r[d],at=g.x,d==0?(rt=at,ct=at):(at<rt&&(rt=at),at>ct&&(ct=at));const yt=parseInt(((rt+ct)/2+3)/6);for(var d=0;d<f;d++)j=(d+1)%f,d==0?(g=r[d],B=widget.LonLatToXA80N(yt,g.x,g.y)[0],E=widget.LonLatToXA80N(yt,g.x,g.y)[1]):(B=b,E=C),M=r[j],b=widget.LonLatToXA80N(yt,M.x,M.y)[0],C=widget.LonLatToXA80N(yt,M.x,M.y)[1],m+=B*C,m-=b*E}}const D=Math.abs(m/2);let G="";return D>1e6?G="总面积:"+Number(D/1e6).toFixed(4)+`平方公里
5
- (约:`+Number(D*.0015).toFixed(3)+"亩)":G="总面积:"+D.toFixed(0)+`平方米
6
- (约:`+Number(D*.0015).toFixed(3)+"亩)",G},updateMeasurements(){if(!this._measurementLayer)return this;const e=this.getLatLngs();new Array().push(e);let r=this.getLatLngs();const u=this instanceof U.Polygon,d=this._measurementOptions;let f,m,g,M,B;if(r&&r.length&&U.Util.isArray(r[0])&&(r=r[0]),this._measurementLayer.clearLayers(),this._measurementOptions.showDistances&&r.length>1){e.length-1;for(let E=1,b=r.length;u&&E<=b||E<b;E++)if(f=r[E-1],m=r[E%b],f.distanceTo(m),g=this._map.latLngToLayerPoint(f),M=this._map.latLngToLayerPoint(m),B=g.distanceTo(M),B>=d.minPixelDistance){const C=this.tempMoveFormatDistance(f,m);new os(this._map.layerPointToLatLng([(g.x+M.x)/2,(g.y+M.y)/2]),C,d.lang.segmentLength,this._getRotation(f,m),d).addTo(this._measurementLayer)}!u&&this._measurementOptions.showAggregate&&(new os(m,this.tempFormatDistance(e),d.lang.totalLength,0,d).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatDistance(e))}return u&&d.showArea&&r.length>2&&(new os(this.getBounds().getCenter(),this.tempFormatArea(e[0]),d.lang.totalArea,0,d).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatArea(e[0])),this},_getRotation(e,n){const r=this._map.project(e),u=this._map.project(n);return Math.atan((u.y-r.y)/(u.x-r.x))}}),U.LatLng.prototype.toArray=function(){return[this.lat,this.lng]},U.Path.include({startTwinkle(e,n,r={}){this.twinkle(e,n,r)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(e=200,n=1/0,r){let u=!1,d=0;const f=this.options,m=()=>{d++,n&&e&&d>Math.floor(n/e)?(this.setStyle({...f,fill:!0,stroke:!0}),this.twinkleTimer=void 0):(u?(this.setStyle({...r,fill:!1,stroke:!1}),u=!1):(this.setStyle({...r,fill:!0,stroke:!0}),u=!0),this.twinkleTimer=setTimeout(m,e))};m()},getArea(e){if(this instanceof U.Polyline){var n,r=this._latlngs[0],u=(e||this._map).options.crs,d=r.length;let f=0,m,g;if(r!=null)for(let M=0;M<d;M++)n=(M+1)%d,m=180<r[M].lng&&90<r[M].lat?{x:r[M].lat,y:r[M].lng}:u.project(r[M]),g=180<r[n].lng&&90<r[n].lat?{x:r[n].lat,y:r[n].lng}:u.project(r[n]),f=(f+=m.x*g.y)-m.y*g.x;return Math.abs(f/2)}else return this instanceof U.Circle?2*Math.PI*this.getRadius():null},getLength(e){if(this instanceof U.Polyline){for(var n=[],r=(e||this._map).options.crs,u=this._latlngs,d=0;d<u.length;d++)this instanceof U.Polygon?n.push(...u[d]):this instanceof U.Polyline&&n.push(u[d]);let B=0,E,b;for(let C=0,D=n.length-1;C<D;C++){E=180<n[C][0]&&90<n[C][1]?{x:n[C].lat,y:n[C].lng}:r.project(n[C]),b=180<n[C+1][0]&&90<n[C+1][1]?{x:n[C+1].lat,y:n[C+1].lng}:r.project(n[C+1]);var f=E.x,m=E.y,g=b.x,M=b.y;B+=Math.sqrt((f-g)*(f-g)+(m-M)*(m-M))}return B}else return this instanceof U.Circle?Math.PI*Math.pow(this.getRadius(),2):null}}),U.Control.mergeOptions({offset:[0,0]}),U.Control.addInitHook(function(){const{className:e,offset:[n,r]}=this.options;(n||r)&&setTimeout(()=>{const u=this.getContainer();u&&(u.style.transform=`translate(${n}px, ${r}px)`,e&&u.classList.add(e))},200)}),U.Canvas.include({_fillStroke:function(e,n){var r=n.options;if(r.fill&&(e.globalAlpha=r.fillOpacity,e.fillStyle=r.fillColor||r.color,e.fill(r.fillRule||"evenodd")),r.stroke&&r.weight!==0&&(e.setLineDash&&e.setLineDash(n.options&&n.options._dashArray||[]),e.globalAlpha=r.opacity,e.lineWidth=r.weight,e.strokeStyle=r.color,e.lineCap=r.lineCap,e.lineJoin=r.lineJoin,e.stroke(),r.img)){const u=new Image;u.src=r.img,u.onload=function(){e.save(),e.clip();var d=n instanceof U.Circle?n._pxBounds:n._rawPxBounds,f=d.getSize(),m=e.createPattern(u,"repeat");e.fillStyle=m,e.fillRect(d.min.x,d.min.y,f.x,f.y),e.restore()}}}}),U.SVG.include({_updateStyle:function(e){var n=e._path,r=e.options;n&&(r.stroke?(n.setAttribute("stroke",r.color),n.setAttribute("stroke-opacity",r.opacity),n.setAttribute("stroke-width",r.weight),n.setAttribute("stroke-linecap",r.lineCap),n.setAttribute("stroke-linejoin",r.lineJoin),r.dashArray?n.setAttribute("stroke-dasharray",r.dashArray):n.removeAttribute("stroke-dasharray"),r.dashOffset?n.setAttribute("stroke-dashoffset",r.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),r.img?(typeof r.img=="string"&&r.img.match(/^url\(/)?this.__fillPattern(e):n.setAttribute("fill",r.fillColor||r.color),n.setAttribute("fill-opacity",r.fillOpacity),n.setAttribute("fill-rule",r.fillRule||"evenodd")):(n.setAttribute("fill",r.fillColor),n.setAttribute("fill-opacity",e instanceof U.Polyline?0:r.fillOpacity)))},__fillPattern:function(e){var n=e._path,r=e.options;this._defs||(this._defs=L.SVG.create("defs"),this._container.appendChild(this._defs));var u=r.img.substring(4,r.img.length-1),d=u+(Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17));d+=new Date().getUTCMilliseconds();var f=document.getElementById(d);if(!f){var m=new Image;m.src=u,f=L.SVG.create("pattern"),f.setAttribute("id",d),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("patternUnits","userSpaceOnUse"),f.setAttribute("width","24"),f.setAttribute("height","24");var g=L.SVG.create("rect");g.setAttribute("width",24),g.setAttribute("height",24),g.setAttribute("x",0),g.setAttribute("x",0),g.setAttribute("fill",r.fillColor||r.color),f.appendChild(g),this._defs.appendChild(f);var M=L.SVG.create("image");M.setAttribute("x","0"),M.setAttribute("y","0"),M.setAttributeNS("http://www.w3.org/1999/xlink","href",u),M.setAttribute("width","24"),M.setAttribute("height","24"),f.appendChild(M),m.onload=function(){f.setAttribute("width",m.width),f.setAttribute("height",m.height),M.setAttribute("width",m.width),M.setAttribute("height",m.height)}}n.setAttribute("fill","url(#"+d+")")}});var vl={exports:{}};function Ml(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var n=1;n<=60;++n)e("EPSG:"+(32600+n),"+proj=utm +zone="+n+" +datum=WGS84 +units=m"),e("EPSG:"+(32700+n),"+proj=utm +zone="+n+" +south +datum=WGS84 +units=m");e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}var Ji=1,Qi=2,Mn=3,xl=4,Sr=5,rh=6378137,Ll=6356752314e-3,oh=.0066943799901413165,hs=484813681109536e-20,ut=Math.PI/2,bl=.16666666666666666,wl=.04722222222222222,Cl=.022156084656084655,dt=1e-10,ye=.017453292519943295,ui=57.29577951308232,jt=Math.PI/4,ls=Math.PI*2,he=3.14159265359,Fe={};Fe.greenwich=0,Fe.lisbon=-9.131906111111,Fe.paris=2.337229166667,Fe.bogota=-74.080916666667,Fe.madrid=-3.687938888889,Fe.rome=12.452333333333,Fe.bern=7.439583333333,Fe.jakarta=106.807719444444,Fe.ferro=-17.666666666667,Fe.brussels=4.367975,Fe.stockholm=18.058277777778,Fe.athens=23.7163375,Fe.oslo=10.722916666667;const El={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var hh=/[\s_\-\/\(\)]/g;function Di(e,n){if(e[n])return e[n];for(var r=Object.keys(e),u=n.toLowerCase().replace(hh,""),d=-1,f,m;++d<r.length;)if(f=r[d],m=f.toLowerCase().replace(hh,""),m===u)return e[f]}function Br(e){var n={},r=e.split("+").map(function(g){return g.trim()}).filter(function(g){return g}).reduce(function(g,M){var B=M.split("=");return B.push(!0),g[B[0].toLowerCase()]=B[1],g},{}),u,d,f,m={proj:"projName",datum:"datumCode",rf:function(g){n.rf=parseFloat(g)},lat_0:function(g){n.lat0=g*ye},lat_1:function(g){n.lat1=g*ye},lat_2:function(g){n.lat2=g*ye},lat_ts:function(g){n.lat_ts=g*ye},lon_0:function(g){n.long0=g*ye},lon_1:function(g){n.long1=g*ye},lon_2:function(g){n.long2=g*ye},alpha:function(g){n.alpha=parseFloat(g)*ye},gamma:function(g){n.rectified_grid_angle=parseFloat(g)*ye},lonc:function(g){n.longc=g*ye},x_0:function(g){n.x0=parseFloat(g)},y_0:function(g){n.y0=parseFloat(g)},k_0:function(g){n.k0=parseFloat(g)},k:function(g){n.k0=parseFloat(g)},a:function(g){n.a=parseFloat(g)},b:function(g){n.b=parseFloat(g)},r:function(g){n.a=n.b=parseFloat(g)},r_a:function(){n.R_A=!0},zone:function(g){n.zone=parseInt(g,10)},south:function(){n.utmSouth=!0},towgs84:function(g){n.datum_params=g.split(",").map(function(M){return parseFloat(M)})},to_meter:function(g){n.to_meter=parseFloat(g)},units:function(g){n.units=g;var M=Di(El,g);M&&(n.to_meter=M.to_meter)},from_greenwich:function(g){n.from_greenwich=g*ye},pm:function(g){var M=Di(Fe,g);n.from_greenwich=(M||parseFloat(g))*ye},nadgrids:function(g){g==="@null"?n.datumCode="none":n.nadgrids=g},axis:function(g){var M="ewnsud";g.length===3&&M.indexOf(g.substr(0,1))!==-1&&M.indexOf(g.substr(1,1))!==-1&&M.indexOf(g.substr(2,1))!==-1&&(n.axis=g)},approx:function(){n.approx=!0}};for(u in r)d=r[u],u in m?(f=m[u],typeof f=="function"?f(d):n[f]=d):n[u]=d;return typeof n.datumCode=="string"&&n.datumCode!=="WGS84"&&(n.datumCode=n.datumCode.toLowerCase()),n}class lh{static getId(n){const r=n.find(u=>Array.isArray(u)&&u[0]==="ID");return r&&r.length>=3?{authority:r[1],code:parseInt(r[2],10)}:null}static convertUnit(n,r="unit"){if(!n||n.length<3)return{type:r,name:"unknown",conversion_factor:null};const u=n[1],d=parseFloat(n[2])||null,f=n.find(g=>Array.isArray(g)&&g[0]==="ID"),m=f?{authority:f[1],code:parseInt(f[2],10)}:null;return{type:r,name:u,conversion_factor:d,id:m}}static convertAxis(n){const r=n[1]||"Unknown";let u;const d=r.match(/^\((.)\)$/);if(d){const B=d[1].toUpperCase();if(B==="E")u="east";else if(B==="N")u="north";else if(B==="U")u="up";else throw new Error(`Unknown axis abbreviation: ${B}`)}else u=n[2]?n[2].toLowerCase():"unknown";const f=n.find(B=>Array.isArray(B)&&B[0]==="ORDER"),m=f?parseInt(f[1],10):null,g=n.find(B=>Array.isArray(B)&&(B[0]==="LENGTHUNIT"||B[0]==="ANGLEUNIT"||B[0]==="SCALEUNIT")),M=this.convertUnit(g);return{name:r,direction:u,unit:M,order:m}}static extractAxes(n){return n.filter(r=>Array.isArray(r)&&r[0]==="AXIS").map(r=>this.convertAxis(r)).sort((r,u)=>(r.order||0)-(u.order||0))}static convert(n,r={}){switch(n[0]){case"PROJCRS":r.type="ProjectedCRS",r.name=n[1],r.base_crs=n.find(C=>Array.isArray(C)&&C[0]==="BASEGEOGCRS")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="BASEGEOGCRS")):null,r.conversion=n.find(C=>Array.isArray(C)&&C[0]==="CONVERSION")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="CONVERSION")):null;const u=n.find(C=>Array.isArray(C)&&C[0]==="CS");u&&(r.coordinate_system={type:u[1],axis:this.extractAxes(n)});const d=n.find(C=>Array.isArray(C)&&C[0]==="LENGTHUNIT");if(d){const C=this.convertUnit(d);r.coordinate_system.unit=C}r.id=this.getId(n);break;case"BASEGEOGCRS":case"GEOGCRS":r.type="GeographicCRS",r.name=n[1];const f=n.find(C=>Array.isArray(C)&&(C[0]==="DATUM"||C[0]==="ENSEMBLE"));if(f){const C=this.convert(f);f[0]==="ENSEMBLE"?r.datum_ensemble=C:r.datum=C;const D=n.find(G=>Array.isArray(G)&&G[0]==="PRIMEM");D&&D[1]!=="Greenwich"&&(C.prime_meridian={name:D[1],longitude:parseFloat(D[2])})}r.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(n)},r.id=this.getId(n);break;case"DATUM":r.type="GeodeticReferenceFrame",r.name=n[1],r.ellipsoid=n.find(C=>Array.isArray(C)&&C[0]==="ELLIPSOID")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":r.type="DatumEnsemble",r.name=n[1],r.members=n.filter(C=>Array.isArray(C)&&C[0]==="MEMBER").map(C=>({type:"DatumEnsembleMember",name:C[1],id:this.getId(C)}));const m=n.find(C=>Array.isArray(C)&&C[0]==="ENSEMBLEACCURACY");m&&(r.accuracy=parseFloat(m[1]));const g=n.find(C=>Array.isArray(C)&&C[0]==="ELLIPSOID");g&&(r.ellipsoid=this.convert(g)),r.id=this.getId(n);break;case"ELLIPSOID":r.type="Ellipsoid",r.name=n[1],r.semi_major_axis=parseFloat(n[2]),r.inverse_flattening=parseFloat(n[3]),n.find(C=>Array.isArray(C)&&C[0]==="LENGTHUNIT")&&this.convert(n.find(C=>Array.isArray(C)&&C[0]==="LENGTHUNIT"),r);break;case"CONVERSION":r.type="Conversion",r.name=n[1],r.method=n.find(C=>Array.isArray(C)&&C[0]==="METHOD")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="METHOD")):null,r.parameters=n.filter(C=>Array.isArray(C)&&C[0]==="PARAMETER").map(C=>this.convert(C));break;case"METHOD":r.type="Method",r.name=n[1],r.id=this.getId(n);break;case"PARAMETER":r.type="Parameter",r.name=n[1],r.value=parseFloat(n[2]),r.unit=this.convertUnit(n.find(C=>Array.isArray(C)&&(C[0]==="LENGTHUNIT"||C[0]==="ANGLEUNIT"||C[0]==="SCALEUNIT"))),r.id=this.getId(n);break;case"BOUNDCRS":r.type="BoundCRS";const M=n.find(C=>Array.isArray(C)&&C[0]==="SOURCECRS");if(M){const C=M.find(D=>Array.isArray(D));r.source_crs=C?this.convert(C):null}const B=n.find(C=>Array.isArray(C)&&C[0]==="TARGETCRS");if(B){const C=B.find(D=>Array.isArray(D));r.target_crs=C?this.convert(C):null}const E=n.find(C=>Array.isArray(C)&&C[0]==="ABRIDGEDTRANSFORMATION");E?r.transformation=this.convert(E):r.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(r.type="Transformation",r.name=n[1],r.method=n.find(C=>Array.isArray(C)&&C[0]==="METHOD")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="METHOD")):null,r.parameters=n.filter(C=>Array.isArray(C)&&(C[0]==="PARAMETER"||C[0]==="PARAMETERFILE")).map(C=>{if(C[0]==="PARAMETER")return this.convert(C);if(C[0]==="PARAMETERFILE")return{name:C[1],value:C[2],id:{authority:"EPSG",code:8656}}}),r.parameters.length===7){const C=r.parameters[6];C.name==="Scale difference"&&(C.value=Math.round((C.value-1)*1e12)/1e6)}r.id=this.getId(n);break;case"AXIS":r.coordinate_system||(r.coordinate_system={type:"unspecified",axis:[]}),r.coordinate_system.axis.push(this.convertAxis(n));break;case"LENGTHUNIT":const b=this.convertUnit(n,"LinearUnit");r.coordinate_system&&r.coordinate_system.axis&&r.coordinate_system.axis.forEach(C=>{C.unit||(C.unit=b)}),b.conversion_factor&&b.conversion_factor!==1&&r.semi_major_axis&&(r.semi_major_axis={value:r.semi_major_axis,unit:b});break;default:r.keyword=n[0];break}return r}}class Pl extends lh{static convert(n,r={}){return super.convert(n,r),r.coordinate_system&&r.coordinate_system.subtype==="Cartesian"&&delete r.coordinate_system,r.usage&&delete r.usage,r}}class kl extends lh{static convert(n,r={}){super.convert(n,r);const u=n.find(f=>Array.isArray(f)&&f[0]==="CS");u&&(r.coordinate_system={subtype:u[1],axis:this.extractAxes(n)});const d=n.find(f=>Array.isArray(f)&&f[0]==="USAGE");if(d){const f=d.find(M=>Array.isArray(M)&&M[0]==="SCOPE"),m=d.find(M=>Array.isArray(M)&&M[0]==="AREA"),g=d.find(M=>Array.isArray(M)&&M[0]==="BBOX");r.usage={},f&&(r.usage.scope=f[1]),m&&(r.usage.area=m[1]),g&&(r.usage.bbox=g.slice(1))}return r}}function Sl(e){return e.find(n=>Array.isArray(n)&&n[0]==="USAGE")?"2019":(e.find(n=>Array.isArray(n)&&n[0]==="CS")||e[0]==="BOUNDCRS"||e[0]==="PROJCRS"||e[0]==="GEOGCRS","2015")}function Bl(e){return(Sl(e)==="2019"?kl:Pl).convert(e)}function Tl(e){const n=e.toUpperCase();return n.includes("PROJCRS")||n.includes("GEOGCRS")||n.includes("BOUNDCRS")||n.includes("VERTCRS")||n.includes("LENGTHUNIT")||n.includes("ANGLEUNIT")||n.includes("SCALEUNIT")?"WKT2":(n.includes("PROJCS")||n.includes("GEOGCS")||n.includes("LOCAL_CS")||n.includes("VERT_CS")||n.includes("UNIT"),"WKT1")}var us=1,uh=2,ch=3,fa=4,dh=5,Tr=-1,Dl=/\s/,Ol=/[A-Za-z]/,Il=/[A-Za-z84_]/,pa=/[,\]]/,fh=/[\d\.E\-\+]/;function Mi(e){if(typeof e!="string")throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=us}Mi.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==fa)for(;Dl.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case us:return this.neutral(e);case uh:return this.keyword(e);case fa:return this.quoted(e);case dh:return this.afterquote(e);case ch:return this.number(e);case Tr:return}},Mi.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=fa;return}if(pa.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)},Mi.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=us;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=us,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Tr);return}},Mi.prototype.number=function(e){if(fh.test(e)){this.word+=e;return}if(pa.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)},Mi.prototype.quoted=function(e){if(e==='"'){this.state=dh;return}this.word+=e},Mi.prototype.keyword=function(e){if(Il.test(e)){this.word+=e;return}if(e==="["){var n=[];n.push(this.word),this.level++,this.root===null?this.root=n:this.currentObject.push(n),this.stack.push(this.currentObject),this.currentObject=n,this.state=us;return}if(pa.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)},Mi.prototype.neutral=function(e){if(Ol.test(e)){this.word=e,this.state=uh;return}if(e==='"'){this.word="",this.state=fa;return}if(fh.test(e)){this.word=e,this.state=ch;return}if(pa.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)},Mi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Tr)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Rl(e){var n=new Mi(e);return n.output()}function Dr(e,n,r){Array.isArray(n)&&(r.unshift(n),n=null);var u=n?{}:e,d=r.reduce(function(f,m){return xn(m,f),f},u);n&&(e[n]=d)}function xn(e,n){if(!Array.isArray(e)){n[e]=!0;return}var r=e.shift();if(r==="PARAMETER"&&(r=e.shift()),e.length===1){if(Array.isArray(e[0])){n[r]={},xn(e[0],n[r]);return}n[r]=e[0];return}if(!e.length){n[r]=!0;return}if(r==="TOWGS84"){n[r]=e;return}if(r==="AXIS"){r in n||(n[r]=[]),n[r].push(e);return}Array.isArray(r)||(n[r]={});var u;switch(r){case"UNIT":case"PRIMEM":case"VERT_DATUM":n[r]={name:e[0].toLowerCase(),convert:e[1]},e.length===3&&xn(e[2],n[r]);return;case"SPHEROID":case"ELLIPSOID":n[r]={name:e[0],a:e[1],rf:e[2]},e.length===4&&xn(e[3],n[r]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":e[0]=["name",e[0]],Dr(n,r,e);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":e[0]=["name",e[0]],Dr(n,r,e),n[r].type=r;return;default:for(u=-1;++u<e.length;)if(!Array.isArray(e[u]))return xn(e,n[r]);return Dr(n,r,e)}}var Fl=.017453292519943295;function ei(e){return e*Fl}function ph(e){const n=(e.projName||"").toLowerCase().replace(/_/g," ");!e.long0&&e.longc&&(n==="albers conic equal area"||n==="lambert azimuthal equal area")&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&(n==="stereographic south pole"||n==="polar stereographic (variant b)")?(e.lat0=ei(e.lat1>0?90:-90),e.lat_ts=e.lat1,delete e.lat1):!e.lat_ts&&e.lat0&&(n==="polar stereographic"||n==="polar stereographic (variant a)")&&(e.lat_ts=e.lat0,e.lat0=ei(e.lat0>0?90:-90),delete e.lat1)}function _h(e){let n={units:null,to_meter:void 0};return typeof e=="string"?(n.units=e.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.units==="meter"&&(n.to_meter=1)):e&&e.name&&(n.units=e.name.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.to_meter=e.conversion_factor),n}function mh(e){return typeof e=="object"?e.value*e.unit.conversion_factor:e}function gh(e,n){e.ellipsoid.radius?(n.a=e.ellipsoid.radius,n.rf=0):(n.a=mh(e.ellipsoid.semi_major_axis),e.ellipsoid.inverse_flattening!==void 0?n.rf=e.ellipsoid.inverse_flattening:e.ellipsoid.semi_major_axis!==void 0&&e.ellipsoid.semi_minor_axis!==void 0&&(n.rf=n.a/(n.a-mh(e.ellipsoid.semi_minor_axis))))}function _a(e,n={}){return!e||typeof e!="object"?e:e.type==="BoundCRS"?(_a(e.source_crs,n),e.transformation&&(e.transformation.method&&e.transformation.method.name==="NTv2"?n.nadgrids=e.transformation.parameters[0].value:n.datum_params=e.transformation.parameters.map(r=>r.value)),n):(Object.keys(e).forEach(r=>{const u=e[r];if(u!==null)switch(r){case"name":if(n.srsCode)break;n.name=u,n.srsCode=u;break;case"type":u==="GeographicCRS"?n.projName="longlat":u==="ProjectedCRS"&&e.conversion&&e.conversion.method&&(n.projName=e.conversion.method.name);break;case"datum":case"datum_ensemble":u.ellipsoid&&(n.ellps=u.ellipsoid.name,gh(u,n)),u.prime_meridian&&(n.from_greenwich=u.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":n.ellps=u.name,gh(u,n);break;case"prime_meridian":n.long0=(u.longitude||0)*Math.PI/180;break;case"coordinate_system":if(u.axis){if(n.axis=u.axis.map(d=>{const f=d.direction;if(f==="east")return"e";if(f==="north")return"n";if(f==="west")return"w";if(f==="south")return"s";throw new Error(`Unknown axis direction: ${f}`)}).join("")+"u",u.unit){const{units:d,to_meter:f}=_h(u.unit);n.units=d,n.to_meter=f}else if(u.axis[0]&&u.axis[0].unit){const{units:d,to_meter:f}=_h(u.axis[0].unit);n.units=d,n.to_meter=f}}break;case"id":u.authority&&u.code&&(n.title=u.authority+":"+u.code);break;case"conversion":u.method&&u.method.name&&(n.projName=u.method.name),u.parameters&&u.parameters.forEach(d=>{const f=d.name.toLowerCase().replace(/\s+/g,"_"),m=d.value;d.unit&&d.unit.conversion_factor?n[f]=m*d.unit.conversion_factor:d.unit==="degree"?n[f]=m*Math.PI/180:n[f]=m});break;case"unit":u.name&&(n.units=u.name.toLowerCase(),n.units==="metre"&&(n.units="meter")),u.conversion_factor&&(n.to_meter=u.conversion_factor);break;case"base_crs":_a(u,n),n.datumCode=u.id?u.id.authority+"_"+u.id.code:u.name;break}}),n.latitude_of_false_origin!==void 0&&(n.lat0=n.latitude_of_false_origin),n.longitude_of_false_origin!==void 0&&(n.long0=n.longitude_of_false_origin),n.latitude_of_standard_parallel!==void 0&&(n.lat0=n.latitude_of_standard_parallel,n.lat1=n.latitude_of_standard_parallel),n.latitude_of_1st_standard_parallel!==void 0&&(n.lat1=n.latitude_of_1st_standard_parallel),n.latitude_of_2nd_standard_parallel!==void 0&&(n.lat2=n.latitude_of_2nd_standard_parallel),n.latitude_of_projection_centre!==void 0&&(n.lat0=n.latitude_of_projection_centre),n.longitude_of_projection_centre!==void 0&&(n.longc=n.longitude_of_projection_centre),n.easting_at_false_origin!==void 0&&(n.x0=n.easting_at_false_origin),n.northing_at_false_origin!==void 0&&(n.y0=n.northing_at_false_origin),n.latitude_of_natural_origin!==void 0&&(n.lat0=n.latitude_of_natural_origin),n.longitude_of_natural_origin!==void 0&&(n.long0=n.longitude_of_natural_origin),n.longitude_of_origin!==void 0&&(n.long0=n.longitude_of_origin),n.false_easting!==void 0&&(n.x0=n.false_easting),n.easting_at_projection_centre&&(n.x0=n.easting_at_projection_centre),n.false_northing!==void 0&&(n.y0=n.false_northing),n.northing_at_projection_centre&&(n.y0=n.northing_at_projection_centre),n.standard_parallel_1!==void 0&&(n.lat1=n.standard_parallel_1),n.standard_parallel_2!==void 0&&(n.lat2=n.standard_parallel_2),n.scale_factor_at_natural_origin!==void 0&&(n.k0=n.scale_factor_at_natural_origin),n.scale_factor_at_projection_centre!==void 0&&(n.k0=n.scale_factor_at_projection_centre),n.scale_factor_on_pseudo_standard_parallel!==void 0&&(n.k0=n.scale_factor_on_pseudo_standard_parallel),n.azimuth!==void 0&&(n.alpha=n.azimuth),n.azimuth_at_projection_centre!==void 0&&(n.alpha=n.azimuth_at_projection_centre),n.angle_from_rectified_to_skew_grid&&(n.rectified_grid_angle=n.angle_from_rectified_to_skew_grid),ph(n),n)}var Gl=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function zl(e,n){var r=n[0],u=n[1];!(r in e)&&u in e&&(e[r]=e[u],n.length===3&&(e[r]=n[2](e[r])))}function yh(e){for(var n=Object.keys(e),r=0,u=n.length;r<u;++r){var d=n[r];Gl.indexOf(d)!==-1&&Nl(e[d]),typeof e[d]=="object"&&yh(e[d])}}function Nl(e){if(e.AUTHORITY){var n=Object.keys(e.AUTHORITY)[0];n&&n in e.AUTHORITY&&(e.title=n+":"+e.AUTHORITY[n])}if(e.type==="GEOGCS"?e.projName="longlat":e.type==="LOCAL_CS"?(e.projName="identity",e.local=!0):typeof e.PROJECTION=="object"?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var r="",u=0,d=e.AXIS.length;u<d;++u){var f=[e.AXIS[u][0].toLowerCase(),e.AXIS[u][1].toLowerCase()];f[0].indexOf("north")!==-1||(f[0]==="y"||f[0]==="lat")&&f[1]==="north"?r+="n":f[0].indexOf("south")!==-1||(f[0]==="y"||f[0]==="lat")&&f[1]==="south"?r+="s":f[0].indexOf("east")!==-1||(f[0]==="x"||f[0]==="lon")&&f[1]==="east"?r+="e":(f[0].indexOf("west")!==-1||(f[0]==="x"||f[0]==="lon")&&f[1]==="west")&&(r+="w")}r.length===2&&(r+="u"),r.length===3&&(e.axis=r)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.UNIT.convert&&(e.type==="GEOGCS"?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var m=e.GEOGCS;e.type==="GEOGCS"&&(m=e),m&&(m.DATUM?e.datumCode=m.DATUM.name.toLowerCase():e.datumCode=m.name.toLowerCase(),e.datumCode.slice(0,2)==="d_"&&(e.datumCode=e.datumCode.slice(2)),e.datumCode==="new_zealand_1949"&&(e.datumCode="nzgd49"),(e.datumCode==="wgs_1984"||e.datumCode==="world_geodetic_system_1984")&&(e.PROJECTION==="Mercator_Auxiliary_Sphere"&&(e.sphere=!0),e.datumCode="wgs84"),e.datumCode==="belge_1972"&&(e.datumCode="rnb72"),m.DATUM&&m.DATUM.SPHEROID&&(e.ellps=m.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=m.DATUM.SPHEROID.a,e.rf=parseFloat(m.DATUM.SPHEROID.rf,10)),m.DATUM&&m.DATUM.TOWGS84&&(e.datum_params=m.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),e.datumCode==="ch1903+"&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a),e.rectified_grid_angle&&(e.rectified_grid_angle=ei(e.rectified_grid_angle));function g(E){var b=e.to_meter||1;return E*b}var M=function(E){return zl(e,E)},B=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",ei],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ei],["x0","false_easting",g],["y0","false_northing",g],["long0","central_meridian",ei],["lat0","latitude_of_origin",ei],["lat0","standard_parallel_1",ei],["lat1","standard_parallel_1",ei],["lat2","standard_parallel_2",ei],["azimuth","Azimuth"],["alpha","azimuth",ei],["srsCode","name"]];B.forEach(M),ph(e)}function Or(e){if(typeof e=="object")return _a(e);const n=Tl(e);var r=Rl(e);if(n==="WKT2"){const f=Bl(r);return _a(f)}var u=r[0],d={};return xn(r,d),yh(d),d[u]}function Be(e){var n=this;if(arguments.length===2){var r=arguments[1];typeof r=="string"?r.charAt(0)==="+"?Be[e]=Br(arguments[1]):Be[e]=Or(arguments[1]):Be[e]=r}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(u){return Array.isArray(u)?Be.apply(n,u):Be(u)});if(typeof e=="string"){if(e in Be)return Be[e]}else"EPSG"in e?Be["EPSG:"+e.EPSG]=e:"ESRI"in e?Be["ESRI:"+e.ESRI]=e:"IAU2000"in e?Be["IAU2000:"+e.IAU2000]=e:console.log(e);return}}Ml(Be);function Ul(e){return typeof e=="string"}function Zl(e){return e in Be}function jl(e){return e.indexOf("+")!==0&&e.indexOf("[")!==-1||typeof e=="object"&&!("srsCode"in e)}var ql=["3857","900913","3785","102113"];function Hl(e){var n=Di(e,"authority");if(n){var r=Di(n,"epsg");return r&&ql.indexOf(r)>-1}}function Vl(e){var n=Di(e,"extension");if(n)return Di(n,"proj4")}function $l(e){return e[0]==="+"}function Kl(e){if(Ul(e)){if(Zl(e))return Be[e];if(jl(e)){var n=Or(e);if(Hl(n))return Be["EPSG:3857"];var r=Vl(n);return r?Br(r):n}if($l(e))return Br(e)}else return"projName"in e?e:Or(e)}function Ah(e,n){e=e||{};var r,u;if(!n)return e;for(u in n)r=n[u],r!==void 0&&(e[u]=r);return e}function ci(e,n,r){var u=e*n;return r/Math.sqrt(1-u*u)}function cs(e){return e<0?-1:1}function _t(e){return Math.abs(e)<=he?e:e-cs(e)*ls}function ii(e,n,r){var u=e*r,d=.5*e;return u=Math.pow((1-u)/(1+u),d),Math.tan(.5*(ut-n))/u}function ds(e,n){for(var r=.5*e,u,d,f=ut-2*Math.atan(n),m=0;m<=15;m++)if(u=e*Math.sin(f),d=ut-2*Math.atan(n*Math.pow((1-u)/(1+u),r))-f,f+=d,Math.abs(d)<=1e-10)return f;return-9999}function Wl(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Xl(e){var n=e.x,r=e.y;if(r*ui>90&&r*ui<-90&&n*ui>180&&n*ui<-180)return null;var u,d;if(Math.abs(Math.abs(r)-ut)<=dt)return null;if(this.sphere)u=this.x0+this.a*this.k0*_t(n-this.long0),d=this.y0+this.a*this.k0*Math.log(Math.tan(jt+.5*r));else{var f=Math.sin(r),m=ii(this.e,r,f);u=this.x0+this.a*this.k0*_t(n-this.long0),d=this.y0-this.a*this.k0*Math.log(m)}return e.x=u,e.y=d,e}function Yl(e){var n=e.x-this.x0,r=e.y-this.y0,u,d;if(this.sphere)d=ut-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var f=Math.exp(-r/(this.a*this.k0));if(d=ds(this.e,f),d===-9999)return null}return u=_t(this.long0+n/(this.a*this.k0)),e.x=u,e.y=d,e}var Jl=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const Ql={init:Wl,forward:Xl,inverse:Yl,names:Jl};function tu(){}function vh(e){return e}var eu=["longlat","identity"],iu=[Ql,{init:tu,forward:vh,inverse:vh,names:eu}],tn={},Ln=[];function Mh(e,n){var r=Ln.length;return e.names?(Ln[r]=e,e.names.forEach(function(u){tn[u.toLowerCase()]=r}),this):(console.log(n),!0)}function xh(e){return e.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function nu(e){if(!e)return!1;var n=e.toLowerCase();if(typeof tn[n]<"u"&&Ln[tn[n]]||(n=xh(n),n in tn&&Ln[tn[n]]))return Ln[tn[n]]}function su(){iu.forEach(Mh)}const au={start:su,add:Mh,get:nu};var Lh={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const ru=Lh.WGS84;function ou(e,n,r,u){var d=e*e,f=n*n,m=(d-f)/d,g=0;u?(e*=1-m*(bl+m*(wl+m*Cl)),d=e*e,m=0):g=Math.sqrt(m);var M=(d-f)/f;return{es:m,e:g,ep2:M}}function hu(e,n,r,u,d){if(!e){var f=Di(Lh,u);f||(f=ru),e=f.a,n=f.b,r=f.rf}return r&&!n&&(n=(1-1/r)*e),(r===0||Math.abs(e-n)<dt)&&(d=!0,n=e),{a:e,b:n,rf:r,sphere:d}}var ma={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var lu in ma){var Ir=ma[lu];Ir.datumName&&(ma[Ir.datumName]=Ir)}function uu(e,n,r,u,d,f,m){var g={};return e===void 0||e==="none"?g.datum_type=Sr:g.datum_type=xl,n&&(g.datum_params=n.map(parseFloat),(g.datum_params[0]!==0||g.datum_params[1]!==0||g.datum_params[2]!==0)&&(g.datum_type=Ji),g.datum_params.length>3&&(g.datum_params[3]!==0||g.datum_params[4]!==0||g.datum_params[5]!==0||g.datum_params[6]!==0)&&(g.datum_type=Qi,g.datum_params[3]*=hs,g.datum_params[4]*=hs,g.datum_params[5]*=hs,g.datum_params[6]=g.datum_params[6]/1e6+1)),m&&(g.datum_type=Mn,g.grids=m),g.a=r,g.b=u,g.es=d,g.ep2=f,g}var Rr={};function cu(e,n,r){return n instanceof ArrayBuffer?du(e,n,r):{ready:fu(e,n)}}function du(e,n,r){var u=!0;r!==void 0&&r.includeErrorFields===!1&&(u=!1);var d=new DataView(n),f=mu(d),m=gu(d,f),g=yu(d,m,f,u),M={header:m,subgrids:g};return Rr[e]=M,M}async function fu(e,n){for(var r=[],u=await n.getImageCount(),d=u-1;d>=0;d--){var f=await n.getImage(d),m=await f.readRasters(),g=m,M=[f.getWidth(),f.getHeight()],B=f.getBoundingBox().map(bh),E=[f.fileDirectory.ModelPixelScale[0],f.fileDirectory.ModelPixelScale[1]].map(bh),b=B[0]+(M[0]-1)*E[0],C=B[3]-(M[1]-1)*E[1],D=g[0],G=g[1],j=[];for(let rt=M[1]-1;rt>=0;rt--)for(let ct=M[0]-1;ct>=0;ct--){var W=rt*M[0]+ct;j.push([-Oi(G[W]),Oi(D[W])])}r.push({del:E,lim:M,ll:[-b,C],cvs:j})}var at={header:{nSubgrids:u},subgrids:r};return Rr[e]=at,at}function pu(e){if(e===void 0)return null;var n=e.split(",");return n.map(_u)}function _u(e){if(e.length===0)return null;var n=e[0]==="@";return n&&(e=e.slice(1)),e==="null"?{name:"null",mandatory:!n,grid:null,isNull:!0}:{name:e,mandatory:!n,grid:Rr[e]||null,isNull:!1}}function bh(e){return e*Math.PI/180}function Oi(e){return e/3600*Math.PI/180}function mu(e){var n=e.getInt32(8,!1);return n===11?!1:(n=e.getInt32(8,!0),n!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function gu(e,n){return{nFields:e.getInt32(8,n),nSubgridFields:e.getInt32(24,n),nSubgrids:e.getInt32(40,n),shiftType:Fr(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,n),fromSemiMinorAxis:e.getFloat64(136,n),toSemiMajorAxis:e.getFloat64(152,n),toSemiMinorAxis:e.getFloat64(168,n)}}function Fr(e,n,r){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(n,r)))}function yu(e,n,r,u){for(var d=176,f=[],m=0;m<n.nSubgrids;m++){var g=vu(e,d,r),M=Mu(e,d,g,r,u),B=Math.round(1+(g.upperLongitude-g.lowerLongitude)/g.longitudeInterval),E=Math.round(1+(g.upperLatitude-g.lowerLatitude)/g.latitudeInterval);f.push({ll:[Oi(g.lowerLongitude),Oi(g.lowerLatitude)],del:[Oi(g.longitudeInterval),Oi(g.latitudeInterval)],lim:[B,E],count:g.gridNodeCount,cvs:Au(M)});var b=16;u===!1&&(b=8),d+=176+g.gridNodeCount*b}return f}function Au(e){return e.map(function(n){return[Oi(n.longitudeShift),Oi(n.latitudeShift)]})}function vu(e,n,r){return{name:Fr(e,n+8,n+16).trim(),parent:Fr(e,n+24,n+24+8).trim(),lowerLatitude:e.getFloat64(n+72,r),upperLatitude:e.getFloat64(n+88,r),lowerLongitude:e.getFloat64(n+104,r),upperLongitude:e.getFloat64(n+120,r),latitudeInterval:e.getFloat64(n+136,r),longitudeInterval:e.getFloat64(n+152,r),gridNodeCount:e.getInt32(n+168,r)}}function Mu(e,n,r,u,d){var f=n+176,m=16;d===!1&&(m=8);for(var g=[],M=0;M<r.gridNodeCount;M++){var B={latitudeShift:e.getFloat32(f+M*m,u),longitudeShift:e.getFloat32(f+M*m+4,u)};d!==!1&&(B.latitudeAccuracy=e.getFloat32(f+M*m+8,u),B.longitudeAccuracy=e.getFloat32(f+M*m+12,u)),g.push(B)}return g}function ni(e,n){if(!(this instanceof ni))return new ni(e);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,n=n||function(B){if(B)throw B};var r=Kl(e);if(typeof r!="object"){n("Could not parse to valid json: "+e);return}var u=ni.projections.get(r.projName);if(!u){n("Could not get projection name from: "+e);return}if(r.datumCode&&r.datumCode!=="none"){var d=Di(ma,r.datumCode);d&&(r.datum_params=r.datum_params||(d.towgs84?d.towgs84.split(","):null),r.ellps=d.ellipse,r.datumName=d.datumName?d.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var f=hu(r.a,r.b,r.rf,r.ellps,r.sphere),m=ou(f.a,f.b,f.rf,r.R_A),g=pu(r.nadgrids),M=r.datum||uu(r.datumCode,r.datum_params,f.a,f.b,m.es,m.ep2,g);Ah(this,r),Ah(this,u),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=m.es,this.e=m.e,this.ep2=m.ep2,this.datum=M,"init"in this&&typeof this.init=="function"&&this.init(),n(null,this)}ni.projections=au,ni.projections.start();function xu(e,n){return e.datum_type!==n.datum_type||e.a!==n.a||Math.abs(e.es-n.es)>5e-11?!1:e.datum_type===Ji?e.datum_params[0]===n.datum_params[0]&&e.datum_params[1]===n.datum_params[1]&&e.datum_params[2]===n.datum_params[2]:e.datum_type===Qi?e.datum_params[0]===n.datum_params[0]&&e.datum_params[1]===n.datum_params[1]&&e.datum_params[2]===n.datum_params[2]&&e.datum_params[3]===n.datum_params[3]&&e.datum_params[4]===n.datum_params[4]&&e.datum_params[5]===n.datum_params[5]&&e.datum_params[6]===n.datum_params[6]:!0}function wh(e,n,r){var u=e.x,d=e.y,f=e.z?e.z:0,m,g,M,B;if(d<-ut&&d>-1.001*ut)d=-ut;else if(d>ut&&d<1.001*ut)d=ut;else{if(d<-ut)return{x:-1/0,y:-1/0,z:e.z};if(d>ut)return{x:1/0,y:1/0,z:e.z}}return u>Math.PI&&(u-=2*Math.PI),g=Math.sin(d),B=Math.cos(d),M=g*g,m=r/Math.sqrt(1-n*M),{x:(m+f)*B*Math.cos(u),y:(m+f)*B*Math.sin(u),z:(m*(1-n)+f)*g}}function Ch(e,n,r,u){var d=1e-12,f=d*d,m=30,g,M,B,E,b,C,D,G,j,W,at,rt,ct,yt=e.x,mt=e.y,xt=e.z?e.z:0,Dt,It,zt;if(g=Math.sqrt(yt*yt+mt*mt),M=Math.sqrt(yt*yt+mt*mt+xt*xt),g/r<d){if(Dt=0,M/r<d)return It=ut,zt=-u,{x:e.x,y:e.y,z:e.z}}else Dt=Math.atan2(mt,yt);B=xt/M,E=g/M,b=1/Math.sqrt(1-n*(2-n)*E*E),G=E*(1-n)*b,j=B*b,ct=0;do ct++,D=r/Math.sqrt(1-n*j*j),zt=g*G+xt*j-D*(1-n*j*j),C=n*D/(D+zt),b=1/Math.sqrt(1-C*(2-C)*E*E),W=E*(1-C)*b,at=B*b,rt=at*G-W*j,G=W,j=at;while(rt*rt>f&&ct<m);return It=Math.atan(at/Math.abs(W)),{x:Dt,y:It,z:zt}}function Lu(e,n,r){if(n===Ji)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(n===Qi){var u=r[0],d=r[1],f=r[2],m=r[3],g=r[4],M=r[5],B=r[6];return{x:B*(e.x-M*e.y+g*e.z)+u,y:B*(M*e.x+e.y-m*e.z)+d,z:B*(-g*e.x+m*e.y+e.z)+f}}}function bu(e,n,r){if(n===Ji)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(n===Qi){var u=r[0],d=r[1],f=r[2],m=r[3],g=r[4],M=r[5],B=r[6],E=(e.x-u)/B,b=(e.y-d)/B,C=(e.z-f)/B;return{x:E+M*b-g*C,y:-M*E+b+m*C,z:g*E-m*b+C}}}function ga(e){return e===Ji||e===Qi}function wu(e,n,r){if(xu(e,n)||e.datum_type===Sr||n.datum_type===Sr)return r;var u=e.a,d=e.es;if(e.datum_type===Mn){var f=Eh(e,!1,r);if(f!==0)return;u=rh,d=oh}var m=n.a,g=n.b,M=n.es;if(n.datum_type===Mn&&(m=rh,g=Ll,M=oh),d===M&&u===m&&!ga(e.datum_type)&&!ga(n.datum_type))return r;if(r=wh(r,d,u),ga(e.datum_type)&&(r=Lu(r,e.datum_type,e.datum_params)),ga(n.datum_type)&&(r=bu(r,n.datum_type,n.datum_params)),r=Ch(r,M,m,g),n.datum_type===Mn){var B=Eh(n,!0,r);if(B!==0)return}return r}function Eh(e,n,r){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;var u={x:-r.x,y:r.y},d={x:Number.NaN,y:Number.NaN},f=[];t:for(var m=0;m<e.grids.length;m++){var g=e.grids[m];if(f.push(g.name),g.isNull){d=u;break}if(g.grid===null){if(g.mandatory)return console.log("Unable to find mandatory grid '"+g.name+"'"),-1;continue}for(var M=g.grid.subgrids,B=0,E=M.length;B<E;B++){var b=M[B],C=(Math.abs(b.del[1])+Math.abs(b.del[0]))/1e4,D=b.ll[0]-C,G=b.ll[1]-C,j=b.ll[0]+(b.lim[0]-1)*b.del[0]+C,W=b.ll[1]+(b.lim[1]-1)*b.del[1]+C;if(!(G>u.y||D>u.x||W<u.y||j<u.x)&&(d=Cu(u,n,b),!isNaN(d.x)))break t}}return isNaN(d.x)?(console.log("Failed to find a grid shift table for location '"+-u.x*ui+" "+u.y*ui+" tried: '"+f+"'"),-1):(r.x=-d.x,r.y=d.y,0)}function Cu(e,n,r){var u={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return u;var d={x:e.x,y:e.y};d.x-=r.ll[0],d.y-=r.ll[1],d.x=_t(d.x-Math.PI)+Math.PI;var f=Ph(d,r);if(n){if(isNaN(f.x))return u;f.x=d.x-f.x,f.y=d.y-f.y;var m=9,g=1e-12,M,B;do{if(B=Ph(f,r),isNaN(B.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}M={x:d.x-(B.x+f.x),y:d.y-(B.y+f.y)},f.x+=M.x,f.y+=M.y}while(m--&&Math.abs(M.x)>g&&Math.abs(M.y)>g);if(m<0)return console.log("Inverse grid shift iterator failed to converge."),u;u.x=_t(f.x+r.ll[0]),u.y=f.y+r.ll[1]}else isNaN(f.x)||(u.x=e.x+f.x,u.y=e.y+f.y);return u}function Ph(e,n){var r={x:e.x/n.del[0],y:e.y/n.del[1]},u={x:Math.floor(r.x),y:Math.floor(r.y)},d={x:r.x-1*u.x,y:r.y-1*u.y},f={x:Number.NaN,y:Number.NaN},m;if(u.x<0||u.x>=n.lim[0]||u.y<0||u.y>=n.lim[1])return f;m=u.y*n.lim[0]+u.x;var g={x:n.cvs[m][0],y:n.cvs[m][1]};m++;var M={x:n.cvs[m][0],y:n.cvs[m][1]};m+=n.lim[0];var B={x:n.cvs[m][0],y:n.cvs[m][1]};m--;var E={x:n.cvs[m][0],y:n.cvs[m][1]},b=d.x*d.y,C=d.x*(1-d.y),D=(1-d.x)*(1-d.y),G=(1-d.x)*d.y;return f.x=D*g.x+C*M.x+G*E.x+b*B.x,f.y=D*g.y+C*M.y+G*E.y+b*B.y,f}function kh(e,n,r){var u=r.x,d=r.y,f=r.z||0,m,g,M,B={};for(M=0;M<3;M++)if(!(n&&M===2&&r.z===void 0))switch(M===0?(m=u,"ew".indexOf(e.axis[M])!==-1?g="x":g="y"):M===1?(m=d,"ns".indexOf(e.axis[M])!==-1?g="y":g="x"):(m=f,g="z"),e.axis[M]){case"e":B[g]=m;break;case"w":B[g]=-m;break;case"n":B[g]=m;break;case"s":B[g]=-m;break;case"u":r[g]!==void 0&&(B.z=m);break;case"d":r[g]!==void 0&&(B.z=-m);break;default:return null}return B}function Sh(e){var n={x:e[0],y:e[1]};return e.length>2&&(n.z=e[2]),e.length>3&&(n.m=e[3]),n}function Eu(e){Bh(e.x),Bh(e.y)}function Bh(e){if(typeof Number.isFinite=="function"){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if(typeof e!="number"||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function Pu(e,n){return(e.datum.datum_type===Ji||e.datum.datum_type===Qi||e.datum.datum_type===Mn)&&n.datumCode!=="WGS84"||(n.datum.datum_type===Ji||n.datum.datum_type===Qi||n.datum.datum_type===Mn)&&e.datumCode!=="WGS84"}function ya(e,n,r,u){var d;Array.isArray(r)?r=Sh(r):r={x:r.x,y:r.y,z:r.z,m:r.m};var f=r.z!==void 0;if(Eu(r),e.datum&&n.datum&&Pu(e,n)&&(d=new ni("WGS84"),r=ya(e,d,r,u),e=d),u&&e.axis!=="enu"&&(r=kh(e,!1,r)),e.projName==="longlat")r={x:r.x*ye,y:r.y*ye,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),r=e.inverse(r),!r)return;if(e.from_greenwich&&(r.x+=e.from_greenwich),r=wu(e.datum,n.datum,r),!!r)return r=r,n.from_greenwich&&(r={x:r.x-n.from_greenwich,y:r.y,z:r.z||0}),n.projName==="longlat"?r={x:r.x*ui,y:r.y*ui,z:r.z||0}:(r=n.forward(r),n.to_meter&&(r={x:r.x/n.to_meter,y:r.y/n.to_meter,z:r.z||0})),u&&n.axis!=="enu"?kh(n,!0,r):(r&&!f&&delete r.z,r)}var Th=ni("WGS84");function Gr(e,n,r,u){var d,f,m;return Array.isArray(r)?(d=ya(e,n,r,u)||{x:NaN,y:NaN},r.length>2?typeof e.name<"u"&&e.name==="geocent"||typeof n.name<"u"&&n.name==="geocent"?typeof d.z=="number"?[d.x,d.y,d.z].concat(r.slice(3)):[d.x,d.y,r[2]].concat(r.slice(3)):[d.x,d.y].concat(r.slice(2)):[d.x,d.y]):(f=ya(e,n,r,u),m=Object.keys(r),m.length===2||m.forEach(function(g){if(typeof e.name<"u"&&e.name==="geocent"||typeof n.name<"u"&&n.name==="geocent"){if(g==="x"||g==="y"||g==="z")return}else if(g==="x"||g==="y")return;f[g]=r[g]}),f)}function Aa(e){return e instanceof ni?e:typeof e=="object"&&"oProj"in e?e.oProj:ni(e)}function ku(e,n,r){var u,d,f=!1,m;return typeof n>"u"?(d=Aa(e),u=Th,f=!0):(typeof n.x<"u"||Array.isArray(n))&&(r=n,d=Aa(e),u=Th,f=!0),u||(u=Aa(e)),d||(d=Aa(n)),r?Gr(u,d,r):(m={forward:function(g,M){return Gr(u,d,g,M)},inverse:function(g,M){return Gr(d,u,g,M)}},f&&(m.oProj=d),m)}var Dh=6,Oh="AJSAJS",Ih="AFAFAF",bn=65,Ge=73,Ve=79,fs=86,ps=90;const Su={forward:Rh,inverse:Bu,toPoint:Fh};function Rh(e,n){return n=n||5,Ou(Tu({lat:e[1],lon:e[0]}),n)}function Bu(e){var n=Nr(Nh(e.toUpperCase()));return n.lat&&n.lon?[n.lon,n.lat,n.lon,n.lat]:[n.left,n.bottom,n.right,n.top]}function Fh(e){var n=Nr(Nh(e.toUpperCase()));return n.lat&&n.lon?[n.lon,n.lat]:[(n.left+n.right)/2,(n.top+n.bottom)/2]}function zr(e){return e*(Math.PI/180)}function Gh(e){return 180*(e/Math.PI)}function Tu(e){var n=e.lat,r=e.lon,u=6378137,d=.00669438,f=.9996,m,g,M,B,E,b,C,D=zr(n),G=zr(r),j,W;W=Math.floor((r+180)/6)+1,r===180&&(W=60),n>=56&&n<64&&r>=3&&r<12&&(W=32),n>=72&&n<84&&(r>=0&&r<9?W=31:r>=9&&r<21?W=33:r>=21&&r<33?W=35:r>=33&&r<42&&(W=37)),m=(W-1)*6-180+3,j=zr(m),g=d/(1-d),M=u/Math.sqrt(1-d*Math.sin(D)*Math.sin(D)),B=Math.tan(D)*Math.tan(D),E=g*Math.cos(D)*Math.cos(D),b=Math.cos(D)*(G-j),C=u*((1-d/4-3*d*d/64-5*d*d*d/256)*D-(3*d/8+3*d*d/32+45*d*d*d/1024)*Math.sin(2*D)+(15*d*d/256+45*d*d*d/1024)*Math.sin(4*D)-35*d*d*d/3072*Math.sin(6*D));var at=f*M*(b+(1-B+E)*b*b*b/6+(5-18*B+B*B+72*E-58*g)*b*b*b*b*b/120)+5e5,rt=f*(C+M*Math.tan(D)*(b*b/2+(5-B+9*E+4*E*E)*b*b*b*b/24+(61-58*B+B*B+600*E-330*g)*b*b*b*b*b*b/720));return n<0&&(rt+=1e7),{northing:Math.round(rt),easting:Math.round(at),zoneNumber:W,zoneLetter:Du(n)}}function Nr(e){var n=e.northing,r=e.easting,u=e.zoneLetter,d=e.zoneNumber;if(d<0||d>60)return null;var f=.9996,m=6378137,g=.00669438,M,B=(1-Math.sqrt(1-g))/(1+Math.sqrt(1-g)),E,b,C,D,G,j,W,at,rt,ct=r-5e5,yt=n;u<"N"&&(yt-=1e7),W=(d-1)*6-180+3,M=g/(1-g),j=yt/f,at=j/(m*(1-g/4-3*g*g/64-5*g*g*g/256)),rt=at+(3*B/2-27*B*B*B/32)*Math.sin(2*at)+(21*B*B/16-55*B*B*B*B/32)*Math.sin(4*at)+151*B*B*B/96*Math.sin(6*at),E=m/Math.sqrt(1-g*Math.sin(rt)*Math.sin(rt)),b=Math.tan(rt)*Math.tan(rt),C=M*Math.cos(rt)*Math.cos(rt),D=m*(1-g)/Math.pow(1-g*Math.sin(rt)*Math.sin(rt),1.5),G=ct/(E*f);var mt=rt-E*Math.tan(rt)/D*(G*G/2-(5+3*b+10*C-4*C*C-9*M)*G*G*G*G/24+(61+90*b+298*C+45*b*b-252*M-3*C*C)*G*G*G*G*G*G/720);mt=Gh(mt);var xt=(G-(1+2*b+C)*G*G*G/6+(5-2*C+28*b-3*C*C+8*M+24*b*b)*G*G*G*G*G/120)/Math.cos(rt);xt=W+Gh(xt);var Dt;if(e.accuracy){var It=Nr({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});Dt={top:It.lat,right:It.lon,bottom:mt,left:xt}}else Dt={lat:mt,lon:xt};return Dt}function Du(e){var n="Z";return 84>=e&&e>=72?n="X":72>e&&e>=64?n="W":64>e&&e>=56?n="V":56>e&&e>=48?n="U":48>e&&e>=40?n="T":40>e&&e>=32?n="S":32>e&&e>=24?n="R":24>e&&e>=16?n="Q":16>e&&e>=8?n="P":8>e&&e>=0?n="N":0>e&&e>=-8?n="M":-8>e&&e>=-16?n="L":-16>e&&e>=-24?n="K":-24>e&&e>=-32?n="J":-32>e&&e>=-40?n="H":-40>e&&e>=-48?n="G":-48>e&&e>=-56?n="F":-56>e&&e>=-64?n="E":-64>e&&e>=-72?n="D":-72>e&&e>=-80&&(n="C"),n}function Ou(e,n){var r="00000"+e.easting,u="00000"+e.northing;return e.zoneNumber+e.zoneLetter+Iu(e.easting,e.northing,e.zoneNumber)+r.substr(r.length-5,n)+u.substr(u.length-5,n)}function Iu(e,n,r){var u=zh(r),d=Math.floor(e/1e5),f=Math.floor(n/1e5)%20;return Ru(d,f,u)}function zh(e){var n=e%Dh;return n===0&&(n=Dh),n}function Ru(e,n,r){var u=r-1,d=Oh.charCodeAt(u),f=Ih.charCodeAt(u),m=d+e-1,g=f+n,M=!1;m>ps&&(m=m-ps+bn-1,M=!0),(m===Ge||d<Ge&&m>Ge||(m>Ge||d<Ge)&&M)&&m++,(m===Ve||d<Ve&&m>Ve||(m>Ve||d<Ve)&&M)&&(m++,m===Ge&&m++),m>ps&&(m=m-ps+bn-1),g>fs?(g=g-fs+bn-1,M=!0):M=!1,(g===Ge||f<Ge&&g>Ge||(g>Ge||f<Ge)&&M)&&g++,(g===Ve||f<Ve&&g>Ve||(g>Ve||f<Ve)&&M)&&(g++,g===Ge&&g++),g>fs&&(g=g-fs+bn-1);var B=String.fromCharCode(m)+String.fromCharCode(g);return B}function Nh(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var n=e.length,r=null,u="",d,f=0;!/[A-Z]/.test(d=e.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+e;u+=d,f++}var m=parseInt(u,10);if(f===0||f+3>n)throw"MGRSPoint bad conversion from: "+e;var g=e.charAt(f++);if(g<="A"||g==="B"||g==="Y"||g>="Z"||g==="I"||g==="O")throw"MGRSPoint zone letter "+g+" not handled: "+e;r=e.substring(f,f+=2);for(var M=zh(m),B=Fu(r.charAt(0),M),E=Gu(r.charAt(1),M);E<zu(g);)E+=2e6;var b=n-f;if(b%2!==0)throw`MGRSPoint has to have an even number
4
+ */var rh;function oh(){return rh||(rh=1,function(t,n){(function(r,u){u(n)})(vn,function(r){var u="1.9.4";function d(e){var a,l,_,v;for(l=1,_=arguments.length;l<_;l++){v=arguments[l];for(a in v)e[a]=v[a]}return e}var f=Object.create||function(){function e(){}return function(a){return e.prototype=a,new e}}();function p(e,a){var l=Array.prototype.slice;if(e.bind)return e.bind.apply(e,l.call(arguments,1));var _=l.call(arguments,2);return function(){return e.apply(a,_.length?_.concat(l.call(arguments)):arguments)}}var g=0;function M(e){return"_leaflet_id"in e||(e._leaflet_id=++g),e._leaflet_id}function B(e,a,l){var _,v,k,Z;return Z=function(){_=!1,v&&(k.apply(l,v),v=!1)},k=function(){_?v=arguments:(e.apply(l,arguments),setTimeout(Z,a),_=!0)},k}function E(e,a,l){var _=a[1],v=a[0],k=_-v;return e===_&&l?e:((e-v)%k+k)%k+v}function x(){return!1}function C(e,a){if(a===!1)return e;var l=Math.pow(10,a===void 0?6:a);return Math.round(e*l)/l}function T(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function G(e){return T(e).split(/\s+/)}function j(e,a){Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?f(e.options):{});for(var l in a)e.options[l]=a[l];return e.options}function W(e,a,l){var _=[];for(var v in e)_.push(encodeURIComponent(l?v.toUpperCase():v)+"="+encodeURIComponent(e[v]));return(!a||a.indexOf("?")===-1?"?":"&")+_.join("&")}var at=/\{ *([\w_ -]+) *\}/g;function rt(e,a){return e.replace(at,function(l,_){var v=a[_];if(v===void 0)throw new Error("No value provided for variable "+l);return typeof v=="function"&&(v=v(a)),v})}var ct=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function yt(e,a){for(var l=0;l<e.length;l++)if(e[l]===a)return l;return-1}var mt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function xt(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var Dt=0;function It(e){var a=+new Date,l=Math.max(0,16-(a-Dt));return Dt=a+l,window.setTimeout(e,l)}var zt=window.requestAnimationFrame||xt("RequestAnimationFrame")||It,Yt=window.cancelAnimationFrame||xt("CancelAnimationFrame")||xt("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function Et(e,a,l){if(l&&zt===It)e.call(a);else return zt.call(window,p(e,a))}function jt(e){e&&Yt.call(window,e)}var be={__proto__:null,extend:d,create:f,bind:p,get lastId(){return g},stamp:M,throttle:B,wrapNum:E,falseFn:x,formatNum:C,trim:T,splitWords:G,setOptions:j,getParamString:W,template:rt,isArray:ct,indexOf:yt,emptyImageUrl:mt,requestFn:zt,cancelFn:Yt,requestAnimFrame:Et,cancelAnimFrame:jt};function pe(){}pe.extend=function(e){var a=function(){j(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},l=a.__super__=this.prototype,_=f(l);_.constructor=a,a.prototype=_;for(var v in this)Object.prototype.hasOwnProperty.call(this,v)&&v!=="prototype"&&v!=="__super__"&&(a[v]=this[v]);return e.statics&&d(a,e.statics),e.includes&&(oo(e.includes),d.apply(null,[_].concat(e.includes))),d(_,e),delete _.statics,delete _.includes,_.options&&(_.options=l.options?f(l.options):{},d(_.options,e.options)),_._initHooks=[],_.callInitHooks=function(){if(!this._initHooksCalled){l.callInitHooks&&l.callInitHooks.call(this),this._initHooksCalled=!0;for(var k=0,Z=_._initHooks.length;k<Z;k++)_._initHooks[k].call(this)}},a},pe.include=function(e){var a=this.prototype.options;return d(this.prototype,e),e.options&&(this.prototype.options=a,this.mergeOptions(e.options)),this},pe.mergeOptions=function(e){return d(this.prototype.options,e),this},pe.addInitHook=function(e){var a=Array.prototype.slice.call(arguments,1),l=typeof e=="function"?e:function(){this[e].apply(this,a)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(l),this};function oo(e){if(!(typeof L>"u"||!L||!L.Mixin)){e=ct(e)?e:[e];for(var a=0;a<e.length;a++)e[a]===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)}}var De={on:function(e,a,l){if(typeof e=="object")for(var _ in e)this._on(_,e[_],a);else{e=G(e);for(var v=0,k=e.length;v<k;v++)this._on(e[v],a,l)}return this},off:function(e,a,l){if(!arguments.length)delete this._events;else if(typeof e=="object")for(var _ in e)this._off(_,e[_],a);else{e=G(e);for(var v=arguments.length===1,k=0,Z=e.length;k<Z;k++)v?this._off(e[k]):this._off(e[k],a,l)}return this},_on:function(e,a,l,_){if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}if(this._listens(e,a,l)===!1){l===this&&(l=void 0);var v={fn:a,ctx:l};_&&(v.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(v)}},_off:function(e,a,l){var _,v,k;if(this._events&&(_=this._events[e],!!_)){if(arguments.length===1){if(this._firingCount)for(v=0,k=_.length;v<k;v++)_[v].fn=x;delete this._events[e];return}if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}var Z=this._listens(e,a,l);if(Z!==!1){var Y=_[Z];this._firingCount&&(Y.fn=x,this._events[e]=_=_.slice()),_.splice(Z,1)}}},fire:function(e,a,l){if(!this.listens(e,l))return this;var _=d({},a,{type:e,target:this,sourceTarget:a&&a.sourceTarget||this});if(this._events){var v=this._events[e];if(v){this._firingCount=this._firingCount+1||1;for(var k=0,Z=v.length;k<Z;k++){var Y=v[k],st=Y.fn;Y.once&&this.off(e,st,Y.ctx),st.call(Y.ctx||this,_)}this._firingCount--}}return l&&this._propagateEvent(_),this},listens:function(e,a,l,_){typeof e!="string"&&console.warn('"string" type argument expected');var v=a;typeof a!="function"&&(_=!!a,v=void 0,l=void 0);var k=this._events&&this._events[e];if(k&&k.length&&this._listens(e,v,l)!==!1)return!0;if(_){for(var Z in this._eventParents)if(this._eventParents[Z].listens(e,a,l,_))return!0}return!1},_listens:function(e,a,l){if(!this._events)return!1;var _=this._events[e]||[];if(!a)return!!_.length;l===this&&(l=void 0);for(var v=0,k=_.length;v<k;v++)if(_[v].fn===a&&_[v].ctx===l)return v;return!1},once:function(e,a,l){if(typeof e=="object")for(var _ in e)this._on(_,e[_],a,!0);else{e=G(e);for(var v=0,k=e.length;v<k;v++)this._on(e[v],a,l,!0)}return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[M(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[M(e)],this},_propagateEvent:function(e){for(var a in this._eventParents)this._eventParents[a].fire(e.type,d({layer:e.target,propagatedFrom:e.target},e),!0)}};De.addEventListener=De.on,De.removeEventListener=De.clearAllEventListeners=De.off,De.addOneTimeEventListener=De.once,De.fireEvent=De.fire,De.hasEventListeners=De.listens;var en=pe.extend(De);function Pt(e,a,l){this.x=l?Math.round(e):e,this.y=l?Math.round(a):a}var Cs=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};Pt.prototype={clone:function(){return new Pt(this.x,this.y)},add:function(e){return this.clone()._add(Ct(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(Ct(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new Pt(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new Pt(this.x/e.x,this.y/e.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=Cs(this.x),this.y=Cs(this.y),this},distanceTo:function(e){e=Ct(e);var a=e.x-this.x,l=e.y-this.y;return Math.sqrt(a*a+l*l)},equals:function(e){return e=Ct(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=Ct(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+C(this.x)+", "+C(this.y)+")"}};function Ct(e,a,l){return e instanceof Pt?e:ct(e)?new Pt(e[0],e[1]):e==null?e:typeof e=="object"&&"x"in e&&"y"in e?new Pt(e.x,e.y):new Pt(e,a,l)}function te(e,a){if(e)for(var l=a?[e,a]:e,_=0,v=l.length;_<v;_++)this.extend(l[_])}te.prototype={extend:function(e){var a,l;if(!e)return this;if(e instanceof Pt||typeof e[0]=="number"||"x"in e)a=l=Ct(e);else if(e=we(e),a=e.min,l=e.max,!a||!l)return this;return!this.min&&!this.max?(this.min=a.clone(),this.max=l.clone()):(this.min.x=Math.min(a.x,this.min.x),this.max.x=Math.max(l.x,this.max.x),this.min.y=Math.min(a.y,this.min.y),this.max.y=Math.max(l.y,this.max.y)),this},getCenter:function(e){return Ct((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return Ct(this.min.x,this.max.y)},getTopRight:function(){return Ct(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(e){var a,l;return typeof e[0]=="number"||e instanceof Pt?e=Ct(e):e=we(e),e instanceof te?(a=e.min,l=e.max):a=l=e,a.x>=this.min.x&&l.x<=this.max.x&&a.y>=this.min.y&&l.y<=this.max.y},intersects:function(e){e=we(e);var a=this.min,l=this.max,_=e.min,v=e.max,k=v.x>=a.x&&_.x<=l.x,Z=v.y>=a.y&&_.y<=l.y;return k&&Z},overlaps:function(e){e=we(e);var a=this.min,l=this.max,_=e.min,v=e.max,k=v.x>a.x&&_.x<l.x,Z=v.y>a.y&&_.y<l.y;return k&&Z},isValid:function(){return!!(this.min&&this.max)},pad:function(e){var a=this.min,l=this.max,_=Math.abs(a.x-l.x)*e,v=Math.abs(a.y-l.y)*e;return we(Ct(a.x-_,a.y-v),Ct(l.x+_,l.y+v))},equals:function(e){return e?(e=we(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight())):!1}};function we(e,a){return!e||e instanceof te?e:new te(e,a)}function Ce(e,a){if(e)for(var l=a?[e,a]:e,_=0,v=l.length;_<v;_++)this.extend(l[_])}Ce.prototype={extend:function(e){var a=this._southWest,l=this._northEast,_,v;if(e instanceof Ht)_=e,v=e;else if(e instanceof Ce){if(_=e._southWest,v=e._northEast,!_||!v)return this}else return e?this.extend(Rt(e)||ae(e)):this;return!a&&!l?(this._southWest=new Ht(_.lat,_.lng),this._northEast=new Ht(v.lat,v.lng)):(a.lat=Math.min(_.lat,a.lat),a.lng=Math.min(_.lng,a.lng),l.lat=Math.max(v.lat,l.lat),l.lng=Math.max(v.lng,l.lng)),this},pad:function(e){var a=this._southWest,l=this._northEast,_=Math.abs(a.lat-l.lat)*e,v=Math.abs(a.lng-l.lng)*e;return new Ce(new Ht(a.lat-_,a.lng-v),new Ht(l.lat+_,l.lng+v))},getCenter:function(){return new Ht((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 Ht(this.getNorth(),this.getWest())},getSouthEast:function(){return new Ht(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(e){typeof e[0]=="number"||e instanceof Ht||"lat"in e?e=Rt(e):e=ae(e);var a=this._southWest,l=this._northEast,_,v;return e instanceof Ce?(_=e.getSouthWest(),v=e.getNorthEast()):_=v=e,_.lat>=a.lat&&v.lat<=l.lat&&_.lng>=a.lng&&v.lng<=l.lng},intersects:function(e){e=ae(e);var a=this._southWest,l=this._northEast,_=e.getSouthWest(),v=e.getNorthEast(),k=v.lat>=a.lat&&_.lat<=l.lat,Z=v.lng>=a.lng&&_.lng<=l.lng;return k&&Z},overlaps:function(e){e=ae(e);var a=this._southWest,l=this._northEast,_=e.getSouthWest(),v=e.getNorthEast(),k=v.lat>a.lat&&_.lat<l.lat,Z=v.lng>a.lng&&_.lng<l.lng;return k&&Z},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,a){return e?(e=ae(e),this._southWest.equals(e.getSouthWest(),a)&&this._northEast.equals(e.getNorthEast(),a)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ae(e,a){return e instanceof Ce?e:new Ce(e,a)}function Ht(e,a,l){if(isNaN(e)||isNaN(a))throw new Error("Invalid LatLng object: ("+e+", "+a+")");this.lat=+e,this.lng=+a,l!==void 0&&(this.alt=+l)}Ht.prototype={equals:function(e,a){if(!e)return!1;e=Rt(e);var l=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return l<=(a===void 0?1e-9:a)},toString:function(e){return"LatLng("+C(this.lat,e)+", "+C(this.lng,e)+")"},distanceTo:function(e){return fi.distance(this,Rt(e))},wrap:function(){return fi.wrapLatLng(this)},toBounds:function(e){var a=180*e/40075017,l=a/Math.cos(Math.PI/180*this.lat);return ae([this.lat-a,this.lng-l],[this.lat+a,this.lng+l])},clone:function(){return new Ht(this.lat,this.lng,this.alt)}};function Rt(e,a,l){return e instanceof Ht?e:ct(e)&&typeof e[0]!="object"?e.length===3?new Ht(e[0],e[1],e[2]):e.length===2?new Ht(e[0],e[1]):null:e==null?e:typeof e=="object"&&"lat"in e?new Ht(e.lat,"lng"in e?e.lng:e.lon,e.alt):a===void 0?null:new Ht(e,a,l)}var si={latLngToPoint:function(e,a){var l=this.projection.project(e),_=this.scale(a);return this.transformation._transform(l,_)},pointToLatLng:function(e,a){var l=this.scale(a),_=this.transformation.untransform(e,l);return this.projection.unproject(_)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var a=this.projection.bounds,l=this.scale(e),_=this.transformation.transform(a.min,l),v=this.transformation.transform(a.max,l);return new te(_,v)},infinite:!1,wrapLatLng:function(e){var a=this.wrapLng?E(e.lng,this.wrapLng,!0):e.lng,l=this.wrapLat?E(e.lat,this.wrapLat,!0):e.lat,_=e.alt;return new Ht(l,a,_)},wrapLatLngBounds:function(e){var a=e.getCenter(),l=this.wrapLatLng(a),_=a.lat-l.lat,v=a.lng-l.lng;if(_===0&&v===0)return e;var k=e.getSouthWest(),Z=e.getNorthEast(),Y=new Ht(k.lat-_,k.lng-v),st=new Ht(Z.lat-_,Z.lng-v);return new Ce(Y,st)}},fi=d({},si,{wrapLng:[-180,180],R:6371e3,distance:function(e,a){var l=Math.PI/180,_=e.lat*l,v=a.lat*l,k=Math.sin((a.lat-e.lat)*l/2),Z=Math.sin((a.lng-e.lng)*l/2),Y=k*k+Math.cos(_)*Math.cos(v)*Z*Z,st=2*Math.atan2(Math.sqrt(Y),Math.sqrt(1-Y));return this.R*st}}),nn=6378137,Es={R:nn,MAX_LATITUDE:85.0511287798,project:function(e){var a=Math.PI/180,l=this.MAX_LATITUDE,_=Math.max(Math.min(l,e.lat),-l),v=Math.sin(_*a);return new Pt(this.R*e.lng*a,this.R*Math.log((1+v)/(1-v))/2)},unproject:function(e){var a=180/Math.PI;return new Ht((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*a,e.x*a/this.R)},bounds:function(){var e=nn*Math.PI;return new te([-e,-e],[e,e])}()};function Ps(e,a,l,_){if(ct(e)){this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3];return}this._a=e,this._b=a,this._c=l,this._d=_}Ps.prototype={transform:function(e,a){return this._transform(e.clone(),a)},_transform:function(e,a){return a=a||1,e.x=a*(this._a*e.x+this._b),e.y=a*(this._c*e.y+this._d),e},untransform:function(e,a){return a=a||1,new Pt((e.x/a-this._b)/this._a,(e.y/a-this._d)/this._c)}};function sn(e,a,l,_){return new Ps(e,a,l,_)}var ks=d({},fi,{code:"EPSG:3857",projection:Es,transformation:function(){var e=.5/(Math.PI*Es.R);return sn(e,.5,-e,.5)}()}),Pa=d({},ks,{code:"EPSG:900913"});function ka(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Sa(e,a){var l="",_,v,k,Z,Y,st;for(_=0,k=e.length;_<k;_++){for(Y=e[_],v=0,Z=Y.length;v<Z;v++)st=Y[v],l+=(v?"L":"M")+st.x+" "+st.y;l+=a?Mt.svg?"z":"x":""}return l||"M0 0"}var Sn=document.documentElement.style,Gi="ActiveXObject"in window,Ba=Gi&&!document.addEventListener,Ta="msLaunchUri"in navigator&&!("documentMode"in document),Ss=Ze("webkit"),Da=Ze("android"),Oa=Ze("android 2")||Ze("android 3"),ho=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lo=Da&&Ze("Google")&&ho<537&&!("AudioNode"in window),Bs=!!window.opera,Ia=!Ta&&Ze("chrome"),Ra=Ze("gecko")&&!Ss&&!Bs&&!Gi,Fa=!Ia&&Ze("safari"),Ts=Ze("phantom"),Ga="OTransition"in Sn,zi=navigator.platform.indexOf("Win")===0,za=Gi&&"transition"in Sn,Bn="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Oa,Ni="MozPerspective"in Sn,Na=!window.L_DISABLE_3D&&(za||Bn||Ni)&&!Ga&&!Ts,xi=typeof orientation<"u"||Ze("mobile"),uo=xi&&Ss,co=xi&&Bn,Ds=!window.PointerEvent&&window.MSPointerEvent,Ua=!!(window.PointerEvent||Ds),ja="ontouchstart"in window||!!window.TouchEvent,fo=!window.L_NO_TOUCH&&(ja||Ua),po=xi&&Bs,Za=xi&&Ra,qa=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,_o=function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",x,a),window.removeEventListener("testPassiveEventSupport",x,a)}catch{}return e}(),mo=function(){return!!document.createElement("canvas").getContext}(),Os=!!(document.createElementNS&&ka("svg").createSVGRect),Ha=!!Os&&function(){var e=document.createElement("div");return e.innerHTML="<svg/>",(e.firstChild&&e.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),go=!Os&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var a=e.firstChild;return a.style.behavior="url(#default#VML)",a&&typeof a.adj=="object"}catch{return!1}}(),yo=navigator.platform.indexOf("Mac")===0,Ao=navigator.platform.indexOf("Linux")===0;function Ze(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Mt={ie:Gi,ielt9:Ba,edge:Ta,webkit:Ss,android:Da,android23:Oa,androidStock:lo,opera:Bs,chrome:Ia,gecko:Ra,safari:Fa,phantom:Ts,opera12:Ga,win:zi,ie3d:za,webkit3d:Bn,gecko3d:Ni,any3d:Na,mobile:xi,mobileWebkit:uo,mobileWebkit3d:co,msPointer:Ds,pointer:Ua,touch:fo,touchNative:ja,mobileOpera:po,mobileGecko:Za,retina:qa,passiveEvents:_o,canvas:mo,svg:Os,vml:go,inlineSvg:Ha,mac:yo,linux:Ao},Va=Mt.msPointer?"MSPointerDown":"pointerdown",$a=Mt.msPointer?"MSPointerMove":"pointermove",Is=Mt.msPointer?"MSPointerUp":"pointerup",Ka=Mt.msPointer?"MSPointerCancel":"pointercancel",Rs={touchstart:Va,touchmove:$a,touchend:Is,touchcancel:Ka},Wa={touchstart:bo,touchmove:Dn,touchend:Dn,touchcancel:Dn},Ui={},Xa=!1;function vo(e,a,l){return a==="touchstart"&&Fs(),Wa[a]?(l=Wa[a].bind(this,l),e.addEventListener(Rs[a],l,!1),l):(console.warn("wrong event specified:",a),x)}function Mo(e,a,l){if(!Rs[a]){console.warn("wrong event specified:",a);return}e.removeEventListener(Rs[a],l,!1)}function xo(e){Ui[e.pointerId]=e}function Lo(e){Ui[e.pointerId]&&(Ui[e.pointerId]=e)}function Tn(e){delete Ui[e.pointerId]}function Fs(){Xa||(document.addEventListener(Va,xo,!0),document.addEventListener($a,Lo,!0),document.addEventListener(Is,Tn,!0),document.addEventListener(Ka,Tn,!0),Xa=!0)}function Dn(e,a){if(a.pointerType!==(a.MSPOINTER_TYPE_MOUSE||"mouse")){a.touches=[];for(var l in Ui)a.touches.push(Ui[l]);a.changedTouches=[a],e(a)}}function bo(e,a){a.MSPOINTER_TYPE_TOUCH&&a.pointerType===a.MSPOINTER_TYPE_TOUCH&&ce(a),Dn(e,a)}function wo(e){var a={},l,_;for(_ in e)l=e[_],a[_]=l&&l.bind?l.bind(e):l;return e=a,a.type="dblclick",a.detail=2,a.isTrusted=!1,a._simulated=!0,a}var Co=200;function Eo(e,a){e.addEventListener("dblclick",a);var l=0,_;function v(k){if(k.detail!==1){_=k.detail;return}if(!(k.pointerType==="mouse"||k.sourceCapabilities&&!k.sourceCapabilities.firesTouchEvents)){var Z=er(k);if(!(Z.some(function(st){return st instanceof HTMLLabelElement&&st.attributes.for})&&!Z.some(function(st){return st instanceof HTMLInputElement||st instanceof HTMLSelectElement}))){var Y=Date.now();Y-l<=Co?(_++,_===2&&a(wo(k))):_=1,l=Y}}}return e.addEventListener("click",v),{dblclick:a,simDblclick:v}}function Po(e,a){e.removeEventListener("dblclick",a.dblclick),e.removeEventListener("click",a.simDblclick)}var Gs=In(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),an=In(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ya=an==="webkitTransition"||an==="OTransition"?an+"End":"transitionend";function Ja(e){return typeof e=="string"?document.getElementById(e):e}function pi(e,a){var l=e.style[a]||e.currentStyle&&e.currentStyle[a];if((!l||l==="auto")&&document.defaultView){var _=document.defaultView.getComputedStyle(e,null);l=_?_[a]:null}return l==="auto"?null:l}function Nt(e,a,l){var _=document.createElement(e);return _.className=a||"",l&&l.appendChild(_),_}function Qt(e){var a=e.parentNode;a&&a.removeChild(e)}function rn(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ji(e){var a=e.parentNode;a&&a.lastChild!==e&&a.appendChild(e)}function Li(e){var a=e.parentNode;a&&a.firstChild!==e&&a.insertBefore(e,a.firstChild)}function zs(e,a){if(e.classList!==void 0)return e.classList.contains(a);var l=On(e);return l.length>0&&new RegExp("(^|\\s)"+a+"(\\s|$)").test(l)}function Tt(e,a){if(e.classList!==void 0)for(var l=G(a),_=0,v=l.length;_<v;_++)e.classList.add(l[_]);else if(!zs(e,a)){var k=On(e);Ns(e,(k?k+" ":"")+a)}}function ne(e,a){e.classList!==void 0?e.classList.remove(a):Ns(e,T((" "+On(e)+" ").replace(" "+a+" "," ")))}function Ns(e,a){e.className.baseVal===void 0?e.className=a:e.className.baseVal=a}function On(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function Ne(e,a){"opacity"in e.style?e.style.opacity=a:"filter"in e.style&&ko(e,a)}function ko(e,a){var l=!1,_="DXImageTransform.Microsoft.Alpha";try{l=e.filters.item(_)}catch{if(a===1)return}a=Math.round(a*100),l?(l.Enabled=a!==100,l.Opacity=a):e.style.filter+=" progid:"+_+"(opacity="+a+")"}function In(e){for(var a=document.documentElement.style,l=0;l<e.length;l++)if(e[l]in a)return e[l];return!1}function bi(e,a,l){var _=a||new Pt(0,0);e.style[Gs]=(Mt.ie3d?"translate("+_.x+"px,"+_.y+"px)":"translate3d("+_.x+"px,"+_.y+"px,0)")+(l?" scale("+l+")":"")}function re(e,a){e._leaflet_pos=a,Mt.any3d?bi(e,a):(e.style.left=a.x+"px",e.style.top=a.y+"px")}function wi(e){return e._leaflet_pos||new Pt(0,0)}var on,hn,Us;if("onselectstart"in document)on=function(){Bt(window,"selectstart",ce)},hn=function(){Kt(window,"selectstart",ce)};else{var Zi=In(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);on=function(){if(Zi){var e=document.documentElement.style;Us=e[Zi],e[Zi]="none"}},hn=function(){Zi&&(document.documentElement.style[Zi]=Us,Us=void 0)}}function js(){Bt(window,"dragstart",ce)}function Zs(){Kt(window,"dragstart",ce)}var Rn,qs;function Hs(e){for(;e.tabIndex===-1;)e=e.parentNode;e.style&&(Fn(),Rn=e,qs=e.style.outlineStyle,e.style.outlineStyle="none",Bt(window,"keydown",Fn))}function Fn(){Rn&&(Rn.style.outlineStyle=qs,Rn=void 0,qs=void 0,Kt(window,"keydown",Fn))}function Qa(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function Vs(e){var a=e.getBoundingClientRect();return{x:a.width/e.offsetWidth||1,y:a.height/e.offsetHeight||1,boundingClientRect:a}}var So={__proto__:null,TRANSFORM:Gs,TRANSITION:an,TRANSITION_END:Ya,get:Ja,getStyle:pi,create:Nt,remove:Qt,empty:rn,toFront:ji,toBack:Li,hasClass:zs,addClass:Tt,removeClass:ne,setClass:Ns,getClass:On,setOpacity:Ne,testProp:In,setTransform:bi,setPosition:re,getPosition:wi,get disableTextSelection(){return on},get enableTextSelection(){return hn},disableImageDrag:js,enableImageDrag:Zs,preventOutline:Hs,restoreOutline:Fn,getSizedParentNode:Qa,getScale:Vs};function Bt(e,a,l,_){if(a&&typeof a=="object")for(var v in a)Ks(e,v,a[v],l);else{a=G(a);for(var k=0,Z=a.length;k<Z;k++)Ks(e,a[k],l,_)}return this}var $e="_leaflet_events";function Kt(e,a,l,_){if(arguments.length===1)tr(e),delete e[$e];else if(a&&typeof a=="object")for(var v in a)_i(e,v,a[v],l);else if(a=G(a),arguments.length===2)tr(e,function(Y){return yt(a,Y)!==-1});else for(var k=0,Z=a.length;k<Z;k++)_i(e,a[k],l,_);return this}function tr(e,a){for(var l in e[$e]){var _=l.split(/\d/)[0];(!a||a(_))&&_i(e,_,null,null,l)}}var $s={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ks(e,a,l,_){var v=a+M(l)+(_?"_"+M(_):"");if(e[$e]&&e[$e][v])return this;var k=function(Y){return l.call(_||e,Y||window.event)},Z=k;!Mt.touchNative&&Mt.pointer&&a.indexOf("touch")===0?k=vo(e,a,k):Mt.touch&&a==="dblclick"?k=Eo(e,k):"addEventListener"in e?a==="touchstart"||a==="touchmove"||a==="wheel"||a==="mousewheel"?e.addEventListener($s[a]||a,k,Mt.passiveEvents?{passive:!1}:!1):a==="mouseenter"||a==="mouseleave"?(k=function(Y){Y=Y||window.event,Xs(e,Y)&&Z(Y)},e.addEventListener($s[a],k,!1)):e.addEventListener(a,Z,!1):e.attachEvent("on"+a,k),e[$e]=e[$e]||{},e[$e][v]=k}function _i(e,a,l,_,v){v=v||a+M(l)+(_?"_"+M(_):"");var k=e[$e]&&e[$e][v];if(!k)return this;!Mt.touchNative&&Mt.pointer&&a.indexOf("touch")===0?Mo(e,a,k):Mt.touch&&a==="dblclick"?Po(e,k):"removeEventListener"in e?e.removeEventListener($s[a]||a,k,!1):e.detachEvent("on"+a,k),e[$e][v]=null}function Ci(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Ws(e){return Ks(e,"wheel",Ci),this}function ln(e){return Bt(e,"mousedown touchstart dblclick contextmenu",Ci),e._leaflet_disable_click=!0,this}function ce(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Ei(e){return ce(e),Ci(e),this}function er(e){if(e.composedPath)return e.composedPath();for(var a=[],l=e.target;l;)a.push(l),l=l.parentNode;return a}function ir(e,a){if(!a)return new Pt(e.clientX,e.clientY);var l=Vs(a),_=l.boundingClientRect;return new Pt((e.clientX-_.left)/l.x-a.clientLeft,(e.clientY-_.top)/l.y-a.clientTop)}var Bo=Mt.linux&&Mt.chrome?window.devicePixelRatio:Mt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function nr(e){return Mt.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/Bo:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function Xs(e,a){var l=a.relatedTarget;if(!l)return!0;try{for(;l&&l!==e;)l=l.parentNode}catch{return!1}return l!==e}var Gn={__proto__:null,on:Bt,off:Kt,stopPropagation:Ci,disableScrollPropagation:Ws,disableClickPropagation:ln,preventDefault:ce,stop:Ei,getPropagationPath:er,getMousePosition:ir,getWheelDelta:nr,isExternalTarget:Xs,addListener:Bt,removeListener:Kt},sr=en.extend({run:function(e,a,l,_){this.stop(),this._el=e,this._inProgress=!0,this._duration=l||.25,this._easeOutPower=1/Math.max(_||.5,.2),this._startPos=wi(e),this._offset=a.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=Et(this._animate,this),this._step()},_step:function(e){var a=+new Date-this._startTime,l=this._duration*1e3;a<l?this._runFrame(this._easeOut(a/l),e):(this._runFrame(1),this._complete())},_runFrame:function(e,a){var l=this._startPos.add(this._offset.multiplyBy(e));a&&l._round(),re(this._el,l),this.fire("step")},_complete:function(){jt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),Ft=en.extend({options:{crs:ks,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(e,a){a=j(this,a),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=p(this._onResize,this),this._initEvents(),a.maxBounds&&this.setMaxBounds(a.maxBounds),a.zoom!==void 0&&(this._zoom=this._limitZoom(a.zoom)),a.center&&a.zoom!==void 0&&this.setView(Rt(a.center),a.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=an&&Mt.any3d&&!Mt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Bt(this._proxy,Ya,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,a,l){if(a=a===void 0?this._zoom:this._limitZoom(a),e=this._limitCenter(Rt(e),a,this.options.maxBounds),l=l||{},this._stop(),this._loaded&&!l.reset&&l!==!0){l.animate!==void 0&&(l.zoom=d({animate:l.animate},l.zoom),l.pan=d({animate:l.animate,duration:l.duration},l.pan));var _=this._zoom!==a?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,a,l.zoom):this._tryAnimatedPan(e,l.pan);if(_)return clearTimeout(this._sizeTimer),this}return this._resetView(e,a,l.pan&&l.pan.noMoveStart),this},setZoom:function(e,a){return this._loaded?this.setView(this.getCenter(),e,{zoom:a}):(this._zoom=e,this)},zoomIn:function(e,a){return e=e||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,a)},zoomOut:function(e,a){return e=e||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,a)},setZoomAround:function(e,a,l){var _=this.getZoomScale(a),v=this.getSize().divideBy(2),k=e instanceof Pt?e:this.latLngToContainerPoint(e),Z=k.subtract(v).multiplyBy(1-1/_),Y=this.containerPointToLatLng(v.add(Z));return this.setView(Y,a,{zoom:l})},_getBoundsCenterZoom:function(e,a){a=a||{},e=e.getBounds?e.getBounds():ae(e);var l=Ct(a.paddingTopLeft||a.padding||[0,0]),_=Ct(a.paddingBottomRight||a.padding||[0,0]),v=this.getBoundsZoom(e,!1,l.add(_));if(v=typeof a.maxZoom=="number"?Math.min(a.maxZoom,v):v,v===1/0)return{center:e.getCenter(),zoom:v};var k=_.subtract(l).divideBy(2),Z=this.project(e.getSouthWest(),v),Y=this.project(e.getNorthEast(),v),st=this.unproject(Z.add(Y).divideBy(2).add(k),v);return{center:st,zoom:v}},fitBounds:function(e,a){if(e=ae(e),!e.isValid())throw new Error("Bounds are not valid.");var l=this._getBoundsCenterZoom(e,a);return this.setView(l.center,l.zoom,a)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,a){return this.setView(e,this._zoom,{pan:a})},panBy:function(e,a){if(e=Ct(e).round(),a=a||{},!e.x&&!e.y)return this.fire("moveend");if(a.animate!==!0&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new sr,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),a.noMoveStart||this.fire("movestart"),a.animate!==!1){Tt(this._mapPane,"leaflet-pan-anim");var l=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,l,a.duration||.25,a.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,a,l){if(l=l||{},l.animate===!1||!Mt.any3d)return this.setView(e,a,l);this._stop();var _=this.project(this.getCenter()),v=this.project(e),k=this.getSize(),Z=this._zoom;e=Rt(e),a=a===void 0?Z:a;var Y=Math.max(k.x,k.y),st=Y*this.getZoomScale(Z,a),ht=v.distanceTo(_)||1,pt=1.42,wt=pt*pt;function Ot(se){var yn=se?-1:1,Qo=se?st:Y,Qe=st*st-Y*Y+yn*wt*wt*ht*ht,th=2*Qo*wt*ht,Xi=Qe/th,ha=Math.sqrt(Xi*Xi+1)-Xi,eh=ha<1e-9?-18:Math.log(ha);return eh}function xe(se){return(Math.exp(se)-Math.exp(-se))/2}function ue(se){return(Math.exp(se)+Math.exp(-se))/2}function ke(se){return xe(se)/ue(se)}var ee=Ot(0);function Je(se){return Y*(ue(ee)/ue(ee+pt*se))}function oa(se){return Y*(ue(ee)*ke(ee+pt*se)-xe(ee))/wt}function as(se){return 1-Math.pow(1-se,1.5)}var Ar=Date.now(),gn=(Ot(1)-ee)/pt,Jo=l.duration?1e3*l.duration:1e3*gn*.8;function vr(){var se=(Date.now()-Ar)/Jo,yn=as(se)*gn;se<=1?(this._flyToFrame=Et(vr,this),this._move(this.unproject(_.add(v.subtract(_).multiplyBy(oa(yn)/ht)),Z),this.getScaleZoom(Y/Je(yn),Z),{flyTo:!0})):this._move(e,a)._moveEnd(!0)}return this._moveStart(!0,l.noMoveStart),vr.call(this),this},flyToBounds:function(e,a){var l=this._getBoundsCenterZoom(e,a);return this.flyTo(l.center,l.zoom,a)},setMaxBounds:function(e){return e=ae(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var a=this.options.minZoom;return this.options.minZoom=e,this._loaded&&a!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var a=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&a!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,a){this._enforcingBounds=!0;var l=this.getCenter(),_=this._limitCenter(l,this._zoom,ae(e));return l.equals(_)||this.panTo(_,a),this._enforcingBounds=!1,this},panInside:function(e,a){a=a||{};var l=Ct(a.paddingTopLeft||a.padding||[0,0]),_=Ct(a.paddingBottomRight||a.padding||[0,0]),v=this.project(this.getCenter()),k=this.project(e),Z=this.getPixelBounds(),Y=we([Z.min.add(l),Z.max.subtract(_)]),st=Y.getSize();if(!Y.contains(k)){this._enforcingBounds=!0;var ht=k.subtract(Y.getCenter()),pt=Y.extend(k).getSize().subtract(st);v.x+=ht.x<0?-pt.x:pt.x,v.y+=ht.y<0?-pt.y:pt.y,this.panTo(this.unproject(v),a),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=d({animate:!1,pan:!0},e===!0?{animate:!0}:e);var a=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var l=this.getSize(),_=a.divideBy(2).round(),v=l.divideBy(2).round(),k=_.subtract(v);return!k.x&&!k.y?this:(e.animate&&e.pan?this.panBy(k):(e.pan&&this._rawPanBy(k),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(p(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:a,newSize:l}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=d({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var a=p(this._handleGeolocationResponse,this),l=p(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(a,l,e):navigator.geolocation.getCurrentPosition(a,l,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var a=e.code,l=e.message||(a===1?"permission denied":a===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:a,message:"Geolocation error: "+l+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var a=e.coords.latitude,l=e.coords.longitude,_=new Ht(a,l),v=_.toBounds(e.coords.accuracy*2),k=this._locateOptions;if(k.setView){var Z=this.getBoundsZoom(v);this.setView(_,k.maxZoom?Math.min(Z,k.maxZoom):Z)}var Y={latlng:_,bounds:v,timestamp:e.timestamp};for(var st in e.coords)typeof e.coords[st]=="number"&&(Y[st]=e.coords[st]);this.fire("locationfound",Y)}},addHandler:function(e,a){if(!a)return this;var l=this[e]=new a(this);return this._handlers.push(l),this.options[e]&&l.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&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{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Qt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(jt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)Qt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,a){var l="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),_=Nt("div",l,a||this._mapPane);return e&&(this._panes[e]=_),_},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),a=this.unproject(e.getBottomLeft()),l=this.unproject(e.getTopRight());return new Ce(a,l)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,a,l){e=ae(e),l=Ct(l||[0,0]);var _=this.getZoom()||0,v=this.getMinZoom(),k=this.getMaxZoom(),Z=e.getNorthWest(),Y=e.getSouthEast(),st=this.getSize().subtract(l),ht=we(this.project(Y,_),this.project(Z,_)).getSize(),pt=Mt.any3d?this.options.zoomSnap:1,wt=st.x/ht.x,Ot=st.y/ht.y,xe=a?Math.max(wt,Ot):Math.min(wt,Ot);return _=this.getScaleZoom(xe,_),pt&&(_=Math.round(_/(pt/100))*(pt/100),_=a?Math.ceil(_/pt)*pt:Math.floor(_/pt)*pt),Math.max(v,Math.min(k,_))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Pt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,a){var l=this._getTopLeftPoint(e,a);return new te(l,l.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e=="string"?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,a){var l=this.options.crs;return a=a===void 0?this._zoom:a,l.scale(e)/l.scale(a)},getScaleZoom:function(e,a){var l=this.options.crs;a=a===void 0?this._zoom:a;var _=l.zoom(e*l.scale(a));return isNaN(_)?1/0:_},project:function(e,a){return a=a===void 0?this._zoom:a,this.options.crs.latLngToPoint(Rt(e),a)},unproject:function(e,a){return a=a===void 0?this._zoom:a,this.options.crs.pointToLatLng(Ct(e),a)},layerPointToLatLng:function(e){var a=Ct(e).add(this.getPixelOrigin());return this.unproject(a)},latLngToLayerPoint:function(e){var a=this.project(Rt(e))._round();return a._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(Rt(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(ae(e))},distance:function(e,a){return this.options.crs.distance(Rt(e),Rt(a))},containerPointToLayerPoint:function(e){return Ct(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return Ct(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var a=this.containerPointToLayerPoint(Ct(e));return this.layerPointToLatLng(a)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Rt(e)))},mouseEventToContainerPoint:function(e){return ir(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var a=this._container=Ja(e);if(a){if(a._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Bt(a,"scroll",this._onScroll,this),this._containerId=M(a)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mt.any3d,Tt(e,"leaflet-container"+(Mt.touch?" leaflet-touch":"")+(Mt.retina?" leaflet-retina":"")+(Mt.ielt9?" leaflet-oldie":"")+(Mt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var a=pi(e,"position");a!=="absolute"&&a!=="relative"&&a!=="fixed"&&a!=="sticky"&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),re(this._mapPane,new Pt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Tt(e.markerPane,"leaflet-zoom-hide"),Tt(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,a,l){re(this._mapPane,new Pt(0,0));var _=!this._loaded;this._loaded=!0,a=this._limitZoom(a),this.fire("viewprereset");var v=this._zoom!==a;this._moveStart(v,l)._move(e,a)._moveEnd(v),this.fire("viewreset"),_&&this.fire("load")},_moveStart:function(e,a){return e&&this.fire("zoomstart"),a||this.fire("movestart"),this},_move:function(e,a,l,_){a===void 0&&(a=this._zoom);var v=this._zoom!==a;return this._zoom=a,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),_?l&&l.pinch&&this.fire("zoom",l):((v||l&&l.pinch)&&this.fire("zoom",l),this.fire("move",l)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return jt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){re(this._mapPane,this._getMapPanePos().subtract(e))},_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(e){this._targets={},this._targets[M(this._container)]=this;var a=e?Kt:Bt;a(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&a(window,"resize",this._onResize,this),Mt.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){jt(this._resizeRequest),this._resizeRequest=Et(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,a){for(var l=[],_,v=a==="mouseout"||a==="mouseover",k=e.target||e.srcElement,Z=!1;k;){if(_=this._targets[M(k)],_&&(a==="click"||a==="preclick")&&this._draggableMoved(_)){Z=!0;break}if(_&&_.listens(a,!0)&&(v&&!Xs(k,e)||(l.push(_),v))||k===this._container)break;k=k.parentNode}return!l.length&&!Z&&!v&&this.listens(a,!0)&&(l=[this]),l},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var a=e.target||e.srcElement;if(!(!this._loaded||a._leaflet_disable_events||e.type==="click"&&this._isClickDisabled(a))){var l=e.type;l==="mousedown"&&Hs(a),this._fireDOMEvent(e,l)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,a,l){if(e.type==="click"){var _=d({},e);_.type="preclick",this._fireDOMEvent(_,_.type,l)}var v=this._findEventTargets(e,a);if(l){for(var k=[],Z=0;Z<l.length;Z++)l[Z].listens(a,!0)&&k.push(l[Z]);v=k.concat(v)}if(v.length){a==="contextmenu"&&ce(e);var Y=v[0],st={originalEvent:e};if(e.type!=="keypress"&&e.type!=="keydown"&&e.type!=="keyup"){var ht=Y.getLatLng&&(!Y._radius||Y._radius<=10);st.containerPoint=ht?this.latLngToContainerPoint(Y.getLatLng()):this.mouseEventToContainerPoint(e),st.layerPoint=this.containerPointToLayerPoint(st.containerPoint),st.latlng=ht?Y.getLatLng():this.layerPointToLatLng(st.layerPoint)}for(Z=0;Z<v.length;Z++)if(v[Z].fire(a,st,!0),st.originalEvent._stopped||v[Z].options.bubblingMouseEvents===!1&&yt(this._mouseEvents,a)!==-1)return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,a=this._handlers.length;e<a;e++)this._handlers[e].disable()},whenReady:function(e,a){return this._loaded?e.call(a||this,{target:this}):this.on("load",e,a),this},_getMapPanePos:function(){return wi(this._mapPane)||new Pt(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,a){var l=e&&a!==void 0?this._getNewPixelOrigin(e,a):this.getPixelOrigin();return l.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,a){var l=this.getSize()._divideBy(2);return this.project(e,a)._subtract(l)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,a,l){var _=this._getNewPixelOrigin(l,a);return this.project(e,a)._subtract(_)},_latLngBoundsToNewLayerBounds:function(e,a,l){var _=this._getNewPixelOrigin(l,a);return we([this.project(e.getSouthWest(),a)._subtract(_),this.project(e.getNorthWest(),a)._subtract(_),this.project(e.getSouthEast(),a)._subtract(_),this.project(e.getNorthEast(),a)._subtract(_)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,a,l){if(!l)return e;var _=this.project(e,a),v=this.getSize().divideBy(2),k=new te(_.subtract(v),_.add(v)),Z=this._getBoundsOffset(k,l,a);return Math.abs(Z.x)<=1&&Math.abs(Z.y)<=1?e:this.unproject(_.add(Z),a)},_limitOffset:function(e,a){if(!a)return e;var l=this.getPixelBounds(),_=new te(l.min.add(e),l.max.add(e));return e.add(this._getBoundsOffset(_,a))},_getBoundsOffset:function(e,a,l){var _=we(this.project(a.getNorthEast(),l),this.project(a.getSouthWest(),l)),v=_.min.subtract(e.min),k=_.max.subtract(e.max),Z=this._rebound(v.x,-k.x),Y=this._rebound(v.y,-k.y);return new Pt(Z,Y)},_rebound:function(e,a){return e+a>0?Math.round(e-a)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(a))},_limitZoom:function(e){var a=this.getMinZoom(),l=this.getMaxZoom(),_=Mt.any3d?this.options.zoomSnap:1;return _&&(e=Math.round(e/_)*_),Math.max(a,Math.min(l,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ne(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,a){var l=this._getCenterOffset(e)._trunc();return(a&&a.animate)!==!0&&!this.getSize().contains(l)?!1:(this.panBy(l,a),!0)},_createAnimProxy:function(){var e=this._proxy=Nt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(a){var l=Gs,_=this._proxy.style[l];bi(this._proxy,this.project(a.center,a.zoom),this.getZoomScale(a.zoom,1)),_===this._proxy.style[l]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Qt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),a=this.getZoom();bi(this._proxy,this.project(e,a),this.getZoomScale(a,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,a,l){if(this._animatingZoom)return!0;if(l=l||{},!this._zoomAnimated||l.animate===!1||this._nothingToAnimate()||Math.abs(a-this._zoom)>this.options.zoomAnimationThreshold)return!1;var _=this.getZoomScale(a),v=this._getCenterOffset(e)._divideBy(1-1/_);return l.animate!==!0&&!this.getSize().contains(v)?!1:(Et(function(){this._moveStart(!0,l.noMoveStart||!1)._animateZoom(e,a,!0)},this),!0)},_animateZoom:function(e,a,l,_){this._mapPane&&(l&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=a,Tt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:a,noUpdate:_}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ne(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function ar(e,a){return new Ft(e,a)}var St=pe.extend({options:{position:"topright"},initialize:function(e){j(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var a=this._map;return a&&a.removeControl(this),this.options.position=e,a&&a.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var a=this._container=this.onAdd(e),l=this.getPosition(),_=e._controlCorners[l];return Tt(a,"leaflet-control"),l.indexOf("bottom")!==-1?_.insertBefore(a,_.firstChild):_.appendChild(a),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Qt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Pi=function(e){return new St(e)};Ft.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},a="leaflet-",l=this._controlContainer=Nt("div",a+"control-container",this._container);function _(v,k){var Z=a+v+" "+a+k;e[v+k]=Nt("div",Z,l)}_("top","left"),_("top","right"),_("bottom","left"),_("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)Qt(this._controlCorners[e]);Qt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=St.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,a,l,_){return l<_?-1:_<l?1:0}},initialize:function(e,a,l){j(this,l),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var _ in e)this._addLayer(e[_],_);for(_ in a)this._addLayer(a[_],_,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var a=0;a<this._layers.length;a++)this._layers[a].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return St.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,a){return this._addLayer(e,a),this._map?this._update():this},addOverlay:function(e,a){return this._addLayer(e,a,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var a=this._getLayer(M(e));return a&&this._layers.splice(this._layers.indexOf(a),1),this._map?this._update():this},expand:function(){Tt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(Tt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):ne(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ne(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",a=this._container=Nt("div",e),l=this.options.collapsed;a.setAttribute("aria-haspopup",!0),ln(a),Ws(a);var _=this._section=Nt("section",e+"-list");l&&(this._map.on("click",this.collapse,this),Bt(a,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var v=this._layersLink=Nt("a",e+"-toggle",a);v.href="#",v.title="Layers",v.setAttribute("role","button"),Bt(v,{keydown:function(k){k.keyCode===13&&this._expandSafely()},click:function(k){ce(k),this._expandSafely()}},this),l||this.expand(),this._baseLayersList=Nt("div",e+"-base",_),this._separator=Nt("div",e+"-separator",_),this._overlaysList=Nt("div",e+"-overlays",_),a.appendChild(_)},_getLayer:function(e){for(var a=0;a<this._layers.length;a++)if(this._layers[a]&&M(this._layers[a].layer)===e)return this._layers[a]},_addLayer:function(e,a,l){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:a,overlay:l}),this.options.sortLayers&&this._layers.sort(p(function(_,v){return this.options.sortFunction(_.layer,v.layer,_.name,v.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;rn(this._baseLayersList),rn(this._overlaysList),this._layerControlInputs=[];var e,a,l,_,v=0;for(l=0;l<this._layers.length;l++)_=this._layers[l],this._addItem(_),a=a||_.overlay,e=e||!_.overlay,v+=_.overlay?0:1;return this.options.hideSingleBase&&(e=e&&v>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=a&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var a=this._getLayer(M(e.target)),l=a.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;l&&this._map.fire(l,a)},_createRadioElement:function(e,a){var l='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(a?' checked="checked"':"")+"/>",_=document.createElement("div");return _.innerHTML=l,_.firstChild},_addItem:function(e){var a=document.createElement("label"),l=this._map.hasLayer(e.layer),_;e.overlay?(_=document.createElement("input"),_.type="checkbox",_.className="leaflet-control-layers-selector",_.defaultChecked=l):_=this._createRadioElement("leaflet-base-layers_"+M(this),l),this._layerControlInputs.push(_),_.layerId=M(e.layer),Bt(_,"click",this._onInputClick,this);var v=document.createElement("span");v.innerHTML=" "+e.name;var k=document.createElement("span");a.appendChild(k),k.appendChild(_),k.appendChild(v);var Z=e.overlay?this._overlaysList:this._baseLayersList;return Z.appendChild(a),this._checkDisabledLayers(),a},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,a,l,_=[],v=[];this._handlingClick=!0;for(var k=e.length-1;k>=0;k--)a=e[k],l=this._getLayer(a.layerId).layer,a.checked?_.push(l):a.checked||v.push(l);for(k=0;k<v.length;k++)this._map.hasLayer(v[k])&&this._map.removeLayer(v[k]);for(k=0;k<_.length;k++)this._map.hasLayer(_[k])||this._map.addLayer(_[k]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e=this._layerControlInputs,a,l,_=this._map.getZoom(),v=e.length-1;v>=0;v--)a=e[v],l=this._getLayer(a.layerId).layer,a.disabled=l.options.minZoom!==void 0&&_<l.options.minZoom||l.options.maxZoom!==void 0&&_>l.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Bt(e,"click",ce),this.expand();var a=this;setTimeout(function(){Kt(e,"click",ce),a._preventClick=!1})}}),To=function(e,a,l){return new un(e,a,l)},zn=St.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var a="leaflet-control-zoom",l=Nt("div",a+" leaflet-bar"),_=this.options;return this._zoomInButton=this._createButton(_.zoomInText,_.zoomInTitle,a+"-in",l,this._zoomIn),this._zoomOutButton=this._createButton(_.zoomOutText,_.zoomOutTitle,a+"-out",l,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),l},onRemove:function(e){e.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(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,a,l,_,v){var k=Nt("a",l,_);return k.innerHTML=e,k.href="#",k.title=a,k.setAttribute("role","button"),k.setAttribute("aria-label",a),ln(k),Bt(k,"click",Ei),Bt(k,"click",v,this),Bt(k,"click",this._refocusOnMap,this),k},_updateDisabled:function(){var e=this._map,a="leaflet-disabled";ne(this._zoomInButton,a),ne(this._zoomOutButton,a),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(Tt(this._zoomOutButton,a),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(Tt(this._zoomInButton,a),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ft.mergeOptions({zoomControl:!0}),Ft.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new zn,this.addControl(this.zoomControl))});var Do=function(e){return new zn(e)},Nn=St.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var a="leaflet-control-scale",l=Nt("div",a),_=this.options;return this._addScales(_,a+"-line",l),e.on(_.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),l},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,a,l){e.metric&&(this._mScale=Nt("div",a,l)),e.imperial&&(this._iScale=Nt("div",a,l))},_update:function(){var e=this._map,a=e.getSize().y/2,l=e.distance(e.containerPointToLatLng([0,a]),e.containerPointToLatLng([this.options.maxWidth,a]));this._updateScales(l)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var a=this._getRoundNum(e),l=a<1e3?a+" m":a/1e3+" km";this._updateScale(this._mScale,l,a/e)},_updateImperial:function(e){var a=e*3.2808399,l,_,v;a>5280?(l=a/5280,_=this._getRoundNum(l),this._updateScale(this._iScale,_+" mi",_/l)):(v=this._getRoundNum(a),this._updateScale(this._iScale,v+" ft",v/a))},_updateScale:function(e,a,l){e.style.width=Math.round(this.options.maxWidth*l)+"px",e.innerHTML=a},_getRoundNum:function(e){var a=Math.pow(10,(Math.floor(e)+"").length-1),l=e/a;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:1,a*l}}),Un=function(e){return new Nn(e)},Oo='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ke=St.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Mt.inlineSvg?Oo+" ":"")+"Leaflet</a>"},initialize:function(e){j(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=Nt("div","leaflet-control-attribution"),ln(this._container);for(var a in e._layers)e._layers[a].getAttribution&&this.addAttribution(e._layers[a].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var a in this._attributions)this._attributions[a]&&e.push(a);var l=[];this.options.prefix&&l.push(this.options.prefix),e.length&&l.push(e.join(", ")),this._container.innerHTML=l.join(' <span aria-hidden="true">|</span> ')}}});Ft.mergeOptions({attributionControl:!0}),Ft.addInitHook(function(){this.options.attributionControl&&new Ke().addTo(this)});var rr=function(e){return new Ke(e)};St.Layers=un,St.Zoom=zn,St.Scale=Nn,St.Attribution=Ke,Pi.layers=To,Pi.zoom=Do,Pi.scale=Un,Pi.attribution=rr;var Ae=pe.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ae.addTo=function(e,a){return e.addHandler(a,this),this};var Io={Events:De},or=Mt.touch?"touchstart mousedown":"mousedown",mi=en.extend({options:{clickTolerance:3},initialize:function(e,a,l,_){j(this,_),this._element=e,this._dragStartTarget=a||e,this._preventOutline=l},enable:function(){this._enabled||(Bt(this._dragStartTarget,or,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(mi._dragging===this&&this.finishDrag(!0),Kt(this._dragStartTarget,or,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!zs(this._element,"leaflet-zoom-anim"))){if(e.touches&&e.touches.length!==1){mi._dragging===this&&this.finishDrag();return}if(!(mi._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(mi._dragging=this,this._preventOutline&&Hs(this._element),js(),on(),!this._moving)){this.fire("down");var a=e.touches?e.touches[0]:e,l=Qa(this._element);this._startPoint=new Pt(a.clientX,a.clientY),this._startPos=wi(this._element),this._parentScale=Vs(l);var _=e.type==="mousedown";Bt(document,_?"mousemove":"touchmove",this._onMove,this),Bt(document,_?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var a=e.touches&&e.touches.length===1?e.touches[0]:e,l=new Pt(a.clientX,a.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)<this.options.clickTolerance||(l.x/=this._parentScale.x,l.y/=this._parentScale.y,ce(e),this._moved||(this.fire("dragstart"),this._moved=!0,Tt(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Tt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(l),this._moving=!0,this._lastEvent=e,this._updatePosition())}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),re(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){ne(document.body,"leaflet-dragging"),this._lastTarget&&(ne(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Kt(document,"mousemove touchmove",this._onMove,this),Kt(document,"mouseup touchend touchcancel",this._onUp,this),Zs(),hn();var a=this._moved&&this._moving;this._moving=!1,mi._dragging=!1,a&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function hr(e,a,l){var _,v=[1,4,2,8],k,Z,Y,st,ht,pt,wt,Ot;for(k=0,pt=e.length;k<pt;k++)e[k]._code=Ee(e[k],a);for(Y=0;Y<4;Y++){for(wt=v[Y],_=[],k=0,pt=e.length,Z=pt-1;k<pt;Z=k++)st=e[k],ht=e[Z],st._code&wt?ht._code&wt||(Ot=gi(ht,st,wt,a,l),Ot._code=Ee(Ot,a),_.push(Ot)):(ht._code&wt&&(Ot=gi(ht,st,wt,a,l),Ot._code=Ee(Ot,a),_.push(Ot)),_.push(st));e=_}return e}function lr(e,a){var l,_,v,k,Z,Y,st,ht,pt;if(!e||e.length===0)throw new Error("latlngs not passed");Pe(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var wt=Rt([0,0]),Ot=ae(e),xe=Ot.getNorthWest().distanceTo(Ot.getSouthWest())*Ot.getNorthEast().distanceTo(Ot.getNorthWest());xe<1700&&(wt=Ys(e));var ue=e.length,ke=[];for(l=0;l<ue;l++){var ee=Rt(e[l]);ke.push(a.project(Rt([ee.lat-wt.lat,ee.lng-wt.lng])))}for(Y=st=ht=0,l=0,_=ue-1;l<ue;_=l++)v=ke[l],k=ke[_],Z=v.y*k.x-k.y*v.x,st+=(v.x+k.x)*Z,ht+=(v.y+k.y)*Z,Y+=Z*3;Y===0?pt=ke[0]:pt=[st/Y,ht/Y];var Je=a.unproject(Ct(pt));return Rt([Je.lat+wt.lat,Je.lng+wt.lng])}function Ys(e){for(var a=0,l=0,_=0,v=0;v<e.length;v++){var k=Rt(e[v]);a+=k.lat,l+=k.lng,_++}return Rt([a/_,l/_])}var Ro={__proto__:null,clipPolygon:hr,polygonCenter:lr,centroid:Ys};function ur(e,a){if(!a||!e.length)return e.slice();var l=a*a;return e=cr(e,l),e=de(e,l),e}function Js(e,a,l){return Math.sqrt(cn(e,a,l,!0))}function Fo(e,a,l){return cn(e,a,l)}function de(e,a){var l=e.length,_=typeof Uint8Array<"u"?Uint8Array:Array,v=new _(l);v[0]=v[l-1]=1,_e(e,v,a,0,l-1);var k,Z=[];for(k=0;k<l;k++)v[k]&&Z.push(e[k]);return Z}function _e(e,a,l,_,v){var k=0,Z,Y,st;for(Y=_+1;Y<=v-1;Y++)st=cn(e[Y],e[_],e[v],!0),st>k&&(Z=Y,k=st);k>l&&(a[Z]=1,_e(e,a,l,_,Z),_e(e,a,l,Z,v))}function cr(e,a){for(var l=[e[0]],_=1,v=0,k=e.length;_<k;_++)Go(e[_],e[v])>a&&(l.push(e[_]),v=_);return v<k-1&&l.push(e[k-1]),l}var ki;function Si(e,a,l,_,v){var k=_?ki:Ee(e,l),Z=Ee(a,l),Y,st,ht;for(ki=Z;;){if(!(k|Z))return[e,a];if(k&Z)return!1;Y=k||Z,st=gi(e,a,Y,l,v),ht=Ee(st,l),Y===k?(e=st,k=ht):(a=st,Z=ht)}}function gi(e,a,l,_,v){var k=a.x-e.x,Z=a.y-e.y,Y=_.min,st=_.max,ht,pt;return l&8?(ht=e.x+k*(st.y-e.y)/Z,pt=st.y):l&4?(ht=e.x+k*(Y.y-e.y)/Z,pt=Y.y):l&2?(ht=st.x,pt=e.y+Z*(st.x-e.x)/k):l&1&&(ht=Y.x,pt=e.y+Z*(Y.x-e.x)/k),new Pt(ht,pt,v)}function Ee(e,a){var l=0;return e.x<a.min.x?l|=1:e.x>a.max.x&&(l|=2),e.y<a.min.y?l|=4:e.y>a.max.y&&(l|=8),l}function Go(e,a){var l=a.x-e.x,_=a.y-e.y;return l*l+_*_}function cn(e,a,l,_){var v=a.x,k=a.y,Z=l.x-v,Y=l.y-k,st=Z*Z+Y*Y,ht;return st>0&&(ht=((e.x-v)*Z+(e.y-k)*Y)/st,ht>1?(v=l.x,k=l.y):ht>0&&(v+=Z*ht,k+=Y*ht)),Z=e.x-v,Y=e.y-k,_?Z*Z+Y*Y:new Pt(v,k)}function Pe(e){return!ct(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]<"u"}function Ue(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Pe(e)}function Qs(e,a){var l,_,v,k,Z,Y,st,ht;if(!e||e.length===0)throw new Error("latlngs not passed");Pe(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var pt=Rt([0,0]),wt=ae(e),Ot=wt.getNorthWest().distanceTo(wt.getSouthWest())*wt.getNorthEast().distanceTo(wt.getNorthWest());Ot<1700&&(pt=Ys(e));var xe=e.length,ue=[];for(l=0;l<xe;l++){var ke=Rt(e[l]);ue.push(a.project(Rt([ke.lat-pt.lat,ke.lng-pt.lng])))}for(l=0,_=0;l<xe-1;l++)_+=ue[l].distanceTo(ue[l+1])/2;if(_===0)ht=ue[0];else for(l=0,k=0;l<xe-1;l++)if(Z=ue[l],Y=ue[l+1],v=Z.distanceTo(Y),k+=v,k>_){st=(k-_)/v,ht=[Y.x-st*(Y.x-Z.x),Y.y-st*(Y.y-Z.y)];break}var ee=a.unproject(Ct(ht));return Rt([ee.lat+pt.lat,ee.lng+pt.lng])}var jn={__proto__:null,simplify:ur,pointToSegmentDistance:Js,closestPointOnSegment:Fo,clipSegment:Si,_getEdgeIntersection:gi,_getBitCode:Ee,_sqClosestPointOnSegment:cn,isFlat:Pe,_flat:Ue,polylineCenter:Qs},ta={project:function(e){return new Pt(e.lng,e.lat)},unproject:function(e){return new Ht(e.y,e.x)},bounds:new te([-180,-90],[180,90])},je={R:6378137,R_MINOR:6356752314245179e-9,bounds:new te([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(e){var a=Math.PI/180,l=this.R,_=e.lat*a,v=this.R_MINOR/l,k=Math.sqrt(1-v*v),Z=k*Math.sin(_),Y=Math.tan(Math.PI/4-_/2)/Math.pow((1-Z)/(1+Z),k/2);return _=-l*Math.log(Math.max(Y,1e-10)),new Pt(e.lng*a*l,_)},unproject:function(e){for(var a=180/Math.PI,l=this.R,_=this.R_MINOR/l,v=Math.sqrt(1-_*_),k=Math.exp(-e.y/l),Z=Math.PI/2-2*Math.atan(k),Y=0,st=.1,ht;Y<15&&Math.abs(st)>1e-7;Y++)ht=v*Math.sin(Z),ht=Math.pow((1-ht)/(1+ht),v/2),st=Math.PI/2-2*Math.atan(k*ht)-Z,Z+=st;return new Ht(Z*a,e.x*a/l)}},We={__proto__:null,LonLat:ta,Mercator:je,SphericalMercator:Es},Zn=d({},fi,{code:"EPSG:3395",projection:je,transformation:function(){var e=.5/(Math.PI*je.R);return sn(e,.5,-e,.5)}()}),ea=d({},fi,{code:"EPSG:4326",projection:ta,transformation:sn(1/180,1,-1/180,.5)}),ia=d({},si,{projection:ta,transformation:sn(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,a){var l=a.lng-e.lng,_=a.lat-e.lat;return Math.sqrt(l*l+_*_)},infinite:!0});si.Earth=fi,si.EPSG3395=Zn,si.EPSG3857=ks,si.EPSG900913=Pa,si.EPSG4326=ea,si.Simple=ia;var ve=en.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[M(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[M(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var a=e.target;if(a.hasLayer(this)){if(this._map=a,this._zoomAnimated=a._zoomAnimated,this.getEvents){var l=this.getEvents();a.on(l,this),this.once("remove",function(){a.off(l,this)},this)}this.onAdd(a),this.fire("add"),a.fire("layeradd",{layer:this})}}});Ft.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var a=M(e);return this._layers[a]?this:(this._layers[a]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var a=M(e);return this._layers[a]?(this._loaded&&e.onRemove(this),delete this._layers[a],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return M(e)in this._layers},eachLayer:function(e,a){for(var l in this._layers)e.call(a,this._layers[l]);return this},_addLayers:function(e){e=e?ct(e)?e:[e]:[];for(var a=0,l=e.length;a<l;a++)this.addLayer(e[a])},_addZoomLimit:function(e){(!isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[M(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var a=M(e);this._zoomBoundLayers[a]&&(delete this._zoomBoundLayers[a],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,a=-1/0,l=this._getZoomSpan();for(var _ in this._zoomBoundLayers){var v=this._zoomBoundLayers[_].options;e=v.minZoom===void 0?e:Math.min(e,v.minZoom),a=v.maxZoom===void 0?a:Math.max(a,v.maxZoom)}this._layersMaxZoom=a===-1/0?void 0:a,this._layersMinZoom=e===1/0?void 0:e,l!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var qi=ve.extend({initialize:function(e,a){j(this,a),this._layers={};var l,_;if(e)for(l=0,_=e.length;l<_;l++)this.addLayer(e[l])},addLayer:function(e){var a=this.getLayerId(e);return this._layers[a]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var a=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[a]&&this._map.removeLayer(this._layers[a]),delete this._layers[a],this},hasLayer:function(e){var a=typeof e=="number"?e:this.getLayerId(e);return a in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var a=Array.prototype.slice.call(arguments,1),l,_;for(l in this._layers)_=this._layers[l],_[e]&&_[e].apply(_,a);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,a){for(var l in this._layers)e.call(a,this._layers[l]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return M(e)}}),zo=function(e,a){return new qi(e,a)},qe=qi.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),qi.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),qi.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new Ce;for(var a in this._layers){var l=this._layers[a];e.extend(l.getBounds?l.getBounds():l.getLatLng())}return e}}),No=function(e,a){return new qe(e,a)},Hi=pe.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){j(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,a){var l=this._getIconUrl(e);if(!l){if(e==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var _=this._createImg(l,a&&a.tagName==="IMG"?a:null);return this._setIconStyles(_,e),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),_},_setIconStyles:function(e,a){var l=this.options,_=l[a+"Size"];typeof _=="number"&&(_=[_,_]);var v=Ct(_),k=Ct(a==="shadow"&&l.shadowAnchor||l.iconAnchor||v&&v.divideBy(2,!0));e.className="leaflet-marker-"+a+" "+(l.className||""),k&&(e.style.marginLeft=-k.x+"px",e.style.marginTop=-k.y+"px"),v&&(e.style.width=v.x+"px",e.style.height=v.y+"px")},_createImg:function(e,a){return a=a||document.createElement("img"),a.src=e,a},_getIconUrl:function(e){return Mt.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function Uo(e){return new Hi(e)}var dn=Hi.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(e){return typeof dn.imagePath!="string"&&(dn.imagePath=this._detectIconPath()),(this.options.imagePath||dn.imagePath)+Hi.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var a=function(l,_,v){var k=_.exec(l);return k&&k[v]};return e=a(e,/^url\((['"])?(.+)\1\)$/,2),e&&a(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=Nt("div","leaflet-default-icon-path",document.body),a=pi(e,"background-image")||pi(e,"backgroundImage");if(document.body.removeChild(e),a=this._stripUrl(a),a)return a;var l=document.querySelector('link[href$="leaflet.css"]');return l?l.href.substring(0,l.href.length-11-1):""}}),qn=Ae.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new mi(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Tt(e,"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&&ne(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var a=this._marker,l=a._map,_=this._marker.options.autoPanSpeed,v=this._marker.options.autoPanPadding,k=wi(a._icon),Z=l.getPixelBounds(),Y=l.getPixelOrigin(),st=we(Z.min._subtract(Y).add(v),Z.max._subtract(Y).subtract(v));if(!st.contains(k)){var ht=Ct((Math.max(st.max.x,k.x)-st.max.x)/(Z.max.x-st.max.x)-(Math.min(st.min.x,k.x)-st.min.x)/(Z.min.x-st.min.x),(Math.max(st.max.y,k.y)-st.max.y)/(Z.max.y-st.max.y)-(Math.min(st.min.y,k.y)-st.min.y)/(Z.min.y-st.min.y)).multiplyBy(_);l.panBy(ht,{animate:!1}),this._draggable._newPos._add(ht),this._draggable._startPos._add(ht),re(a._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=Et(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(jt(this._panRequest),this._panRequest=Et(this._adjustPan.bind(this,e)))},_onDrag:function(e){var a=this._marker,l=a._shadow,_=wi(a._icon),v=a._map.layerPointToLatLng(_);l&&re(l,_),a._latlng=v,e.latlng=v,e.oldLatLng=this._oldLatLng,a.fire("move",e).fire("drag",e)},_onDragEnd:function(e){jt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),Hn=ve.extend({options:{icon:new dn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,a){j(this,a),this._latlng=Rt(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.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(e){var a=this._latlng;return this._latlng=Rt(e),this.update(),this.fire("move",{oldLatLng:a,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,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 e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,a="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),l=e.icon.createIcon(this._icon),_=!1;l!==this._icon&&(this._icon&&this._removeIcon(),_=!0,e.title&&(l.title=e.title),l.tagName==="IMG"&&(l.alt=e.alt||"")),Tt(l,a),e.keyboard&&(l.tabIndex="0",l.setAttribute("role","button")),this._icon=l,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Bt(l,"focus",this._panOnFocus,this);var v=e.icon.createShadow(this._shadow),k=!1;v!==this._shadow&&(this._removeShadow(),k=!0),v&&(Tt(v,a),v.alt=""),this._shadow=v,e.opacity<1&&this._updateOpacity(),_&&this.getPane().appendChild(this._icon),this._initInteraction(),v&&k&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Kt(this._icon,"focus",this._panOnFocus,this),Qt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Qt(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&re(this._icon,e),this._shadow&&re(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var a=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(a)},_initInteraction:function(){if(this.options.interactive&&(Tt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),qn)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new qn(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&Ne(this._icon,e),this._shadow&&Ne(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var a=this.options.icon.options,l=a.iconSize?Ct(a.iconSize):Ct(0,0),_=a.iconAnchor?Ct(a.iconAnchor):Ct(0,0);e.panInside(this._latlng,{paddingTopLeft:_,paddingBottomRight:l.subtract(_)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function jo(e,a){return new Hn(e,a)}var ai=ve.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(e){this._renderer=e.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(e){return j(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"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||0)}}),Xe=ai.extend({options:{fill:!0,radius:10},initialize:function(e,a){j(this,a),this._latlng=Rt(e),this._radius=this.options.radius},setLatLng:function(e){var a=this._latlng;return this._latlng=Rt(e),this.redraw(),this.fire("move",{oldLatLng:a,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var a=e&&e.radius||this._radius;return ai.prototype.setStyle.call(this,e),this.setRadius(a),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,a=this._radiusY||e,l=this._clickTolerance(),_=[e+l,a+l];this._pxBounds=new te(this._point.subtract(_),this._point.add(_))},_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(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function dr(e,a){return new Xe(e,a)}var na=Xe.extend({initialize:function(e,a,l){if(typeof a=="number"&&(a=d({},l,{radius:a})),j(this,a),this._latlng=Rt(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new Ce(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:ai.prototype.setStyle,_project:function(){var e=this._latlng.lng,a=this._latlng.lat,l=this._map,_=l.options.crs;if(_.distance===fi.distance){var v=Math.PI/180,k=this._mRadius/fi.R/v,Z=l.project([a+k,e]),Y=l.project([a-k,e]),st=Z.add(Y).divideBy(2),ht=l.unproject(st).lat,pt=Math.acos((Math.cos(k*v)-Math.sin(a*v)*Math.sin(ht*v))/(Math.cos(a*v)*Math.cos(ht*v)))/v;(isNaN(pt)||pt===0)&&(pt=k/Math.cos(Math.PI/180*a)),this._point=st.subtract(l.getPixelOrigin()),this._radius=isNaN(pt)?0:st.x-l.project([ht,e-pt]).x,this._radiusY=st.y-Z.y}else{var wt=_.unproject(_.project(this._latlng).subtract([this._mRadius,0]));this._point=l.latLngToLayerPoint(this._latlng),this._radius=this._point.x-l.latLngToLayerPoint(wt).x}this._updateBounds()}});function Bi(e,a,l){return new na(e,a,l)}var ri=ai.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,a){j(this,a),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var a=1/0,l=null,_=cn,v,k,Z=0,Y=this._parts.length;Z<Y;Z++)for(var st=this._parts[Z],ht=1,pt=st.length;ht<pt;ht++){v=st[ht-1],k=st[ht];var wt=_(e,v,k,!0);wt<a&&(a=wt,l=_(e,v,k))}return l&&(l.distance=Math.sqrt(a)),l},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Qs(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,a){return a=a||this._defaultShape(),e=Rt(e),a.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new Ce,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Pe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var a=[],l=Pe(e),_=0,v=e.length;_<v;_++)l?(a[_]=Rt(e[_]),this._bounds.extend(a[_])):a[_]=this._convertLatLngs(e[_]);return a},_project:function(){var e=new te;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),a=new Pt(e,e);this._rawPxBounds&&(this._pxBounds=new te([this._rawPxBounds.min.subtract(a),this._rawPxBounds.max.add(a)]))},_projectLatlngs:function(e,a,l){var _=e[0]instanceof Ht,v=e.length,k,Z;if(_){for(Z=[],k=0;k<v;k++)Z[k]=this._map.latLngToLayerPoint(e[k]),l.extend(Z[k]);a.push(Z)}else for(k=0;k<v;k++)this._projectLatlngs(e[k],a,l)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}var a=this._parts,l,_,v,k,Z,Y,st;for(l=0,v=0,k=this._rings.length;l<k;l++)for(st=this._rings[l],_=0,Z=st.length;_<Z-1;_++)Y=Si(st[_],st[_+1],e,_,!0),Y&&(a[v]=a[v]||[],a[v].push(Y[0]),(Y[1]!==st[_+1]||_===Z-2)&&(a[v].push(Y[1]),v++))}},_simplifyPoints:function(){for(var e=this._parts,a=this.options.smoothFactor,l=0,_=e.length;l<_;l++)e[l]=ur(e[l],a)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,a){var l,_,v,k,Z,Y,st=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(l=0,k=this._parts.length;l<k;l++)for(Y=this._parts[l],_=0,Z=Y.length,v=Z-1;_<Z;v=_++)if(!(!a&&_===0)&&Js(e,Y[v],Y[_])<=st)return!0;return!1}});function Zo(e,a){return new ri(e,a)}ri._flat=Ue;var yi=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()");return lr(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var a=ri.prototype._convertLatLngs.call(this,e),l=a.length;return l>=2&&a[0]instanceof Ht&&a[0].equals(a[l-1])&&a.pop(),a},_setLatLngs:function(e){ri.prototype._setLatLngs.call(this,e),Pe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Pe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,a=this.options.weight,l=new Pt(a,a);if(e=new te(e.min.subtract(l),e.max.add(l)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var _=0,v=this._rings.length,k;_<v;_++)k=hr(this._rings[_],e,!0),k.length&&this._parts.push(k)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var a=!1,l,_,v,k,Z,Y,st,ht;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(k=0,st=this._parts.length;k<st;k++)for(l=this._parts[k],Z=0,ht=l.length,Y=ht-1;Z<ht;Y=Z++)_=l[Z],v=l[Y],_.y>e.y!=v.y>e.y&&e.x<(v.x-_.x)*(e.y-_.y)/(v.y-_.y)+_.x&&(a=!a);return a||ri.prototype._containsPoint.call(this,e,!0)}});function fn(e,a){return new yi(e,a)}var oi=qe.extend({initialize:function(e,a){j(this,a),this._layers={},e&&this.addData(e)},addData:function(e){var a=ct(e)?e:e.features,l,_,v;if(a){for(l=0,_=a.length;l<_;l++)v=a[l],(v.geometries||v.geometry||v.features||v.coordinates)&&this.addData(v);return this}var k=this.options;if(k.filter&&!k.filter(e))return this;var Z=Vn(e,k);return Z?(Z.feature=Yn(e),Z.defaultOptions=Z.options,this.resetStyle(Z),k.onEachFeature&&k.onEachFeature(e,Z),this.addLayer(Z)):this},resetStyle:function(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=d({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(a){this._setLayerStyle(a,e)},this)},_setLayerStyle:function(e,a){e.setStyle&&(typeof a=="function"&&(a=a(e.feature)),e.setStyle(a))}});function Vn(e,a){var l=e.type==="Feature"?e.geometry:e,_=l?l.coordinates:null,v=[],k=a&&a.pointToLayer,Z=a&&a.coordsToLatLng||$n,Y,st,ht,pt;if(!_&&!l)return null;switch(l.type){case"Point":return Y=Z(_),fr(k,e,Y,a);case"MultiPoint":for(ht=0,pt=_.length;ht<pt;ht++)Y=Z(_[ht]),v.push(fr(k,e,Y,a));return new qe(v);case"LineString":case"MultiLineString":return st=Kn(_,l.type==="LineString"?0:1,Z),new ri(st,a);case"Polygon":case"MultiPolygon":return st=Kn(_,l.type==="Polygon"?1:2,Z),new yi(st,a);case"GeometryCollection":for(ht=0,pt=l.geometries.length;ht<pt;ht++){var wt=Vn({geometry:l.geometries[ht],type:"Feature",properties:e.properties},a);wt&&v.push(wt)}return new qe(v);case"FeatureCollection":for(ht=0,pt=l.features.length;ht<pt;ht++){var Ot=Vn(l.features[ht],a);Ot&&v.push(Ot)}return new qe(v);default:throw new Error("Invalid GeoJSON object.")}}function fr(e,a,l,_){return e?e(a,l):new Hn(l,_&&_.markersInheritOptions&&_)}function $n(e){return new Ht(e[1],e[0],e[2])}function Kn(e,a,l){for(var _=[],v=0,k=e.length,Z;v<k;v++)Z=a?Kn(e[v],a-1,l):(l||$n)(e[v]),_.push(Z);return _}function Wn(e,a){return e=Rt(e),e.alt!==void 0?[C(e.lng,a),C(e.lat,a),C(e.alt,a)]:[C(e.lng,a),C(e.lat,a)]}function Xn(e,a,l,_){for(var v=[],k=0,Z=e.length;k<Z;k++)v.push(a?Xn(e[k],Pe(e[k])?0:a-1,l,_):Wn(e[k],_));return!a&&l&&v.length>0&&v.push(v[0].slice()),v}function Vi(e,a){return e.feature?d({},e.feature,{geometry:a}):Yn(a)}function Yn(e){return e.type==="Feature"||e.type==="FeatureCollection"?e:{type:"Feature",properties:{},geometry:e}}var Jn={toGeoJSON:function(e){return Vi(this,{type:"Point",coordinates:Wn(this.getLatLng(),e)})}};Hn.include(Jn),na.include(Jn),Xe.include(Jn),ri.include({toGeoJSON:function(e){var a=!Pe(this._latlngs),l=Xn(this._latlngs,a?1:0,!1,e);return Vi(this,{type:(a?"Multi":"")+"LineString",coordinates:l})}}),yi.include({toGeoJSON:function(e){var a=!Pe(this._latlngs),l=a&&!Pe(this._latlngs[0]),_=Xn(this._latlngs,l?2:a?1:0,!0,e);return a||(_=[_]),Vi(this,{type:(l?"Multi":"")+"Polygon",coordinates:_})}}),qi.include({toMultiPoint:function(e){var a=[];return this.eachLayer(function(l){a.push(l.toGeoJSON(e).geometry.coordinates)}),Vi(this,{type:"MultiPoint",coordinates:a})},toGeoJSON:function(e){var a=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(a==="MultiPoint")return this.toMultiPoint(e);var l=a==="GeometryCollection",_=[];return this.eachLayer(function(v){if(v.toGeoJSON){var k=v.toGeoJSON(e);if(l)_.push(k.geometry);else{var Z=Yn(k);Z.type==="FeatureCollection"?_.push.apply(_,Z.features):_.push(Z)}}}),l?Vi(this,{geometries:_,type:"GeometryCollection"}):{type:"FeatureCollection",features:_}}});function Qn(e,a){return new oi(e,a)}var pr=Qn,$i=ve.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,a,l){this._url=e,this._bounds=ae(a),j(this,l)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Tt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Qt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&ji(this._image),this},bringToBack:function(){return this._map&&Li(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=ae(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName==="IMG",a=this._image=e?this._url:Nt("img");if(Tt(a,"leaflet-image-layer"),this._zoomAnimated&&Tt(a,"leaflet-zoom-animated"),this.options.className&&Tt(a,this.options.className),a.onselectstart=x,a.onmousemove=x,a.onload=p(this.fire,this,"load"),a.onerror=p(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=a.src;return}a.src=this._url,a.alt=this.options.alt},_animateZoom:function(e){var a=this._map.getZoomScale(e.zoom),l=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;bi(this._image,l,a)},_reset:function(){var e=this._image,a=new te(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),l=a.getSize();re(e,a.min),e.style.width=l.x+"px",e.style.height=l.y+"px"},_updateOpacity:function(){Ne(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),qo=function(e,a,l){return new $i(e,a,l)},pn=$i.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName==="VIDEO",a=this._image=e?this._url:Nt("video");if(Tt(a,"leaflet-image-layer"),this._zoomAnimated&&Tt(a,"leaflet-zoom-animated"),this.options.className&&Tt(a,this.options.className),a.onselectstart=x,a.onmousemove=x,a.onloadeddata=p(this.fire,this,"load"),e){for(var l=a.getElementsByTagName("source"),_=[],v=0;v<l.length;v++)_.push(l[v].src);this._url=l.length>0?_:[a.src];return}ct(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(a.style,"objectFit")&&(a.style.objectFit="fill"),a.autoplay=!!this.options.autoplay,a.loop=!!this.options.loop,a.muted=!!this.options.muted,a.playsInline=!!this.options.playsInline;for(var k=0;k<this._url.length;k++){var Z=Nt("source");Z.src=this._url[k],a.appendChild(Z)}}});function _r(e,a,l){return new pn(e,a,l)}var mr=$i.extend({_initImage:function(){var e=this._image=this._url;Tt(e,"leaflet-image-layer"),this._zoomAnimated&&Tt(e,"leaflet-zoom-animated"),this.options.className&&Tt(e,this.options.className),e.onselectstart=x,e.onmousemove=x}});function Ho(e,a,l){return new mr(e,a,l)}var Ye=ve.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,a){e&&(e instanceof Ht||ct(e))?(this._latlng=Rt(e),j(this,a)):(j(this,e),this._source=a),this.options.content&&(this._content=this.options.content)},openOn:function(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&Ne(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&Ne(this._container,1),this.bringToFront(),this.options.interactive&&(Tt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(Ne(this._container,0),this._removeTimeout=setTimeout(p(Qt,void 0,this._container),200)):Qt(this._container),this.options.interactive&&(ne(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=Rt(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,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 e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ji(this._container),this},bringToBack:function(){return this._map&&Li(this._container),this},_prepareOpen:function(e){var a=this._source;if(!a._map)return!1;if(a instanceof qe){a=null;var l=this._source._layers;for(var _ in l)if(l[_]._map){a=l[_];break}if(!a)return!1;this._source=a}if(!e)if(a.getCenter)e=a.getCenter();else if(a.getLatLng)e=a.getLatLng();else if(a.getBounds)e=a.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,a=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof a=="string")e.innerHTML=a;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(a)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),a=Ct(this.options.offset),l=this._getAnchor();this._zoomAnimated?re(this._container,e.add(l)):a=a.add(e).add(l);var _=this._containerBottom=-a.y,v=this._containerLeft=-Math.round(this._containerWidth/2)+a.x;this._container.style.bottom=_+"px",this._container.style.left=v+"px"}},_getAnchor:function(){return[0,0]}});Ft.include({_initOverlay:function(e,a,l,_){var v=a;return v instanceof e||(v=new e(_).setContent(a)),l&&v.setLatLng(l),v}}),ve.include({_initOverlay:function(e,a,l,_){var v=l;return v instanceof e?(j(v,_),v._source=this):(v=a&&!_?a:new e(_,this),v.setContent(l)),v}});var Ai=Ye.extend({options:{pane:"popupPane",offset:[0,7],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(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Ye.prototype.openOn.call(this,e)},onAdd:function(e){Ye.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ai||this._source.on("preclick",Ci))},onRemove:function(e){Ye.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ai||this._source.off("preclick",Ci))},getEvents:function(){var e=Ye.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",a=this._container=Nt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),l=this._wrapper=Nt("div",e+"-content-wrapper",a);if(this._contentNode=Nt("div",e+"-content",l),ln(a),Ws(this._contentNode),Bt(a,"contextmenu",Ci),this._tipContainer=Nt("div",e+"-tip-container",a),this._tip=Nt("div",e+"-tip",this._tipContainer),this.options.closeButton){var _=this._closeButton=Nt("a",e+"-close-button",a);_.setAttribute("role","button"),_.setAttribute("aria-label","Close popup"),_.href="#close",_.innerHTML='<span aria-hidden="true">&#215;</span>',Bt(_,"click",function(v){ce(v),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,a=e.style;a.width="",a.whiteSpace="nowrap";var l=e.offsetWidth;l=Math.min(l,this.options.maxWidth),l=Math.max(l,this.options.minWidth),a.width=l+1+"px",a.whiteSpace="",a.height="";var _=e.offsetHeight,v=this.options.maxHeight,k="leaflet-popup-scrolled";v&&_>v?(a.height=v+"px",Tt(e,k)):ne(e,k),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var a=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),l=this._getAnchor();re(this._container,a.add(l))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,a=parseInt(pi(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+a,_=this._containerWidth,v=new Pt(this._containerLeft,-l-this._containerBottom);v._add(wi(this._container));var k=e.layerPointToContainerPoint(v),Z=Ct(this.options.autoPanPadding),Y=Ct(this.options.autoPanPaddingTopLeft||Z),st=Ct(this.options.autoPanPaddingBottomRight||Z),ht=e.getSize(),pt=0,wt=0;k.x+_+st.x>ht.x&&(pt=k.x+_-ht.x+st.x),k.x-pt-Y.x<0&&(pt=k.x-Y.x),k.y+l+st.y>ht.y&&(wt=k.y+l-ht.y+st.y),k.y-wt-Y.y<0&&(wt=k.y-Y.y),(pt||wt)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([pt,wt]))}},_getAnchor:function(){return Ct(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Vo=function(e,a){return new Ai(e,a)};Ft.mergeOptions({closePopupOnClick:!0}),Ft.include({openPopup:function(e,a,l){return this._initOverlay(Ai,e,a,l).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),ve.include({bindPopup:function(e,a){return this._popup=this._initOverlay(Ai,this._popup,e,a),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(e){return this._popup&&(this instanceof qe||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){Ei(e);var a=e.layer||e.target;if(this._popup._source===a&&!(a instanceof ai)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=a,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var ts=Ye.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Ye.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Ye.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Ye.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip",a=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Nt("div",a),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+M(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var a,l,_=this._map,v=this._container,k=_.latLngToContainerPoint(_.getCenter()),Z=_.layerPointToContainerPoint(e),Y=this.options.direction,st=v.offsetWidth,ht=v.offsetHeight,pt=Ct(this.options.offset),wt=this._getAnchor();Y==="top"?(a=st/2,l=ht):Y==="bottom"?(a=st/2,l=0):Y==="center"?(a=st/2,l=ht/2):Y==="right"?(a=0,l=ht/2):Y==="left"?(a=st,l=ht/2):Z.x<k.x?(Y="right",a=0,l=ht/2):(Y="left",a=st+(pt.x+wt.x)*2,l=ht/2),e=e.subtract(Ct(a,l,!0)).add(pt).add(wt),ne(v,"leaflet-tooltip-right"),ne(v,"leaflet-tooltip-left"),ne(v,"leaflet-tooltip-top"),ne(v,"leaflet-tooltip-bottom"),Tt(v,"leaflet-tooltip-"+Y),re(v,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&Ne(this._container,e)},_animateZoom:function(e){var a=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(a)},_getAnchor:function(){return Ct(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),$o=function(e,a){return new ts(e,a)};Ft.include({openTooltip:function(e,a,l){return this._initOverlay(ts,e,a,l).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),ve.include({bindTooltip:function(e,a){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ts,this._tooltip,e,a),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(e){if(!(!e&&this._tooltipHandlersAdded)){var a=e?"off":"on",l={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?l.add=this._openTooltip:(l.mouseover=this._openTooltip,l.mouseout=this.closeTooltip,l.click=this._openTooltip,this._map?this._addFocusListeners():l.add=this._addFocusListeners),this._tooltip.options.sticky&&(l.mousemove=this._moveTooltip),this[a](l),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof qe||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var a=typeof e.getElement=="function"&&e.getElement();a&&(Bt(a,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),Bt(a,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var a=typeof e.getElement=="function"&&e.getElement();a&&a.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var a=this;this._map.once("moveend",function(){a._openOnceFlag=!1,a._openTooltip(e)});return}this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)}},_moveTooltip:function(e){var a=e.latlng,l,_;this._tooltip.options.sticky&&e.originalEvent&&(l=this._map.mouseEventToContainerPoint(e.originalEvent),_=this._map.containerPointToLayerPoint(l),a=this._map.layerPointToLatLng(_)),this._tooltip.setLatLng(a)}});var gr=Hi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var a=e&&e.tagName==="DIV"?e:document.createElement("div"),l=this.options;if(l.html instanceof Element?(rn(a),a.appendChild(l.html)):a.innerHTML=l.html!==!1?l.html:"",l.bgPos){var _=Ct(l.bgPos);a.style.backgroundPosition=-_.x+"px "+-_.y+"px"}return this._setIconStyles(a,"icon"),a},createShadow:function(){return null}});function Ko(e){return new gr(e)}Hi.Default=dn;var _n=ve.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Mt.mobile,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(e){j(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),Qt(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ji(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Li(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=B(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof Pt?e:new Pt(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var a=this.getPane().children,l=-e(-1/0,1/0),_=0,v=a.length,k;_<v;_++)k=a[_].style.zIndex,a[_]!==this._container&&k&&(l=e(l,+k));isFinite(l)&&(this.options.zIndex=l+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Mt.ielt9){Ne(this._container,this.options.opacity);var e=+new Date,a=!1,l=!1;for(var _ in this._tiles){var v=this._tiles[_];if(!(!v.current||!v.loaded)){var k=Math.min(1,(e-v.loaded)/200);Ne(v.el,k),k<1?a=!0:(v.active?l=!0:this._onOpaqueTile(v),v.active=!0)}}l&&!this._noPrune&&this._pruneTiles(),a&&(jt(this._fadeFrame),this._fadeFrame=Et(this._updateOpacity,this))}},_onOpaqueTile:x,_initContainer:function(){this._container||(this._container=Nt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,a=this.options.maxZoom;if(e!==void 0){for(var l in this._levels)l=Number(l),this._levels[l].el.children.length||l===e?(this._levels[l].el.style.zIndex=a-Math.abs(e-l),this._onUpdateLevel(l)):(Qt(this._levels[l].el),this._removeTilesAtZoom(l),this._onRemoveLevel(l),delete this._levels[l]);var _=this._levels[e],v=this._map;return _||(_=this._levels[e]={},_.el=Nt("div","leaflet-tile-container leaflet-zoom-animated",this._container),_.el.style.zIndex=a,_.origin=v.project(v.unproject(v.getPixelOrigin()),e).round(),_.zoom=e,this._setZoomTransform(_,v.getCenter(),v.getZoom()),x(_.el.offsetWidth),this._onCreateLevel(_)),this._level=_,_}},_onUpdateLevel:x,_onRemoveLevel:x,_onCreateLevel:x,_pruneTiles:function(){if(this._map){var e,a,l=this._map.getZoom();if(l>this.options.maxZoom||l<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles)a=this._tiles[e],a.retain=a.current;for(e in this._tiles)if(a=this._tiles[e],a.current&&!a.active){var _=a.coords;this._retainParent(_.x,_.y,_.z,_.z-5)||this._retainChildren(_.x,_.y,_.z,_.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}},_removeTilesAtZoom:function(e){for(var a in this._tiles)this._tiles[a].coords.z===e&&this._removeTile(a)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)Qt(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,a,l,_){var v=Math.floor(e/2),k=Math.floor(a/2),Z=l-1,Y=new Pt(+v,+k);Y.z=+Z;var st=this._tileCoordsToKey(Y),ht=this._tiles[st];return ht&&ht.active?(ht.retain=!0,!0):(ht&&ht.loaded&&(ht.retain=!0),Z>_?this._retainParent(v,k,Z,_):!1)},_retainChildren:function(e,a,l,_){for(var v=2*e;v<2*e+2;v++)for(var k=2*a;k<2*a+2;k++){var Z=new Pt(v,k);Z.z=l+1;var Y=this._tileCoordsToKey(Z),st=this._tiles[Y];if(st&&st.active){st.retain=!0;continue}else st&&st.loaded&&(st.retain=!0);l+1<_&&this._retainChildren(v,k,l+1,_)}},_resetView:function(e){var a=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),a,a)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var a=this.options;return a.minNativeZoom!==void 0&&e<a.minNativeZoom?a.minNativeZoom:a.maxNativeZoom!==void 0&&a.maxNativeZoom<e?a.maxNativeZoom:e},_setView:function(e,a,l,_){var v=Math.round(a);this.options.maxZoom!==void 0&&v>this.options.maxZoom||this.options.minZoom!==void 0&&v<this.options.minZoom?v=void 0:v=this._clampZoom(v);var k=this.options.updateWhenZooming&&v!==this._tileZoom;(!_||k)&&(this._tileZoom=v,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),v!==void 0&&this._update(e),l||this._pruneTiles(),this._noPrune=!!l),this._setZoomTransforms(e,a)},_setZoomTransforms:function(e,a){for(var l in this._levels)this._setZoomTransform(this._levels[l],e,a)},_setZoomTransform:function(e,a,l){var _=this._map.getZoomScale(l,e.zoom),v=e.origin.multiplyBy(_).subtract(this._map._getNewPixelOrigin(a,l)).round();Mt.any3d?bi(e.el,v,_):re(e.el,v)},_resetGrid:function(){var e=this._map,a=e.options.crs,l=this._tileSize=this.getTileSize(),_=this._tileZoom,v=this._map.getPixelWorldBounds(this._tileZoom);v&&(this._globalTileRange=this._pxBoundsToTileRange(v)),this._wrapX=a.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,a.wrapLng[0]],_).x/l.x),Math.ceil(e.project([0,a.wrapLng[1]],_).x/l.y)],this._wrapY=a.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([a.wrapLat[0],0],_).y/l.x),Math.ceil(e.project([a.wrapLat[1],0],_).y/l.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var a=this._map,l=a._animatingZoom?Math.max(a._animateToZoom,a.getZoom()):a.getZoom(),_=a.getZoomScale(l,this._tileZoom),v=a.project(e,this._tileZoom).floor(),k=a.getSize().divideBy(_*2);return new te(v.subtract(k),v.add(k))},_update:function(e){var a=this._map;if(a){var l=this._clampZoom(a.getZoom());if(e===void 0&&(e=a.getCenter()),this._tileZoom!==void 0){var _=this._getTiledPixelBounds(e),v=this._pxBoundsToTileRange(_),k=v.getCenter(),Z=[],Y=this.options.keepBuffer,st=new te(v.getBottomLeft().subtract([Y,-Y]),v.getTopRight().add([Y,-Y]));if(!(isFinite(v.min.x)&&isFinite(v.min.y)&&isFinite(v.max.x)&&isFinite(v.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ht in this._tiles){var pt=this._tiles[ht].coords;(pt.z!==this._tileZoom||!st.contains(new Pt(pt.x,pt.y)))&&(this._tiles[ht].current=!1)}if(Math.abs(l-this._tileZoom)>1){this._setView(e,l);return}for(var wt=v.min.y;wt<=v.max.y;wt++)for(var Ot=v.min.x;Ot<=v.max.x;Ot++){var xe=new Pt(Ot,wt);if(xe.z=this._tileZoom,!!this._isValidTile(xe)){var ue=this._tiles[this._tileCoordsToKey(xe)];ue?ue.current=!0:Z.push(xe)}}if(Z.sort(function(ee,Je){return ee.distanceTo(k)-Je.distanceTo(k)}),Z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ke=document.createDocumentFragment();for(Ot=0;Ot<Z.length;Ot++)this._addTile(Z[Ot],ke);this._level.el.appendChild(ke)}}}},_isValidTile:function(e){var a=this._map.options.crs;if(!a.infinite){var l=this._globalTileRange;if(!a.wrapLng&&(e.x<l.min.x||e.x>l.max.x)||!a.wrapLat&&(e.y<l.min.y||e.y>l.max.y))return!1}if(!this.options.bounds)return!0;var _=this._tileCoordsToBounds(e);return ae(this.options.bounds).overlaps(_)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var a=this._map,l=this.getTileSize(),_=e.scaleBy(l),v=_.add(l),k=a.unproject(_,e.z),Z=a.unproject(v,e.z);return[k,Z]},_tileCoordsToBounds:function(e){var a=this._tileCoordsToNwSe(e),l=new Ce(a[0],a[1]);return this.options.noWrap||(l=this._map.wrapLatLngBounds(l)),l},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var a=e.split(":"),l=new Pt(+a[0],+a[1]);return l.z=+a[2],l},_removeTile:function(e){var a=this._tiles[e];a&&(Qt(a.el),delete this._tiles[e],this.fire("tileunload",{tile:a.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){Tt(e,"leaflet-tile");var a=this.getTileSize();e.style.width=a.x+"px",e.style.height=a.y+"px",e.onselectstart=x,e.onmousemove=x,Mt.ielt9&&this.options.opacity<1&&Ne(e,this.options.opacity)},_addTile:function(e,a){var l=this._getTilePos(e),_=this._tileCoordsToKey(e),v=this.createTile(this._wrapCoords(e),p(this._tileReady,this,e));this._initTile(v),this.createTile.length<2&&Et(p(this._tileReady,this,e,null,v)),re(v,l),this._tiles[_]={el:v,coords:e,current:!0},a.appendChild(v),this.fire("tileloadstart",{tile:v,coords:e})},_tileReady:function(e,a,l){a&&this.fire("tileerror",{error:a,tile:l,coords:e});var _=this._tileCoordsToKey(e);l=this._tiles[_],l&&(l.loaded=+new Date,this._map._fadeAnimated?(Ne(l.el,0),jt(this._fadeFrame),this._fadeFrame=Et(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),a||(Tt(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mt.ielt9||!this._map._fadeAnimated?Et(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var a=new Pt(this._wrapX?E(e.x,this._wrapX):e.x,this._wrapY?E(e.y,this._wrapY):e.y);return a.z=e.z,a},_pxBoundsToTileRange:function(e){var a=this.getTileSize();return new te(e.min.unscaleBy(a).floor(),e.max.unscaleBy(a).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Wo(e){return new _n(e)}var Ki=_n.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,a){this._url=e,a=j(this,a),a.detectRetina&&Mt.retina&&a.maxZoom>0?(a.tileSize=Math.floor(a.tileSize/2),a.zoomReverse?(a.zoomOffset--,a.minZoom=Math.min(a.maxZoom,a.minZoom+1)):(a.zoomOffset++,a.maxZoom=Math.max(a.minZoom,a.maxZoom-1)),a.minZoom=Math.max(0,a.minZoom)):a.zoomReverse?a.minZoom=Math.min(a.maxZoom,a.minZoom):a.maxZoom=Math.max(a.minZoom,a.maxZoom),typeof a.subdomains=="string"&&(a.subdomains=a.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,a){return this._url===e&&a===void 0&&(a=!0),this._url=e,a||this.redraw(),this},createTile:function(e,a){var l=document.createElement("img");return Bt(l,"load",p(this._tileOnLoad,this,a,l)),Bt(l,"error",p(this._tileOnError,this,a,l)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(l.referrerPolicy=this.options.referrerPolicy),l.alt="",l.src=this.getTileUrl(e),l},getTileUrl:function(e){var a={r:Mt.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var l=this._globalTileRange.max.y-e.y;this.options.tms&&(a.y=l),a["-y"]=l}return rt(this._url,d(a,this.options))},_tileOnLoad:function(e,a){Mt.ielt9?setTimeout(p(e,this,null,a),0):e(null,a)},_tileOnError:function(e,a,l){var _=this.options.errorTileUrl;_&&a.getAttribute("src")!==_&&(a.src=_),e(l,a)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,a=this.options.maxZoom,l=this.options.zoomReverse,_=this.options.zoomOffset;return l&&(e=a-e),e+_},_getSubdomain:function(e){var a=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[a]},_abortLoading:function(){var e,a;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(a=this._tiles[e].el,a.onload=x,a.onerror=x,!a.complete)){a.src=mt;var l=this._tiles[e].coords;Qt(a),delete this._tiles[e],this.fire("tileabort",{tile:a,coords:l})}},_removeTile:function(e){var a=this._tiles[e];if(a)return a.el.setAttribute("src",mt),_n.prototype._removeTile.call(this,e)},_tileReady:function(e,a,l){if(!(!this._map||l&&l.getAttribute("src")===mt))return _n.prototype._tileReady.call(this,e,a,l)}});function sa(e,a){return new Ki(e,a)}var es=Ki.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,a){this._url=e;var l=d({},this.defaultWmsParams);for(var _ in a)_ in this.options||(l[_]=a[_]);a=j(this,a);var v=a.detectRetina&&Mt.retina?2:1,k=this.getTileSize();l.width=k.x*v,l.height=k.y*v,this.wmsParams=l},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var a=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[a]=this._crs.code,Ki.prototype.onAdd.call(this,e)},getTileUrl:function(e){var a=this._tileCoordsToNwSe(e),l=this._crs,_=we(l.project(a[0]),l.project(a[1])),v=_.min,k=_.max,Z=(this._wmsVersion>=1.3&&this._crs===ea?[v.y,v.x,k.y,k.x]:[v.x,v.y,k.x,k.y]).join(","),Y=Ki.prototype.getTileUrl.call(this,e);return Y+W(this.wmsParams,Y,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Z},setParams:function(e,a){return d(this.wmsParams,e),a||this.redraw(),this}});function Xo(e,a){return new es(e,a)}Ki.WMS=es,sa.wms=Xo;var hi=ve.extend({options:{padding:.1},initialize:function(e){j(this,e),M(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Tt(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 e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,a){var l=this._map.getZoomScale(a,this._zoom),_=this._map.getSize().multiplyBy(.5+this.options.padding),v=this._map.project(this._center,a),k=_.multiplyBy(-l).add(v).subtract(this._map._getNewPixelOrigin(e,a));Mt.any3d?bi(this._container,k,l):re(this._container,k)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,a=this._map.getSize(),l=this._map.containerPointToLayerPoint(a.multiplyBy(-e)).round();this._bounds=new te(l,l.add(a.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),aa=hi.extend({options:{tolerance:0},getEvents:function(){var e=hi.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){hi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Bt(e,"mousemove",this._onMouseMove,this),Bt(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Bt(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){jt(this._redrawRequest),delete this._ctx,Qt(this._container),Kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;this._redrawBounds=null;for(var a in this._layers)e=this._layers[a],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){hi.prototype._update.call(this);var e=this._bounds,a=this._container,l=e.getSize(),_=Mt.retina?2:1;re(a,e.min),a.width=_*l.x,a.height=_*l.y,a.style.width=l.x+"px",a.style.height=l.y+"px",Mt.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){hi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[M(e)]=e;var a=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=a),this._drawLast=a,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var a=e._order,l=a.next,_=a.prev;l?l.prev=_:this._drawLast=_,_?_.next=l:this._drawFirst=l,delete e._order,delete this._layers[M(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray=="string"){var a=e.options.dashArray.split(/[, ]+/),l=[],_,v;for(v=0;v<a.length;v++){if(_=Number(a[v]),isNaN(_))return;l.push(_)}e.options._dashArray=l}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||Et(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var a=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new te,this._redrawBounds.extend(e._pxBounds.min.subtract([a,a])),this._redrawBounds.extend(e._pxBounds.max.add([a,a]))}},_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 e=this._redrawBounds;if(e){var a=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,a.x,a.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 e,a=this._redrawBounds;if(this._ctx.save(),a){var l=a.getSize();this._ctx.beginPath(),this._ctx.rect(a.min.x,a.min.y,l.x,l.y),this._ctx.clip()}this._drawing=!0;for(var _=this._drawFirst;_;_=_.next)e=_.layer,(!a||e._pxBounds&&e._pxBounds.intersects(a))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,a){if(this._drawing){var l,_,v,k,Z=e._parts,Y=Z.length,st=this._ctx;if(Y){for(st.beginPath(),l=0;l<Y;l++){for(_=0,v=Z[l].length;_<v;_++)k=Z[l][_],st[_?"lineTo":"moveTo"](k.x,k.y);a&&st.closePath()}this._fillStroke(st,e)}}},_updateCircle:function(e){if(!(!this._drawing||e._empty())){var a=e._point,l=this._ctx,_=Math.max(Math.round(e._radius),1),v=(Math.max(Math.round(e._radiusY),1)||_)/_;v!==1&&(l.save(),l.scale(1,v)),l.beginPath(),l.arc(a.x,a.y/v,_,0,Math.PI*2,!1),v!==1&&l.restore(),this._fillStroke(l,e)}},_fillStroke:function(e,a){var l=a.options;l.fill&&(e.globalAlpha=l.fillOpacity,e.fillStyle=l.fillColor||l.color,e.fill(l.fillRule||"evenodd")),l.stroke&&l.weight!==0&&(e.setLineDash&&e.setLineDash(a.options&&a.options._dashArray||[]),e.globalAlpha=l.opacity,e.lineWidth=l.weight,e.strokeStyle=l.color,e.lineCap=l.lineCap,e.lineJoin=l.lineJoin,e.stroke())},_onClick:function(e){for(var a=this._map.mouseEventToLayerPoint(e),l,_,v=this._drawFirst;v;v=v.next)l=v.layer,l.options.interactive&&l._containsPoint(a)&&(!(e.type==="click"||e.type==="preclick")||!this._map._draggableMoved(l))&&(_=l);this._fireEvent(_?[_]:!1,e)},_onMouseMove:function(e){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var a=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,a)}},_handleMouseOut:function(e){var a=this._hoveredLayer;a&&(ne(this._container,"leaflet-interactive"),this._fireEvent([a],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,a){if(!this._mouseHoverThrottled){for(var l,_,v=this._drawFirst;v;v=v.next)l=v.layer,l.options.interactive&&l._containsPoint(a)&&(_=l);_!==this._hoveredLayer&&(this._handleMouseOut(e),_&&(Tt(this._container,"leaflet-interactive"),this._fireEvent([_],e,"mouseover"),this._hoveredLayer=_)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._mouseHoverThrottled=!0,setTimeout(p(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,a,l){this._map._fireDOMEvent(a,l||a.type,e)},_bringToFront:function(e){var a=e._order;if(a){var l=a.next,_=a.prev;if(l)l.prev=_;else return;_?_.next=l:l&&(this._drawFirst=l),a.prev=this._drawLast,this._drawLast.next=a,a.next=null,this._drawLast=a,this._requestRedraw(e)}},_bringToBack:function(e){var a=e._order;if(a){var l=a.next,_=a.prev;if(_)_.next=l;else return;l?l.prev=_:_&&(this._drawLast=_),a.prev=null,a.next=this._drawFirst,this._drawFirst.prev=a,this._drawFirst=a,this._requestRedraw(e)}}});function is(e){return Mt.canvas?new aa(e):null}var mn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Yo={_initContainer:function(){this._container=Nt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hi.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var a=e._container=mn("shape");Tt(a,"leaflet-vml-shape "+(this.options.className||"")),a.coordsize="1 1",e._path=mn("path"),a.appendChild(e._path),this._updateStyle(e),this._layers[M(e)]=e},_addPath:function(e){var a=e._container;this._container.appendChild(a),e.options.interactive&&e.addInteractiveTarget(a)},_removePath:function(e){var a=e._container;Qt(a),e.removeInteractiveTarget(a),delete this._layers[M(e)]},_updateStyle:function(e){var a=e._stroke,l=e._fill,_=e.options,v=e._container;v.stroked=!!_.stroke,v.filled=!!_.fill,_.stroke?(a||(a=e._stroke=mn("stroke")),v.appendChild(a),a.weight=_.weight+"px",a.color=_.color,a.opacity=_.opacity,_.dashArray?a.dashStyle=ct(_.dashArray)?_.dashArray.join(" "):_.dashArray.replace(/( *, *)/g," "):a.dashStyle="",a.endcap=_.lineCap.replace("butt","flat"),a.joinstyle=_.lineJoin):a&&(v.removeChild(a),e._stroke=null),_.fill?(l||(l=e._fill=mn("fill")),v.appendChild(l),l.color=_.fillColor||_.color,l.opacity=_.fillOpacity):l&&(v.removeChild(l),e._fill=null)},_updateCircle:function(e){var a=e._point.round(),l=Math.round(e._radius),_=Math.round(e._radiusY||l);this._setPath(e,e._empty()?"M0 0":"AL "+a.x+","+a.y+" "+l+","+_+" 0,"+65535*360)},_setPath:function(e,a){e._path.v=a},_bringToFront:function(e){ji(e._container)},_bringToBack:function(e){Li(e._container)}},Wi=Mt.vml?mn:ka,me=hi.extend({_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Qt(this._container),Kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){hi.prototype._update.call(this);var e=this._bounds,a=e.getSize(),l=this._container;(!this._svgSize||!this._svgSize.equals(a))&&(this._svgSize=a,l.setAttribute("width",a.x),l.setAttribute("height",a.y)),re(l,e.min),l.setAttribute("viewBox",[e.min.x,e.min.y,a.x,a.y].join(" ")),this.fire("update")}},_initPath:function(e){var a=e._path=Wi("path");e.options.className&&Tt(a,e.options.className),e.options.interactive&&Tt(a,"leaflet-interactive"),this._updateStyle(e),this._layers[M(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){Qt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[M(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var a=e._path,l=e.options;a&&(l.stroke?(a.setAttribute("stroke",l.color),a.setAttribute("stroke-opacity",l.opacity),a.setAttribute("stroke-width",l.weight),a.setAttribute("stroke-linecap",l.lineCap),a.setAttribute("stroke-linejoin",l.lineJoin),l.dashArray?a.setAttribute("stroke-dasharray",l.dashArray):a.removeAttribute("stroke-dasharray"),l.dashOffset?a.setAttribute("stroke-dashoffset",l.dashOffset):a.removeAttribute("stroke-dashoffset")):a.setAttribute("stroke","none"),l.fill?(a.setAttribute("fill",l.fillColor||l.color),a.setAttribute("fill-opacity",l.fillOpacity),a.setAttribute("fill-rule",l.fillRule||"evenodd")):a.setAttribute("fill","none"))},_updatePoly:function(e,a){this._setPath(e,Sa(e._parts,a))},_updateCircle:function(e){var a=e._point,l=Math.max(Math.round(e._radius),1),_=Math.max(Math.round(e._radiusY),1)||l,v="a"+l+","+_+" 0 1,0 ",k=e._empty()?"M0 0":"M"+(a.x-l)+","+a.y+v+l*2+",0 "+v+-l*2+",0 ";this._setPath(e,k)},_setPath:function(e,a){e._path.setAttribute("d",a)},_bringToFront:function(e){ji(e._path)},_bringToBack:function(e){Li(e._path)}});Mt.vml&&me.include(Yo);function Me(e){return Mt.svg||Mt.vml?new me(e):null}Ft.include({getRenderer:function(e){var a=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return a||(a=this._renderer=this._createRenderer()),this.hasLayer(a)||this.addLayer(a),a},_getPaneRenderer:function(e){if(e==="overlayPane"||e===void 0)return!1;var a=this._paneRenderers[e];return a===void 0&&(a=this._createRenderer({pane:e}),this._paneRenderers[e]=a),a},_createRenderer:function(e){return this.options.preferCanvas&&is(e)||Me(e)}});var ra=yi.extend({initialize:function(e,a){yi.prototype.initialize.call(this,this._boundsToLatLngs(e),a)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=ae(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function He(e,a){return new ra(e,a)}me.create=Wi,me.pointsToPath=Sa,oi.geometryToLayer=Vn,oi.coordsToLatLng=$n,oi.coordsToLatLngs=Kn,oi.latLngToCoords=Wn,oi.latLngsToCoords=Xn,oi.getFeature=Vi,oi.asFeature=Yn,Ft.mergeOptions({boxZoom:!0});var kt=Ae.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Bt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Qt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),on(),js(),this._startPoint=this._map.mouseEventToContainerPoint(e),Bt(document,{contextmenu:Ei,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=Nt("div","leaflet-zoom-box",this._container),Tt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var a=new te(this._point,this._startPoint),l=a.getSize();re(this._box,a.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(Qt(this._box),ne(this._container,"leaflet-crosshair")),hn(),Zs(),Kt(document,{contextmenu:Ei,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0);var a=new Ce(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(a).fire("boxzoomend",{boxZoomBounds:a})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ft.addInitHook("addHandler","boxZoom",kt),Ft.mergeOptions({doubleClickZoom:!0});var ns=Ae.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var a=this._map,l=a.getZoom(),_=a.options.zoomDelta,v=e.originalEvent.shiftKey?l-_:l+_;a.options.doubleClickZoom==="center"?a.setZoom(v):a.setZoomAround(e.containerPoint,v)}});Ft.addInitHook("addHandler","doubleClickZoom",ns),Ft.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ss=Ae.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new mi(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}Tt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ne(this._map._container,"leaflet-grab"),ne(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 e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var a=ae(this._map.options.maxBounds);this._offsetLimit=we(this._map.latLngToContainerPoint(a.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(a.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var a=this._lastTime=+new Date,l=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(l),this._times.push(a),this._prunePositions(a)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),a=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=a.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,a){return e-(e-a)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),a=this._offsetLimit;e.x<a.min.x&&(e.x=this._viscousLimit(e.x,a.min.x)),e.y<a.min.y&&(e.y=this._viscousLimit(e.y,a.min.y)),e.x>a.max.x&&(e.x=this._viscousLimit(e.x,a.max.x)),e.y>a.max.y&&(e.y=this._viscousLimit(e.y,a.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,a=Math.round(e/2),l=this._initialWorldOffset,_=this._draggable._newPos.x,v=(_-a+l)%e+a-l,k=(_+a+l)%e-a-l,Z=Math.abs(v+l)<Math.abs(k+l)?v:k;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Z},_onDragEnd:function(e){var a=this._map,l=a.options,_=!l.inertia||e.noInertia||this._times.length<2;if(a.fire("dragend",e),_)a.fire("moveend");else{this._prunePositions(+new Date);var v=this._lastPos.subtract(this._positions[0]),k=(this._lastTime-this._times[0])/1e3,Z=l.easeLinearity,Y=v.multiplyBy(Z/k),st=Y.distanceTo([0,0]),ht=Math.min(l.inertiaMaxSpeed,st),pt=Y.multiplyBy(ht/st),wt=ht/(l.inertiaDeceleration*Z),Ot=pt.multiplyBy(-wt/2).round();!Ot.x&&!Ot.y?a.fire("moveend"):(Ot=a._limitOffset(Ot,a.options.maxBounds),Et(function(){a.panBy(Ot,{duration:wt,easeLinearity:Z,noMoveStart:!0,animate:!0})}))}}});Ft.addInitHook("addHandler","dragging",ss),Ft.mergeOptions({keyboard:!0,keyboardPanDelta:80});var li=Ae.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),Bt(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Kt(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 e=document.body,a=document.documentElement,l=e.scrollTop||a.scrollTop,_=e.scrollLeft||a.scrollLeft;this._map._container.focus(),window.scrollTo(_,l)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var a=this._panKeys={},l=this.keyCodes,_,v;for(_=0,v=l.left.length;_<v;_++)a[l.left[_]]=[-1*e,0];for(_=0,v=l.right.length;_<v;_++)a[l.right[_]]=[e,0];for(_=0,v=l.down.length;_<v;_++)a[l.down[_]]=[0,e];for(_=0,v=l.up.length;_<v;_++)a[l.up[_]]=[0,-1*e]},_setZoomDelta:function(e){var a=this._zoomKeys={},l=this.keyCodes,_,v;for(_=0,v=l.zoomIn.length;_<v;_++)a[l.zoomIn[_]]=e;for(_=0,v=l.zoomOut.length;_<v;_++)a[l.zoomOut[_]]=-e},_addHooks:function(){Bt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Kt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var a=e.keyCode,l=this._map,_;if(a in this._panKeys){if(!l._panAnim||!l._panAnim._inProgress)if(_=this._panKeys[a],e.shiftKey&&(_=Ct(_).multiplyBy(3)),l.options.maxBounds&&(_=l._limitOffset(Ct(_),l.options.maxBounds)),l.options.worldCopyJump){var v=l.wrapLatLng(l.unproject(l.project(l.getCenter()).add(_)));l.panTo(v)}else l.panBy(_)}else if(a in this._zoomKeys)l.setZoom(l.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[a]);else if(a===27&&l._popup&&l._popup.options.closeOnEscapeKey)l.closePopup();else return;Ei(e)}}});Ft.addInitHook("addHandler","keyboard",li),Ft.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var le=Ae.extend({addHooks:function(){Bt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Kt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var a=nr(e),l=this._map.options.wheelDebounceTime;this._delta+=a,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var _=Math.max(l-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(p(this._performZoom,this),_),Ei(e)},_performZoom:function(){var e=this._map,a=e.getZoom(),l=this._map.options.zoomSnap||0;e._stop();var _=this._delta/(this._map.options.wheelPxPerZoomLevel*4),v=4*Math.log(2/(1+Math.exp(-Math.abs(_))))/Math.LN2,k=l?Math.ceil(v/l)*l:v,Z=e._limitZoom(a+(this._delta>0?k:-k))-a;this._delta=0,this._startTime=null,Z&&(e.options.scrollWheelZoom==="center"?e.setZoom(a+Z):e.setZoomAround(this._lastMousePos,a+Z))}});Ft.addInitHook("addHandler","scrollWheelZoom",le);var yr=600;Ft.mergeOptions({tapHold:Mt.touchNative&&Mt.safari&&Mt.mobile,tapTolerance:15});var Oe=Ae.extend({addHooks:function(){Bt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var a=e.touches[0];this._startPos=this._newPos=new Pt(a.clientX,a.clientY),this._holdTimeout=setTimeout(p(function(){this._cancel(),this._isTapValid()&&(Bt(document,"touchend",ce),Bt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",a))},this),yr),Bt(document,"touchend touchcancel contextmenu",this._cancel,this),Bt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Kt(document,"touchend",ce),Kt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Kt(document,"touchend touchcancel contextmenu",this._cancel,this),Kt(document,"touchmove",this._onMove,this)},_onMove:function(e){var a=e.touches[0];this._newPos=new Pt(a.clientX,a.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,a){var l=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY});l._simulated=!0,a.target.dispatchEvent(l)}});Ft.addInitHook("addHandler","tapHold",Oe),Ft.mergeOptions({touchZoom:Mt.touch,bounceAtZoomLimits:!0});var Ie=Ae.extend({addHooks:function(){Tt(this._map._container,"leaflet-touch-zoom"),Bt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ne(this._map._container,"leaflet-touch-zoom"),Kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var a=this._map;if(!(!e.touches||e.touches.length!==2||a._animatingZoom||this._zooming)){var l=a.mouseEventToContainerPoint(e.touches[0]),_=a.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=a.getSize()._divideBy(2),this._startLatLng=a.containerPointToLatLng(this._centerPoint),a.options.touchZoom!=="center"&&(this._pinchStartLatLng=a.containerPointToLatLng(l.add(_)._divideBy(2))),this._startDist=l.distanceTo(_),this._startZoom=a.getZoom(),this._moved=!1,this._zooming=!0,a._stop(),Bt(document,"touchmove",this._onTouchMove,this),Bt(document,"touchend touchcancel",this._onTouchEnd,this),ce(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var a=this._map,l=a.mouseEventToContainerPoint(e.touches[0]),_=a.mouseEventToContainerPoint(e.touches[1]),v=l.distanceTo(_)/this._startDist;if(this._zoom=a.getScaleZoom(v,this._startZoom),!a.options.bounceAtZoomLimits&&(this._zoom<a.getMinZoom()&&v<1||this._zoom>a.getMaxZoom()&&v>1)&&(this._zoom=a._limitZoom(this._zoom)),a.options.touchZoom==="center"){if(this._center=this._startLatLng,v===1)return}else{var k=l._add(_)._divideBy(2)._subtract(this._centerPoint);if(v===1&&k.x===0&&k.y===0)return;this._center=a.unproject(a.project(this._pinchStartLatLng,this._zoom).subtract(k),this._zoom)}this._moved||(a._moveStart(!0,!1),this._moved=!0),jt(this._animRequest);var Z=p(a._move,a,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Et(Z,this,!0),ce(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,jt(this._animRequest),Kt(document,"touchmove",this._onTouchMove,this),Kt(document,"touchend touchcancel",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))}});Ft.addInitHook("addHandler","touchZoom",Ie),Ft.BoxZoom=kt,Ft.DoubleClickZoom=ns,Ft.Drag=ss,Ft.Keyboard=li,Ft.ScrollWheelZoom=le,Ft.TapHold=Oe,Ft.TouchZoom=Ie,r.Bounds=te,r.Browser=Mt,r.CRS=si,r.Canvas=aa,r.Circle=na,r.CircleMarker=Xe,r.Class=pe,r.Control=St,r.DivIcon=gr,r.DivOverlay=Ye,r.DomEvent=Gn,r.DomUtil=So,r.Draggable=mi,r.Evented=en,r.FeatureGroup=qe,r.GeoJSON=oi,r.GridLayer=_n,r.Handler=Ae,r.Icon=Hi,r.ImageOverlay=$i,r.LatLng=Ht,r.LatLngBounds=Ce,r.Layer=ve,r.LayerGroup=qi,r.LineUtil=jn,r.Map=Ft,r.Marker=Hn,r.Mixin=Io,r.Path=ai,r.Point=Pt,r.PolyUtil=Ro,r.Polygon=yi,r.Polyline=ri,r.Popup=Ai,r.PosAnimation=sr,r.Projection=We,r.Rectangle=ra,r.Renderer=hi,r.SVG=me,r.SVGOverlay=mr,r.TileLayer=Ki,r.Tooltip=ts,r.Transformation=Ps,r.Util=be,r.VideoOverlay=pn,r.bind=p,r.bounds=we,r.canvas=is,r.circle=Bi,r.circleMarker=dr,r.control=Pi,r.divIcon=Ko,r.extend=d,r.featureGroup=No,r.geoJSON=Qn,r.geoJson=pr,r.gridLayer=Wo,r.icon=Uo,r.imageOverlay=qo,r.latLng=Rt,r.latLngBounds=ae,r.layerGroup=zo,r.map=ar,r.marker=jo,r.point=Ct,r.polygon=fn,r.polyline=Zo,r.popup=Vo,r.rectangle=He,r.setOptions=j,r.stamp=M,r.svg=Me,r.svgOverlay=Ho,r.tileLayer=sa,r.tooltip=$o,r.transformation=sn,r.version=u,r.videoOverlay=_r;var Ti=window.L;r.noConflict=function(){return window.L=Ti,this},window.L=r})}(da,da.exports)),da.exports}var U=oh();(function(t){typeof define=="function"&&define.amd?define(t):t()})(function(){const t=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(E,x,C,T,G){var j=x||new L.Point(0,0);if(!T)return x=j._round(),t.setTransform.apply(this,arguments);j=j.rotateFrom(T,G),E.style[L.DomUtil.TRANSFORM]="translate3d("+j.x+"px,"+j.y+"px,0)"+(C?" scale("+C+")":"")+" rotate("+T+"rad)"},setPosition:function(E,x,C,T,G){if(!C&&!G)return t.setPosition.apply(this,arguments);E._leaflet_pos=x,L.Browser.any3d?L.DomUtil.setTransform(E,x,G,C,T):(E.style.left=x.x+"px",E.style.top=x.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({}),L.extend(L.Point.prototype,{rotate:function(E){return this.rotateFrom(E,new L.Point(0,0))},rotateFrom:function(E,x){if(!E)return this;var C=Math.sin(E),T=Math.cos(E),G=x.x,j=x.y,W=this.x-G,at=this.y-j;return new L.Point(W*T-at*C+G,W*C+at*T+j)}});const n=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(n.getEvents.apply(this,arguments),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map&&(n._updatePosition.apply(this,arguments),this._map&&this._map._rotate&&this._zoomAnimated)){var E=this._getAnchor(),x=L.DomUtil.getPosition(this._container).subtract(E);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(x).add(E))}}});const r=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(E){if(r._animateZoom.apply(this,arguments),this._map&&this._map._rotate){var x=this._getAnchor(),C=L.DomUtil.getPosition(this._container).subtract(x);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(C).add(x))}},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){if(this._autopanning){this._autopanning=!1;return}var E=this._map,x=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,C=this._container.offsetHeight+x,T=this._containerWidth,G=new L.Point(this._containerLeft,-C-this._containerBottom);G._add(L.DomUtil.getPosition(this._container));var j=G._add(this._map._getMapPanePos()),W=L.point(this.options.autoPanPadding),at=L.point(this.options.autoPanPaddingTopLeft||W),rt=L.point(this.options.autoPanPaddingBottomRight||W),ct=E.getSize(),yt=0,mt=0;j.x+T+rt.x>ct.x&&(yt=j.x+T-ct.x+rt.x),j.x-yt-at.x<0&&(yt=j.x-at.x),j.y+C+rt.y>ct.y&&(mt=j.y+C-ct.y+rt.y),j.y-mt-at.y<0&&(mt=j.y-at.y),(yt||mt)&&(this.options.keepInView&&(this._autopanning=!0),E.fire("autopanstart").panBy([yt,mt]))}}});const u=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_animateZoom:function(E){if(!this._map._rotate)return u._animateZoom.apply(this,arguments);var x=this._map._latLngToNewLayerPoint(this._latlng,E.zoom,E.center);x=this._map.rotatedPointToMapPanePoint(x),this._setPosition(x)},_updatePosition:function(){if(!this._map._rotate)return u._updatePosition.apply(this,arguments);var E=this._map.latLngToLayerPoint(this._latlng);E=this._map.rotatedPointToMapPanePoint(E),this._setPosition(E)}}),L.extend({},L.Icon.prototype),L.Icon.include({_setIconStyles:function(E,x){var C=this.options,T=C[x+"Size"];typeof T=="number"&&(T=[T,T]);var G=L.point(T),j=L.point(x==="shadow"&&C.shadowAnchor||C.iconAnchor||G&&G.divideBy(2,!0));E.className="leaflet-marker-"+x+" "+(C.className||""),j&&(E.style.marginLeft=-j.x+"px",E.style.marginTop=-j.y+"px",E.style[L.DomUtil.TRANSFORM+"Origin"]=j.x+"px "+j.y+"px 0px"),G&&(E.style.width=G.x+"px",E.style.height=G.y+"px")}});const d=L.extend({},L.Marker.prototype);L.Marker.mergeOptions({rotation:0,rotateWithView:!1,scale:void 0});var f,p={_onDrag:function(E){var x=this._marker,C=x.options.rotation||x.options.rotateWithView,T=x._shadow,G=L.DomUtil.getPosition(x._icon);!C&&T&&L.DomUtil.setPosition(T,G),x._map._rotate&&(G=x._map.mapPanePointToRotatedPoint(G));var j=x._map.layerPointToLatLng(G);x._latlng=j,E.latlng=j,E.oldLatLng=this._oldLatLng,C?x.setLatLng(j):x.fire("move",E),x.fire("drag",E)},_onDragEnd:function(E){this._marker._map._rotate&&this._marker.update(),f._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents:function(){return L.extend(d.getEvents.apply(this,arguments),{rotate:this.update})},_initInteraction:function(){var E=d._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(f=f||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:p._onDrag.bind(this.dragging),_onDragEnd:p._onDragEnd.bind(this.dragging)}),this.dragging.enable()),E},_setPos:function(E){this._map._rotate&&(E=this._map.rotatedPointToMapPanePoint(E));var x=this.options.rotation||0;this.options.rotateWithView&&(x+=this._map._bearing),this._icon&&L.DomUtil.setPosition(this._icon,E,x,E,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,E,x,E,this.options.scale),this._zIndex=E.y+this.options.zIndexOffset,this._resetZIndex()},setRotation:function(E){this.options.rotation=E,this.update()}});const g=L.extend({},L.GridLayer.prototype);L.GridLayer.include({getEvents:function(){var E=g.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),E.rotate=this._onRotate),E},_getTiledPixelBounds:function(E){return this._map._rotate?this._map._getNewPixelBounds(E,this._tileZoom):g._getTiledPixelBounds.apply(this,arguments)}});const M=L.extend({},L.Renderer.prototype);L.Renderer.include({getEvents:function(){return L.extend(M.getEvents.apply(this,arguments),{rotate:this._update})},onAdd:function(){M.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform:function(E,x){if(!this._map._rotate)return M._updateTransform.apply(this,arguments);var C=this._map.getZoomScale(x,this._zoom),T=this._map._latLngToNewLayerPoint(this._topLeft,x,E);L.DomUtil.setTransform(this._container,T,C)},_update:function(){if(!this._map._rotate)return M._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const B=L.extend({},L.Map.prototype);L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(E,x){x.rotate&&(this._rotate=!0,this._bearing=0),B.initialize.apply(this,arguments),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(E){return this._rotate?L.point(E).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):B.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint:function(E){return this._rotate?L.point(E).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):B.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint:function(E){return L.point(E).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(E){return L.point(E)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds:function(E){if(!this._rotate&&B.mapBoundsToContainerBounds)return B.mapBoundsToContainerBounds.apply(this,arguments);const x=this.getPixelOrigin(),C=this.layerPointToContainerPoint(this.project(E.getNorthWest())._subtract(x)),T=this.layerPointToContainerPoint(this.project(E.getNorthEast())._subtract(x)),G=this.layerPointToContainerPoint(this.project(E.getSouthWest())._subtract(x)),j=this.layerPointToContainerPoint(this.project(E.getSouthEast())._subtract(x));return L.bounds([L.point(Math.min(C.x,T.x,j.x,G.x),Math.min(C.y,T.y,j.y,G.y)),L.point(Math.max(C.x,T.x,j.x,G.x),Math.max(C.y,T.y,j.y,G.y))])},getBounds:function(){if(!this._rotate)return B.getBounds.apply(this,arguments);var E=this.getSize();return new L.LatLngBounds([this.containerPointToLatLng([0,0]),this.containerPointToLatLng([E.x,0]),this.containerPointToLatLng([E.x,E.y]),this.containerPointToLatLng([0,E.y])])},setBearing:function(E){if(!(!L.Browser.any3d||!this._rotate)){var x=L.Util.wrapNum(E,[0,360])*L.DomUtil.DEG_TO_RAD,C=this._getPixelCenter(),T=this._getRotatePanePos().rotateFrom(-this._bearing,C),G=T.rotateFrom(x,C);L.DomUtil.setPosition(this._rotatePane,T,x,C),this._pivot=C,this._bearing=x,this._rotatePanePos=G,this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var E=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(E.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(E.shadowPane,"leaflet-zoom-hide"))},panInside(E,x){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return B.panInside.apply(this,arguments);x=x||{};const C=L.point(x.paddingTopLeft||x.padding||[0,0]),T=L.point(x.paddingBottomRight||x.padding||[0,0]),G=this._container.getBoundingClientRect(),j=this.latLngToContainerPoint(E),W=L.bounds([L.point(G),L.point(G).add(this.getSize())]),at=W.getCenter(),rt=L.bounds([W.min.add(C),W.max.subtract(T)]),ct=rt.getSize();if(!rt.contains(j)){this._enforcingBounds=!0;const yt=j.subtract(rt.getCenter()),mt=rt.extend(j).getSize().subtract(ct);at.x+=yt.x<0?-mt.x:mt.x,at.y+=yt.y<0?-mt.y:mt.y,this.panTo(this.containerPointToLatLng(at),x),this._enforcingBounds=!1}return this},getBoundsZoom(E,x,C){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return B.getBoundsZoom.apply(this,arguments);E=L.latLngBounds(E),C=L.point(C||[0,0]);let T=this.getZoom()||0;const G=this.getMinZoom(),j=this.getMaxZoom(),W=this.getSize().subtract(C),at=this.mapBoundsToContainerBounds(E).getSize(),rt=this.options.zoomSnap,ct=W.x/at.x,yt=W.y/at.y,mt=x?Math.max(ct,yt):Math.min(ct,yt);return T=this.getScaleZoom(mt,T),rt&&(T=Math.round(T/(rt/100))*(rt/100),T=x?Math.ceil(T/rt)*rt:Math.floor(T/rt)*rt),Math.max(G,Math.min(j,T))},_getCenterOffset:function(E){var x=B._getCenterOffset.apply(this,arguments);return this._rotate&&(x=x.rotate(this._bearing)),x},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(E,x){if(!this._rotate)return B._getNewPixelOrigin.apply(this,arguments);var C=this.getSize()._divideBy(2);return this.project(E,x).rotate(this._bearing)._subtract(C)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_getNewPixelBounds:function(E,x){if(E=E||this.getCenter(),x=x||this.getZoom(),!this._rotate&&B._getNewPixelBounds)return B._getNewPixelBounds.apply(this,arguments);var C=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),T=this.getZoomScale(C,x),G=this.project(E,x).floor(),j=this.getSize(),W=new L.Bounds([this.containerPointToLayerPoint([0,0]).floor(),this.containerPointToLayerPoint([j.x,0]).floor(),this.containerPointToLayerPoint([0,j.y]).floor(),this.containerPointToLayerPoint([j.x,j.y]).floor()]).getSize().divideBy(T*2);return new L.Bounds(G.subtract(W),G.add(W))},_getPixelCenter:function(){return!this._rotate&&B._getPixelCenter?B._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds:function(E){if(!this._rotate&&B._getPaddedPixelBounds)return B._getPaddedPixelBounds.apply(this,arguments);var x=E,C=this.getSize(),T=C.multiplyBy(-x),G=C.multiplyBy(1+x);return new L.Bounds([this.containerPointToLayerPoint([T.x,T.y]).floor(),this.containerPointToLayerPoint([T.x,G.y]).floor(),this.containerPointToLayerPoint([G.x,T.y]).floor(),this.containerPointToLayerPoint([G.x,G.y]).floor()])},_handleGeolocationResponse:function(E){if(this._container._leaflet_id){var x=E.coords.latitude,C=E.coords.longitude,T=E.coords.heading,G=new L.LatLng(x,C),j=G.toBounds(E.coords.accuracy),W=this._locateOptions;if(W.setView){var at=this.getBoundsZoom(j);this.setView(G,W.maxZoom?Math.min(at,W.maxZoom):at)}var rt={latlng:G,bounds:j,timestamp:E.timestamp,heading:T};for(var ct in E.coords)typeof E.coords[ct]=="number"&&(rt[ct]=E.coords[ct]);this.fire("locationfound",rt)}}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(E){this._map=E,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks:function(){this._map._rotate&&this.__deviceOrientationEvent?L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this):this.disable()},removeHooks:function(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation:function(E){var x=E.webkitCompassHeading||E.alpha,C=0;!E.absolute&&E.webkitCompassHeading&&(x=360-x),!E.absolute&&typeof window.orientation<"u"&&(C=window.orientation),this._map.setBearing(x-C)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks:function(){this._observer.disconnect()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(E){this._map=E,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(E){var x=this._map;if(!(!E.touches||E.touches.length!==2||x._animatingZoom||this._zooming||this._rotating)){var C=x.mouseEventToContainerPoint(E.touches[0]),T=x.mouseEventToContainerPoint(E.touches[1]),G=C.subtract(T);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),this.zoom?(x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(C.add(T)._divideBy(2))),this._startDist=C.distanceTo(T),this._startZoom=x.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(G.x/G.y),this._startBearing=x.getBearing(),G.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,x._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(E)}},_onTouchMove:function(E){if(!(!E.touches||E.touches.length!==2||!(this._zooming||this._rotating))){var x=this._map,C=x.mouseEventToContainerPoint(E.touches[0]),T=x.mouseEventToContainerPoint(E.touches[1]),G=C.subtract(T),j=C.distanceTo(T)/this._startDist,W;if(this._rotating){var at=Math.atan(G.x/G.y),rt=(at-this._startTheta)*L.DomUtil.RAD_TO_DEG;G.y<0&&(rt+=180),rt&&x.setBearing(this._startBearing-rt)}if(this._zooming)if(this._zoom=x.getScaleZoom(j,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoom<x.getMinZoom()&&j<1||this._zoom>x.getMaxZoom()&&j>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,j===1)return}else{if(W=C._add(T)._divideBy(2)._subtract(this._centerPoint),j===1&&W.x===0&&W.y===0)return;var ct=-x.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=x.unproject(x.project(this._pinchStartLatLng).subtract(W.rotate(ct)))}this._moved||(x._moveStart(!0,!1),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var yt=x._move.bind(x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=L.Util.requestAnimFrame(yt,this,!0),L.DomEvent.preventDefault(E)}},_onTouchEnd:function(){if(!this._moved||!(this._zooming||this._rotating)){this._zooming=!1;return}this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(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)))}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(E){E.shiftKey?(E.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+Math.sign(E.deltaY)*5)):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.addInitHook(function(){this.scrollWheelZoom.enabled()&&this.shiftKeyRotate.enabled()&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())}),L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(E){var x=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),C=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");C.style.backgroundImage=`url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")`,C.style.cursor="grab",C.style.display="block",C.style.width="100%",C.style.height="100%",C.style.backgroundRepeat="no-repeat",C.style.backgroundPosition="50%";var T=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",x);return T.appendChild(C),T.href="#",T.title="Rotate map",L.DomEvent.on(T,"dblclick",L.DomEvent.stopPropagation).on(T,"mousedown",this._handleMouseDown,this).on(T,"click",L.DomEvent.stop).on(T,"click",this._cycleState,this).on(T,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(T,"leaflet-disabled"),this._restyle(),E.on("rotate",this._restyle,this),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&E.getBearing()===0&&(x.style.display="none"),x},onRemove:function(E){E.off("rotate",this._restyle,this)},_handleMouseDown:function(E){L.DomEvent.stop(E),this.dragging=!0,this.dragstartX=E.pageX,this.dragstartY=E.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(E){L.DomEvent.stop(E),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(E){if(this.dragging){var x=E.clientX-this.dragstartX;this._map.setBearing(x)}},_cycleState:function(E){if(this._map){var x=this._map;!x.touchRotate.enabled()&&!x.compassBearing.enabled()?x.touchRotate.enable():x.compassBearing.enabled()?(x.compassBearing.disable(),x.setBearing(0),this.options.closeOnZeroBearing&&x.touchRotate.enable()):(x.touchRotate.disable(),(DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission():Promise.resolve("granted")).then(C=>C==="granted"&&x.compassBearing.enable())),this._restyle()}},_restyle:function(){if(!this._map.options.rotate)L.DomUtil.addClass(this._link,"leaflet-disabled");else{var E=this._map,x=E.getBearing();this._arrow.style.transform="rotate("+x+"deg)",x&&this.options.closeOnZeroBearing&&(this._container.style.display="block"),E.compassBearing.enabled()?this._link.style.backgroundColor="orange":E.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",x===0&&this.options.closeOnZeroBearing&&(this._container.style.display="none"))}}}),L.control.rotate=function(E){return new L.Control.Rotate(E)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook(function(){if(this.options.rotateControl){var E=typeof this.options.rotateControl=="object"?this.options.rotateControl:{};this.rotateControl=L.control.rotate(E),this.addControl(this.rotateControl)}})}),(()=>{var pl,_l;var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports),g=(i,s,o,h)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of u(s))!f.call(i,c)&&c!==o&&n(i,c,{get:()=>s[c],enumerable:!(h=r(s,c))||h.enumerable});return i},M=(i,s,o)=>(o=i!=null?t(d(i)):{},g(s||!i||!i.__esModule?n(o,"default",{value:i,enumerable:!0}):o,i)),B=p((i,s)=>{function o(){this.__data__=[],this.size=0}s.exports=o}),E=p((i,s)=>{function o(h,c){return h===c||h!==h&&c!==c}s.exports=o}),x=p((i,s)=>{var o=E();function h(c,m){for(var y=c.length;y--;)if(o(c[y][0],m))return y;return-1}s.exports=h}),C=p((i,s)=>{var o=x(),h=Array.prototype,c=h.splice;function m(y){var A=this.__data__,b=o(A,y);if(b<0)return!1;var P=A.length-1;return b==P?A.pop():c.call(A,b,1),--this.size,!0}s.exports=m}),T=p((i,s)=>{var o=x();function h(c){var m=this.__data__,y=o(m,c);return y<0?void 0:m[y][1]}s.exports=h}),G=p((i,s)=>{var o=x();function h(c){return o(this.__data__,c)>-1}s.exports=h}),j=p((i,s)=>{var o=x();function h(c,m){var y=this.__data__,A=o(y,c);return A<0?(++this.size,y.push([c,m])):y[A][1]=m,this}s.exports=h}),W=p((i,s)=>{var o=B(),h=C(),c=T(),m=G(),y=j();function A(b){var P=-1,N=b==null?0:b.length;for(this.clear();++P<N;){var F=b[P];this.set(F[0],F[1])}}A.prototype.clear=o,A.prototype.delete=h,A.prototype.get=c,A.prototype.has=m,A.prototype.set=y,s.exports=A}),at=p((i,s)=>{var o=W();function h(){this.__data__=new o,this.size=0}s.exports=h}),rt=p((i,s)=>{function o(h){var c=this.__data__,m=c.delete(h);return this.size=c.size,m}s.exports=o}),ct=p((i,s)=>{function o(h){return this.__data__.get(h)}s.exports=o}),yt=p((i,s)=>{function o(h){return this.__data__.has(h)}s.exports=o}),mt=p((i,s)=>{var o=typeof vn=="object"&&vn&&vn.Object===Object&&vn;s.exports=o}),xt=p((i,s)=>{var o=mt(),h=typeof self=="object"&&self&&self.Object===Object&&self,c=o||h||Function("return this")();s.exports=c}),Dt=p((i,s)=>{var o=xt(),h=o.Symbol;s.exports=h}),It=p((i,s)=>{var o=Dt(),h=Object.prototype,c=h.hasOwnProperty,m=h.toString,y=o?o.toStringTag:void 0;function A(b){var P=c.call(b,y),N=b[y];try{b[y]=void 0;var F=!0}catch{}var tt=m.call(b);return F&&(P?b[y]=N:delete b[y]),tt}s.exports=A}),zt=p((i,s)=>{var o=Object.prototype,h=o.toString;function c(m){return h.call(m)}s.exports=c}),Yt=p((i,s)=>{var o=Dt(),h=It(),c=zt(),m="[object Null]",y="[object Undefined]",A=o?o.toStringTag:void 0;function b(P){return P==null?P===void 0?y:m:A&&A in Object(P)?h(P):c(P)}s.exports=b}),Et=p((i,s)=>{function o(h){var c=typeof h;return h!=null&&(c=="object"||c=="function")}s.exports=o}),jt=p((i,s)=>{var o=Yt(),h=Et(),c="[object AsyncFunction]",m="[object Function]",y="[object GeneratorFunction]",A="[object Proxy]";function b(P){if(!h(P))return!1;var N=o(P);return N==m||N==y||N==c||N==A}s.exports=b}),be=p((i,s)=>{var o=xt(),h=o["__core-js_shared__"];s.exports=h}),pe=p((i,s)=>{var o=be(),h=function(){var m=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}();function c(m){return!!h&&h in m}s.exports=c}),oo=p((i,s)=>{var o=Function.prototype,h=o.toString;function c(m){if(m!=null){try{return h.call(m)}catch{}try{return m+""}catch{}}return""}s.exports=c}),De=p((i,s)=>{var o=jt(),h=pe(),c=Et(),m=oo(),y=/[\\^$.*+?()[\]{}|]/g,A=/^\[object .+?Constructor\]$/,b=Function.prototype,P=Object.prototype,N=b.toString,F=P.hasOwnProperty,tt=RegExp("^"+N.call(F).replace(y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function it(lt){if(!c(lt)||h(lt))return!1;var ft=o(lt)?tt:A;return ft.test(m(lt))}s.exports=it}),en=p((i,s)=>{function o(h,c){return h==null?void 0:h[c]}s.exports=o}),Pt=p((i,s)=>{var o=De(),h=en();function c(m,y){var A=h(m,y);return o(A)?A:void 0}s.exports=c}),Cs=p((i,s)=>{var o=Pt(),h=xt(),c=o(h,"Map");s.exports=c}),Ct=p((i,s)=>{var o=Pt(),h=o(Object,"create");s.exports=h}),te=p((i,s)=>{var o=Ct();function h(){this.__data__=o?o(null):{},this.size=0}s.exports=h}),we=p((i,s)=>{function o(h){var c=this.has(h)&&delete this.__data__[h];return this.size-=c?1:0,c}s.exports=o}),Ce=p((i,s)=>{var o=Ct(),h="__lodash_hash_undefined__",c=Object.prototype,m=c.hasOwnProperty;function y(A){var b=this.__data__;if(o){var P=b[A];return P===h?void 0:P}return m.call(b,A)?b[A]:void 0}s.exports=y}),ae=p((i,s)=>{var o=Ct(),h=Object.prototype,c=h.hasOwnProperty;function m(y){var A=this.__data__;return o?A[y]!==void 0:c.call(A,y)}s.exports=m}),Ht=p((i,s)=>{var o=Ct(),h="__lodash_hash_undefined__";function c(m,y){var A=this.__data__;return this.size+=this.has(m)?0:1,A[m]=o&&y===void 0?h:y,this}s.exports=c}),Rt=p((i,s)=>{var o=te(),h=we(),c=Ce(),m=ae(),y=Ht();function A(b){var P=-1,N=b==null?0:b.length;for(this.clear();++P<N;){var F=b[P];this.set(F[0],F[1])}}A.prototype.clear=o,A.prototype.delete=h,A.prototype.get=c,A.prototype.has=m,A.prototype.set=y,s.exports=A}),si=p((i,s)=>{var o=Rt(),h=W(),c=Cs();function m(){this.size=0,this.__data__={hash:new o,map:new(c||h),string:new o}}s.exports=m}),fi=p((i,s)=>{function o(h){var c=typeof h;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?h!=="__proto__":h===null}s.exports=o}),nn=p((i,s)=>{var o=fi();function h(c,m){var y=c.__data__;return o(m)?y[typeof m=="string"?"string":"hash"]:y.map}s.exports=h}),Es=p((i,s)=>{var o=nn();function h(c){var m=o(this,c).delete(c);return this.size-=m?1:0,m}s.exports=h}),Ps=p((i,s)=>{var o=nn();function h(c){return o(this,c).get(c)}s.exports=h}),sn=p((i,s)=>{var o=nn();function h(c){return o(this,c).has(c)}s.exports=h}),ks=p((i,s)=>{var o=nn();function h(c,m){var y=o(this,c),A=y.size;return y.set(c,m),this.size+=y.size==A?0:1,this}s.exports=h}),Pa=p((i,s)=>{var o=si(),h=Es(),c=Ps(),m=sn(),y=ks();function A(b){var P=-1,N=b==null?0:b.length;for(this.clear();++P<N;){var F=b[P];this.set(F[0],F[1])}}A.prototype.clear=o,A.prototype.delete=h,A.prototype.get=c,A.prototype.has=m,A.prototype.set=y,s.exports=A}),ka=p((i,s)=>{var o=W(),h=Cs(),c=Pa(),m=200;function y(A,b){var P=this.__data__;if(P instanceof o){var N=P.__data__;if(!h||N.length<m-1)return N.push([A,b]),this.size=++P.size,this;P=this.__data__=new c(N)}return P.set(A,b),this.size=P.size,this}s.exports=y}),Sa=p((i,s)=>{var o=W(),h=at(),c=rt(),m=ct(),y=yt(),A=ka();function b(P){var N=this.__data__=new o(P);this.size=N.size}b.prototype.clear=h,b.prototype.delete=c,b.prototype.get=m,b.prototype.has=y,b.prototype.set=A,s.exports=b}),Sn=p((i,s)=>{var o=Pt(),h=function(){try{var c=o(Object,"defineProperty");return c({},"",{}),c}catch{}}();s.exports=h}),Gi=p((i,s)=>{var o=Sn();function h(c,m,y){m=="__proto__"&&o?o(c,m,{configurable:!0,enumerable:!0,value:y,writable:!0}):c[m]=y}s.exports=h}),Ba=p((i,s)=>{var o=Gi(),h=E();function c(m,y,A){(A!==void 0&&!h(m[y],A)||A===void 0&&!(y in m))&&o(m,y,A)}s.exports=c}),Ta=p((i,s)=>{function o(h){return function(c,m,y){for(var A=-1,b=Object(c),P=y(c),N=P.length;N--;){var F=P[h?N:++A];if(m(b[F],F,b)===!1)break}return c}}s.exports=o}),Ss=p((i,s)=>{var o=Ta(),h=o();s.exports=h}),Da=p((i,s)=>{var o=xt(),h=typeof i=="object"&&i&&!i.nodeType&&i,c=h&&typeof s=="object"&&s&&!s.nodeType&&s,m=c&&c.exports===h,y=m?o.Buffer:void 0,A=y?y.allocUnsafe:void 0;function b(P,N){if(N)return P.slice();var F=P.length,tt=A?A(F):new P.constructor(F);return P.copy(tt),tt}s.exports=b}),Oa=p((i,s)=>{var o=xt(),h=o.Uint8Array;s.exports=h}),ho=p((i,s)=>{var o=Oa();function h(c){var m=new c.constructor(c.byteLength);return new o(m).set(new o(c)),m}s.exports=h}),lo=p((i,s)=>{var o=ho();function h(c,m){var y=m?o(c.buffer):c.buffer;return new c.constructor(y,c.byteOffset,c.length)}s.exports=h}),Bs=p((i,s)=>{function o(h,c){var m=-1,y=h.length;for(c||(c=Array(y));++m<y;)c[m]=h[m];return c}s.exports=o}),Ia=p((i,s)=>{var o=Et(),h=Object.create,c=function(){function m(){}return function(y){if(!o(y))return{};if(h)return h(y);m.prototype=y;var A=new m;return m.prototype=void 0,A}}();s.exports=c}),Ra=p((i,s)=>{function o(h,c){return function(m){return h(c(m))}}s.exports=o}),Fa=p((i,s)=>{var o=Ra(),h=o(Object.getPrototypeOf,Object);s.exports=h}),Ts=p((i,s)=>{var o=Object.prototype;function h(c){var m=c&&c.constructor,y=typeof m=="function"&&m.prototype||o;return c===y}s.exports=h}),Ga=p((i,s)=>{var o=Ia(),h=Fa(),c=Ts();function m(y){return typeof y.constructor=="function"&&!c(y)?o(h(y)):{}}s.exports=m}),zi=p((i,s)=>{function o(h){return h!=null&&typeof h=="object"}s.exports=o}),za=p((i,s)=>{var o=Yt(),h=zi(),c="[object Arguments]";function m(y){return h(y)&&o(y)==c}s.exports=m}),Bn=p((i,s)=>{var o=za(),h=zi(),c=Object.prototype,m=c.hasOwnProperty,y=c.propertyIsEnumerable,A=o(function(){return arguments}())?o:function(b){return h(b)&&m.call(b,"callee")&&!y.call(b,"callee")};s.exports=A}),Ni=p((i,s)=>{var o=Array.isArray;s.exports=o}),Na=p((i,s)=>{var o=9007199254740991;function h(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=o}s.exports=h}),xi=p((i,s)=>{var o=jt(),h=Na();function c(m){return m!=null&&h(m.length)&&!o(m)}s.exports=c}),uo=p((i,s)=>{var o=xi(),h=zi();function c(m){return h(m)&&o(m)}s.exports=c}),co=p((i,s)=>{function o(){return!1}s.exports=o}),Ds=p((i,s)=>{var o=xt(),h=co(),c=typeof i=="object"&&i&&!i.nodeType&&i,m=c&&typeof s=="object"&&s&&!s.nodeType&&s,y=m&&m.exports===c,A=y?o.Buffer:void 0,b=A?A.isBuffer:void 0,P=b||h;s.exports=P}),Ua=p((i,s)=>{var o=Yt(),h=Fa(),c=zi(),m="[object Object]",y=Function.prototype,A=Object.prototype,b=y.toString,P=A.hasOwnProperty,N=b.call(Object);function F(tt){if(!c(tt)||o(tt)!=m)return!1;var it=h(tt);if(it===null)return!0;var lt=P.call(it,"constructor")&&it.constructor;return typeof lt=="function"&&lt instanceof lt&&b.call(lt)==N}s.exports=F}),ja=p((i,s)=>{var o=Yt(),h=Na(),c=zi(),m="[object Arguments]",y="[object Array]",A="[object Boolean]",b="[object Date]",P="[object Error]",N="[object Function]",F="[object Map]",tt="[object Number]",it="[object Object]",lt="[object RegExp]",ft="[object Set]",At="[object String]",Gt="[object WeakMap]",z="[object ArrayBuffer]",q="[object DataView]",K="[object Float32Array]",nt="[object Float64Array]",X="[object Int8Array]",et="[object Int16Array]",w="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",D="[object Uint16Array]",I="[object Uint32Array]",R={};R[K]=R[nt]=R[X]=R[et]=R[w]=R[S]=R[O]=R[D]=R[I]=!0,R[m]=R[y]=R[z]=R[A]=R[q]=R[b]=R[P]=R[N]=R[F]=R[tt]=R[it]=R[lt]=R[ft]=R[At]=R[Gt]=!1;function V(H){return c(H)&&h(H.length)&&!!R[o(H)]}s.exports=V}),fo=p((i,s)=>{function o(h){return function(c){return h(c)}}s.exports=o}),po=p((i,s)=>{var o=mt(),h=typeof i=="object"&&i&&!i.nodeType&&i,c=h&&typeof s=="object"&&s&&!s.nodeType&&s,m=c&&c.exports===h,y=m&&o.process,A=function(){try{var b=c&&c.require&&c.require("util").types;return b||y&&y.binding&&y.binding("util")}catch{}}();s.exports=A}),Za=p((i,s)=>{var o=ja(),h=fo(),c=po(),m=c&&c.isTypedArray,y=m?h(m):o;s.exports=y}),qa=p((i,s)=>{function o(h,c){if(!(c==="constructor"&&typeof h[c]=="function")&&c!="__proto__")return h[c]}s.exports=o}),_o=p((i,s)=>{var o=Gi(),h=E(),c=Object.prototype,m=c.hasOwnProperty;function y(A,b,P){var N=A[b];(!(m.call(A,b)&&h(N,P))||P===void 0&&!(b in A))&&o(A,b,P)}s.exports=y}),mo=p((i,s)=>{var o=_o(),h=Gi();function c(m,y,A,b){var P=!A;A||(A={});for(var N=-1,F=y.length;++N<F;){var tt=y[N],it=b?b(A[tt],m[tt],tt,A,m):void 0;it===void 0&&(it=m[tt]),P?h(A,tt,it):o(A,tt,it)}return A}s.exports=c}),Os=p((i,s)=>{function o(h,c){for(var m=-1,y=Array(h);++m<h;)y[m]=c(m);return y}s.exports=o}),Ha=p((i,s)=>{var o=9007199254740991,h=/^(?:0|[1-9]\d*)$/;function c(m,y){var A=typeof m;return y=y??o,!!y&&(A=="number"||A!="symbol"&&h.test(m))&&m>-1&&m%1==0&&m<y}s.exports=c}),go=p((i,s)=>{var o=Os(),h=Bn(),c=Ni(),m=Ds(),y=Ha(),A=Za(),b=Object.prototype,P=b.hasOwnProperty;function N(F,tt){var it=c(F),lt=!it&&h(F),ft=!it&&!lt&&m(F),At=!it&&!lt&&!ft&&A(F),Gt=it||lt||ft||At,z=Gt?o(F.length,String):[],q=z.length;for(var K in F)(tt||P.call(F,K))&&!(Gt&&(K=="length"||ft&&(K=="offset"||K=="parent")||At&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||y(K,q)))&&z.push(K);return z}s.exports=N}),yo=p((i,s)=>{function o(h){var c=[];if(h!=null)for(var m in Object(h))c.push(m);return c}s.exports=o}),Ao=p((i,s)=>{var o=Et(),h=Ts(),c=yo(),m=Object.prototype,y=m.hasOwnProperty;function A(b){if(!o(b))return c(b);var P=h(b),N=[];for(var F in b)F=="constructor"&&(P||!y.call(b,F))||N.push(F);return N}s.exports=A}),Ze=p((i,s)=>{var o=go(),h=Ao(),c=xi();function m(y){return c(y)?o(y,!0):h(y)}s.exports=m}),Mt=p((i,s)=>{var o=mo(),h=Ze();function c(m){return o(m,h(m))}s.exports=c}),Va=p((i,s)=>{var o=Ba(),h=Da(),c=lo(),m=Bs(),y=Ga(),A=Bn(),b=Ni(),P=uo(),N=Ds(),F=jt(),tt=Et(),it=Ua(),lt=Za(),ft=qa(),At=Mt();function Gt(z,q,K,nt,X,et,w){var S=ft(z,K),O=ft(q,K),D=w.get(O);if(D){o(z,K,D);return}var I=et?et(S,O,K+"",z,q,w):void 0,R=I===void 0;if(R){var V=b(O),H=!V&&N(O),$=!V&&!H&&lt(O);I=O,V||H||$?b(S)?I=S:P(S)?I=m(S):H?(R=!1,I=h(O,!0)):$?(R=!1,I=c(O,!0)):I=[]:it(O)||A(O)?(I=S,A(S)?I=At(S):(!tt(S)||F(S))&&(I=y(O))):R=!1}R&&(w.set(O,I),X(I,O,nt,et,w),w.delete(O)),o(z,K,I)}s.exports=Gt}),$a=p((i,s)=>{var o=Sa(),h=Ba(),c=Ss(),m=Va(),y=Et(),A=Ze(),b=qa();function P(N,F,tt,it,lt){N!==F&&c(F,function(ft,At){if(lt||(lt=new o),y(ft))m(N,F,At,tt,P,it,lt);else{var Gt=it?it(b(N,At),ft,At+"",N,F,lt):void 0;Gt===void 0&&(Gt=ft),h(N,At,Gt)}},A)}s.exports=P}),Is=p((i,s)=>{function o(h){return h}s.exports=o}),Ka=p((i,s)=>{function o(h,c,m){switch(m.length){case 0:return h.call(c);case 1:return h.call(c,m[0]);case 2:return h.call(c,m[0],m[1]);case 3:return h.call(c,m[0],m[1],m[2])}return h.apply(c,m)}s.exports=o}),Rs=p((i,s)=>{var o=Ka(),h=Math.max;function c(m,y,A){return y=h(y===void 0?m.length-1:y,0),function(){for(var b=arguments,P=-1,N=h(b.length-y,0),F=Array(N);++P<N;)F[P]=b[y+P];P=-1;for(var tt=Array(y+1);++P<y;)tt[P]=b[P];return tt[y]=A(F),o(m,this,tt)}}s.exports=c}),Wa=p((i,s)=>{function o(h){return function(){return h}}s.exports=o}),Ui=p((i,s)=>{var o=Wa(),h=Sn(),c=Is(),m=h?function(y,A){return h(y,"toString",{configurable:!0,enumerable:!1,value:o(A),writable:!0})}:c;s.exports=m}),Xa=p((i,s)=>{var o=800,h=16,c=Date.now;function m(y){var A=0,b=0;return function(){var P=c(),N=h-(P-b);if(b=P,N>0){if(++A>=o)return arguments[0]}else A=0;return y.apply(void 0,arguments)}}s.exports=m}),vo=p((i,s)=>{var o=Ui(),h=Xa(),c=h(o);s.exports=c}),Mo=p((i,s)=>{var o=Is(),h=Rs(),c=vo();function m(y,A){return c(h(y,A,o),y+"")}s.exports=m}),xo=p((i,s)=>{var o=E(),h=xi(),c=Ha(),m=Et();function y(A,b,P){if(!m(P))return!1;var N=typeof b;return(N=="number"?h(P)&&c(b,P.length):N=="string"&&b in P)?o(P[b],A):!1}s.exports=y}),Lo=p((i,s)=>{var o=Mo(),h=xo();function c(m){return o(function(y,A){var b=-1,P=A.length,N=P>1?A[P-1]:void 0,F=P>2?A[2]:void 0;for(N=m.length>3&&typeof N=="function"?(P--,N):void 0,F&&h(A[0],A[1],F)&&(N=P<3?void 0:N,P=1),y=Object(y);++b<P;){var tt=A[b];tt&&m(y,tt,b,N)}return y})}s.exports=c}),Tn=p((i,s)=>{var o=$a(),h=Lo(),c=h(function(m,y,A){o(m,y,A)});s.exports=c}),Fs=p((i,s)=>{var o=Yt(),h=zi(),c="[object Symbol]";function m(y){return typeof y=="symbol"||h(y)&&o(y)==c}s.exports=m}),Dn=p((i,s)=>{var o=Ni(),h=Fs(),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m=/^\w*$/;function y(A,b){if(o(A))return!1;var P=typeof A;return P=="number"||P=="symbol"||P=="boolean"||A==null||h(A)?!0:m.test(A)||!c.test(A)||b!=null&&A in Object(b)}s.exports=y}),bo=p((i,s)=>{var o=Pa(),h="Expected a function";function c(m,y){if(typeof m!="function"||y!=null&&typeof y!="function")throw new TypeError(h);var A=function(){var b=arguments,P=y?y.apply(this,b):b[0],N=A.cache;if(N.has(P))return N.get(P);var F=m.apply(this,b);return A.cache=N.set(P,F)||N,F};return A.cache=new(c.Cache||o),A}c.Cache=o,s.exports=c}),wo=p((i,s)=>{var o=bo(),h=500;function c(m){var y=o(m,function(b){return A.size===h&&A.clear(),b}),A=y.cache;return y}s.exports=c}),Co=p((i,s)=>{var o=wo(),h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,m=o(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(h,function(b,P,N,F){A.push(N?F.replace(c,"$1"):P||b)}),A});s.exports=m}),Eo=p((i,s)=>{function o(h,c){for(var m=-1,y=h==null?0:h.length,A=Array(y);++m<y;)A[m]=c(h[m],m,h);return A}s.exports=o}),Po=p((i,s)=>{var o=Dt(),h=Eo(),c=Ni(),m=Fs(),y=o?o.prototype:void 0,A=y?y.toString:void 0;function b(P){if(typeof P=="string")return P;if(c(P))return h(P,b)+"";if(m(P))return A?A.call(P):"";var N=P+"";return N=="0"&&1/P==-1/0?"-0":N}s.exports=b}),Gs=p((i,s)=>{var o=Po();function h(c){return c==null?"":o(c)}s.exports=h}),an=p((i,s)=>{var o=Ni(),h=Dn(),c=Co(),m=Gs();function y(A,b){return o(A)?A:h(A,b)?[A]:c(m(A))}s.exports=y}),Ya=p((i,s)=>{var o=Fs();function h(c){if(typeof c=="string"||o(c))return c;var m=c+"";return m=="0"&&1/c==-1/0?"-0":m}s.exports=h}),Ja=p((i,s)=>{var o=an(),h=Ya();function c(m,y){y=o(y,m);for(var A=0,b=y.length;m!=null&&A<b;)m=m[h(y[A++])];return A&&A==b?m:void 0}s.exports=c}),pi=p((i,s)=>{var o=Ja();function h(c,m,y){var A=c==null?void 0:o(c,m);return A===void 0?y:A}s.exports=h}),Nt=p((i,s)=>{(function(o,h){typeof i=="object"&&typeof s<"u"?s.exports=h():(o=o||self).RBush=h()})(i,function(){function o(z,q,K,nt,X){(function et(w,S,O,D,I){for(;D>O;){if(D-O>600){var R=D-O+1,V=S-O+1,H=Math.log(R),$=.5*Math.exp(2*H/3),Q=.5*Math.sqrt(H*$*(R-$)/R)*(V-R/2<0?-1:1),J=Math.max(O,Math.floor(S-V*$/R+Q)),ot=Math.min(D,Math.floor(S+(R-V)*$/R+Q));et(w,S,J,ot,I)}var gt=w[S],vt=O,bt=D;for(h(w,O,S),I(w[D],gt)>0&&h(w,O,D);vt<bt;){for(h(w,vt,bt),vt++,bt--;I(w[vt],gt)<0;)vt++;for(;I(w[bt],gt)>0;)bt--}I(w[O],gt)===0?h(w,O,bt):h(w,++bt,D),bt<=S&&(O=bt+1),S<=bt&&(D=bt-1)}})(z,q,K||0,nt||z.length-1,X||c)}function h(z,q,K){var nt=z[q];z[q]=z[K],z[K]=nt}function c(z,q){return z<q?-1:z>q?1:0}var m=function(z){z===void 0&&(z=9),this._maxEntries=Math.max(4,z),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function y(z,q,K){if(!K)return q.indexOf(z);for(var nt=0;nt<q.length;nt++)if(K(z,q[nt]))return nt;return-1}function A(z,q){b(z,0,z.children.length,q,z)}function b(z,q,K,nt,X){X||(X=At(null)),X.minX=1/0,X.minY=1/0,X.maxX=-1/0,X.maxY=-1/0;for(var et=q;et<K;et++){var w=z.children[et];P(X,z.leaf?nt(w):w)}return X}function P(z,q){return z.minX=Math.min(z.minX,q.minX),z.minY=Math.min(z.minY,q.minY),z.maxX=Math.max(z.maxX,q.maxX),z.maxY=Math.max(z.maxY,q.maxY),z}function N(z,q){return z.minX-q.minX}function F(z,q){return z.minY-q.minY}function tt(z){return(z.maxX-z.minX)*(z.maxY-z.minY)}function it(z){return z.maxX-z.minX+(z.maxY-z.minY)}function lt(z,q){return z.minX<=q.minX&&z.minY<=q.minY&&q.maxX<=z.maxX&&q.maxY<=z.maxY}function ft(z,q){return q.minX<=z.maxX&&q.minY<=z.maxY&&q.maxX>=z.minX&&q.maxY>=z.minY}function At(z){return{children:z,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Gt(z,q,K,nt,X){for(var et=[q,K];et.length;)if(!((K=et.pop())-(q=et.pop())<=nt)){var w=q+Math.ceil((K-q)/nt/2)*nt;o(z,w,q,K,X),et.push(q,w,w,K)}}return m.prototype.all=function(){return this._all(this.data,[])},m.prototype.search=function(z){var q=this.data,K=[];if(!ft(z,q))return K;for(var nt=this.toBBox,X=[];q;){for(var et=0;et<q.children.length;et++){var w=q.children[et],S=q.leaf?nt(w):w;ft(z,S)&&(q.leaf?K.push(w):lt(z,S)?this._all(w,K):X.push(w))}q=X.pop()}return K},m.prototype.collides=function(z){var q=this.data;if(!ft(z,q))return!1;for(var K=[];q;){for(var nt=0;nt<q.children.length;nt++){var X=q.children[nt],et=q.leaf?this.toBBox(X):X;if(ft(z,et)){if(q.leaf||lt(z,et))return!0;K.push(X)}}q=K.pop()}return!1},m.prototype.load=function(z){if(!z||!z.length)return this;if(z.length<this._minEntries){for(var q=0;q<z.length;q++)this.insert(z[q]);return this}var K=this._build(z.slice(),0,z.length-1,0);if(this.data.children.length)if(this.data.height===K.height)this._splitRoot(this.data,K);else{if(this.data.height<K.height){var nt=this.data;this.data=K,K=nt}this._insert(K,this.data.height-K.height-1,!0)}else this.data=K;return this},m.prototype.insert=function(z){return z&&this._insert(z,this.data.height-1),this},m.prototype.clear=function(){return this.data=At([]),this},m.prototype.remove=function(z,q){if(!z)return this;for(var K,nt,X,et=this.data,w=this.toBBox(z),S=[],O=[];et||S.length;){if(et||(et=S.pop(),nt=S[S.length-1],K=O.pop(),X=!0),et.leaf){var D=y(z,et.children,q);if(D!==-1)return et.children.splice(D,1),S.push(et),this._condense(S),this}X||et.leaf||!lt(et,w)?nt?(K++,et=nt.children[K],X=!1):et=null:(S.push(et),O.push(K),K=0,nt=et,et=et.children[0])}return this},m.prototype.toBBox=function(z){return z},m.prototype.compareMinX=function(z,q){return z.minX-q.minX},m.prototype.compareMinY=function(z,q){return z.minY-q.minY},m.prototype.toJSON=function(){return this.data},m.prototype.fromJSON=function(z){return this.data=z,this},m.prototype._all=function(z,q){for(var K=[];z;)z.leaf?q.push.apply(q,z.children):K.push.apply(K,z.children),z=K.pop();return q},m.prototype._build=function(z,q,K,nt){var X,et=K-q+1,w=this._maxEntries;if(et<=w)return A(X=At(z.slice(q,K+1)),this.toBBox),X;nt||(nt=Math.ceil(Math.log(et)/Math.log(w)),w=Math.ceil(et/Math.pow(w,nt-1))),(X=At([])).leaf=!1,X.height=nt;var S=Math.ceil(et/w),O=S*Math.ceil(Math.sqrt(w));Gt(z,q,K,O,this.compareMinX);for(var D=q;D<=K;D+=O){var I=Math.min(D+O-1,K);Gt(z,D,I,S,this.compareMinY);for(var R=D;R<=I;R+=S){var V=Math.min(R+S-1,I);X.children.push(this._build(z,R,V,nt-1))}}return A(X,this.toBBox),X},m.prototype._chooseSubtree=function(z,q,K,nt){for(;nt.push(q),!q.leaf&&nt.length-1!==K;){for(var X=1/0,et=1/0,w=void 0,S=0;S<q.children.length;S++){var O=q.children[S],D=tt(O),I=(R=z,V=O,(Math.max(V.maxX,R.maxX)-Math.min(V.minX,R.minX))*(Math.max(V.maxY,R.maxY)-Math.min(V.minY,R.minY))-D);I<et?(et=I,X=D<X?D:X,w=O):I===et&&D<X&&(X=D,w=O)}q=w||q.children[0]}var R,V;return q},m.prototype._insert=function(z,q,K){var nt=K?z:this.toBBox(z),X=[],et=this._chooseSubtree(nt,this.data,q,X);for(et.children.push(z),P(et,nt);q>=0&&X[q].children.length>this._maxEntries;)this._split(X,q),q--;this._adjustParentBBoxes(nt,X,q)},m.prototype._split=function(z,q){var K=z[q],nt=K.children.length,X=this._minEntries;this._chooseSplitAxis(K,X,nt);var et=this._chooseSplitIndex(K,X,nt),w=At(K.children.splice(et,K.children.length-et));w.height=K.height,w.leaf=K.leaf,A(K,this.toBBox),A(w,this.toBBox),q?z[q-1].children.push(w):this._splitRoot(K,w)},m.prototype._splitRoot=function(z,q){this.data=At([z,q]),this.data.height=z.height+1,this.data.leaf=!1,A(this.data,this.toBBox)},m.prototype._chooseSplitIndex=function(z,q,K){for(var nt,X,et,w,S,O,D,I=1/0,R=1/0,V=q;V<=K-q;V++){var H=b(z,0,V,this.toBBox),$=b(z,V,K,this.toBBox),Q=(X=H,et=$,w=void 0,S=void 0,O=void 0,D=void 0,w=Math.max(X.minX,et.minX),S=Math.max(X.minY,et.minY),O=Math.min(X.maxX,et.maxX),D=Math.min(X.maxY,et.maxY),Math.max(0,O-w)*Math.max(0,D-S)),J=tt(H)+tt($);Q<I?(I=Q,nt=V,R=J<R?J:R):Q===I&&J<R&&(R=J,nt=V)}return nt||K-q},m.prototype._chooseSplitAxis=function(z,q,K){var nt=z.leaf?this.compareMinX:N,X=z.leaf?this.compareMinY:F;this._allDistMargin(z,q,K,nt)<this._allDistMargin(z,q,K,X)&&z.children.sort(nt)},m.prototype._allDistMargin=function(z,q,K,nt){z.children.sort(nt);for(var X=this.toBBox,et=b(z,0,q,X),w=b(z,K-q,K,X),S=it(et)+it(w),O=q;O<K-q;O++){var D=z.children[O];P(et,z.leaf?X(D):D),S+=it(et)}for(var I=K-q-1;I>=q;I--){var R=z.children[I];P(w,z.leaf?X(R):R),S+=it(w)}return S},m.prototype._adjustParentBBoxes=function(z,q,K){for(var nt=K;nt>=0;nt--)P(q[nt],z)},m.prototype._condense=function(z){for(var q=z.length-1,K=void 0;q>=0;q--)z[q].children.length===0?q>0?(K=z[q-1].children).splice(K.indexOf(z[q]),1):this.clear():A(z[q],this.toBBox)},m})}),Qt=p(i=>{Object.defineProperty(i,"__esModule",{value:!0}),i.earthRadius=63710088e-1,i.factors={centimeters:i.earthRadius*100,centimetres:i.earthRadius*100,degrees:i.earthRadius/111325,feet:i.earthRadius*3.28084,inches:i.earthRadius*39.37,kilometers:i.earthRadius/1e3,kilometres:i.earthRadius/1e3,meters:i.earthRadius,metres:i.earthRadius,miles:i.earthRadius/1609.344,millimeters:i.earthRadius*1e3,millimetres:i.earthRadius*1e3,nauticalmiles:i.earthRadius/1852,radians:1,yards:i.earthRadius*1.0936},i.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/i.earthRadius,yards:1.0936133},i.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(D,I,R){R===void 0&&(R={});var V={type:"Feature"};return(R.id===0||R.id)&&(V.id=R.id),R.bbox&&(V.bbox=R.bbox),V.properties=I||{},V.geometry=D,V}i.feature=s;function o(D,I,R){switch(D){case"Point":return h(I).geometry;case"LineString":return A(I).geometry;case"Polygon":return m(I).geometry;case"MultiPoint":return F(I).geometry;case"MultiLineString":return N(I).geometry;case"MultiPolygon":return tt(I).geometry;default:throw new Error(D+" is invalid")}}i.geometry=o;function h(D,I,R){if(R===void 0&&(R={}),!D)throw new Error("coordinates is required");if(!Array.isArray(D))throw new Error("coordinates must be an Array");if(D.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!et(D[0])||!et(D[1]))throw new Error("coordinates must contain numbers");var V={type:"Point",coordinates:D};return s(V,I,R)}i.point=h;function c(D,I,R){return R===void 0&&(R={}),P(D.map(function(V){return h(V,I)}),R)}i.points=c;function m(D,I,R){R===void 0&&(R={});for(var V=0,H=D;V<H.length;V++){var $=H[V];if($.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var Q=0;Q<$[$.length-1].length;Q++)if($[$.length-1][Q]!==$[0][Q])throw new Error("First and last Position are not equivalent.")}var J={type:"Polygon",coordinates:D};return s(J,I,R)}i.polygon=m;function y(D,I,R){return R===void 0&&(R={}),P(D.map(function(V){return m(V,I)}),R)}i.polygons=y;function A(D,I,R){if(R===void 0&&(R={}),D.length<2)throw new Error("coordinates must be an array of two or more positions");var V={type:"LineString",coordinates:D};return s(V,I,R)}i.lineString=A;function b(D,I,R){return R===void 0&&(R={}),P(D.map(function(V){return A(V,I)}),R)}i.lineStrings=b;function P(D,I){I===void 0&&(I={});var R={type:"FeatureCollection"};return I.id&&(R.id=I.id),I.bbox&&(R.bbox=I.bbox),R.features=D,R}i.featureCollection=P;function N(D,I,R){R===void 0&&(R={});var V={type:"MultiLineString",coordinates:D};return s(V,I,R)}i.multiLineString=N;function F(D,I,R){R===void 0&&(R={});var V={type:"MultiPoint",coordinates:D};return s(V,I,R)}i.multiPoint=F;function tt(D,I,R){R===void 0&&(R={});var V={type:"MultiPolygon",coordinates:D};return s(V,I,R)}i.multiPolygon=tt;function it(D,I,R){R===void 0&&(R={});var V={type:"GeometryCollection",geometries:D};return s(V,I,R)}i.geometryCollection=it;function lt(D,I){if(I===void 0&&(I=0),I&&!(I>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,I||0);return Math.round(D*R)/R}i.round=lt;function ft(D,I){I===void 0&&(I="kilometers");var R=i.factors[I];if(!R)throw new Error(I+" units is invalid");return D*R}i.radiansToLength=ft;function At(D,I){I===void 0&&(I="kilometers");var R=i.factors[I];if(!R)throw new Error(I+" units is invalid");return D/R}i.lengthToRadians=At;function Gt(D,I){return q(At(D,I))}i.lengthToDegrees=Gt;function z(D){var I=D%360;return I<0&&(I+=360),I}i.bearingToAzimuth=z;function q(D){var I=D%(2*Math.PI);return I*180/Math.PI}i.radiansToDegrees=q;function K(D){var I=D%360;return I*Math.PI/180}i.degreesToRadians=K;function nt(D,I,R){if(I===void 0&&(I="kilometers"),R===void 0&&(R="kilometers"),!(D>=0))throw new Error("length must be a positive number");return ft(At(D,I),R)}i.convertLength=nt;function X(D,I,R){if(I===void 0&&(I="meters"),R===void 0&&(R="kilometers"),!(D>=0))throw new Error("area must be a positive number");var V=i.areaFactors[I];if(!V)throw new Error("invalid original units");var H=i.areaFactors[R];if(!H)throw new Error("invalid final units");return D/V*H}i.convertArea=X;function et(D){return!isNaN(D)&&D!==null&&!Array.isArray(D)}i.isNumber=et;function w(D){return!!D&&D.constructor===Object}i.isObject=w;function S(D){if(!D)throw new Error("bbox is required");if(!Array.isArray(D))throw new Error("bbox must be an Array");if(D.length!==4&&D.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");D.forEach(function(I){if(!et(I))throw new Error("bbox must only contain numbers")})}i.validateBBox=S;function O(D){if(!D)throw new Error("id is required");if(["string","number"].indexOf(typeof D)===-1)throw new Error("id must be a number or a string")}i.validateId=O}),rn=p(i=>{Object.defineProperty(i,"__esModule",{value:!0});var s=Qt();function o(q,K,nt){if(q!==null)for(var X,et,w,S,O,D,I,R=0,V=0,H,$=q.type,Q=$==="FeatureCollection",J=$==="Feature",ot=Q?q.features.length:1,gt=0;gt<ot;gt++){I=Q?q.features[gt].geometry:J?q.geometry:q,H=I?I.type==="GeometryCollection":!1,O=H?I.geometries.length:1;for(var vt=0;vt<O;vt++){var bt=0,Vt=0;if(S=H?I.geometries[vt]:I,S!==null){D=S.coordinates;var Wt=S.type;switch(R=nt&&(Wt==="Polygon"||Wt==="MultiPolygon")?1:0,Wt){case null:break;case"Point":if(K(D,V,gt,bt,Vt)===!1)return!1;V++,bt++;break;case"LineString":case"MultiPoint":for(X=0;X<D.length;X++){if(K(D[X],V,gt,bt,Vt)===!1)return!1;V++,Wt==="MultiPoint"&&bt++}Wt==="LineString"&&bt++;break;case"Polygon":case"MultiLineString":for(X=0;X<D.length;X++){for(et=0;et<D[X].length-R;et++){if(K(D[X][et],V,gt,bt,Vt)===!1)return!1;V++}Wt==="MultiLineString"&&bt++,Wt==="Polygon"&&Vt++}Wt==="Polygon"&&bt++;break;case"MultiPolygon":for(X=0;X<D.length;X++){for(Vt=0,et=0;et<D[X].length;et++){for(w=0;w<D[X][et].length-R;w++){if(K(D[X][et][w],V,gt,bt,Vt)===!1)return!1;V++}Vt++}bt++}break;case"GeometryCollection":for(X=0;X<S.geometries.length;X++)if(o(S.geometries[X],K,nt)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function h(q,K,nt,X){var et=nt;return o(q,function(w,S,O,D,I){S===0&&nt===void 0?et=w:et=K(et,w,S,O,D,I)},X),et}function c(q,K){var nt;switch(q.type){case"FeatureCollection":for(nt=0;nt<q.features.length&&K(q.features[nt].properties,nt)!==!1;nt++);break;case"Feature":K(q.properties,0);break}}function m(q,K,nt){var X=nt;return c(q,function(et,w){w===0&&nt===void 0?X=et:X=K(X,et,w)}),X}function y(q,K){if(q.type==="Feature")K(q,0);else if(q.type==="FeatureCollection")for(var nt=0;nt<q.features.length&&K(q.features[nt],nt)!==!1;nt++);}function A(q,K,nt){var X=nt;return y(q,function(et,w){w===0&&nt===void 0?X=et:X=K(X,et,w)}),X}function b(q){var K=[];return o(q,function(nt){K.push(nt)}),K}function P(q,K){var nt,X,et,w,S,O,D,I,R,V,H=0,$=q.type==="FeatureCollection",Q=q.type==="Feature",J=$?q.features.length:1;for(nt=0;nt<J;nt++){for(O=$?q.features[nt].geometry:Q?q.geometry:q,I=$?q.features[nt].properties:Q?q.properties:{},R=$?q.features[nt].bbox:Q?q.bbox:void 0,V=$?q.features[nt].id:Q?q.id:void 0,D=O?O.type==="GeometryCollection":!1,S=D?O.geometries.length:1,et=0;et<S;et++){if(w=D?O.geometries[et]:O,w===null){if(K(null,H,I,R,V)===!1)return!1;continue}switch(w.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(K(w,H,I,R,V)===!1)return!1;break}case"GeometryCollection":{for(X=0;X<w.geometries.length;X++)if(K(w.geometries[X],H,I,R,V)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}H++}}function N(q,K,nt){var X=nt;return P(q,function(et,w,S,O,D){w===0&&nt===void 0?X=et:X=K(X,et,w,S,O,D)}),X}function F(q,K){P(q,function(nt,X,et,w,S){var O=nt===null?null:nt.type;switch(O){case null:case"Point":case"LineString":case"Polygon":return K(s.feature(nt,et,{bbox:w,id:S}),X,0)===!1?!1:void 0}var D;switch(O){case"MultiPoint":D="Point";break;case"MultiLineString":D="LineString";break;case"MultiPolygon":D="Polygon";break}for(var I=0;I<nt.coordinates.length;I++){var R=nt.coordinates[I],V={type:D,coordinates:R};if(K(s.feature(V,et),X,I)===!1)return!1}})}function tt(q,K,nt){var X=nt;return F(q,function(et,w,S){w===0&&S===0&&nt===void 0?X=et:X=K(X,et,w,S)}),X}function it(q,K){F(q,function(nt,X,et){var w=0;if(nt.geometry){var S=nt.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var O,D=0,I=0,R=0;if(o(nt,function(V,H,$,Q,J){if(O===void 0||X>D||Q>I||J>R){O=V,D=X,I=Q,R=J,w=0;return}var ot=s.lineString([O,V],nt.properties);if(K(ot,X,et,J,w)===!1)return!1;w++,O=V})===!1)return!1}}})}function lt(q,K,nt){var X=nt,et=!1;return it(q,function(w,S,O,D,I){et===!1&&nt===void 0?X=w:X=K(X,w,S,O,D,I),et=!0}),X}function ft(q,K){if(!q)throw new Error("geojson is required");F(q,function(nt,X,et){if(nt.geometry!==null){var w=nt.geometry.type,S=nt.geometry.coordinates;switch(w){case"LineString":if(K(nt,X,et,0,0)===!1)return!1;break;case"Polygon":for(var O=0;O<S.length;O++)if(K(s.lineString(S[O],nt.properties),X,et,O)===!1)return!1;break}}})}function At(q,K,nt){var X=nt;return ft(q,function(et,w,S,O){w===0&&nt===void 0?X=et:X=K(X,et,w,S,O)}),X}function Gt(q,K){if(K=K||{},!s.isObject(K))throw new Error("options is invalid");var nt=K.featureIndex||0,X=K.multiFeatureIndex||0,et=K.geometryIndex||0,w=K.segmentIndex||0,S=K.properties,O;switch(q.type){case"FeatureCollection":nt<0&&(nt=q.features.length+nt),S=S||q.features[nt].properties,O=q.features[nt].geometry;break;case"Feature":S=S||q.properties,O=q.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=q;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var D=O.coordinates;switch(O.type){case"Point":case"MultiPoint":return null;case"LineString":return w<0&&(w=D.length+w-1),s.lineString([D[w],D[w+1]],S,K);case"Polygon":return et<0&&(et=D.length+et),w<0&&(w=D[et].length+w-1),s.lineString([D[et][w],D[et][w+1]],S,K);case"MultiLineString":return X<0&&(X=D.length+X),w<0&&(w=D[X].length+w-1),s.lineString([D[X][w],D[X][w+1]],S,K);case"MultiPolygon":return X<0&&(X=D.length+X),et<0&&(et=D[X].length+et),w<0&&(w=D[X][et].length-w-1),s.lineString([D[X][et][w],D[X][et][w+1]],S,K)}throw new Error("geojson is invalid")}function z(q,K){if(K=K||{},!s.isObject(K))throw new Error("options is invalid");var nt=K.featureIndex||0,X=K.multiFeatureIndex||0,et=K.geometryIndex||0,w=K.coordIndex||0,S=K.properties,O;switch(q.type){case"FeatureCollection":nt<0&&(nt=q.features.length+nt),S=S||q.features[nt].properties,O=q.features[nt].geometry;break;case"Feature":S=S||q.properties,O=q.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=q;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var D=O.coordinates;switch(O.type){case"Point":return s.point(D,S,K);case"MultiPoint":return X<0&&(X=D.length+X),s.point(D[X],S,K);case"LineString":return w<0&&(w=D.length+w),s.point(D[w],S,K);case"Polygon":return et<0&&(et=D.length+et),w<0&&(w=D[et].length+w),s.point(D[et][w],S,K);case"MultiLineString":return X<0&&(X=D.length+X),w<0&&(w=D[X].length+w),s.point(D[X][w],S,K);case"MultiPolygon":return X<0&&(X=D.length+X),et<0&&(et=D[X].length+et),w<0&&(w=D[X][et].length-w),s.point(D[X][et][w],S,K)}throw new Error("geojson is invalid")}i.coordAll=b,i.coordEach=o,i.coordReduce=h,i.featureEach=y,i.featureReduce=A,i.findPoint=z,i.findSegment=Gt,i.flattenEach=F,i.flattenReduce=tt,i.geomEach=P,i.geomReduce=N,i.lineEach=ft,i.lineReduce=At,i.propEach=c,i.propReduce=m,i.segmentEach=it,i.segmentReduce=lt}),ji=p(i=>{Object.defineProperty(i,"__esModule",{value:!0});var s=rn();function o(h){var c=[1/0,1/0,-1/0,-1/0];return s.coordEach(h,function(m){c[0]>m[0]&&(c[0]=m[0]),c[1]>m[1]&&(c[1]=m[1]),c[2]<m[0]&&(c[2]=m[0]),c[3]<m[1]&&(c[3]=m[1])}),c}o.default=o,i.default=o}),Li=p((i,s)=>{var o=Nt(),h=Qt(),c=rn(),m=ji().default,y=c.featureEach;c.coordEach,h.polygon;var A=h.featureCollection;function b(P){var N=new o(P);return N.insert=function(F){if(F.type!=="Feature")throw new Error("invalid feature");return F.bbox=F.bbox?F.bbox:m(F),o.prototype.insert.call(this,F)},N.load=function(F){var tt=[];return Array.isArray(F)?F.forEach(function(it){if(it.type!=="Feature")throw new Error("invalid features");it.bbox=it.bbox?it.bbox:m(it),tt.push(it)}):y(F,function(it){if(it.type!=="Feature")throw new Error("invalid features");it.bbox=it.bbox?it.bbox:m(it),tt.push(it)}),o.prototype.load.call(this,tt)},N.remove=function(F,tt){if(F.type!=="Feature")throw new Error("invalid feature");return F.bbox=F.bbox?F.bbox:m(F),o.prototype.remove.call(this,F,tt)},N.clear=function(){return o.prototype.clear.call(this)},N.search=function(F){var tt=o.prototype.search.call(this,this.toBBox(F));return A(tt)},N.collides=function(F){return o.prototype.collides.call(this,this.toBBox(F))},N.all=function(){var F=o.prototype.all.call(this);return A(F)},N.toJSON=function(){return o.prototype.toJSON.call(this)},N.fromJSON=function(F){return o.prototype.fromJSON.call(this,F)},N.toBBox=function(F){var tt;if(F.bbox)tt=F.bbox;else if(Array.isArray(F)&&F.length===4)tt=F;else if(Array.isArray(F)&&F.length===6)tt=[F[0],F[1],F[3],F[4]];else if(F.type==="Feature")tt=m(F);else if(F.type==="FeatureCollection")tt=m(F);else throw new Error("invalid geojson");return{minX:tt[0],minY:tt[1],maxX:tt[2],maxY:tt[3]}},N}s.exports=b,s.exports.default=b});Array.prototype.findIndex=Array.prototype.findIndex||function(i){if(this===null)throw new TypeError("Array.prototype.findIndex called on null or undefined");if(typeof i!="function")throw new TypeError("callback must be a function");for(var s=Object(this),o=s.length>>>0,h=arguments[1],c=0;c<o;c++)if(i.call(h,s[c],c,s))return c;return-1},Array.prototype.find=Array.prototype.find||function(i){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof i!="function")throw new TypeError("callback must be a function");for(var s=Object(this),o=s.length>>>0,h=arguments[1],c=0;c<o;c++){var m=s[c];if(i.call(h,m,c,s))return m}},typeof Object.assign!="function"&&(Object.assign=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");i=Object(i);for(var s=1;s<arguments.length;s++){var o=arguments[s];if(o!=null)for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(i[h]=o[h])}return i}),function(i){i.forEach(function(s){s.hasOwnProperty("remove")||Object.defineProperty(s,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype]),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(i,s){if(this==null)throw new TypeError('"this" is null or not defined');var o=Object(this),h=o.length>>>0;if(h===0)return!1;var c=s|0,m=Math.max(c>=0?c:h-Math.abs(c),0);function y(A,b){return A===b||typeof A=="number"&&typeof b=="number"&&isNaN(A)&&isNaN(b)}for(;m<h;){if(y(o[m],i))return!0;m++}return!1}});var zs={version:"2.18.3"},Tt=M(Tn()),ne={tooltips:{placeMarker:"Click to place marker",firstVertex:"Click to place first vertex",continueLine:"Click to continue drawing",finishLine:"Click any existing marker to finish",finishPoly:"Click first marker to finish",finishRect:"Click to finish",startCircle:"Click to place circle center",finishCircle:"Click to finish circle",placeCircleMarker:"Click to place circle marker",placeText:"Click to place text",selectFirstLayerFor:"Select first layer for {action}",selectSecondLayerFor:"Select second layer for {action}"},actions:{finish:"Finish",cancel:"Cancel",removeLastVertex:"Remove Last Vertex"},buttonTitles:{drawMarkerButton:"Draw Marker",drawPolyButton:"Draw Polygons",drawLineButton:"Draw Polyline",drawCircleButton:"Draw Circle",drawRectButton:"Draw Rectangle",editButton:"Edit Layers",dragButton:"Drag Layers",cutButton:"Cut Layers",deleteButton:"Remove Layers",drawCircleMarkerButton:"Draw Circle Marker",snappingButton:"Snap dragged marker to other layers and vertices",pinningButton:"Pin shared vertices together",rotateButton:"Rotate Layers",drawTextButton:"Draw Text",scaleButton:"Scale Layers",autoTracingButton:"Auto trace Line",snapGuidesButton:"Show SnapGuides",unionButton:"Union layers",differenceButton:"Subtract layers"},measurements:{totalLength:"Length",segmentLength:"Segment length",area:"Area",radius:"Radius",perimeter:"Perimeter",height:"Height",width:"Width",coordinates:"Position",coordinatesMarker:"Position Marker"}},Ns={tooltips:{placeMarker:"Platziere den Marker mit Klick",firstVertex:"Platziere den ersten Marker mit Klick",continueLine:"Klicke, um weiter zu zeichnen",finishLine:"Beende mit Klick auf existierenden Marker",finishPoly:"Beende mit Klick auf ersten Marker",finishRect:"Beende mit Klick",startCircle:"Platziere das Kreiszentrum mit Klick",finishCircle:"Beende den Kreis mit Klick",placeCircleMarker:"Platziere den Kreismarker mit Klick",placeText:"Platziere den Text mit Klick"},actions:{finish:"Beenden",cancel:"Abbrechen",removeLastVertex:"Letzten Vertex löschen"},buttonTitles:{drawMarkerButton:"Marker zeichnen",drawPolyButton:"Polygon zeichnen",drawLineButton:"Polyline zeichnen",drawCircleButton:"Kreis zeichnen",drawRectButton:"Rechteck zeichnen",editButton:"Layer editieren",dragButton:"Layer bewegen",cutButton:"Layer schneiden",deleteButton:"Layer löschen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verknüpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"Länge",segmentLength:"Segment Länge",area:"Fläche",radius:"Radius",perimeter:"Umfang",height:"Höhe",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},On={tooltips:{placeMarker:"Clicca per posizionare un Marker",firstVertex:"Clicca per posizionare il primo vertice",continueLine:"Clicca per continuare a disegnare",finishLine:"Clicca qualsiasi marker esistente per terminare",finishPoly:"Clicca il primo marker per terminare",finishRect:"Clicca per terminare",startCircle:"Clicca per posizionare il punto centrale del cerchio",finishCircle:"Clicca per terminare il cerchio",placeCircleMarker:"Clicca per posizionare un Marker del cherchio"},actions:{finish:"Termina",cancel:"Annulla",removeLastVertex:"Rimuovi l'ultimo vertice"},buttonTitles:{drawMarkerButton:"Disegna Marker",drawPolyButton:"Disegna Poligoni",drawLineButton:"Disegna Polilinea",drawCircleButton:"Disegna Cerchio",drawRectButton:"Disegna Rettangolo",editButton:"Modifica Livelli",dragButton:"Sposta Livelli",cutButton:"Ritaglia Livelli",deleteButton:"Elimina Livelli",drawCircleMarkerButton:"Disegna Marker del Cerchio",snappingButton:"Snap ha trascinato il pennarello su altri strati e vertici",pinningButton:"Pin condiviso vertici insieme",rotateButton:"Ruota livello"}},Ne={tooltips:{placeMarker:"Klik untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},ko={tooltips:{placeMarker:"Adaugă un punct",firstVertex:"Apasă aici pentru a adăuga primul Vertex",continueLine:"Apasă aici pentru a continua desenul",finishLine:"Apasă pe orice obiect pentru a finisa desenul",finishPoly:"Apasă pe primul obiect pentru a finisa",finishRect:"Apasă pentru a finisa",startCircle:"Apasă pentru a desena un cerc",finishCircle:"Apasă pentru a finisa un cerc",placeCircleMarker:"Adaugă un punct"},actions:{finish:"Termină",cancel:"Anulează",removeLastVertex:"Șterge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaugă o bulină",drawPolyButton:"Desenează un poligon",drawLineButton:"Desenează o linie",drawCircleButton:"Desenează un cerc",drawRectButton:"Desenează un dreptunghi",editButton:"Editează straturile",dragButton:"Mută straturile",cutButton:"Taie straturile",deleteButton:"Șterge straturile",drawCircleMarkerButton:"Desenează marcatorul cercului",snappingButton:"Fixați marcatorul glisat pe alte straturi și vârfuri",pinningButton:"Fixați vârfurile partajate împreună",rotateButton:"Rotiți stratul"}},In={tooltips:{placeMarker:"Нажмите, чтобы нанести маркер",firstVertex:"Нажмите, чтобы нанести первый объект",continueLine:"Нажмите, чтобы продолжить рисование",finishLine:"Нажмите любой существующий маркер для завершения",finishPoly:"Выберите первую точку, чтобы закончить",finishRect:"Нажмите, чтобы закончить",startCircle:"Нажмите, чтобы добавить центр круга",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Нажмите, чтобы нанести круговой маркер"},actions:{finish:"Завершить",cancel:"Отменить",removeLastVertex:"Отменить последнее действие"},buttonTitles:{drawMarkerButton:"Добавить маркер",drawPolyButton:"Рисовать полигон",drawLineButton:"Рисовать кривую",drawCircleButton:"Рисовать круг",drawRectButton:"Рисовать прямоугольник",editButton:"Редактировать слой",dragButton:"Перенести слой",cutButton:"Вырезать слой",deleteButton:"Удалить слой",drawCircleMarkerButton:"Добавить круговой маркер",snappingButton:"Привязать перетаскиваемый маркер к другим слоям и вершинам",pinningButton:"Связать общие точки вместе",rotateButton:"Поворот слоя"}},bi={tooltips:{placeMarker:"Presiona para colocar un marcador",firstVertex:"Presiona para colocar el primer vértice",continueLine:"Presiona para continuar dibujando",finishLine:"Presiona cualquier marcador existente para finalizar",finishPoly:"Presiona el primer marcador para finalizar",finishRect:"Presiona para finalizar",startCircle:"Presiona para colocar el centro del círculo",finishCircle:"Presiona para finalizar el círculo",placeCircleMarker:"Presiona para colocar un marcador de círculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar último vértice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Polígono",drawLineButton:"Dibujar Línea",drawCircleButton:"Dibujar Círculo",drawRectButton:"Dibujar Rectángulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de Círculo",snappingButton:"El marcador de Snap arrastrado a otras capas y vértices",pinningButton:"Fijar juntos los vértices compartidos",rotateButton:"Rotar capa"}},re={tooltips:{placeMarker:"Klik om een marker te plaatsen",firstVertex:"Klik om het eerste punt te plaatsen",continueLine:"Klik om te blijven tekenen",finishLine:"Klik op een bestaand punt om te beëindigen",finishPoly:"Klik op het eerst punt om te beëindigen",finishRect:"Klik om te beëindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te beëindigen",placeCircleMarker:"Klik om een marker te plaatsen"},actions:{finish:"Bewaar",cancel:"Annuleer",removeLastVertex:"Verwijder laatste punt"},buttonTitles:{drawMarkerButton:"Plaats Marker",drawPolyButton:"Teken een vlak",drawLineButton:"Teken een lijn",drawCircleButton:"Teken een cirkel",drawRectButton:"Teken een vierkant",editButton:"Bewerk",dragButton:"Verplaats",cutButton:"Knip",deleteButton:"Verwijder",drawCircleMarkerButton:"Plaats Marker",snappingButton:"Snap gesleepte marker naar andere lagen en hoekpunten",pinningButton:"Speld gedeelde hoekpunten samen",rotateButton:"Laag roteren"}},wi={tooltips:{placeMarker:"Cliquez pour placer un marqueur",firstVertex:"Cliquez pour placer le premier sommet",continueLine:"Cliquez pour continuer à dessiner",finishLine:"Cliquez sur n'importe quel marqueur pour terminer",finishPoly:"Cliquez sur le premier marqueur pour terminer",finishRect:"Cliquez pour terminer",startCircle:"Cliquez pour placer le centre du cercle",finishCircle:"Cliquez pour finir le cercle",placeCircleMarker:"Cliquez pour placer le marqueur circulaire"},actions:{finish:"Terminer",cancel:"Annuler",removeLastVertex:"Retirer le dernier sommet"},buttonTitles:{drawMarkerButton:"Placer des marqueurs",drawPolyButton:"Dessiner des polygones",drawLineButton:"Dessiner des polylignes",drawCircleButton:"Dessiner un cercle",drawRectButton:"Dessiner un rectangle",editButton:"Éditer des calques",dragButton:"Déplacer des calques",cutButton:"Couper des calques",deleteButton:"Supprimer des calques",drawCircleMarkerButton:"Dessiner un marqueur circulaire",snappingButton:"Glisser le marqueur vers d'autres couches et sommets",pinningButton:"Épingler ensemble les sommets partagés",rotateButton:"Tourner des calques"}},on={tooltips:{placeMarker:"单击放置标记",firstVertex:"单击放置首个顶点",continueLine:"单击继续绘制",finishLine:"单击任何存在的标记以完成",finishPoly:"单击第一个标记以完成",finishRect:"单击完成",startCircle:"单击放置圆心",finishCircle:"单击完成圆形",placeCircleMarker:"点击放置圆形标记"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最后的顶点"},buttonTitles:{drawMarkerButton:"绘制标记",drawPolyButton:"绘制多边形",drawLineButton:"绘制线段",drawCircleButton:"绘制圆形",drawRectButton:"绘制长方形",editButton:"编辑图层",dragButton:"拖拽图层",cutButton:"剪切图层",deleteButton:"删除图层",drawCircleMarkerButton:"画圆圈标记",snappingButton:"将拖动的标记捕捉到其他图层和顶点",pinningButton:"将共享顶点固定在一起",rotateButton:"旋转图层"}},hn={tooltips:{placeMarker:"單擊放置標記",firstVertex:"單擊放置第一個頂點",continueLine:"單擊繼續繪製",finishLine:"單擊任何存在的標記以完成",finishPoly:"單擊第一個標記以完成",finishRect:"單擊完成",startCircle:"單擊放置圓心",finishCircle:"單擊完成圓形",placeCircleMarker:"點擊放置圓形標記"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最後一個頂點"},buttonTitles:{drawMarkerButton:"放置標記",drawPolyButton:"繪製多邊形",drawLineButton:"繪製線段",drawCircleButton:"繪製圓形",drawRectButton:"繪製方形",editButton:"編輯圖形",dragButton:"移動圖形",cutButton:"裁切圖形",deleteButton:"刪除圖形",drawCircleMarkerButton:"畫圓圈標記",snappingButton:"將拖動的標記對齊到其他圖層和頂點",pinningButton:"將共享頂點固定在一起",rotateButton:"旋轉圖形"}},Us={tooltips:{placeMarker:"Clique para posicionar o marcador",firstVertex:"Clique para posicionar o primeiro vértice",continueLine:"Clique para continuar desenhando",finishLine:"Clique em qualquer marcador existente para finalizar",finishPoly:"Clique no primeiro marcador para finalizar",finishRect:"Clique para finalizar",startCircle:"Clique para posicionar o centro do círculo",finishCircle:"Clique para finalizar o círculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover último vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},Zi={tooltips:{placeMarker:"Clique para colocar marcador",firstVertex:"Clique para colocar primeiro vértice",continueLine:"Clique para continuar a desenhar",finishLine:"Clique num marcador existente para terminar",finishPoly:"Clique no primeiro marcador para terminar",finishRect:"Clique para terminar",startCircle:"Clique para colocar o centro do círculo",finishCircle:"Clique para terminar o círculo",placeCircleMarker:"Clique para colocar marcador de círculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover Último Vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},js={tooltips:{placeMarker:"Kliknij, aby umieścić znacznik",firstVertex:"Kliknij, aby umieścić pierwszy wierzchołek",continueLine:"Kliknij, aby kontynuować rysowanie",finishLine:"Kliknij dowolny istniejący znacznik, aby zakończyć",finishPoly:"Kliknij pierwszy znacznik, aby zakończyć",finishRect:"Kliknij, aby zakończyć",startCircle:"Kliknij, aby umieścić środek okręgu",finishCircle:"Kliknij, aby zakończyć okrąg",placeCircleMarker:"Kliknij, aby umieścić znacznik okręgu",placeText:"Kliknij, aby umieścić tekst"},actions:{finish:"Zakończ",cancel:"Anuluj",removeLastVertex:"Usuń ostatni wierzchołek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielokąt",drawLineButton:"Rysuj linię",drawCircleButton:"Rysuj okrąg",drawRectButton:"Rysuj prostokąt",editButton:"Edytuj warstwy",dragButton:"Przeciągnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usuń warstwy",drawCircleMarkerButton:"Rysuj znacznik okrągły",snappingButton:"Przyciągnij przenoszony znacznik do innych warstw i wierzchołków",pinningButton:"Przypnij wspólne wierzchołki razem",rotateButton:"Obróć warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne śledzenie linii"},measurements:{totalLength:"Długość",segmentLength:"Długość odcinka",area:"Obszar",radius:"Promień",perimeter:"Obwód",height:"Wysokość",width:"Szerokość",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},Zs={tooltips:{placeMarker:"Klicka för att placera markör",firstVertex:"Klicka för att placera första hörnet",continueLine:"Klicka för att fortsätta rita",finishLine:"Klicka på en existerande punkt för att slutföra",finishPoly:"Klicka på den första punkten för att slutföra",finishRect:"Klicka för att slutföra",startCircle:"Klicka för att placera cirkelns centrum",finishCircle:"Klicka för att slutföra cirkeln",placeCircleMarker:"Klicka för att placera cirkelmarkör"},actions:{finish:"Slutför",cancel:"Avbryt",removeLastVertex:"Ta bort sista hörnet"},buttonTitles:{drawMarkerButton:"Rita Markör",drawPolyButton:"Rita Polygoner",drawLineButton:"Rita Linje",drawCircleButton:"Rita Cirkel",drawRectButton:"Rita Rektangel",editButton:"Redigera Lager",dragButton:"Dra Lager",cutButton:"Klipp i Lager",deleteButton:"Ta bort Lager",drawCircleMarkerButton:"Rita Cirkelmarkör",snappingButton:"Snäpp dra markören till andra lager och hörn",pinningButton:"Fäst delade hörn tillsammans",rotateButton:"Rotera lagret"}},Rn={tooltips:{placeMarker:"Κάντε κλικ για να τοποθετήσετε Δείκτη",firstVertex:"Κάντε κλικ για να τοποθετήσετε το πρώτο σημείο",continueLine:"Κάντε κλικ για να συνεχίσετε να σχεδιάζετε",finishLine:"Κάντε κλικ σε οποιονδήποτε υπάρχον σημείο για να ολοκληρωθεί",finishPoly:"Κάντε κλικ στο πρώτο σημείο για να τελειώσετε",finishRect:"Κάντε κλικ για να τελειώσετε",startCircle:"Κάντε κλικ για να τοποθετήσετε κέντρο Κύκλου",finishCircle:"Κάντε κλικ για να ολοκληρώσετε τον Κύκλο",placeCircleMarker:"Κάντε κλικ για να τοποθετήσετε Κυκλικό Δείκτη"},actions:{finish:"Τέλος",cancel:"Ακύρωση",removeLastVertex:"Κατάργηση τελευταίου σημείου"},buttonTitles:{drawMarkerButton:"Σχεδίαση Δείκτη",drawPolyButton:"Σχεδίαση Πολυγώνου",drawLineButton:"Σχεδίαση Γραμμής",drawCircleButton:"Σχεδίαση Κύκλου",drawRectButton:"Σχεδίαση Ορθογωνίου",editButton:"Επεξεργασία Επιπέδων",dragButton:"Μεταφορά Επιπέδων",cutButton:"Αποκοπή Επιπέδων",deleteButton:"Κατάργηση Επιπέδων",drawCircleMarkerButton:"Σχεδίαση Κυκλικού Δείκτη",snappingButton:"Προσκόλληση του Δείκτη μεταφοράς σε άλλα Επίπεδα και Κορυφές",pinningButton:"Περικοπή κοινών κορυφών μαζί",rotateButton:"Περιστρέψτε το στρώμα"}},qs={tooltips:{placeMarker:"Kattintson a jelölő elhelyezéséhez",firstVertex:"Kattintson az első pont elhelyezéséhez",continueLine:"Kattintson a következő pont elhelyezéséhez",finishLine:"A befejezéshez kattintson egy meglévő pontra",finishPoly:"A befejezéshez kattintson az első pontra",finishRect:"Kattintson a befejezéshez",startCircle:"Kattintson a kör középpontjának elhelyezéséhez",finishCircle:"Kattintson a kör befejezéséhez",placeCircleMarker:"Kattintson a körjelölő elhelyezéséhez"},actions:{finish:"Befejezés",cancel:"Mégse",removeLastVertex:"Utolsó pont eltávolítása"},buttonTitles:{drawMarkerButton:"Jelölő rajzolása",drawPolyButton:"Poligon rajzolása",drawLineButton:"Vonal rajzolása",drawCircleButton:"Kör rajzolása",drawRectButton:"Négyzet rajzolása",editButton:"Elemek szerkesztése",dragButton:"Elemek mozgatása",cutButton:"Elemek vágása",deleteButton:"Elemek törlése",drawCircleMarkerButton:"Kör jelölő rajzolása",snappingButton:"Kapcsolja a jelöltőt másik elemhez vagy ponthoz",pinningButton:"Közös pontok összekötése",rotateButton:"Fólia elforgatása"}},Hs={tooltips:{placeMarker:"Tryk for at placere en markør",firstVertex:"Tryk for at placere det første punkt",continueLine:"Tryk for at fortsætte linjen",finishLine:"Tryk på et eksisterende punkt for at afslutte",finishPoly:"Tryk på det første punkt for at afslutte",finishRect:"Tryk for at afslutte",startCircle:"Tryk for at placere cirklens center",finishCircle:"Tryk for at afslutte cirklen",placeCircleMarker:"Tryk for at placere en cirkelmarkør"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer markør",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Træk",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmarkør",snappingButton:"Fastgør trukket markør til andre elementer",pinningButton:"Sammenlæg delte elementer",rotateButton:"Roter laget"}},Fn={tooltips:{placeMarker:"Klikk for å plassere punkt",firstVertex:"Klikk for å plassere første punkt",continueLine:"Klikk for å tegne videre",finishLine:"Klikk på et eksisterende punkt for å fullføre",finishPoly:"Klikk første punkt for å fullføre",finishRect:"Klikk for å fullføre",startCircle:"Klikk for å sette sirkel midtpunkt",finishCircle:"Klikk for å fullføre sirkel",placeCircleMarker:"Klikk for å plassere sirkel",placeText:"Klikk for å plassere tekst"},actions:{finish:"Fullfør",cancel:"Kanseller",removeLastVertex:"Fjern forrige punkt"},buttonTitles:{drawMarkerButton:"Tegn punkt",drawPolyButton:"Tegn flate",drawLineButton:"Tegn linje",drawCircleButton:"Tegn sirkel",drawRectButton:"Tegn rektangel",editButton:"Rediger objekter",dragButton:"Dra objekter",cutButton:"Kutt objekter",deleteButton:"Fjern objekter",drawCircleMarkerButton:"Tegn sirkel-punkt",snappingButton:"Fest dratt punkt til andre objekter og punkt",pinningButton:"Pin delte punkter sammen",rotateButton:"Rotér objekter",drawTextButton:"Tegn tekst",scaleButton:"Skalér objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Område",radius:"Radius",perimeter:"Omriss",height:"Høyde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmarkør"}},Qa={tooltips:{placeMarker:"کلیک برای جانمایی نشان",firstVertex:"کلیک برای رسم اولین رأس",continueLine:"کلیک برای ادامه رسم",finishLine:"کلیک روی هر نشان موجود برای پایان",finishPoly:"کلیک روی اولین نشان برای پایان",finishRect:"کلیک برای پایان",startCircle:"کلیک برای رسم مرکز دایره",finishCircle:"کلیک برای پایان رسم دایره",placeCircleMarker:"کلیک برای رسم نشان دایره",placeText:"کلیک برای نوشتن متن"},actions:{finish:"پایان",cancel:"لفو",removeLastVertex:"حذف آخرین رأس"},buttonTitles:{drawMarkerButton:"درج نشان",drawPolyButton:"رسم چندضلعی",drawLineButton:"رسم خط",drawCircleButton:"رسم دایره",drawRectButton:"رسم چهارضلعی",editButton:"ویرایش لایه‌ها",dragButton:"جابجایی لایه‌ها",cutButton:"برش لایه‌ها",deleteButton:"حذف لایه‌ها",drawCircleMarkerButton:"رسم نشان دایره",snappingButton:"نشانگر را به لایه‌ها و رئوس دیگر بکشید",pinningButton:"رئوس مشترک را با هم پین کنید",rotateButton:"چرخش لایه",drawTextButton:"رسم متن",scaleButton:"مقیاس‌گذاری",autoTracingButton:"ردیاب خودکار"},measurements:{totalLength:"طول",segmentLength:"طول بخش",area:"ناحیه",radius:"شعاع",perimeter:"محیط",height:"ارتفاع",width:"عرض",coordinates:"موقعیت",coordinatesMarker:"موقعیت نشان"}},Vs={tooltips:{placeMarker:"Натисніть, щоб нанести маркер",firstVertex:"Натисніть, щоб нанести першу вершину",continueLine:"Натисніть, щоб продовжити малювати",finishLine:"Натисніть будь-який існуючий маркер для завершення",finishPoly:"Виберіть перший маркер, щоб завершити",finishRect:"Натисніть, щоб завершити",startCircle:"Натисніть, щоб додати центр кола",finishCircle:"Натисніть, щоб завершити коло",placeCircleMarker:"Натисніть, щоб нанести круговий маркер"},actions:{finish:"Завершити",cancel:"Відмінити",removeLastVertex:"Видалити попередню вершину"},buttonTitles:{drawMarkerButton:"Малювати маркер",drawPolyButton:"Малювати полігон",drawLineButton:"Малювати криву",drawCircleButton:"Малювати коло",drawRectButton:"Малювати прямокутник",editButton:"Редагувати шари",dragButton:"Перенести шари",cutButton:"Вирізати шари",deleteButton:"Видалити шари",drawCircleMarkerButton:"Малювати круговий маркер",snappingButton:"Прив’язати перетягнутий маркер до інших шарів та вершин",pinningButton:"Зв'язати спільні вершини разом",rotateButton:"Повернути шар"}},So={tooltips:{placeMarker:"İşaretçi yerleştirmek için tıklayın",firstVertex:"İlk tepe noktasını yerleştirmek için tıklayın",continueLine:"Çizime devam etmek için tıklayın",finishLine:"Bitirmek için mevcut herhangi bir işaretçiyi tıklayın",finishPoly:"Bitirmek için ilk işaretçiyi tıklayın",finishRect:"Bitirmek için tıklayın",startCircle:"Daire merkezine yerleştirmek için tıklayın",finishCircle:"Daireyi bitirmek için tıklayın",placeCircleMarker:"Daire işaretçisi yerleştirmek için tıklayın"},actions:{finish:"Bitir",cancel:"İptal",removeLastVertex:"Son köşeyi kaldır"},buttonTitles:{drawMarkerButton:"Çizim İşaretçisi",drawPolyButton:"Çokgenler çiz",drawLineButton:"Çoklu çizgi çiz",drawCircleButton:"Çember çiz",drawRectButton:"Dikdörtgen çiz",editButton:"Katmanları düzenle",dragButton:"Katmanları sürükle",cutButton:"Katmanları kes",deleteButton:"Katmanları kaldır",drawCircleMarkerButton:"Daire işaretçisi çiz",snappingButton:"Sürüklenen işaretçiyi diğer katmanlara ve köşelere yapıştır",pinningButton:"Paylaşılan köşeleri birbirine sabitle",rotateButton:"Katmanı döndür"}},Bt={tooltips:{placeMarker:"Kliknutím vytvoříte značku",firstVertex:"Kliknutím vytvoříte první objekt",continueLine:"Kliknutím pokračujte v kreslení",finishLine:"Kliknutí na libovolnou existující značku pro dokončení",finishPoly:"Vyberte první bod pro dokončení",finishRect:"Klikněte pro dokončení",startCircle:"Kliknutím přidejte střed kruhu",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Kliknutím nastavte poloměr"},actions:{finish:"Dokončit",cancel:"Zrušit",removeLastVertex:"Zrušit poslední akci"},buttonTitles:{drawMarkerButton:"Přidat značku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit křivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obdélník",editButton:"Upravit vrstvu",dragButton:"Přeneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"Přidat kruhovou značku",snappingButton:"Navázat tažnou značku k dalším vrstvám a vrcholům",pinningButton:"Spojit společné body dohromady",rotateButton:"Otočte vrstvu"}},$e={tooltips:{placeMarker:"クリックしてマーカーを配置",firstVertex:"クリックして最初の頂点を配置",continueLine:"クリックして描画を続ける",finishLine:"任意のマーカーをクリックして終了",finishPoly:"最初のマーカーをクリックして終了",finishRect:"クリックして終了",startCircle:"クリックして円の中心を配置",finishCircle:"クリックして円の描画を終了",placeCircleMarker:"クリックして円マーカーを配置",placeText:"クリックしてテキストを配置"},actions:{finish:"終了",cancel:"キャンセル",removeLastVertex:"最後の頂点を削除"},buttonTitles:{drawMarkerButton:"マーカーを描画",drawPolyButton:"ポリゴンを描画",drawLineButton:"折れ線を描画",drawCircleButton:"円を描画",drawRectButton:"矩形を描画",editButton:"レイヤーを編集",dragButton:"レイヤーをドラッグ",cutButton:"レイヤーを切り取り",deleteButton:"レイヤーを削除",drawCircleMarkerButton:"円マーカーを描画",snappingButton:"ドラッグしたマーカーを他のレイヤーや頂点にスナップする",pinningButton:"共有する頂点を同時に動かす",rotateButton:"レイヤーを回転",drawTextButton:"テキストを描画"}},Kt={tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimmäisen osuuden",continueLine:"Klikkaa jatkaaksesi piirtämistä",finishLine:"Klikkaa olemassa olevaa merkkiä lopettaaksesi",finishPoly:"Klikkaa ensimmäistä merkkiä lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyrän keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyrän",placeCircleMarker:"Klikkaa asettaaksesi ympyrämerkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirrä merkkejä",drawPolyButton:"Piirrä monikulmioita",drawLineButton:"Piirrä viivoja",drawCircleButton:"Piirrä ympyrä",drawRectButton:"Piirrä neliskulmioita",editButton:"Muokkaa",dragButton:"Siirrä",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirrä ympyrämerkki",snappingButton:"Kiinnitä siirrettävä merkki toisiin muotoihin",pinningButton:"Kiinnitä jaetut muodot yhteen",rotateButton:"Käännä",drawTextButton:"Piirrä tekstiä"}},tr={tooltips:{placeMarker:"마커 위치를 클릭하세요",firstVertex:"첫번째 꼭지점 위치을 클릭하세요",continueLine:"계속 그리려면 클릭하세요",finishLine:"끝내려면 기존 마커를 클릭하세요",finishPoly:"끝내려면 처음 마커를 클릭하세요",finishRect:"끝내려면 클릭하세요",startCircle:"원의 중심이 될 위치를 클릭하세요",finishCircle:"원을 끝내려면 클릭하세요",placeCircleMarker:"원 마커 위치를 클릭하세요",placeText:"텍스트 위치를 클릭하세요"},actions:{finish:"끝내기",cancel:"취소",removeLastVertex:"마지막 꼭지점 제거"},buttonTitles:{drawMarkerButton:"마커 그리기",drawPolyButton:"다각형 그리기",drawLineButton:"다각선 그리기",drawCircleButton:"원 그리기",drawRectButton:"직사각형 그리기",editButton:"레이어 편집하기",dragButton:"레이어 끌기",cutButton:"레이어 자르기",deleteButton:"레이어 제거하기",drawCircleMarkerButton:"원 마커 그리기",snappingButton:"잡아끈 마커를 다른 레이어 및 꼭지점에 들러붙게 하기",pinningButton:"공유 꼭지점을 함께 찍기",rotateButton:"레이어 회전하기",drawTextButton:"텍스트 그리기"}},$s={tooltips:{placeMarker:"Маркерди жайгаштыруу үчүн басыңыз",firstVertex:"Биринчи чокуну жайгаштырууну үчүн басыңыз",continueLine:"Сүрөт тартууну улантуу үчүн басыңыз",finishLine:"Аяктоо үчүн учурдагы маркерди басыңыз",finishPoly:"Бүтүрүү үчүн биринчи маркерди басыңыз",finishRect:"Бүтүрүү үчүн басыңыз",startCircle:"Айлананын борборун жайгаштырууну үчүн басыңыз",finishCircle:"Айлананы бүтүрүү үчүн басыңыз",placeCircleMarker:"Тегерек маркерди жайгаштыруу үчүн басыңыз",placeText:"Текстти жайгаштыруу үчүн басыңыз"},actions:{finish:"Аягы",cancel:"Жок кылуу",removeLastVertex:"Акыркы чокуну өчүрүү"},buttonTitles:{drawMarkerButton:"Маркерди чизуу",drawPolyButton:"Полигон чизуу",drawLineButton:"Полилиния чизуу",drawCircleButton:"Дайынды чизуу",drawRectButton:"Прямоугольник чизуу",editButton:"Слоопту түзөтүү",dragButton:"Слоопту карап сүйлөү",cutButton:"Слооптун башын кесүү",deleteButton:"Слооптун өчүрүү",drawCircleMarkerButton:"Дайынды маркерди чизуу",snappingButton:"Башка слооптордун жана вертекстердин арасына чекилдөө",pinningButton:"Бөлүшкөн вертекстерди бирге тутуштуруу",rotateButton:"Слооптун өзгөртүү",drawTextButton:"Текст чизуу",scaleButton:"Слооптун өлчөмүн өзгөртүү",autoTracingButton:"Автоматтык тизмеги чизуу"},measurements:{totalLength:"Узундук",segmentLength:"Сегмент узундугу",area:"Аймак",radius:"Радиус",perimeter:"Периметр",height:"Диаметр",width:"Кенчилик",coordinates:"Координаттар",coordinatesMarker:"Маркердин координаттары"}},Ks=Zi,_i={en:ne,de:Ns,it:On,id:Ne,ro:ko,ru:In,es:bi,nl:re,fr:wi,pt:Ks,pt_br:Us,pt_pt:Zi,zh:on,zh_tw:hn,pl:js,sv:Zs,el:Rn,hu:qs,da:Hs,no:Fn,fa:Qa,ua:Vs,tr:So,cz:Bt,ja:$e,fi:Kt,ko:tr,ky:$s},Ci={_globalEditModeEnabled:!1,enableGlobalEditMode(i){let s={...i};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(o=>{this._isRelevantForEdit(o)&&o.pm.enable(s)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(i=>{i.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(i=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(i)},handleLayerAdditionInGlobalEditMode(){let i=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let s in i){let o=i[s];this._isRelevantForEdit(o)&&o.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:i}){this._addedLayersEdit[L.stamp(i)]=i},_isRelevantForEdit(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowEditing}},Ws=Ci,ln={_globalDragModeEnabled:!1,enableGlobalDragMode(){let i=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},i.forEach(s=>{this._isRelevantForDrag(s)&&s.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let i=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,i.forEach(s=>{s.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let i=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let s in i){let o=i[s];this._isRelevantForDrag(o)&&o.pm.enableLayerDrag()}},_layerAddedDrag({layer:i}){this._addedLayersDrag[L.stamp(i)]=i},_isRelevantForDrag(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.draggable}},ce=ln,Ei={_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(i=>{this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(i=>{i.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(i){let s=i.target;this._isRelevantForRemoval(s)&&!s.pm.dragging()&&(s.removeFrom(this.map.pm._getContainingLayer()),s.remove(),s instanceof L.LayerGroup?(this._fireRemoveLayerGroup(s),this._fireRemoveLayerGroup(this.map,s)):(s.pm._fireRemove(s),s.pm._fireRemove(this.map,s)))},_isRelevantForRemoval(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowRemoval},handleLayerAdditionInGlobalRemovalMode(){let i=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let s in i){let o=i[s];this._isRelevantForRemoval(o)&&(o.pm.enabled()&&o.pm.disable(),o.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:i}){this._addedLayersRemoval[L.stamp(i)]=i}},er=Ei,ir={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(i=>i instanceof L.Polyline).forEach(i=>{this._isRelevantForRotate(i)&&i.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(i=>i instanceof L.Polyline).forEach(i=>{i.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate(i){return i.pm&&i instanceof L.Polyline&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowRotation},handleLayerAdditionInGlobalRotateMode(){let i=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let s in i){let o=i[s];this._isRelevantForRemoval(o)&&o.pm.enableRotate()}},_layerAddedRotate({layer:i}){this._addedLayersRotate[L.stamp(i)]=i}},Bo=ir,nr=M(Tn()),Xs={_fireDrawStart(i="Draw",s={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},i,s)},_fireDrawEnd(i="Draw",s={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},i,s)},_fireCreate(i,s="Draw",o={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:i,layer:i},s,o)},_fireCenterPlaced(i="Draw",s={}){let o=i==="Draw"?this._layer:void 0,h=i!=="Draw"?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:o,layer:h,latlng:this._layer.getLatLng()},i,s)},_fireCut(i,s,o,h="Draw",c={}){this.__fire(i,"pm:cut",{shape:this._shape,layer:s,originalLayer:o},h,c)},_fireEdit(i=this._layer,s="Edit",o={}){this.__fire(i,"pm:edit",{layer:this._layer,shape:this.getShape()},s,o)},_fireEnable(i="Edit",s={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},i,s)},_fireDisable(i="Edit",s={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},i,s)},_fireUpdate(i="Edit",s={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},i,s)},_fireMarkerDragStart(i,s=void 0,o="Edit",h={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s},o,h)},_fireMarkerDrag(i,s=void 0,o="Edit",h={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s},o,h)},_fireMarkerDragEnd(i,s=void 0,o=void 0,h="Edit",c={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s,intersectionReset:o},h,c)},_fireDragStart(i="Edit",s={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},i,s)},_fireDrag(i,s="Edit",o={}){this.__fire(this._layer,"pm:drag",{...i,shape:this.getShape()},s,o)},_fireDragEnd(i="Edit",s={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},i,s)},_fireDragEnable(i="Edit",s={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},i,s)},_fireDragDisable(i="Edit",s={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},i,s)},_fireRemove(i,s=i,o="Edit",h={}){this.__fire(i,"pm:remove",{layer:s,shape:this.getShape()},o,h)},_fireVertexAdded(i,s,o,h="Edit",c={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:i,indexPath:s,latlng:o,shape:this.getShape()},h,c)},_fireVertexRemoved(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:i,indexPath:s,shape:this.getShape()},o,h)},_fireVertexClick(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:i,indexPath:s,shape:this.getShape()},o,h)},_fireIntersect(i,s=this._layer,o="Edit",h={}){this.__fire(s,"pm:intersect",{layer:this._layer,intersection:i,shape:this.getShape()},o,h)},_fireLayerReset(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:i,indexPath:s,shape:this.getShape()},o,h)},_fireChange(i,s="Edit",o={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:i,shape:this.getShape()},s,o)},_fireTextChange(i,s="Edit",o={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:i,shape:this.getShape()},s,o)},_fireTextFocus(i="Edit",s={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},i,s)},_fireTextBlur(i="Edit",s={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},i,s)},_fireSnapDrag(i,s,o="Snapping",h={}){this.__fire(i,"pm:snapdrag",s,o,h)},_fireSnap(i,s,o="Snapping",h={}){this.__fire(i,"pm:snap",s,o,h)},_fireUnsnap(i,s,o="Snapping",h={}){this.__fire(i,"pm:unsnap",s,o,h)},_fireRotationEnable(i,s,o="Rotation",h={}){this.__fire(i,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},o,h)},_fireRotationDisable(i,s="Rotation",o={}){this.__fire(i,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},s,o)},_fireRotationStart(i,s,o="Rotation",h={}){this.__fire(i,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:s},o,h)},_fireRotation(i,s,o,h=this._rotationLayer,c="Rotation",m={}){this.__fire(i,"pm:rotate",{layer:h,helpLayer:this._layer,startAngle:this._startAngle,angle:h.pm.getAngle(),angleDiff:s,oldLatLngs:o,newLatLngs:h.getLatLngs()},c,m)},_fireRotationEnd(i,s,o,h="Rotation",c={}){this.__fire(i,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:s,angle:this._rotationLayer.pm.getAngle(),originLatLngs:o,newLatLngs:this._rotationLayer.getLatLngs()},h,c)},_fireActionClick(i,s,o,h="Toolbar",c={}){this.__fire(this._map,"pm:actionclick",{text:i.text,action:i,btnName:s,button:o},h,c)},_fireButtonClick(i,s,o="Toolbar",h={}){this.__fire(this._map,"pm:buttonclick",{btnName:i,button:s},o,h)},_fireLangChange(i,s,o,h,c="Global",m={}){this.__fire(this.map,"pm:langchange",{oldLang:i,activeLang:s,fallback:o,translations:h},c,m)},_fireGlobalDragModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalEditModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalRemovalModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalCutModeToggled(i="Global",s={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},i,s)},_fireGlobalDrawModeToggled(i="Global",s={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},i,s)},_fireGlobalRotateModeToggled(i="Global",s={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},i,s)},_fireRemoveLayerGroup(i,s=i,o="Edit",h={}){this.__fire(i,"pm:remove",{layer:s,shape:void 0},o,h)},_fireKeyeventEvent(i,s,o,h="Global",c={}){this.__fire(this.map,"pm:keyevent",{event:i,eventType:s,focusOn:o},h,c)},__fire(i,s,o,h,c={}){o=(0,nr.default)(o,c,{source:h}),L.PM.Utils._fireEvent(i,s,o)}},Gn=Xs,sr=()=>({_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(i){this.map=i,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),i.once("unload",this._unbindKeyListenerEvents,this)},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(i){let s="document";this.map.getContainer().contains(i.target)&&(s="map");let o={event:i,eventType:i.type,focusOn:s};this._lastEvents[i.type]=o,this._lastEvents.current=o,this.map.pm._fireKeyeventEvent(i,i.type,s)},_onBlur(i){i.altKey=!1;let s={event:i,eventType:i.type,focusOn:"document"};this._lastEvents[i.type]=s,this._lastEvents.current=s},getLastKeyEvent(i="current"){return this._lastEvents[i]},isShiftKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.shiftKey},isAltKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.altKey},isCtrlKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.ctrlKey},isMetaKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.metaKey},getPressedKey(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.key}}),Ft=sr,ar=M(pi());function St(i){let s=L.PM.activeLang;return(0,ar.default)(_i[s],i)||(0,ar.default)(_i.en,i)||i}function Pi(i){for(let s=0;s<i.length;s+=1){let o=i[s];if(Array.isArray(o)){if(Pi(o))return!0}else if(o!=null&&o!=="")return!0}return!1}function un(i){return i.reduce((s,o)=>{if(o.length!==0){let h=Array.isArray(o)?un(o):o;Array.isArray(h)?h.length!==0&&s.push(h):s.push(h)}return s},[])}function To(i,s,o){let h={a:L.CRS.Earth.R,b:63567523142e-4,f:.0033528106647474805},{a:c,b:m,f:y}=h,A=i.lng,b=i.lat,P=o,N=Math.PI,F=s*N/180,tt=Math.sin(F),it=Math.cos(F),lt=(1-y)*Math.tan(b*N/180),ft=1/Math.sqrt(1+lt*lt),At=lt*ft,Gt=Math.atan2(lt,it),z=ft*tt,q=1-z*z,K=q*(c*c-m*m)/(m*m),nt=1+K/16384*(4096+K*(-768+K*(320-175*K))),X=K/1024*(256+K*(-128+K*(74-47*K))),et=P/(m*nt),w=2*Math.PI,S,O,D;for(;Math.abs(et-w)>1e-12;){S=Math.cos(2*Gt+et),O=Math.sin(et),D=Math.cos(et);let ot=X*O*(S+X/4*(D*(-1+2*S*S)-X/6*S*(-3+4*O*O)*(-3+4*S*S)));w=et,et=P/(m*nt)+ot}let I=At*O-ft*D*it,R=Math.atan2(At*D+ft*O*it,(1-y)*Math.sqrt(z*z+I*I)),V=Math.atan2(O*tt,ft*D-At*O*it),H=y/16*q*(4+y*(4-3*q)),$=V-(1-H)*y*z*(et+H*O*(S+H*D*(-1+2*S*S))),Q=A+$*180/N,J=R*180/N;return L.latLng(Q,J)}function zn(i,s,o,h,c=!0){let m,y,A,b=[];for(let P=0;P<o;P+=1){if(c)m=P*360/o+h,y=To(i,m,s),A=L.latLng(y.lng,y.lat);else{let N=i.lat+Math.cos(2*P*Math.PI/o)*s,F=i.lng+Math.sin(2*P*Math.PI/o)*s;A=L.latLng(N,F)}b.push(A)}return b}function Do(i,s,o){s=(s+360)%360;let h=Math.PI/180,c=180/Math.PI,{R:m}=L.CRS.Earth,y=i.lng*h,A=i.lat*h,b=s*h,P=Math.sin(A),N=Math.cos(A),F=Math.cos(o/m),tt=Math.sin(o/m),it=Math.asin(P*F+N*tt*Math.cos(b)),lt=y+Math.atan2(Math.sin(b)*tt*N,F-P*Math.sin(it));lt*=c;let ft=lt-360,At=lt<-180?lt+360:lt;return lt=lt>180?ft:At,L.latLng([it*c,lt])}function Nn(i,s,o){let h=i.latLngToContainerPoint(s),c=i.latLngToContainerPoint(o),m=Math.atan2(c.y-h.y,c.x-h.x)*180/Math.PI+90;return m+=m<0?360:0,m}function Un(i,s,o,h){let c=Nn(i,s,o);return Do(s,c,h)}function Oo(i,s,o="asc"){if(!s||Object.keys(s).length===0)return(b,P)=>b-P;let h=Object.keys(s),c,m=h.length-1,y={};for(;m>=0;)c=h[m],y[c.toLowerCase()]=s[c],m-=1;function A(b){if(b instanceof L.Marker)return"Marker";if(b instanceof L.Circle)return"Circle";if(b instanceof L.CircleMarker)return"CircleMarker";if(b instanceof L.Rectangle)return"Rectangle";if(b instanceof L.Polygon)return"Polygon";if(b instanceof L.Polyline)return"Line"}return(b,P)=>{let N,F;if(N=A(b.layer).toLowerCase(),F=A(P.layer).toLowerCase(),!N||!F)return 0;let tt=N in y?y[N]:Number.MAX_SAFE_INTEGER,it=F in y?y[F]:Number.MAX_SAFE_INTEGER,lt=0;return tt<it?lt=-1:tt>it&&(lt=1),o==="desc"?lt*-1:lt}}function Ke(i,s=i.getLatLngs()){return i instanceof L.Polygon?L.polygon(s).getLatLngs():L.polyline(s).getLatLngs()}function rr(i,s){var o,h,c,m;if((h=(o=s.options.crs)==null?void 0:o.projection)!=null&&h.MAX_LATITUDE){let y=(m=(c=s.options.crs)==null?void 0:c.projection)==null?void 0:m.MAX_LATITUDE;i.lat=Math.max(Math.min(y,i.lat),-y)}return i}function Ae(i){return i.options.renderer||i._map&&(i._map._getPaneRenderer(i.options.pane)||i._map.options.renderer||i._map._renderer)||i._renderer}var Io=L.Class.extend({includes:[Ws,ce,er,Bo,Gn],initialize(i){this.map=i,this.Draw=new L.PM.Draw(i),this.Toolbar=new L.PM.Toolbar(i),this.Keyboard=Ft(),this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0},this.Keyboard._initKeyListener(i)},setLang(i="en",s,o="en"){if(i=i.trim().toLowerCase(),!/^[a-z]{2}$/.test(i)){let c=i.replace(/[-_\s]/g,"-").replace(/^(\w{2})$/,"$1-").match(/([a-z]{2})-?([a-z]{2})?/);if(c){let m=[`${c[1]}_${c[2]}`,`${c[1]}`];for(let y of m)if(_i[y]){i=y;break}}}let h=L.PM.activeLang;s&&(_i[i]=(0,Tt.default)(_i[o],s)),L.PM.activeLang=i,this.map.pm.Toolbar.reinit(),this._fireLangChange(h,i,o,_i[i])},addControls(i){this.Toolbar.addControls(i)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(i="Polygon",s){i==="Poly"&&(i="Polygon"),this.Draw.enable(i,s)},disableDraw(i="Polygon"){i==="Poly"&&(i="Polygon"),this.Draw.disable(i)},setPathOptions(i,s={}){let o=s.ignoreShapes||[],h=s.merge||!1;this.map.pm.Draw.shapes.forEach(c=>{o.indexOf(c)===-1&&this.map.pm.Draw[c].setPathOptions(i,h)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(i){let s=(0,Tt.default)(this.globalOptions,i);s.editable&&(s.resizeableCircleMarker=s.editable,delete s.editable);let o=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!s.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),o=!0);let h=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!s.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),h=!0),this.map.pm.Draw.shapes.forEach(c=>{this.map.pm.Draw[c].setOptions(s)}),o&&this.map.pm.Draw.CircleMarker.enable(),h&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(c=>{c.pm.setOptions(s)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=s,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(i=>{i.pm.enabled()&&i.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(i){return this.Draw.Cut.enable(i)},toggleGlobalCutMode(i){return this.Draw.Cut.toggle(i)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(i=!1){let s=L.PM.Utils.findLayers(this.map);if(!i)return s;let o=L.featureGroup();return o._pmTempLayer=!0,s.forEach(h=>{o.addLayer(h)}),o},getGeomanDrawLayers(i=!1){let s=L.PM.Utils.findLayers(this.map).filter(h=>h._drawnByGeoman===!0);if(!i)return s;let o=L.featureGroup();return o._pmTempLayer=!0,s.forEach(h=>{o.addLayer(h)}),o},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(i){this._touchEventCounter===0&&(L.DomEvent.on(i,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(i,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(i){this._touchEventCounter===1&&(L.DomEvent.off(i,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(i,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(i){Ae(this.map)._onMouseMove(this._createMouseEvent("mousemove",i))},_canvasTouchClick(i){let s="";i.type==="touchstart"||i.type==="pointerdown"?s="mousedown":(i.type==="touchend"||i.type==="pointerup"||i.type==="touchcancel"||i.type==="pointercancel")&&(s="mouseup"),s&&Ae(this.map)._onClick(this._createMouseEvent(s,i))},_createMouseEvent(i,s){let o,h=s.touches[0]||s.changedTouches[0];try{o=new MouseEvent(i,{bubbles:s.bubbles,cancelable:s.cancelable,view:s.view,detail:h.detail,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY,ctrlKey:s.ctrlKey,altKey:s.altKey,shiftKey:s.shiftKey,metaKey:s.metaKey,button:s.button,relatedTarget:s.relatedTarget})}catch{o=document.createEvent("MouseEvents"),o.initMouseEvent(i,s.bubbles,s.cancelable,s.view,h.detail,h.screenX,h.screenY,h.clientX,h.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget)}return o}}),or=Io,mi=L.Control.extend({includes:[Gn],options:{position:"topleft",disableByOtherButtons:!0},initialize(i){this._button=L.Util.extend({},this.options,i)},onAdd(i){return this._map=i,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):this._button.tool==="edit"?this._container=this._map.pm.Toolbar.editContainer:this._button.tool==="options"?this._container=this._map.pm.Toolbar.optionsContainer:this._button.tool==="custom"?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let i=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),i?i.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(i){return typeof i=="boolean"?this._button.toggleStatus=i:this._button.toggleStatus=!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(i){i&&i.preventDefault(),!this._button.disabled&&(this._button.onClick(i,{button:this,event:i}),this._clicked(i),this._button.afterClick(i,{button:this,event:i}))},_makeButton(i){let s=this.options.position.indexOf("right")>-1?"pos-right":"",o=L.DomUtil.create("div",`button-container ${s}`,this._container);i.title&&o.setAttribute("title",i.title);let h=L.DomUtil.create("a","leaflet-buttons-control-button",o);h.setAttribute("role","button"),h.setAttribute("tabindex","0"),h.href="#";let c=L.DomUtil.create("div",`leaflet-pm-actions-container ${s}`,o),m=i.actions,y={cancel:{text:St("actions.cancel"),title:St("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:St("actions.finish"),title:St("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:St("actions.removeLastVertex"),title:St("actions.removeLastVertex"),onClick(){this._map.pm.Draw[i.jsClass]._removeLastVertex()}},finish:{text:St("actions.finish"),title:St("actions.finish"),onClick(b){this._map.pm.Draw[i.jsClass]._finishShape(b)}}};i._preparedActions=m.map(b=>{let P=typeof b=="string"?b:b.name,N;if(y[P])N=y[P];else if(b.text)N=b;else return N;let F=L.DomUtil.create("a",`leaflet-pm-action ${s} action-${P}`,c);if(F.setAttribute("role","button"),F.setAttribute("tabindex","0"),F.href="#",N.title&&(F.title=N.title),F.innerHTML=N.text,L.DomEvent.disableClickPropagation(F),L.DomEvent.on(F,"click",L.DomEvent.stop),N._node=F,!i.disabled&&N.onClick){let tt=it=>{it.preventDefault();let lt="",{buttons:ft}=this._map.pm.Toolbar;for(let At in ft)if(ft[At]._button===i){lt=At;break}this._fireActionClick(N,lt,i)};L.DomEvent.addListener(F,"click",tt,this),L.DomEvent.addListener(F,"click",N.onClick,this),L.DomEvent.addListener(F,"click",()=>this._updateActiveAction(i))}return N}),this._updateActiveAction(i),i.toggleStatus&&L.DomUtil.addClass(o,"active");let A=L.DomUtil.create("div","control-icon",h);return i.iconUrl&&A.setAttribute("src",i.iconUrl),i.className&&L.DomUtil.addClass(A,i.className),L.DomEvent.disableClickPropagation(h),L.DomEvent.on(h,"click",L.DomEvent.stop),i.disabled||(L.DomEvent.addListener(h,"click",this._onBtnClick,this),L.DomEvent.addListener(h,"click",this._triggerClick,this)),i.disabled&&(L.DomUtil.addClass(h,"pm-disabled"),h.setAttribute("aria-disabled","true")),o},_applyStyleClasses(){this._container&&(!this._button.toggleStatus||this._button.cssToggle===!1?(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")):(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let i="",{buttons:s}=this._map.pm.Toolbar;for(let o in s)if(s[o]._button===this._button){i=o;break}this._fireButtonClick(i,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let i="pm-disabled",s=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(s,i),s.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(s,i),s.setAttribute("aria-disabled","false"))},_updateActiveAction(i){var s;(s=i._preparedActions)==null||s.forEach(o=>{o!=null&&o._node&&(o.isActive&&o.isActive.call(this)?L.DomUtil.addClass(o._node,"active-action"):L.DomUtil.removeClass(o._node,"active-action"))})}}),hr=mi;L.Control.PMButton=hr;var lr=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(i){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(i)},reinit(){let i=this.isVisible;this.removeControls(),this._defineButtons(),i&&this.addControls()},init(i){this.map=i,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(i){let s=`${i}Container`;return this[s]||(this[s]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${i} leaflet-bar leaflet-control`)),this[s]},getButtons(){return this.buttons},addControls(i=this.options){typeof i.editPolygon<"u"&&(i.editMode=i.editPolygon),typeof i.deleteLayer<"u"&&(i.removalMode=i.deleteLayer),L.Util.setOptions(this,i),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let i=this.getButtons(),s={geomanIcons:{drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"}};for(let o in i){let h=i[o];L.Util.setOptions(h,{className:s.geomanIcons[o]})}},removeControls(){let i=this.getButtons();for(let s in i)i[s].remove();this.isVisible=!1},toggleControls(i=this.options){this.isVisible?this.removeControls():this.addControls(i)},_addButton(i,s){return this.buttons[i]=s,this.options[i]=!!this.options[i]||!1,this.buttons[i]},triggerClickOnToggledButtons(i){for(let s in this.buttons){let o=this.buttons[s];o._button.disableByOtherButtons&&o!==i&&o.toggled()&&o._triggerClick()}},toggleButton(i,s,o=!0){i==="editPolygon"&&(i="editMode"),i==="deleteLayer"&&(i="removalMode");let h=i;return o&&this.triggerClickOnToggledButtons(this.buttons[h]),this.buttons[h]?this.buttons[h].toggle(s):!1},_defineButtons(){let i={className:"control-icon leaflet-pm-icon-marker",title:St("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:St("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},o={className:"control-icon leaflet-pm-icon-polyline",title:St("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},h={title:St("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},c={title:St("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},m={title:St("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},y={title:St("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},A={title:St("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},b={title:St("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},P={title:St("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},N={title:St("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},F={className:"control-icon leaflet-pm-icon-text",title:St("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(i)),this._addButton("drawPolyline",new L.Control.PMButton(o)),this._addButton("drawRectangle",new L.Control.PMButton(m)),this._addButton("drawPolygon",new L.Control.PMButton(s)),this._addButton("drawCircle",new L.Control.PMButton(h)),this._addButton("drawCircleMarker",new L.Control.PMButton(c)),this._addButton("drawText",new L.Control.PMButton(F)),this._addButton("editMode",new L.Control.PMButton(y)),this._addButton("dragMode",new L.Control.PMButton(A)),this._addButton("cutPolygon",new L.Control.PMButton(b)),this._addButton("removalMode",new L.Control.PMButton(P)),this._addButton("rotateMode",new L.Control.PMButton(N))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let i=this.getButtons(),s=[];this.options.drawControls===!1&&(s=s.concat(Object.keys(i).filter(o=>!i[o]._button.tool))),this.options.editControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="edit"))),this.options.optionsControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="options"))),this.options.customControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="custom")));for(let o in i)if(this.options[o]&&s.indexOf(o)===-1){let h=i[o]._button.tool;h||(h="draw"),i[o].setPosition(this._getBtnPosition(h)),i[o].addTo(this.map)}},_getBtnPosition(i){return this.options.positions&&this.options.positions[i]?this.options.positions[i]:this.options.position},setBlockPosition(i,s){this.options.positions[i]=s,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(i,s){if(s)typeof s!="object"&&(s={name:s});else throw new TypeError("Button has no name");let o=this._btnNameMapping(i);if(!s.name)throw new TypeError("Button has no name");if(this.buttons[s.name])throw new TypeError("Button with this name already exists");let h=this.map.pm.Draw.createNewDrawInstance(s.name,o);s={...this.buttons[o]._button,...s};let c=this.createCustomControl(s);return{drawInstance:h,control:c}},createCustomControl(i){if(!i.name)throw new TypeError("Button has no name");if(this.buttons[i.name])throw new TypeError("Button with this name already exists");i.onClick||(i.onClick=()=>{}),i.afterClick||(i.afterClick=()=>{}),i.toggle!==!1&&(i.toggle=!0),i.block&&(i.block=i.block.toLowerCase()),(!i.block||i.block==="draw")&&(i.block=""),i.className?i.className.indexOf("control-icon")===-1&&(i.className=`control-icon ${i.className}`):i.className="control-icon";let s={tool:i.block,className:i.className,title:i.title||"",jsClass:i.name,onClick:i.onClick,afterClick:i.afterClick,doToggle:i.toggle,toggleStatus:!1,disableOtherButtons:i.disableOtherButtons??!0,disableByOtherButtons:i.disableByOtherButtons??!0,cssToggle:i.toggle,position:this.options.position,actions:i.actions||[],disabled:!!i.disabled};this.options[i.name]!==!1&&(this.options[i.name]=!0);let o=this._addButton(i.name,new L.Control.PMButton(s));return this.changeControlOrder(),o},controlExists(i){return!!this.getButton(i)},getButton(i){return this.getButtons()[i]},getButtonsInBlock(i){let s={};if(i)for(let o in this.getButtons()){let h=this.getButtons()[o];(h._button.tool===i||i==="draw"&&!h._button.tool)&&(s[o]=h)}return s},changeControlOrder(i=[]){let s=this._shapeMapping(),o=[];i.forEach(m=>{s[m]?o.push(s[m]):o.push(m)});let h=this.getButtons(),c={};o.forEach(m=>{h[m]&&(c[m]=h[m])}),Object.keys(h).filter(m=>!h[m]._button.tool||h[m]._button.tool==="draw").forEach(m=>{o.indexOf(m)===-1&&(c[m]=h[m])}),Object.keys(h).filter(m=>h[m]._button.tool==="edit").forEach(m=>{o.indexOf(m)===-1&&(c[m]=h[m])}),Object.keys(h).filter(m=>h[m]._button.tool==="options").forEach(m=>{o.indexOf(m)===-1&&(c[m]=h[m])}),Object.keys(h).filter(m=>h[m]._button.tool==="custom").forEach(m=>{o.indexOf(m)===-1&&(c[m]=h[m])}),Object.keys(h).forEach(m=>{o.indexOf(m)===-1&&(c[m]=h[m])}),this.map.pm.Toolbar.buttons=c,this._showHideButtons()},getControlOrder(){let i=this.getButtons(),s=[];for(let o in i)s.push(o);return s},changeActionsOfControl(i,s){let o=this._btnNameMapping(i);if(!o)throw new TypeError("No name passed");if(!s)throw new TypeError("No actions passed");if(!this.buttons[o])throw new TypeError("Button with this name not exists");this.buttons[o]._button.actions=s,this.changeControlOrder()},setButtonDisabled(i,s){let o=this._btnNameMapping(i);s?this.buttons[o].disable():this.buttons[o].enable()},_shapeMapping(){return{Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}},_btnNameMapping(i){let s=this._shapeMapping();return s[i]?s[i]:i}}),Ys=lr,Ro=M(Tn()),ur={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(i){i.forEach(s=>{if(Array.isArray(s)){this._assignEvents(s);return}s.off("drag",this._handleSnapping,this),s.on("drag",this._handleSnapping,this),s.off("dragend",this._cleanupSnapping,this),s.on("dragend",this._cleanupSnapping,this)})},_cleanupSnapping(i){if(i){let s=i.target;s._snapped=!1}delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(s=>{s.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(i){var A,b,P;let s=i.target;if(s._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),((A=i==null?void 0:i.originalEvent)==null?void 0:A.altKey)||((P=(b=this._map)==null?void 0:b.pm)==null?void 0:P.Keyboard.isAltKeyPressed())||(this._snapList===void 0&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),this._snapList.length<=0))return!1;let o=this._calcClosestLayer(s.getLatLng(),this._snapList);if(Object.keys(o).length===0)return!1;let h=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment,c;h?c=o.latlng:c=this._checkPrioritiySnapping(o);let m=this.options.snapDistance,y={marker:s,shape:this._shape,snapLatLng:c,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(y.marker,y),this._fireSnapDrag(this._layer,y),o.distance<m){s._orgLatLng=s.getLatLng(),s.setLatLng(c),s._snapped=!0,s._snapInfo=y;let N=()=>{this._snapLatLng=c,this._fireSnap(s,y),this._fireSnap(this._layer,y)},F=this._snapLatLng||{},tt=c||{};(F.lat!==tt.lat||F.lng!==tt.lng)&&N()}else this._snapLatLng&&(this._unsnap(y),s._snapped=!1,s._snapInfo=void 0,this._fireUnsnap(y.marker,y),this._fireUnsnap(this._layer,y));return!0},_createSnapList(){let i=[],s=[],o=this._map;o.off("layerremove",this._handleSnapLayerRemoval,this),o.on("layerremove",this._handleSnapLayerRemoval,this),o.eachLayer(h=>{if((h instanceof L.Polyline||h instanceof L.Marker||h instanceof L.CircleMarker||h instanceof L.ImageOverlay)&&h.options.snapIgnore!==!0){if(h.options.snapIgnore===void 0&&(!L.PM.optIn&&h.options.pmIgnore===!0||L.PM.optIn&&h.options.pmIgnore!==!1))return;(h instanceof L.Circle||h instanceof L.CircleMarker)&&h.pm&&h.pm._hiddenPolyCircle?i.push(h.pm._hiddenPolyCircle):h instanceof L.ImageOverlay&&(h=L.rectangle(h.getBounds())),i.push(h);let c=L.polyline([],{color:"red",pmIgnore:!0});c._pmTempLayer=!0,s.push(c),(h instanceof L.Circle||h instanceof L.CircleMarker)&&s.push(c)}}),i=i.filter(h=>this._layer!==h),i=i.filter(h=>h._latlng||h._latlngs&&Pi(h._latlngs)),i=i.filter(h=>!h._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let h=L.polyline([],{color:"red",pmIgnore:!0});h._pmTempLayer=!0,s.push(h)}),this._snapList=i.concat(this._otherSnapLayers)):this._snapList=i,this.debugIndicatorLines=s},_handleSnapLayerRemoval({layer:i}){if(!i._leaflet_id)return;let s=this._snapList.findIndex(o=>o._leaflet_id===i._leaflet_id);s>-1&&this._snapList.splice(s,1)},_calcClosestLayer(i,s){return this._calcClosestLayers(i,s,1)[0]},_calcClosestLayers(i,s,o=1){let h=[],c={};s.forEach((y,A)=>{var P;if(y._parentCopy&&y._parentCopy===this._layer||((P=y.getLatLngs)==null?void 0:P.call(y).flat(5).length)<2)return;let b=this._calcLayerDistances(i,y);if(b.distance=Math.floor(b.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[A]){let N=L.polyline([],{color:"red",pmIgnore:!0});N._pmTempLayer=!0,this.debugIndicatorLines[A]=N}this.debugIndicatorLines[A].setLatLngs([i,b.latlng])}o===1&&(c.distance===void 0||b.distance-5<=c.distance)?(b.distance+5<c.distance&&(h=[]),c=b,c.layer=y,h.push(c)):o!==1&&(c={},c=b,c.layer=y,h.push(c))}),o!==1&&(h=h.sort((y,A)=>y.distance-A.distance)),o===-1&&(o=h.length);let m=this._getClosestLayerByPriority(h,o);return L.Util.isArray(m)?m:[m]},_calcLayerDistances(i,s){let o=this._map,h=s instanceof L.Marker||s instanceof L.CircleMarker,c=s instanceof L.Polygon,m=i;if(h){let y=s.getLatLng();return{latlng:{...y},distance:this._getDistance(o,y,m)}}return this._calcLatLngDistances(m,s.getLatLngs(),o,c)},_calcLatLngDistances(i,s,o,h=!1){let c,m,y,A=b=>{b.forEach((P,N)=>{if(Array.isArray(P)){A(P);return}if(this.options.snapSegment){let F=P,tt;h?tt=N+1===b.length?0:N+1:tt=N+1===b.length?void 0:N+1;let it=b[tt];if(it){let lt=this._getDistanceToSegment(o,i,F,it);(m===void 0||lt<m)&&(m=lt,y=[F,it])}}else{let F=this._getDistance(o,i,P);(m===void 0||F<m)&&(m=F,c=P)}})};return A(s),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(o,i,y[0],y[1])},segment:y,distance:m}:{latlng:c,distance:m}},_getClosestLayerByPriority(i,s=1){i=i.sort((y,A)=>y._leaflet_id-A._leaflet_id);let o=["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],h=this._map.pm.globalOptions.snappingOrder||[],c=0,m={};return h.concat(o).forEach(y=>{m[y]||(c+=1,m[y]=c)}),i.sort(Oo("instanceofShape",m)),s===1?i[0]||{}:i.slice(0,s)},_checkPrioritiySnapping(i){let s=this._map,o=i.segment[0],h=i.segment[1],c=i.latlng,m=c;if(this.options.snapVertex){let y=this._getDistance(s,o,c),A=this._getDistance(s,h,c),b=y<A?o:h,P=y<A?y:A;if(this.options.snapMiddle){let F=L.PM.Utils.calcMiddleLatLng(s,o,h),tt=this._getDistance(s,F,c);tt<y&&tt<A&&(b=F,P=tt)}let N=this.options.snapDistance;P<N&&(m=b)}return{...m}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(i,s,o,h){let c=i.getMaxZoom();c===1/0&&(c=i.getZoom());let m=i.project(s,c),y=i.project(o,c),A=i.project(h,c),b=L.LineUtil.closestPointOnSegment(m,y,A);return i.unproject(b,c)},_getDistanceToSegment(i,s,o,h){let c=i.latLngToContainerPoint(s),m=i.latLngToContainerPoint(o),y=i.latLngToContainerPoint(h);return L.LineUtil.pointToSegmentDistance(c,m,y)},_getDistance(i,s,o){return i.latLngToContainerPoint(s).distanceTo(i.latLngToContainerPoint(o))}},Js=ur,Fo=L.Class.extend({includes:[Js,Gn],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(i){L.Util.setOptions(this,i),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(i){let s=new L.Icon.Default;s.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=s,this._map=i,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(o=>{this[o]=new L.PM.Draw[o](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(i,s=!1){s?this.options.pathOptions=(0,Ro.default)(this.options.pathOptions,i):this.options.pathOptions=i},getShapes(){return this.shapes},getShape(){return this._shape},enable(i,s){if(!i)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[i].enable(s)},disable(){this.shapes.forEach(i=>{this[i].disable()})},addControls(){this.shapes.forEach(i=>{this[i].addButton()})},getActiveShape(){let i;return this.shapes.forEach(s=>{this[s]._enabled&&(i=s)}),i},_setGlobalDrawMode(){this._shape==="Cut"?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let i=[];this._map.eachLayer(s=>{(s instanceof L.Polyline||s instanceof L.Marker||s instanceof L.Circle||s instanceof L.CircleMarker||s instanceof L.ImageOverlay)&&(s._pmTempLayer||i.push(s))}),this._enabled?i.forEach(s=>{L.PM.Utils.disablePopup(s)}):i.forEach(s=>{L.PM.Utils.enablePopup(s)})},createNewDrawInstance(i,s){let o=this._getShapeFromBtnName(s);if(this[i])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[o])throw new TypeError(`There is no class L.PM.Draw.${o}`);return this[i]=new L.PM.Draw[o](this._map),this[i].toolbarButtonName=i,this[i]._shape=i,this.shapes.push(i),this[s]&&this[i].setOptions(this[s].options),this[i].setOptions(this[i].options),this[i]},_getShapeFromBtnName(i){let s={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return s[i]?s[i]:this[i]?this[i]._shape:i},_finishLayer(i){i.pm&&(i.pm.setOptions(this.options),i.pm._shape=this._shape,i.pm._map=this._map),this._addDrawnLayerProp(i)},_addDrawnLayerProp(i){i._drawnByGeoman=!0},_setPane(i,s){s==="layerPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":s==="vertexPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":s==="markerPane"&&(i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return(this._map||this._layer._map).pm.getGeomanLayers().length===0}}),de=Fo;de.Marker=de.extend({initialize(i){this._map=i,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer(s=>{this.isRelevantMarker(s)&&s.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this),this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},isRelevantMarker(i){return i instanceof L.Marker&&i.pm&&!i._pmTempLayer&&!i.pm._initTextMarker},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let s=i;s.target=this._hintMarker,this._handleSnapping(s)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(i){if(!i.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=new L.Marker(s,this.options.markerStyle);this._setPane(o,"markerPane"),this._finishLayer(o),o.pm||(o.options.draggable=!1),o.addTo(this._map.pm._getContainingLayer()),o.pm&&this.options.markerEditable?o.pm.enable():o.dragging&&o.dragging.disable(),this._fireCreate(o),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){var i,s;(i=this.options.markerStyle)!=null&&i.icon&&((s=this._hintMarker)==null||s.setIcon(this.options.markerStyle.icon))}});var _e=63710088e-1,cr={centimeters:_e*100,centimetres:_e*100,degrees:_e/111325,feet:_e*3.28084,inches:_e*39.37,kilometers:_e/1e3,kilometres:_e/1e3,meters:_e,metres:_e,miles:_e/1609.344,millimeters:_e*1e3,millimetres:_e*1e3,nauticalmiles:_e/1852,radians:1,yards:_e*1.0936};function ki(i,s,o){o===void 0&&(o={});var h={type:"Feature"};return(o.id===0||o.id)&&(h.id=o.id),o.bbox&&(h.bbox=o.bbox),h.properties=s||{},h.geometry=i,h}function Si(i,s,o){if(o===void 0&&(o={}),!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Qs(i[0])||!Qs(i[1]))throw new Error("coordinates must contain numbers");var h={type:"Point",coordinates:i};return ki(h,s,o)}function gi(i,s,o){if(o===void 0&&(o={}),i.length<2)throw new Error("coordinates must be an array of two or more positions");var h={type:"LineString",coordinates:i};return ki(h,s,o)}function Ee(i,s){s===void 0&&(s={});var o={type:"FeatureCollection"};return s.id&&(o.id=s.id),s.bbox&&(o.bbox=s.bbox),o.features=i,o}function Go(i,s){s===void 0&&(s="kilometers");var o=cr[s];if(!o)throw new Error(s+" units is invalid");return i*o}function cn(i,s){s===void 0&&(s="kilometers");var o=cr[s];if(!o)throw new Error(s+" units is invalid");return i/o}function Pe(i){var s=i%(2*Math.PI);return s*180/Math.PI}function Ue(i){var s=i%360;return s*Math.PI/180}function Qs(i){return!isNaN(i)&&i!==null&&!Array.isArray(i)}function jn(i){var s,o,h={type:"FeatureCollection",features:[]};if(i.type==="Feature"?o=i.geometry:o=i,o.type==="LineString")s=[o.coordinates];else if(o.type==="MultiLineString")s=o.coordinates;else if(o.type==="MultiPolygon")s=[].concat.apply([],o.coordinates);else if(o.type==="Polygon")s=o.coordinates;else throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return s.forEach(function(c){s.forEach(function(m){for(var y=0;y<c.length-1;y++)for(var A=y;A<m.length-1;A++)if(!(c===m&&(Math.abs(y-A)===1||y===0&&A===c.length-2&&c[y][0]===c[c.length-1][0]&&c[y][1]===c[c.length-1][1]))){var b=ta(c[y][0],c[y][1],c[y+1][0],c[y+1][1],m[A][0],m[A][1],m[A+1][0],m[A+1][1]);b&&h.features.push(Si([b[0],b[1]]))}})}),h}function ta(i,s,o,h,c,m,y,A){var b,P,N,F,tt,it={x:null,y:null,onLine1:!1,onLine2:!1};return b=(A-m)*(o-i)-(y-c)*(h-s),b===0?it.x!==null&&it.y!==null?it:!1:(P=s-m,N=i-c,F=(y-c)*P-(A-m)*N,tt=(o-i)*P-(h-s)*N,P=F/b,N=tt/b,it.x=i+P*(o-i),it.y=s+P*(h-s),P>=0&&P<=1&&(it.onLine1=!0),N>=0&&N<=1&&(it.onLine2=!0),it.onLine1&&it.onLine2?[it.x,it.y]:!1)}de.Line=de.extend({initialize(i){this._map=i,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&this.options.finishOn!=="snap"&&this._map.on(this.options.finishOn,this._finishShape,this),this.options.finishOn==="dblclick"&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&this.options.finishOn!=="snap"&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_syncHintLine(){let i=this._layer.getLatLngs();if(i.length>0){let s=i[i.length-1];this._hintline.setLatLngs([s,this._hintMarker.getLatLng()])}},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let s=this._layer._defaultShape().slice();s.push(this._hintMarker.getLatLng()),this._change(s)},hasSelfIntersection(){return jn(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(i,s){let o=L.polyline(this._layer.getLatLngs());i&&(s||(s=this._hintMarker.getLatLng()),o.addLatLng(s));let h=jn(o.toGeoJSON(15));this._doesSelfIntersect=h.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(h,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(i){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,i.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=this._layer.getLatLngs(),h=o[o.length-1];if(s.equals(o[0])||o.length>0&&s.equals(h)){this._finishShape();return}this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:s,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(s);let c=this._createMarker(s);this._setTooltipText(),this._setHintLineAfterNewVertex(s),this._fireVertexAdded(c,void 0,s,"Draw"),this._change(this._layer.getLatLngs()),this.options.finishOn==="snap"&&this._hintMarker._snapped&&this._finishShape(i)},_setHintLineAfterNewVertex(i){this._hintline.setLatLngs([i,i])},_removeLastVertex(){let i=this._markers;if(i.length<=1){this.disable();return}let s=this._layer.getLatLngs(),o=i[i.length-1],{indexPath:h}=L.PM.Utils.findDeepMarkerIndex(i,o);i.pop(),this._layerGroup.removeLayer(o);let c=i[i.length-1],m=s.indexOf(c.getLatLng());s=s.slice(0,m+1),this._layer.setLatLngs(s),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(o,h,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=1)return;let s=L.polyline(i,this.options.pathOptions);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),this._fireCreate(s),this.options.snappable&&this._cleanupSnapping();let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_createMarker(i){let s=new L.Marker(i,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this._layerGroup.addLayer(s),this._markers.push(s),s.on("click",this._finishShape,this),s},_setTooltipText(){let{length:i}=this._layer.getLatLngs().flat(),s="";i<=1?s=St("tooltips.continueLine"):s=St("tooltips.finishLine"),this._hintMarker.setTooltipContent(s)},_change(i){this._fireChange(i,"Draw")},setStyle(){var i,s;(i=this._layer)==null||i.setStyle(this.options.templineStyle),(s=this._hintline)==null||s.setStyle(this.options.hintlineStyle)}}),de.Polygon=de.Line.extend({initialize(i){this._map=i,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(i){L.PM.Draw.Line.prototype.enable.call(this,i),this._layer.pm._shape="Polygon"},_createMarker(i){let s=new L.Marker(i,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this._layerGroup.addLayer(s),this._markers.push(s),this._layer.getLatLngs().flat().length===1?(s.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(s)-1,this.options.snappable&&this._cleanupSnapping()):s.on("click",()=>1),s},_setTooltipText(){let{length:i}=this._layer.getLatLngs().flat(),s="";i<=2?s=St("tooltips.continueLine"):s=St("tooltips.finishPoly"),this._hintMarker.setTooltipContent(s)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=2)return;let s=L.polygon(i,this.options.pathOptions);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),this._fireCreate(s),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))}}),de.Rectangle=de.extend({initialize(i){this._map=i,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(i){if(L.Util.setOptions(this,i),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:this.options.cursorMarker?1:0}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let s=0;s<2;s+=1){let o=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(o,"vertexPane"),o._pmTempLayer=!0,this._layerGroup.addLayer(o),this._styleMarkers.push(o)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_placeStartingMarkers(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(s),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(o=>{L.DomUtil.addClass(o._icon,"visible"),o.setLatLng(s)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(St("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let i=this._startMarker.getLatLng();i&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([i,i]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}let s=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(s,"Draw")},_syncRectangleSize(){let i=rr(this._startMarker.getLatLng(),this._map),s=rr(this._hintMarker.getLatLng(),this._map),o=L.PM.Utils._getRotatedRectangle(i,s,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(o),this.options.cursorMarker&&this._styleMarkers){let h=[];o.forEach(c=>{!c.equals(i,1e-8)&&!c.equals(s,1e-8)&&h.push(c)}),h.forEach((c,m)=>{try{this._styleMarkers[m].setLatLng(c)}catch{}})}},_findCorners(){let i=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(i[0],i[2],this.options.rectangleAngle||0,this._map)},_finishShape(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||o.equals(s))return;let h=L.rectangle([o,s],this.options.pathOptions);if(this.options.rectangleAngle){let m=L.PM.Utils._getRotatedRectangle(o,s,this.options.rectangleAngle||0,this._map);h.setLatLngs(m),h.pm&&h.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(h,"layerPane"),this._finishLayer(h),h.addTo(this._map.pm._getContainingLayer()),this._fireCreate(h);let c=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(c))},setStyle(){var i;(i=this._layer)==null||i.setStyle(this.options.pathOptions)}}),de.CircleMarker=de.extend({initialize(i){this._map=i,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(i){if(L.Util.setOptions(this,i),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let s={};L.extend(s,this.options.templineStyle),s.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),s),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.disable()})},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_placeCenterMarker(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let s=this._hintMarker.getLatLng();this._centerMarker.setLatLng(s),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let i=this._centerMarker.getLatLng();i&&(this._layer.setLatLng(i),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(St("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let i=this._centerMarker.getLatLng(),s=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([i,s])},_syncCircleRadius(){let i=this._centerMarker.getLatLng(),s=this._hintMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(o)},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}this._handleHintMarkerSnapping();let s=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(s,"Draw")},isRelevantMarker(i){return i instanceof L.CircleMarker&&!(i instanceof L.Circle)&&i.pm&&!i._pmTempLayer},_createMarker(i){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!i.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=new this._BaseCircleClass(s,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(o,"layerPane"),this._finishLayer(o),o.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(o),this._fireCreate(o),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(i){i.pm&&this.options.markerEditable&&i.pm.enable()},_finishShape(i){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._centerMarker.getLatLng(),o=this._defaultRadius;if(this.options[this._editableOption]){let y=this._hintMarker.getLatLng();o=this._distanceCalculation(s,y),this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?o=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(o=this.options[this._maxRadiusOption])}let h={...this.options.pathOptions,radius:o},c=new this._BaseCircleClass(s,h);this._setPane(c,"layerPane"),this._finishLayer(c),c.addTo(this._map.pm._getContainingLayer()),c.pm&&c.pm._updateHiddenPolyCircle(),this._fireCreate(c);let m=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(m))},_getNewDestinationOfHintMarker(){let i=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return i;let s=this._centerMarker.getLatLng(),o=this._distanceCalculation(s,i);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?i=Un(this._map,s,i,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(i=Un(this._map,s,i,this._getMaxDistanceInMeter()))}return i},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let i=this._centerMarker.getLatLng(),s=this._hintMarker.getLatLng(),o=this._distanceCalculation(i,s);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._hintMarker.setLatLng(this._hintMarker._orgLatLng):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){var s,o;let i={};L.extend(i,this.options.templineStyle),this.options[this._editableOption]&&(i.radius=0),(s=this._layer)==null||s.setStyle(i),(o=this._hintline)==null||o.setStyle(this.options.hintlineStyle)},_distanceCalculation(i,s){return this._map.project(i).distanceTo(this._map.project(s))}}),de.Circle=de.CircleMarker.extend({initialize(i){this._map=i,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(i,s){return this._map.distance(i,s)}});function je(i){if(!i)throw new Error("coord is required");if(!Array.isArray(i)){if(i.type==="Feature"&&i.geometry!==null&&i.geometry.type==="Point")return i.geometry.coordinates;if(i.type==="Point")return i.coordinates}if(Array.isArray(i)&&i.length>=2&&!Array.isArray(i[0])&&!Array.isArray(i[1]))return i;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function We(i){if(Array.isArray(i))return i;if(i.type==="Feature"){if(i.geometry!==null)return i.geometry.coordinates}else if(i.coordinates)return i.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Zn(i){return i.type==="Feature"?i.geometry:i}function ea(i,s){return i.type==="FeatureCollection"?"FeatureCollection":i.type==="GeometryCollection"?"GeometryCollection":i.type==="Feature"&&i.geometry!==null?i.geometry.type:i.type}function ia(i,s,o){if(i!==null)for(var h,c,m,y,A,b,P,N=0,F=0,tt,it=i.type,lt=it==="FeatureCollection",ft=it==="Feature",At=lt?i.features.length:1,Gt=0;Gt<At;Gt++){P=lt?i.features[Gt].geometry:ft?i.geometry:i,tt=P?P.type==="GeometryCollection":!1,A=tt?P.geometries.length:1;for(var z=0;z<A;z++){var q=0,K=0;if(y=tt?P.geometries[z]:P,y!==null){b=y.coordinates;var nt=y.type;switch(N=0,nt){case null:break;case"Point":if(s(b,F,Gt,q,K)===!1)return!1;F++,q++;break;case"LineString":case"MultiPoint":for(h=0;h<b.length;h++){if(s(b[h],F,Gt,q,K)===!1)return!1;F++,nt==="MultiPoint"&&q++}nt==="LineString"&&q++;break;case"Polygon":case"MultiLineString":for(h=0;h<b.length;h++){for(c=0;c<b[h].length-N;c++){if(s(b[h][c],F,Gt,q,K)===!1)return!1;F++}nt==="MultiLineString"&&q++,nt==="Polygon"&&K++}nt==="Polygon"&&q++;break;case"MultiPolygon":for(h=0;h<b.length;h++){for(K=0,c=0;c<b[h].length;c++){for(m=0;m<b[h][c].length-N;m++){if(s(b[h][c][m],F,Gt,q,K)===!1)return!1;F++}K++}q++}break;case"GeometryCollection":for(h=0;h<y.geometries.length;h++)if(ia(y.geometries[h],s)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ve(i,s){if(i.type==="Feature")s(i,0);else if(i.type==="FeatureCollection")for(var o=0;o<i.features.length&&s(i.features[o],o)!==!1;o++);}function qi(i,s,o){var h=o;return ve(i,function(c,m){m===0&&o===void 0?h=c:h=s(h,c,m)}),h}function zo(i,s){var o,h,c,m,y,A,b,P,N,F,tt=0,it=i.type==="FeatureCollection",lt=i.type==="Feature",ft=it?i.features.length:1;for(o=0;o<ft;o++){for(A=it?i.features[o].geometry:lt?i.geometry:i,P=it?i.features[o].properties:lt?i.properties:{},N=it?i.features[o].bbox:lt?i.bbox:void 0,F=it?i.features[o].id:lt?i.id:void 0,b=A?A.type==="GeometryCollection":!1,y=b?A.geometries.length:1,c=0;c<y;c++){if(m=b?A.geometries[c]:A,m===null){if(s(null,tt,P,N,F)===!1)return!1;continue}switch(m.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(s(m,tt,P,N,F)===!1)return!1;break}case"GeometryCollection":{for(h=0;h<m.geometries.length;h++)if(s(m.geometries[h],tt,P,N,F)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}tt++}}function qe(i,s){zo(i,function(o,h,c,m,y){var A=o===null?null:o.type;switch(A){case null:case"Point":case"LineString":case"Polygon":return s(ki(o,c,{bbox:m,id:y}),h,0)===!1?!1:void 0}var b;switch(A){case"MultiPoint":b="Point";break;case"MultiLineString":b="LineString";break;case"MultiPolygon":b="Polygon";break}for(var P=0;P<o.coordinates.length;P++){var N=o.coordinates[P],F={type:b,coordinates:N};if(s(ki(F,c),h,P)===!1)return!1}})}function No(i){if(!i)throw new Error("geojson is required");var s=[];return qe(i,function(o){Hi(o,s)}),Ee(s)}function Hi(i,s){var o=[],h=i.geometry;if(h!==null){switch(h.type){case"Polygon":o=We(h);break;case"LineString":o=[We(h)]}o.forEach(function(c){var m=Uo(c,i.properties);m.forEach(function(y){y.id=s.length,s.push(y)})})}}function Uo(i,s){var o=[];return i.reduce(function(h,c){var m=gi([h,c],s);return m.bbox=dn(h,c),o.push(m),c}),o}function dn(i,s){var o=i[0],h=i[1],c=s[0],m=s[1],y=o<c?o:c,A=h<m?h:m,b=o>c?o:c,P=h>m?h:m;return[y,A,b,P]}var qn=No,Hn=M(Li(),1);function jo(i,s){var o={},h=[];if(i.type==="LineString"&&(i=ki(i)),s.type==="LineString"&&(s=ki(s)),i.type==="Feature"&&s.type==="Feature"&&i.geometry!==null&&s.geometry!==null&&i.geometry.type==="LineString"&&s.geometry.type==="LineString"&&i.geometry.coordinates.length===2&&s.geometry.coordinates.length===2){var c=ai(i,s);return c&&h.push(c),Ee(h)}var m=(0,Hn.default)();return m.load(qn(s)),ve(qn(i),function(y){ve(m.search(y),function(A){var b=ai(y,A);if(b){var P=We(b).join(",");o[P]||(o[P]=!0,h.push(b))}})}),Ee(h)}function ai(i,s){var o=We(i),h=We(s);if(o.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(h.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var c=o[0][0],m=o[0][1],y=o[1][0],A=o[1][1],b=h[0][0],P=h[0][1],N=h[1][0],F=h[1][1],tt=(F-P)*(y-c)-(N-b)*(A-m),it=(N-b)*(m-P)-(F-P)*(c-b),lt=(y-c)*(m-P)-(A-m)*(c-b);if(tt===0)return null;var ft=it/tt,At=lt/tt;if(ft>=0&&ft<=1&&At>=0&&At<=1){var Gt=c+ft*(y-c),z=m+ft*(A-m);return Si([Gt,z])}return null}var Xe=jo,dr=M(Li(),1);function na(i,s,o){o===void 0&&(o={});var h=je(i),c=je(s),m=Ue(c[1]-h[1]),y=Ue(c[0]-h[0]),A=Ue(h[1]),b=Ue(c[1]),P=Math.pow(Math.sin(m/2),2)+Math.pow(Math.sin(y/2),2)*Math.cos(A)*Math.cos(b);return Go(2*Math.atan2(Math.sqrt(P),Math.sqrt(1-P)),o.units)}var Bi=na;function ri(i){var s=i[0],o=i[1],h=i[2],c=i[3],m=Bi(i.slice(0,2),[h,o]),y=Bi(i.slice(0,2),[s,c]);if(m>=y){var A=(o+c)/2;return[s,A-(h-s)/2,h,A+(h-s)/2]}else{var b=(s+h)/2;return[b-(c-o)/2,o,b+(c-o)/2,c]}}var Zo=ri;function yi(i){var s=[1/0,1/0,-1/0,-1/0];return ia(i,function(o){s[0]>o[0]&&(s[0]=o[0]),s[1]>o[1]&&(s[1]=o[1]),s[2]<o[0]&&(s[2]=o[0]),s[3]<o[1]&&(s[3]=o[1])}),s}yi.default=yi;var fn=yi;function oi(i,s){s===void 0&&(s={});var o=s.precision,h=s.coordinates,c=s.mutate;if(o=o==null||isNaN(o)?6:o,h=h==null||isNaN(h)?3:h,!i)throw new Error("<geojson> is required");if(typeof o!="number")throw new Error("<precision> must be a number");if(typeof h!="number")throw new Error("<coordinates> must be a number");(c===!1||c===void 0)&&(i=JSON.parse(JSON.stringify(i)));var m=Math.pow(10,o);return ia(i,function(y){Vn(y,m,h)}),i}function Vn(i,s,o){i.length>o&&i.splice(o,i.length);for(var h=0;h<i.length;h++)i[h]=Math.round(i[h]*s)/s;return i}var fr=oi;function $n(i,s,o){if(o===void 0&&(o={}),o.final===!0)return Kn(i,s);var h=je(i),c=je(s),m=Ue(h[0]),y=Ue(c[0]),A=Ue(h[1]),b=Ue(c[1]),P=Math.sin(y-m)*Math.cos(b),N=Math.cos(A)*Math.sin(b)-Math.sin(A)*Math.cos(b)*Math.cos(y-m);return Pe(Math.atan2(P,N))}function Kn(i,s){var o=$n(s,i);return o=(o+180)%360,o}function Wn(i,s,o,h){h===void 0&&(h={});var c=je(i),m=Ue(c[0]),y=Ue(c[1]),A=Ue(o),b=cn(s,h.units),P=Math.asin(Math.sin(y)*Math.cos(b)+Math.cos(y)*Math.sin(b)*Math.cos(A)),N=m+Math.atan2(Math.sin(A)*Math.sin(b)*Math.cos(y),Math.cos(b)-Math.sin(y)*Math.sin(P)),F=Pe(N),tt=Pe(P);return Si([F,tt],h.properties)}function Xn(i,s,o){o===void 0&&(o={});var h=Si([1/0,1/0],{dist:1/0}),c=0;return qe(i,function(m){for(var y=We(m),A=0;A<y.length-1;A++){var b=Si(y[A]);b.properties.dist=Bi(s,b,o);var P=Si(y[A+1]);P.properties.dist=Bi(s,P,o);var N=Bi(b,P,o),F=Math.max(b.properties.dist,P.properties.dist),tt=$n(b,P),it=Wn(s,F,tt+90,o),lt=Wn(s,F,tt-90,o),ft=Xe(gi([it.geometry.coordinates,lt.geometry.coordinates]),gi([b.geometry.coordinates,P.geometry.coordinates])),At=null;ft.features.length>0&&(At=ft.features[0],At.properties.dist=Bi(s,At,o),At.properties.location=c+Bi(b,At,o)),b.properties.dist<h.properties.dist&&(h=b,h.properties.index=A,h.properties.location=c),P.properties.dist<h.properties.dist&&(h=P,h.properties.index=A+1,h.properties.location=c+N),At&&At.properties.dist<h.properties.dist&&(h=At,h.properties.index=A),c+=N}}),h}var Vi=Xn;function Yn(i,s){if(!i)throw new Error("line is required");if(!s)throw new Error("splitter is required");var o=ea(i),h=ea(s);if(o!=="LineString")throw new Error("line must be LineString");if(h==="FeatureCollection")throw new Error("splitter cannot be a FeatureCollection");if(h==="GeometryCollection")throw new Error("splitter cannot be a GeometryCollection");var c=fr(s,{precision:7});switch(h){case"Point":return Qn(i,c);case"MultiPoint":return Jn(i,c);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Jn(i,Xe(i,c))}}function Jn(i,s){var o=[],h=(0,dr.default)();return qe(s,function(c){if(o.forEach(function(A,b){A.id=b}),!o.length)o=Qn(i,c).features,o.forEach(function(A){A.bbox||(A.bbox=Zo(fn(A)))}),h.load(Ee(o));else{var m=h.search(c);if(m.features.length){var y=pr(c,m);o=o.filter(function(A){return A.id!==y.id}),h.remove(y),ve(Qn(y,c),function(A){o.push(A),h.insert(A)})}}}),Ee(o)}function Qn(i,s){var o=[],h=We(i)[0],c=We(i)[i.geometry.coordinates.length-1];if($i(h,je(s))||$i(c,je(s)))return Ee([i]);var m=(0,dr.default)(),y=qn(i);m.load(y);var A=m.search(s);if(!A.features.length)return Ee([i]);var b=pr(s,A),P=[h],N=qi(y,function(F,tt,it){var lt=We(tt)[1],ft=je(s);return it===b.id?(F.push(ft),o.push(gi(F)),$i(ft,lt)?[ft]:[ft,lt]):(F.push(lt),F)},P);return N.length>1&&o.push(gi(N)),Ee(o)}function pr(i,s){if(!s.features.length)throw new Error("lines must contain features");if(s.features.length===1)return s.features[0];var o,h=1/0;return ve(s,function(c){var m=Vi(c,i),y=m.properties.dist;y<h&&(o=c,h=y)}),o}function $i(i,s){return i[0]===s[0]&&i[1]===s[1]}var qo=Yn;function pn(i,s,o){if(o===void 0&&(o={}),!i)throw new Error("point is required");if(!s)throw new Error("polygon is required");var h=je(i),c=Zn(s),m=c.type,y=s.bbox,A=c.coordinates;if(y&&mr(h,y)===!1)return!1;m==="Polygon"&&(A=[A]);for(var b=!1,P=0;P<A.length&&!b;P++)if(_r(h,A[P][0],o.ignoreBoundary)){for(var N=!1,F=1;F<A[P].length&&!N;)_r(h,A[P][F],!o.ignoreBoundary)&&(N=!0),F++;N||(b=!0)}return b}function _r(i,s,o){var h=!1;s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1]&&(s=s.slice(0,s.length-1));for(var c=0,m=s.length-1;c<s.length;m=c++){var y=s[c][0],A=s[c][1],b=s[m][0],P=s[m][1],N=i[1]*(y-b)+A*(b-i[0])+P*(i[0]-y)===0&&(y-i[0])*(b-i[0])<=0&&(A-i[1])*(P-i[1])<=0;if(N)return!o;var F=A>i[1]!=P>i[1]&&i[0]<(b-y)*(i[1]-A)/(P-A)+y;F&&(h=!h)}return h}function mr(i,s){return s[0]<=i[0]&&s[1]<=i[1]&&s[2]>=i[0]&&s[3]>=i[1]}function Ho(i,s,o){o===void 0&&(o={});for(var h=je(i),c=We(s),m=0;m<c.length-1;m++){var y=!1;if(o.ignoreEndVertices&&(m===0&&(y="start"),m===c.length-2&&(y="end"),m===0&&m+1===c.length-1&&(y="both")),Ye(c[m],c[m+1],h,y,typeof o.epsilon>"u"?null:o.epsilon))return!0}return!1}function Ye(i,s,o,h,c){var m=o[0],y=o[1],A=i[0],b=i[1],P=s[0],N=s[1],F=o[0]-A,tt=o[1]-b,it=P-A,lt=N-b,ft=F*lt-tt*it;if(c!==null){if(Math.abs(ft)>c)return!1}else if(ft!==0)return!1;if(h){if(h==="start")return Math.abs(it)>=Math.abs(lt)?it>0?A<m&&m<=P:P<=m&&m<A:lt>0?b<y&&y<=N:N<=y&&y<b;if(h==="end")return Math.abs(it)>=Math.abs(lt)?it>0?A<=m&&m<P:P<m&&m<=A:lt>0?b<=y&&y<N:N<y&&y<=b;if(h==="both")return Math.abs(it)>=Math.abs(lt)?it>0?A<m&&m<P:P<m&&m<A:lt>0?b<y&&y<N:N<y&&y<b}else return Math.abs(it)>=Math.abs(lt)?it>0?A<=m&&m<=P:P<=m&&m<=A:lt>0?b<=y&&y<=N:N<=y&&y<=b;return!1}var Ai=Ho;function Vo(i,s){var o=Zn(i),h=Zn(s),c=o.type,m=h.type,y=o.coordinates,A=h.coordinates;switch(c){case"Point":switch(m){case"Point":return es(y,A);default:throw new Error("feature2 "+m+" geometry not supported")}case"MultiPoint":switch(m){case"Point":return ts(o,h);case"MultiPoint":return $o(o,h);default:throw new Error("feature2 "+m+" geometry not supported")}case"LineString":switch(m){case"Point":return Ai(h,o,{ignoreEndVertices:!0});case"LineString":return _n(o,h);case"MultiPoint":return gr(o,h);default:throw new Error("feature2 "+m+" geometry not supported")}case"Polygon":switch(m){case"Point":return pn(h,o,{ignoreBoundary:!0});case"LineString":return Wo(o,h);case"Polygon":return Ki(o,h);case"MultiPoint":return Ko(o,h);default:throw new Error("feature2 "+m+" geometry not supported")}default:throw new Error("feature1 "+c+" geometry not supported")}}function ts(i,s){var o,h=!1;for(o=0;o<i.coordinates.length;o++)if(es(i.coordinates[o],s.coordinates)){h=!0;break}return h}function $o(i,s){for(var o=0,h=s.coordinates;o<h.length;o++){for(var c=h[o],m=!1,y=0,A=i.coordinates;y<A.length;y++){var b=A[y];if(es(c,b)){m=!0;break}}if(!m)return!1}return!0}function gr(i,s){for(var o=!1,h=0,c=s.coordinates;h<c.length;h++){var m=c[h];if(Ai(m,i,{ignoreEndVertices:!0})&&(o=!0),!Ai(m,i))return!1}return!!o}function Ko(i,s){for(var o=0,h=s.coordinates;o<h.length;o++){var c=h[o];if(!pn(c,i,{ignoreBoundary:!0}))return!1}return!0}function _n(i,s){for(var o=!1,h=0,c=s.coordinates;h<c.length;h++){var m=c[h];if(Ai({type:"Point",coordinates:m},i,{ignoreEndVertices:!0})&&(o=!0),!Ai({type:"Point",coordinates:m},i,{ignoreEndVertices:!1}))return!1}return o}function Wo(i,s){var o=!1,h=0,c=fn(i),m=fn(s);if(!sa(c,m))return!1;for(h;h<s.coordinates.length-1;h++){var y=Xo(s.coordinates[h],s.coordinates[h+1]);if(pn({type:"Point",coordinates:y},i,{ignoreBoundary:!0})){o=!0;break}}return o}function Ki(i,s){if(i.type==="Feature"&&i.geometry===null||s.type==="Feature"&&s.geometry===null)return!1;var o=fn(i),h=fn(s);if(!sa(o,h))return!1;for(var c=Zn(s).coordinates,m=0,y=c;m<y.length;m++)for(var A=y[m],b=0,P=A;b<P.length;b++){var N=P[b];if(!pn(N,i))return!1}return!0}function sa(i,s){return!(i[0]>s[0]||i[2]<s[2]||i[1]>s[1]||i[3]<s[3])}function es(i,s){return i[0]===s[0]&&i[1]===s[1]}function Xo(i,s){return[(i[0]+s[0])/2,(i[1]+s[1])/2]}var hi=M(pi()),aa=i=>()=>i,is=i=>{let s=i?(o,h)=>h.minus(o).abs().isLessThanOrEqualTo(i):aa(!1);return(o,h)=>s(o,h)?0:o.comparedTo(h)};function mn(i){let s=i?(o,h,c,m,y)=>o.exponentiatedBy(2).isLessThanOrEqualTo(m.minus(h).exponentiatedBy(2).plus(y.minus(c).exponentiatedBy(2)).times(i)):aa(!1);return(o,h,c)=>{let m=o.x,y=o.y,A=c.x,b=c.y,P=y.minus(b).times(h.x.minus(A)).minus(m.minus(A).times(h.y.minus(b)));return s(P,m,y,A,b)?0:P.comparedTo(0)}}var Yo=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Wi=Math.ceil,me=Math.floor,Me="[BigNumber Error] ",ra=Me+"Number primitive has more than 15 significant digits: ",He=1e14,kt=14,ns=9007199254740991,ss=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],li=1e7,le=1e9;function yr(i){var s,o,h,c=z.prototype={constructor:z,toString:null,valueOf:null},m=new z(1),y=20,A=4,b=-7,P=21,N=-1e7,F=1e7,tt=!1,it=1,lt=0,ft={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},At="0123456789abcdefghijklmnopqrstuvwxyz",Gt=!0;function z(w,S){var O,D,I,R,V,H,$,Q,J=this;if(!(J instanceof z))return new z(w,S);if(S==null){if(w&&w._isBigNumber===!0){J.s=w.s,!w.c||w.e>F?J.c=J.e=null:w.e<N?J.c=[J.e=0]:(J.e=w.e,J.c=w.c.slice());return}if((H=typeof w=="number")&&w*0==0){if(J.s=1/w<0?(w=-w,-1):1,w===~~w){for(R=0,V=w;V>=10;V/=10,R++);R>F?J.c=J.e=null:(J.e=R,J.c=[w]);return}Q=String(w)}else{if(!Yo.test(Q=String(w)))return h(J,Q,H);J.s=Q.charCodeAt(0)==45?(Q=Q.slice(1),-1):1}(R=Q.indexOf("."))>-1&&(Q=Q.replace(".","")),(V=Q.search(/e/i))>0?(R<0&&(R=V),R+=+Q.slice(V+1),Q=Q.substring(0,V)):R<0&&(R=Q.length)}else{if(e(S,2,At.length,"Base"),S==10&&Gt)return J=new z(w),X(J,y+J.e+1,A);if(Q=String(w),H=typeof w=="number"){if(w*0!=0)return h(J,Q,H,S);if(J.s=1/w<0?(Q=Q.slice(1),-1):1,z.DEBUG&&Q.replace(/^0\.0*|\./,"").length>15)throw Error(ra+w)}else J.s=Q.charCodeAt(0)===45?(Q=Q.slice(1),-1):1;for(O=At.slice(0,S),R=V=0,$=Q.length;V<$;V++)if(O.indexOf(D=Q.charAt(V))<0){if(D=="."){if(V>R){R=$;continue}}else if(!I&&(Q==Q.toUpperCase()&&(Q=Q.toLowerCase())||Q==Q.toLowerCase()&&(Q=Q.toUpperCase()))){I=!0,V=-1,R=0;continue}return h(J,String(w),H,S)}H=!1,Q=o(Q,S,10,J.s),(R=Q.indexOf("."))>-1?Q=Q.replace(".",""):R=Q.length}for(V=0;Q.charCodeAt(V)===48;V++);for($=Q.length;Q.charCodeAt(--$)===48;);if(Q=Q.slice(V,++$)){if($-=V,H&&z.DEBUG&&$>15&&(w>ns||w!==me(w)))throw Error(ra+J.s*w);if((R=R-V-1)>F)J.c=J.e=null;else if(R<N)J.c=[J.e=0];else{if(J.e=R,J.c=[],V=(R+1)%kt,R<0&&(V+=kt),V<$){for(V&&J.c.push(+Q.slice(0,V)),$-=kt;V<$;)J.c.push(+Q.slice(V,V+=kt));V=kt-(Q=Q.slice(V)).length}else V-=$;for(;V--;Q+="0");J.c.push(+Q)}}else J.c=[J.e=0]}z.clone=yr,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(w){var S,O;if(w!=null)if(typeof w=="object"){if(w.hasOwnProperty(S="DECIMAL_PLACES")&&(O=w[S],e(O,0,le,S),y=O),w.hasOwnProperty(S="ROUNDING_MODE")&&(O=w[S],e(O,0,8,S),A=O),w.hasOwnProperty(S="EXPONENTIAL_AT")&&(O=w[S],O&&O.pop?(e(O[0],-le,0,S),e(O[1],0,le,S),b=O[0],P=O[1]):(e(O,-le,le,S),b=-(P=O<0?-O:O))),w.hasOwnProperty(S="RANGE"))if(O=w[S],O&&O.pop)e(O[0],-le,-1,S),e(O[1],1,le,S),N=O[0],F=O[1];else if(e(O,-le,le,S),O)N=-(F=O<0?-O:O);else throw Error(Me+S+" cannot be zero: "+O);if(w.hasOwnProperty(S="CRYPTO"))if(O=w[S],O===!!O)if(O)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))tt=O;else throw tt=!O,Error(Me+"crypto unavailable");else tt=O;else throw Error(Me+S+" not true or false: "+O);if(w.hasOwnProperty(S="MODULO_MODE")&&(O=w[S],e(O,0,9,S),it=O),w.hasOwnProperty(S="POW_PRECISION")&&(O=w[S],e(O,0,le,S),lt=O),w.hasOwnProperty(S="FORMAT"))if(O=w[S],typeof O=="object")ft=O;else throw Error(Me+S+" not an object: "+O);if(w.hasOwnProperty(S="ALPHABET"))if(O=w[S],typeof O=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(O))Gt=O.slice(0,10)=="0123456789",At=O;else throw Error(Me+S+" invalid: "+O)}else throw Error(Me+"Object expected: "+w);return{DECIMAL_PLACES:y,ROUNDING_MODE:A,EXPONENTIAL_AT:[b,P],RANGE:[N,F],CRYPTO:tt,MODULO_MODE:it,POW_PRECISION:lt,FORMAT:ft,ALPHABET:At}},z.isBigNumber=function(w){if(!w||w._isBigNumber!==!0)return!1;if(!z.DEBUG)return!0;var S,O,D=w.c,I=w.e,R=w.s;t:if({}.toString.call(D)=="[object Array]"){if((R===1||R===-1)&&I>=-le&&I<=le&&I===me(I)){if(D[0]===0){if(I===0&&D.length===1)return!0;break t}if(S=(I+1)%kt,S<1&&(S+=kt),String(D[0]).length==S){for(S=0;S<D.length;S++)if(O=D[S],O<0||O>=He||O!==me(O))break t;if(O!==0)return!0}}}else if(D===null&&I===null&&(R===null||R===1||R===-1))return!0;throw Error(Me+"Invalid BigNumber: "+w)},z.maximum=z.max=function(){return K(arguments,-1)},z.minimum=z.min=function(){return K(arguments,1)},z.random=function(){var w=9007199254740992,S=Math.random()*w&2097151?function(){return me(Math.random()*w)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(O){var D,I,R,V,H,$=0,Q=[],J=new z(m);if(O==null?O=y:e(O,0,le),V=Wi(O/kt),tt)if(crypto.getRandomValues){for(D=crypto.getRandomValues(new Uint32Array(V*=2));$<V;)H=D[$]*131072+(D[$+1]>>>11),H>=9e15?(I=crypto.getRandomValues(new Uint32Array(2)),D[$]=I[0],D[$+1]=I[1]):(Q.push(H%1e14),$+=2);$=V/2}else if(crypto.randomBytes){for(D=crypto.randomBytes(V*=7);$<V;)H=(D[$]&31)*281474976710656+D[$+1]*1099511627776+D[$+2]*4294967296+D[$+3]*16777216+(D[$+4]<<16)+(D[$+5]<<8)+D[$+6],H>=9e15?crypto.randomBytes(7).copy(D,$):(Q.push(H%1e14),$+=7);$=V/7}else throw tt=!1,Error(Me+"crypto unavailable");if(!tt)for(;$<V;)H=S(),H<9e15&&(Q[$++]=H%1e14);for(V=Q[--$],O%=kt,V&&O&&(H=ss[kt-O],Q[$]=me(V/H)*H);Q[$]===0;Q.pop(),$--);if($<0)Q=[R=0];else{for(R=-1;Q[0]===0;Q.splice(0,1),R-=kt);for($=1,H=Q[0];H>=10;H/=10,$++);$<kt&&(R-=kt-$)}return J.e=R,J.c=Q,J}}(),z.sum=function(){for(var w=1,S=arguments,O=new z(S[0]);w<S.length;)O=O.plus(S[w++]);return O},o=function(){var w="0123456789";function S(O,D,I,R){for(var V,H=[0],$,Q=0,J=O.length;Q<J;){for($=H.length;$--;H[$]*=D);for(H[0]+=R.indexOf(O.charAt(Q++)),V=0;V<H.length;V++)H[V]>I-1&&(H[V+1]==null&&(H[V+1]=0),H[V+1]+=H[V]/I|0,H[V]%=I)}return H.reverse()}return function(O,D,I,R,V){var H,$,Q,J,ot,gt,vt,bt,Vt=O.indexOf("."),Wt=y,Ut=A;for(Vt>=0&&(J=lt,lt=0,O=O.replace(".",""),bt=new z(D),gt=bt.pow(O.length-Vt),lt=J,bt.c=S(_(Ie(gt.c),gt.e,"0"),10,I,w),bt.e=bt.c.length),vt=S(O,D,I,V?(H=At,w):(H=w,At)),Q=J=vt.length;vt[--J]==0;vt.pop());if(!vt[0])return H.charAt(0);if(Vt<0?--Q:(gt.c=vt,gt.e=Q,gt.s=R,gt=s(gt,bt,Wt,Ut,I),vt=gt.c,ot=gt.r,Q=gt.e),$=Q+Wt+1,Vt=vt[$],J=I/2,ot=ot||$<0||vt[$+1]!=null,ot=Ut<4?(Vt!=null||ot)&&(Ut==0||Ut==(gt.s<0?3:2)):Vt>J||Vt==J&&(Ut==4||ot||Ut==6&&vt[$-1]&1||Ut==(gt.s<0?8:7)),$<1||!vt[0])O=ot?_(H.charAt(1),-Wt,H.charAt(0)):H.charAt(0);else{if(vt.length=$,ot)for(--I;++vt[--$]>I;)vt[$]=0,$||(++Q,vt=[1].concat(vt));for(J=vt.length;!vt[--J];);for(Vt=0,O="";Vt<=J;O+=H.charAt(vt[Vt++]));O=_(O,Q,H.charAt(0))}return O}}(),s=function(){function w(D,I,R){var V,H,$,Q,J=0,ot=D.length,gt=I%li,vt=I/li|0;for(D=D.slice();ot--;)$=D[ot]%li,Q=D[ot]/li|0,V=vt*$+Q*gt,H=gt*$+V%li*li+J,J=(H/R|0)+(V/li|0)+vt*Q,D[ot]=H%R;return J&&(D=[J].concat(D)),D}function S(D,I,R,V){var H,$;if(R!=V)$=R>V?1:-1;else for(H=$=0;H<R;H++)if(D[H]!=I[H]){$=D[H]>I[H]?1:-1;break}return $}function O(D,I,R,V){for(var H=0;R--;)D[R]-=H,H=D[R]<I[R]?1:0,D[R]=H*V+D[R]-I[R];for(;!D[0]&&D.length>1;D.splice(0,1));}return function(D,I,R,V,H){var $,Q,J,ot,gt,vt,bt,Vt,Wt,Ut,Xt,Se,wr,nh,sh,vi,ua,ti=D.s==I.s?1:-1,Re=D.c,oe=I.c;if(!Re||!Re[0]||!oe||!oe[0])return new z(!D.s||!I.s||(Re?oe&&Re[0]==oe[0]:!oe)?NaN:Re&&Re[0]==0||!oe?ti*0:ti/0);for(Vt=new z(ti),Wt=Vt.c=[],Q=D.e-I.e,ti=R+Q+1,H||(H=He,Q=Oe(D.e/kt)-Oe(I.e/kt),ti=ti/kt|0),J=0;oe[J]==(Re[J]||0);J++);if(oe[J]>(Re[J]||0)&&Q--,ti<0)Wt.push(1),ot=!0;else{for(nh=Re.length,vi=oe.length,J=0,ti+=2,gt=me(H/(oe[0]+1)),gt>1&&(oe=w(oe,gt,H),Re=w(Re,gt,H),vi=oe.length,nh=Re.length),wr=vi,Ut=Re.slice(0,vi),Xt=Ut.length;Xt<vi;Ut[Xt++]=0);ua=oe.slice(),ua=[0].concat(ua),sh=oe[0],oe[1]>=H/2&&sh++;do{if(gt=0,$=S(oe,Ut,vi,Xt),$<0){if(Se=Ut[0],vi!=Xt&&(Se=Se*H+(Ut[1]||0)),gt=me(Se/sh),gt>1)for(gt>=H&&(gt=H-1),vt=w(oe,gt,H),bt=vt.length,Xt=Ut.length;S(vt,Ut,bt,Xt)==1;)gt--,O(vt,vi<bt?ua:oe,bt,H),bt=vt.length,$=1;else gt==0&&($=gt=1),vt=oe.slice(),bt=vt.length;if(bt<Xt&&(vt=[0].concat(vt)),O(Ut,vt,Xt,H),Xt=Ut.length,$==-1)for(;S(oe,Ut,vi,Xt)<1;)gt++,O(Ut,vi<Xt?ua:oe,Xt,H),Xt=Ut.length}else $===0&&(gt++,Ut=[0]);Wt[J++]=gt,Ut[0]?Ut[Xt++]=Re[wr]||0:(Ut=[Re[wr]],Xt=1)}while((wr++<nh||Ut[0]!=null)&&ti--);ot=Ut[0]!=null,Wt[0]||Wt.splice(0,1)}if(H==He){for(J=1,ti=Wt[0];ti>=10;ti/=10,J++);X(Vt,R+(Vt.e=J+Q*kt-1)+1,V,ot)}else Vt.e=Q,Vt.r=+ot;return Vt}}();function q(w,S,O,D){var I,R,V,H,$;if(O==null?O=A:e(O,0,8),!w.c)return w.toString();if(I=w.c[0],V=w.e,S==null)$=Ie(w.c),$=D==1||D==2&&(V<=b||V>=P)?l($,V):_($,V,"0");else if(w=X(new z(w),S,O),R=w.e,$=Ie(w.c),H=$.length,D==1||D==2&&(S<=R||R<=b)){for(;H<S;$+="0",H++);$=l($,R)}else if(S-=V,$=_($,R,"0"),R+1>H){if(--S>0)for($+=".";S--;$+="0");}else if(S+=R-H,S>0)for(R+1==H&&($+=".");S--;$+="0");return w.s<0&&I?"-"+$:$}function K(w,S){for(var O,D,I=1,R=new z(w[0]);I<w.length;I++)D=new z(w[I]),(!D.s||(O=Ti(R,D))===S||O===0&&R.s===S)&&(R=D);return R}function nt(w,S,O){for(var D=1,I=S.length;!S[--I];S.pop());for(I=S[0];I>=10;I/=10,D++);return(O=D+O*kt-1)>F?w.c=w.e=null:O<N?w.c=[w.e=0]:(w.e=O,w.c=S),w}h=function(){var w=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,O=/^\.([^.]+)$/,D=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(R,V,H,$){var Q,J=H?V:V.replace(I,"");if(D.test(J))R.s=isNaN(J)?null:J<0?-1:1;else{if(!H&&(J=J.replace(w,function(ot,gt,vt){return Q=(vt=vt.toLowerCase())=="x"?16:vt=="b"?2:8,!$||$==Q?gt:ot}),$&&(Q=$,J=J.replace(S,"$1").replace(O,"0.$1")),V!=J))return new z(J,Q);if(z.DEBUG)throw Error(Me+"Not a"+($?" base "+$:"")+" number: "+V);R.s=null}R.c=R.e=null}}();function X(w,S,O,D){var I,R,V,H,$,Q,J,ot=w.c,gt=ss;if(ot){t:{for(I=1,H=ot[0];H>=10;H/=10,I++);if(R=S-I,R<0)R+=kt,V=S,$=ot[Q=0],J=me($/gt[I-V-1]%10);else if(Q=Wi((R+1)/kt),Q>=ot.length)if(D){for(;ot.length<=Q;ot.push(0));$=J=0,I=1,R%=kt,V=R-kt+1}else break t;else{for($=H=ot[Q],I=1;H>=10;H/=10,I++);R%=kt,V=R-kt+I,J=V<0?0:me($/gt[I-V-1]%10)}if(D=D||S<0||ot[Q+1]!=null||(V<0?$:$%gt[I-V-1]),D=O<4?(J||D)&&(O==0||O==(w.s<0?3:2)):J>5||J==5&&(O==4||D||O==6&&(R>0?V>0?$/gt[I-V]:0:ot[Q-1])%10&1||O==(w.s<0?8:7)),S<1||!ot[0])return ot.length=0,D?(S-=w.e+1,ot[0]=gt[(kt-S%kt)%kt],w.e=-S||0):ot[0]=w.e=0,w;if(R==0?(ot.length=Q,H=1,Q--):(ot.length=Q+1,H=gt[kt-R],ot[Q]=V>0?me($/gt[I-V]%gt[V])*H:0),D)for(;;)if(Q==0){for(R=1,V=ot[0];V>=10;V/=10,R++);for(V=ot[0]+=H,H=1;V>=10;V/=10,H++);R!=H&&(w.e++,ot[0]==He&&(ot[0]=1));break}else{if(ot[Q]+=H,ot[Q]!=He)break;ot[Q--]=0,H=1}for(R=ot.length;ot[--R]===0;ot.pop());}w.e>F?w.c=w.e=null:w.e<N&&(w.c=[w.e=0])}return w}function et(w){var S,O=w.e;return O===null?w.toString():(S=Ie(w.c),S=O<=b||O>=P?l(S,O):_(S,O,"0"),w.s<0?"-"+S:S)}return c.absoluteValue=c.abs=function(){var w=new z(this);return w.s<0&&(w.s=1),w},c.comparedTo=function(w,S){return Ti(this,new z(w,S))},c.decimalPlaces=c.dp=function(w,S){var O,D,I,R=this;if(w!=null)return e(w,0,le),S==null?S=A:e(S,0,8),X(new z(R),w+R.e+1,S);if(!(O=R.c))return null;if(D=((I=O.length-1)-Oe(this.e/kt))*kt,I=O[I])for(;I%10==0;I/=10,D--);return D<0&&(D=0),D},c.dividedBy=c.div=function(w,S){return s(this,new z(w,S),y,A)},c.dividedToIntegerBy=c.idiv=function(w,S){return s(this,new z(w,S),0,1)},c.exponentiatedBy=c.pow=function(w,S){var O,D,I,R,V,H,$,Q,J,ot=this;if(w=new z(w),w.c&&!w.isInteger())throw Error(Me+"Exponent not an integer: "+et(w));if(S!=null&&(S=new z(S)),H=w.e>14,!ot.c||!ot.c[0]||ot.c[0]==1&&!ot.e&&ot.c.length==1||!w.c||!w.c[0])return J=new z(Math.pow(+et(ot),H?w.s*(2-a(w)):+et(w))),S?J.mod(S):J;if($=w.s<0,S){if(S.c?!S.c[0]:!S.s)return new z(NaN);D=!$&&ot.isInteger()&&S.isInteger(),D&&(ot=ot.mod(S))}else{if(w.e>9&&(ot.e>0||ot.e<-1||(ot.e==0?ot.c[0]>1||H&&ot.c[1]>=24e7:ot.c[0]<8e13||H&&ot.c[0]<=9999975e7)))return R=ot.s<0&&a(w)?-0:0,ot.e>-1&&(R=1/R),new z($?1/R:R);lt&&(R=Wi(lt/kt+2))}for(H?(O=new z(.5),$&&(w.s=1),Q=a(w)):(I=Math.abs(+et(w)),Q=I%2),J=new z(m);;){if(Q){if(J=J.times(ot),!J.c)break;R?J.c.length>R&&(J.c.length=R):D&&(J=J.mod(S))}if(I){if(I=me(I/2),I===0)break;Q=I%2}else if(w=w.times(O),X(w,w.e+1,1),w.e>14)Q=a(w);else{if(I=+et(w),I===0)break;Q=I%2}ot=ot.times(ot),R?ot.c&&ot.c.length>R&&(ot.c.length=R):D&&(ot=ot.mod(S))}return D?J:($&&(J=m.div(J)),S?J.mod(S):R?X(J,lt,A,V):J)},c.integerValue=function(w){var S=new z(this);return w==null?w=A:e(w,0,8),X(S,S.e+1,w)},c.isEqualTo=c.eq=function(w,S){return Ti(this,new z(w,S))===0},c.isFinite=function(){return!!this.c},c.isGreaterThan=c.gt=function(w,S){return Ti(this,new z(w,S))>0},c.isGreaterThanOrEqualTo=c.gte=function(w,S){return(S=Ti(this,new z(w,S)))===1||S===0},c.isInteger=function(){return!!this.c&&Oe(this.e/kt)>this.c.length-2},c.isLessThan=c.lt=function(w,S){return Ti(this,new z(w,S))<0},c.isLessThanOrEqualTo=c.lte=function(w,S){return(S=Ti(this,new z(w,S)))===-1||S===0},c.isNaN=function(){return!this.s},c.isNegative=function(){return this.s<0},c.isPositive=function(){return this.s>0},c.isZero=function(){return!!this.c&&this.c[0]==0},c.minus=function(w,S){var O,D,I,R,V=this,H=V.s;if(w=new z(w,S),S=w.s,!H||!S)return new z(NaN);if(H!=S)return w.s=-S,V.plus(w);var $=V.e/kt,Q=w.e/kt,J=V.c,ot=w.c;if(!$||!Q){if(!J||!ot)return J?(w.s=-S,w):new z(ot?V:NaN);if(!J[0]||!ot[0])return ot[0]?(w.s=-S,w):new z(J[0]?V:A==3?-0:0)}if($=Oe($),Q=Oe(Q),J=J.slice(),H=$-Q){for((R=H<0)?(H=-H,I=J):(Q=$,I=ot),I.reverse(),S=H;S--;I.push(0));I.reverse()}else for(D=(R=(H=J.length)<(S=ot.length))?H:S,H=S=0;S<D;S++)if(J[S]!=ot[S]){R=J[S]<ot[S];break}if(R&&(I=J,J=ot,ot=I,w.s=-w.s),S=(D=ot.length)-(O=J.length),S>0)for(;S--;J[O++]=0);for(S=He-1;D>H;){if(J[--D]<ot[D]){for(O=D;O&&!J[--O];J[O]=S);--J[O],J[D]+=He}J[D]-=ot[D]}for(;J[0]==0;J.splice(0,1),--Q);return J[0]?nt(w,J,Q):(w.s=A==3?-1:1,w.c=[w.e=0],w)},c.modulo=c.mod=function(w,S){var O,D,I=this;return w=new z(w,S),!I.c||!w.s||w.c&&!w.c[0]?new z(NaN):!w.c||I.c&&!I.c[0]?new z(I):(it==9?(D=w.s,w.s=1,O=s(I,w,0,3),w.s=D,O.s*=D):O=s(I,w,0,it),w=I.minus(O.times(w)),!w.c[0]&&it==1&&(w.s=I.s),w)},c.multipliedBy=c.times=function(w,S){var O,D,I,R,V,H,$,Q,J,ot,gt,vt,bt,Vt,Wt,Ut=this,Xt=Ut.c,Se=(w=new z(w,S)).c;if(!Xt||!Se||!Xt[0]||!Se[0])return!Ut.s||!w.s||Xt&&!Xt[0]&&!Se||Se&&!Se[0]&&!Xt?w.c=w.e=w.s=null:(w.s*=Ut.s,!Xt||!Se?w.c=w.e=null:(w.c=[0],w.e=0)),w;for(D=Oe(Ut.e/kt)+Oe(w.e/kt),w.s*=Ut.s,$=Xt.length,ot=Se.length,$<ot&&(bt=Xt,Xt=Se,Se=bt,I=$,$=ot,ot=I),I=$+ot,bt=[];I--;bt.push(0));for(Vt=He,Wt=li,I=ot;--I>=0;){for(O=0,gt=Se[I]%Wt,vt=Se[I]/Wt|0,V=$,R=I+V;R>I;)Q=Xt[--V]%Wt,J=Xt[V]/Wt|0,H=vt*Q+J*gt,Q=gt*Q+H%Wt*Wt+bt[R]+O,O=(Q/Vt|0)+(H/Wt|0)+vt*J,bt[R--]=Q%Vt;bt[R]=O}return O?++D:bt.splice(0,1),nt(w,bt,D)},c.negated=function(){var w=new z(this);return w.s=-w.s||null,w},c.plus=function(w,S){var O,D=this,I=D.s;if(w=new z(w,S),S=w.s,!I||!S)return new z(NaN);if(I!=S)return w.s=-S,D.minus(w);var R=D.e/kt,V=w.e/kt,H=D.c,$=w.c;if(!R||!V){if(!H||!$)return new z(I/0);if(!H[0]||!$[0])return $[0]?w:new z(H[0]?D:I*0)}if(R=Oe(R),V=Oe(V),H=H.slice(),I=R-V){for(I>0?(V=R,O=$):(I=-I,O=H),O.reverse();I--;O.push(0));O.reverse()}for(I=H.length,S=$.length,I-S<0&&(O=$,$=H,H=O,S=I),I=0;S;)I=(H[--S]=H[S]+$[S]+I)/He|0,H[S]=He===H[S]?0:H[S]%He;return I&&(H=[I].concat(H),++V),nt(w,H,V)},c.precision=c.sd=function(w,S){var O,D,I,R=this;if(w!=null&&w!==!!w)return e(w,1,le),S==null?S=A:e(S,0,8),X(new z(R),w,S);if(!(O=R.c))return null;if(I=O.length-1,D=I*kt+1,I=O[I]){for(;I%10==0;I/=10,D--);for(I=O[0];I>=10;I/=10,D++);}return w&&R.e+1>D&&(D=R.e+1),D},c.shiftedBy=function(w){return e(w,-ns,ns),this.times("1e"+w)},c.squareRoot=c.sqrt=function(){var w,S,O,D,I,R=this,V=R.c,H=R.s,$=R.e,Q=y+4,J=new z("0.5");if(H!==1||!V||!V[0])return new z(!H||H<0&&(!V||V[0])?NaN:V?R:1/0);if(H=Math.sqrt(+et(R)),H==0||H==1/0?(S=Ie(V),(S.length+$)%2==0&&(S+="0"),H=Math.sqrt(+S),$=Oe(($+1)/2)-($<0||$%2),H==1/0?S="5e"+$:(S=H.toExponential(),S=S.slice(0,S.indexOf("e")+1)+$),O=new z(S)):O=new z(H+""),O.c[0]){for($=O.e,H=$+Q,H<3&&(H=0);;)if(I=O,O=J.times(I.plus(s(R,I,Q,1))),Ie(I.c).slice(0,H)===(S=Ie(O.c)).slice(0,H))if(O.e<$&&--H,S=S.slice(H-3,H+1),S=="9999"||!D&&S=="4999"){if(!D&&(X(I,I.e+y+2,0),I.times(I).eq(R))){O=I;break}Q+=4,H+=4,D=1}else{(!+S||!+S.slice(1)&&S.charAt(0)=="5")&&(X(O,O.e+y+2,1),w=!O.times(O).eq(R));break}}return X(O,O.e+y+1,A,w)},c.toExponential=function(w,S){return w!=null&&(e(w,0,le),w++),q(this,w,S,1)},c.toFixed=function(w,S){return w!=null&&(e(w,0,le),w=w+this.e+1),q(this,w,S)},c.toFormat=function(w,S,O){var D,I=this;if(O==null)w!=null&&S&&typeof S=="object"?(O=S,S=null):w&&typeof w=="object"?(O=w,w=S=null):O=ft;else if(typeof O!="object")throw Error(Me+"Argument not an object: "+O);if(D=I.toFixed(w,S),I.c){var R,V=D.split("."),H=+O.groupSize,$=+O.secondaryGroupSize,Q=O.groupSeparator||"",J=V[0],ot=V[1],gt=I.s<0,vt=gt?J.slice(1):J,bt=vt.length;if($&&(R=H,H=$,$=R,bt-=R),H>0&&bt>0){for(R=bt%H||H,J=vt.substr(0,R);R<bt;R+=H)J+=Q+vt.substr(R,H);$>0&&(J+=Q+vt.slice(R)),gt&&(J="-"+J)}D=ot?J+(O.decimalSeparator||"")+(($=+O.fractionGroupSize)?ot.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(O.fractionGroupSeparator||"")):ot):J}return(O.prefix||"")+D+(O.suffix||"")},c.toFraction=function(w){var S,O,D,I,R,V,H,$,Q,J,ot,gt,vt=this,bt=vt.c;if(w!=null&&(H=new z(w),!H.isInteger()&&(H.c||H.s!==1)||H.lt(m)))throw Error(Me+"Argument "+(H.isInteger()?"out of range: ":"not an integer: ")+et(H));if(!bt)return new z(vt);for(S=new z(m),Q=O=new z(m),D=$=new z(m),gt=Ie(bt),R=S.e=gt.length-vt.e-1,S.c[0]=ss[(V=R%kt)<0?kt+V:V],w=!w||H.comparedTo(S)>0?R>0?S:Q:H,V=F,F=1/0,H=new z(gt),$.c[0]=0;J=s(H,S,0,1),I=O.plus(J.times(D)),I.comparedTo(w)!=1;)O=D,D=I,Q=$.plus(J.times(I=Q)),$=I,S=H.minus(J.times(I=S)),H=I;return I=s(w.minus(O),D,0,1),$=$.plus(I.times(Q)),O=O.plus(I.times(D)),$.s=Q.s=vt.s,R=R*2,ot=s(Q,D,R,A).minus(vt).abs().comparedTo(s($,O,R,A).minus(vt).abs())<1?[Q,D]:[$,O],F=V,ot},c.toNumber=function(){return+et(this)},c.toPrecision=function(w,S){return w!=null&&e(w,1,le),q(this,w,S,2)},c.toString=function(w){var S,O=this,D=O.s,I=O.e;return I===null?D?(S="Infinity",D<0&&(S="-"+S)):S="NaN":(w==null?S=I<=b||I>=P?l(Ie(O.c),I):_(Ie(O.c),I,"0"):w===10&&Gt?(O=X(new z(O),y+I+1,A),S=_(Ie(O.c),O.e,"0")):(e(w,2,At.length,"Base"),S=o(_(Ie(O.c),I,"0"),10,w,D,!0)),D<0&&O.c[0]&&(S="-"+S)),S},c.valueOf=c.toJSON=function(){return et(this)},c._isBigNumber=!0,c[Symbol.toStringTag]="BigNumber",c[Symbol.for("nodejs.util.inspect.custom")]=c.valueOf,i!=null&&z.set(i),z}function Oe(i){var s=i|0;return i>0||i===s?s:s-1}function Ie(i){for(var s,o,h=1,c=i.length,m=i[0]+"";h<c;){for(s=i[h++]+"",o=kt-s.length;o--;s="0"+s);m+=s}for(c=m.length;m.charCodeAt(--c)===48;);return m.slice(0,c+1||1)}function Ti(i,s){var o,h,c=i.c,m=s.c,y=i.s,A=s.s,b=i.e,P=s.e;if(!y||!A)return null;if(o=c&&!c[0],h=m&&!m[0],o||h)return o?h?0:-A:y;if(y!=A)return y;if(o=y<0,h=b==P,!c||!m)return h?0:!c^o?1:-1;if(!h)return b>P^o?1:-1;for(A=(b=c.length)<(P=m.length)?b:P,y=0;y<A;y++)if(c[y]!=m[y])return c[y]>m[y]^o?1:-1;return b==P?0:b>P^o?1:-1}function e(i,s,o,h){if(i<s||i>o||i!==me(i))throw Error(Me+(h||"Argument")+(typeof i=="number"?i<s||i>o?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function a(i){var s=i.c.length-1;return Oe(i.e/kt)==s&&i.c[s]%2!=0}function l(i,s){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(s<0?"e":"e+")+s}function _(i,s,o){var h,c;if(s<0){for(c=o+".";++s;c+=o);i=c+i}else if(h=i.length,++s>h){for(c=o,s-=h;--s;c+=o);i+=c}else s<h&&(i=i.slice(0,s)+"."+i.slice(s));return i}var v=yr(),k=v,Z=class{constructor(i){Lt(this,"key");Lt(this,"left",null);Lt(this,"right",null);this.key=i}},Y=class extends Z{constructor(i){super(i)}},st=class{constructor(){Lt(this,"size",0);Lt(this,"modificationCount",0);Lt(this,"splayCount",0)}splay(i){let s=this.root;if(s==null)return this.compare(i,i),-1;let o=null,h=null,c=null,m=null,y=s,A=this.compare,b;for(;;)if(b=A(y.key,i),b>0){let P=y.left;if(P==null||(b=A(P.key,i),b>0&&(y.left=P.right,P.right=y,y=P,P=y.left,P==null)))break;o==null?h=y:o.left=y,o=y,y=P}else if(b<0){let P=y.right;if(P==null||(b=A(P.key,i),b<0&&(y.right=P.left,P.left=y,y=P,P=y.right,P==null)))break;c==null?m=y:c.right=y,c=y,y=P}else break;return c!=null&&(c.right=y.left,y.left=m),o!=null&&(o.left=y.right,y.right=h),this.root!==y&&(this.root=y,this.splayCount++),b}splayMin(i){let s=i,o=s.left;for(;o!=null;){let h=o;s.left=h.right,h.right=s,s=h,o=s.left}return s}splayMax(i){let s=i,o=s.right;for(;o!=null;){let h=o;s.right=h.left,h.left=s,s=h,o=s.right}return s}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let s=this.root,o=s,h=s.left;if(this.size--,h==null)this.root=s.right;else{let c=s.right;s=this.splayMax(h),s.right=c,this.root=s}return this.modificationCount++,o}addNewRoot(i,s){this.size++,this.modificationCount++;let o=this.root;if(o==null){this.root=i;return}s<0?(i.left=o,i.right=o.right,o.right=null):(i.right=o,i.left=o.left,o.left=null),this.root=i}_first(){let i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){let i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,s)=>i<s?-1:i>s?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},ht=class ca extends st{constructor(o,h){super();Lt(this,"root",null);Lt(this,"compare");Lt(this,"validKey");Lt(this,pl,"[object Set]");this.compare=o??this.defaultCompare(),this.validKey=h??(c=>c!=null&&c!=null)}delete(o){return this.validKey(o)?this._delete(o)!=null:!1}deleteAll(o){for(let h of o)this.delete(h)}forEach(o){let h=this[Symbol.iterator](),c;for(;c=h.next(),!c.done;)o(c.value,c.value,this)}add(o){let h=this.splay(o);return h!=0&&this.addNewRoot(new Y(o),h),this}addAndReturn(o){let h=this.splay(o);return h!=0&&this.addNewRoot(new Y(o),h),this.root.key}addAll(o){for(let h of o)this.add(h)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(o){if(o==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(o)<0)return this.root.key;let h=this.root.left;if(h==null)return null;let c=h.right;for(;c!=null;)h=c,c=h.right;return h.key}firstAfter(o){if(o==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(o)>0)return this.root.key;let h=this.root.right;if(h==null)return null;let c=h.left;for(;c!=null;)h=c,c=h.left;return h.key}retainAll(o){let h=new ca(this.compare,this.validKey),c=this.modificationCount;for(let m of o){if(c!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(m)&&this.splay(m)==0&&h.add(this.root.key)}h.size!=this.size&&(this.root=h.root,this.size=h.size,this.modificationCount++)}lookup(o){return!this.validKey(o)||this.splay(o)!=0?null:this.root.key}intersection(o){let h=new ca(this.compare,this.validKey);for(let c of this)o.has(c)&&h.add(c);return h}difference(o){let h=new ca(this.compare,this.validKey);for(let c of this)o.has(c)||h.add(c);return h}union(o){let h=this.clone();return h.addAll(o),h}clone(){let o=new ca(this.compare,this.validKey);return o.size=this.size,o.root=this.copyNode(this.root),o}copyNode(o){if(o==null)return null;function h(m,y){let A,b;do{if(A=m.left,b=m.right,A!=null){let P=new Y(A.key);y.left=P,h(A,P)}if(b!=null){let P=new Y(b.key);y.right=P,m=b,y=P}}while(b!=null)}let c=new Y(o.key);return h(o,c),c}toSet(){return this.clone()}entries(){return new Ot(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(_l=Symbol.iterator,pl=Symbol.toStringTag,_l)](){return new wt(this.wrap())}},pt=class{constructor(i){Lt(this,"tree");Lt(this,"path",new Array);Lt(this,"modificationCount",null);Lt(this,"splayCount");this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let o=this.tree.getRoot();for(;o!=null;)this.path.push(o),o=o.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],s=i.right;if(s!=null){for(;s!=null;)this.path.push(s),s=s.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},wt=class extends pt{getValue(i){return i.key}},Ot=class extends pt{getValue(i){return[i.key,i.key]}},xe=i=>i,ue=i=>{if(i){let s=new ht(is(i)),o=new ht(is(i)),h=(m,y)=>y.addAndReturn(m),c=m=>({x:h(m.x,s),y:h(m.y,o)});return c({x:new k(0),y:new k(0)}),c}return xe},ke=i=>({set:s=>{ee=ke(s)},reset:()=>ke(i),compare:is(i),snap:ue(i),orient:mn(i)}),ee=ke(),Je=(i,s)=>i.ll.x.isLessThanOrEqualTo(s.x)&&s.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(s.y)&&s.y.isLessThanOrEqualTo(i.ur.y),oa=(i,s)=>{if(s.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(s.ll.x)||s.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(s.ll.y))return null;let o=i.ll.x.isLessThan(s.ll.x)?s.ll.x:i.ll.x,h=i.ur.x.isLessThan(s.ur.x)?i.ur.x:s.ur.x,c=i.ll.y.isLessThan(s.ll.y)?s.ll.y:i.ll.y,m=i.ur.y.isLessThan(s.ur.y)?i.ur.y:s.ur.y;return{ll:{x:o,y:c},ur:{x:h,y:m}}},as=(i,s)=>i.x.times(s.y).minus(i.y.times(s.x)),Ar=(i,s)=>i.x.times(s.x).plus(i.y.times(s.y)),gn=i=>Ar(i,i).sqrt(),Jo=(i,s,o)=>{let h={x:s.x.minus(i.x),y:s.y.minus(i.y)},c={x:o.x.minus(i.x),y:o.y.minus(i.y)};return as(c,h).div(gn(c)).div(gn(h))},vr=(i,s,o)=>{let h={x:s.x.minus(i.x),y:s.y.minus(i.y)},c={x:o.x.minus(i.x),y:o.y.minus(i.y)};return Ar(c,h).div(gn(c)).div(gn(h))},se=(i,s,o)=>s.y.isZero()?null:{x:i.x.plus(s.x.div(s.y).times(o.minus(i.y))),y:o},yn=(i,s,o)=>s.x.isZero()?null:{x:o,y:i.y.plus(s.y.div(s.x).times(o.minus(i.x)))},Qo=(i,s,o,h)=>{if(s.x.isZero())return yn(o,h,i.x);if(h.x.isZero())return yn(i,s,o.x);if(s.y.isZero())return se(o,h,i.y);if(h.y.isZero())return se(i,s,o.y);let c=as(s,h);if(c.isZero())return null;let m={x:o.x.minus(i.x),y:o.y.minus(i.y)},y=as(m,s).div(c),A=as(m,h).div(c),b=i.x.plus(A.times(s.x)),P=o.x.plus(y.times(h.x)),N=i.y.plus(A.times(s.y)),F=o.y.plus(y.times(h.y)),tt=b.plus(P).div(2),it=N.plus(F).div(2);return{x:tt,y:it}},Qe=class ml{constructor(s,o){Lt(this,"point");Lt(this,"isLeft");Lt(this,"segment");Lt(this,"otherSE");Lt(this,"consumedBy");s.events===void 0?s.events=[this]:s.events.push(this),this.point=s,this.isLeft=o}static compare(s,o){let h=ml.comparePoints(s.point,o.point);return h!==0?h:(s.point!==o.point&&s.link(o),s.isLeft!==o.isLeft?s.isLeft?1:-1:Xi.compare(s.segment,o.segment))}static comparePoints(s,o){return s.x.isLessThan(o.x)?-1:s.x.isGreaterThan(o.x)?1:s.y.isLessThan(o.y)?-1:s.y.isGreaterThan(o.y)?1:0}link(s){if(s.point===this.point)throw new Error("Tried to link already linked events");let o=s.point.events;for(let h=0,c=o.length;h<c;h++){let m=o[h];this.point.events.push(m),m.point=this.point}this.checkForConsuming()}checkForConsuming(){let s=this.point.events.length;for(let o=0;o<s;o++){let h=this.point.events[o];if(h.segment.consumedBy===void 0)for(let c=o+1;c<s;c++){let m=this.point.events[c];m.consumedBy===void 0&&h.otherSE.point.events===m.otherSE.point.events&&h.segment.consume(m.segment)}}}getAvailableLinkedEvents(){let s=[];for(let o=0,h=this.point.events.length;o<h;o++){let c=this.point.events[o];c!==this&&!c.segment.ringOut&&c.segment.isInResult()&&s.push(c)}return s}getLeftmostComparator(s){let o=new Map,h=c=>{let m=c.otherSE;o.set(c,{sine:Jo(this.point,s.point,m.point),cosine:vr(this.point,s.point,m.point)})};return(c,m)=>{o.has(c)||h(c),o.has(m)||h(m);let{sine:y,cosine:A}=o.get(c),{sine:b,cosine:P}=o.get(m);return y.isGreaterThanOrEqualTo(0)&&b.isGreaterThanOrEqualTo(0)?A.isLessThan(P)?1:A.isGreaterThan(P)?-1:0:y.isLessThan(0)&&b.isLessThan(0)?A.isLessThan(P)?-1:A.isGreaterThan(P)?1:0:b.isLessThan(y)?-1:b.isGreaterThan(y)?1:0}}},th=0,Xi=class Cr{constructor(s,o,h,c){Lt(this,"id");Lt(this,"leftSE");Lt(this,"rightSE");Lt(this,"rings");Lt(this,"windings");Lt(this,"ringOut");Lt(this,"consumedBy");Lt(this,"prev");Lt(this,"_prevInResult");Lt(this,"_beforeState");Lt(this,"_afterState");Lt(this,"_isInResult");this.id=++th,this.leftSE=s,s.segment=this,s.otherSE=o,this.rightSE=o,o.segment=this,o.otherSE=s,this.rings=h,this.windings=c}static compare(s,o){let h=s.leftSE.point.x,c=o.leftSE.point.x,m=s.rightSE.point.x,y=o.rightSE.point.x;if(y.isLessThan(h))return 1;if(m.isLessThan(c))return-1;let A=s.leftSE.point.y,b=o.leftSE.point.y,P=s.rightSE.point.y,N=o.rightSE.point.y;if(h.isLessThan(c)){if(b.isLessThan(A)&&b.isLessThan(P))return 1;if(b.isGreaterThan(A)&&b.isGreaterThan(P))return-1;let F=s.comparePoint(o.leftSE.point);if(F<0)return 1;if(F>0)return-1;let tt=o.comparePoint(s.rightSE.point);return tt!==0?tt:-1}if(h.isGreaterThan(c)){if(A.isLessThan(b)&&A.isLessThan(N))return-1;if(A.isGreaterThan(b)&&A.isGreaterThan(N))return 1;let F=o.comparePoint(s.leftSE.point);if(F!==0)return F;let tt=s.comparePoint(o.rightSE.point);return tt<0?1:tt>0?-1:1}if(A.isLessThan(b))return-1;if(A.isGreaterThan(b))return 1;if(m.isLessThan(y)){let F=o.comparePoint(s.rightSE.point);if(F!==0)return F}if(m.isGreaterThan(y)){let F=s.comparePoint(o.rightSE.point);if(F<0)return 1;if(F>0)return-1}if(!m.eq(y)){let F=P.minus(A),tt=m.minus(h),it=N.minus(b),lt=y.minus(c);if(F.isGreaterThan(tt)&&it.isLessThan(lt))return 1;if(F.isLessThan(tt)&&it.isGreaterThan(lt))return-1}return m.isGreaterThan(y)?1:m.isLessThan(y)||P.isLessThan(N)?-1:P.isGreaterThan(N)?1:s.id<o.id?-1:s.id>o.id?1:0}static fromRing(s,o,h){let c,m,y,A=Qe.comparePoints(s,o);if(A<0)c=s,m=o,y=1;else if(A>0)c=o,m=s,y=-1;else throw new Error(`Tried to create degenerate segment at [${s.x}, ${s.y}]`);let b=new Qe(c,!0),P=new Qe(m,!1);return new Cr(b,P,[h],[y])}replaceRightSE(s){this.rightSE=s,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let s=this.leftSE.point.y,o=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:s.isLessThan(o)?s:o},ur:{x:this.rightSE.point.x,y:s.isGreaterThan(o)?s:o}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(s){return s.x.eq(this.leftSE.point.x)&&s.y.eq(this.leftSE.point.y)||s.x.eq(this.rightSE.point.x)&&s.y.eq(this.rightSE.point.y)}comparePoint(s){return ee.orient(this.leftSE.point,s,this.rightSE.point)}getIntersection(s){let o=this.bbox(),h=s.bbox(),c=oa(o,h);if(c===null)return null;let m=this.leftSE.point,y=this.rightSE.point,A=s.leftSE.point,b=s.rightSE.point,P=Je(o,A)&&this.comparePoint(A)===0,N=Je(h,m)&&s.comparePoint(m)===0,F=Je(o,b)&&this.comparePoint(b)===0,tt=Je(h,y)&&s.comparePoint(y)===0;if(N&&P)return tt&&!F?y:!tt&&F?b:null;if(N)return F&&m.x.eq(b.x)&&m.y.eq(b.y)?null:m;if(P)return tt&&y.x.eq(A.x)&&y.y.eq(A.y)?null:A;if(tt&&F)return null;if(tt)return y;if(F)return b;let it=Qo(m,this.vector(),A,s.vector());return it===null||!Je(c,it)?null:ee.snap(it)}split(s){let o=[],h=s.events!==void 0,c=new Qe(s,!0),m=new Qe(s,!1),y=this.rightSE;this.replaceRightSE(m),o.push(m),o.push(c);let A=new Cr(c,y,this.rings.slice(),this.windings.slice());return Qe.comparePoints(A.leftSE.point,A.rightSE.point)>0&&A.swapEvents(),Qe.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),h&&(c.checkForConsuming(),m.checkForConsuming()),o}swapEvents(){let s=this.rightSE;this.rightSE=this.leftSE,this.leftSE=s,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let o=0,h=this.windings.length;o<h;o++)this.windings[o]*=-1}consume(s){let o=this,h=s;for(;o.consumedBy;)o=o.consumedBy;for(;h.consumedBy;)h=h.consumedBy;let c=Cr.compare(o,h);if(c!==0){if(c>0){let m=o;o=h,h=m}if(o.prev===h){let m=o;o=h,h=m}for(let m=0,y=h.rings.length;m<y;m++){let A=h.rings[m],b=h.windings[m],P=o.rings.indexOf(A);P===-1?(o.rings.push(A),o.windings.push(b)):o.windings[P]+=b}h.rings=null,h.windings=null,h.consumedBy=o,h.leftSE.consumedBy=o.leftSE,h.rightSE.consumedBy=o.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let s=this.prev.consumedBy||this.prev;this._beforeState=s.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let s=this.beforeState();this._afterState={rings:s.rings.slice(0),windings:s.windings.slice(0),multiPolys:[]};let o=this._afterState.rings,h=this._afterState.windings,c=this._afterState.multiPolys;for(let A=0,b=this.rings.length;A<b;A++){let P=this.rings[A],N=this.windings[A],F=o.indexOf(P);F===-1?(o.push(P),h.push(N)):h[F]+=N}let m=[],y=[];for(let A=0,b=o.length;A<b;A++){if(h[A]===0)continue;let P=o[A],N=P.poly;if(y.indexOf(N)===-1)if(P.isExterior)m.push(N);else{y.indexOf(N)===-1&&y.push(N);let F=m.indexOf(P.poly);F!==-1&&m.splice(F,1)}}for(let A=0,b=m.length;A<b;A++){let P=m[A].multiPoly;c.indexOf(P)===-1&&c.push(P)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let s=this.beforeState().multiPolys,o=this.afterState().multiPolys;switch(Mr.type){case"union":{let h=s.length===0,c=o.length===0;this._isInResult=h!==c;break}case"intersection":{let h,c;s.length<o.length?(h=s.length,c=o.length):(h=o.length,c=s.length),this._isInResult=c===Mr.numMultiPolys&&h<c;break}case"xor":{let h=Math.abs(s.length-o.length);this._isInResult=h%2===1;break}case"difference":{let h=c=>c.length===1&&c[0].isSubject;this._isInResult=h(s)!==h(o);break}}return this._isInResult}},ha=class{constructor(i,s,o){Lt(this,"poly");Lt(this,"isExterior");Lt(this,"segments");Lt(this,"bbox");if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=s,this.isExterior=o,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let h=ee.snap({x:new k(i[0][0]),y:new k(i[0][1])});this.bbox={ll:{x:h.x,y:h.y},ur:{x:h.x,y:h.y}};let c=h;for(let m=1,y=i.length;m<y;m++){if(typeof i[m][0]!="number"||typeof i[m][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let A=ee.snap({x:new k(i[m][0]),y:new k(i[m][1])});A.x.eq(c.x)&&A.y.eq(c.y)||(this.segments.push(Xi.fromRing(c,A,this)),A.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=A.x),A.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=A.y),A.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=A.x),A.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=A.y),c=A)}(!h.x.eq(c.x)||!h.y.eq(c.y))&&this.segments.push(Xi.fromRing(c,h,this))}getSweepEvents(){let i=[];for(let s=0,o=this.segments.length;s<o;s++){let h=this.segments[s];i.push(h.leftSE),i.push(h.rightSE)}return i}},eh=class{constructor(i,s){Lt(this,"multiPoly");Lt(this,"exteriorRing");Lt(this,"interiorRings");Lt(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new ha(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let o=1,h=i.length;o<h;o++){let c=new ha(i[o],this,!1);c.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=c.bbox.ll.x),c.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=c.bbox.ll.y),c.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=c.bbox.ur.x),c.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=c.bbox.ur.y),this.interiorRings.push(c)}this.multiPoly=s}getSweepEvents(){let i=this.exteriorRing.getSweepEvents();for(let s=0,o=this.interiorRings.length;s<o;s++){let h=this.interiorRings[s].getSweepEvents();for(let c=0,m=h.length;c<m;c++)i.push(h[c])}return i}},ol=class{constructor(i,s){Lt(this,"isSubject");Lt(this,"polys");Lt(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new k(Number.POSITIVE_INFINITY),y:new k(Number.POSITIVE_INFINITY)},ur:{x:new k(Number.NEGATIVE_INFINITY),y:new k(Number.NEGATIVE_INFINITY)}};for(let o=0,h=i.length;o<h;o++){let c=new eh(i[o],this);c.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=c.bbox.ll.x),c.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=c.bbox.ll.y),c.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=c.bbox.ur.x),c.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=c.bbox.ur.y),this.polys.push(c)}this.isSubject=s}getSweepEvents(){let i=[];for(let s=0,o=this.polys.length;s<o;s++){let h=this.polys[s].getSweepEvents();for(let c=0,m=h.length;c<m;c++)i.push(h[c])}return i}},jf=class ah{constructor(s){Lt(this,"events");Lt(this,"poly");Lt(this,"_isExteriorRing");Lt(this,"_enclosingRing");this.events=s;for(let o=0,h=s.length;o<h;o++)s[o].segment.ringOut=this;this.poly=null}static factory(s){let o=[];for(let h=0,c=s.length;h<c;h++){let m=s[h];if(!m.isInResult()||m.ringOut)continue;let y=null,A=m.leftSE,b=m.rightSE,P=[A],N=A.point,F=[];for(;y=A,A=b,P.push(A),A.point!==N;)for(;;){let tt=A.getAvailableLinkedEvents();if(tt.length===0){let ft=P[0].point,At=P[P.length-1].point;throw new Error(`Unable to complete output ring starting at [${ft.x}, ${ft.y}]. Last matching segment found ends at [${At.x}, ${At.y}].`)}if(tt.length===1){b=tt[0].otherSE;break}let it=null;for(let ft=0,At=F.length;ft<At;ft++)if(F[ft].point===A.point){it=ft;break}if(it!==null){let ft=F.splice(it)[0],At=P.splice(ft.index);At.unshift(At[0].otherSE),o.push(new ah(At.reverse()));continue}F.push({index:P.length,point:A.point});let lt=A.getLeftmostComparator(y);b=tt.sort(lt)[0].otherSE;break}o.push(new ah(P))}return o}getGeom(){let s=this.events[0].point,o=[s];for(let P=1,N=this.events.length-1;P<N;P++){let F=this.events[P].point,tt=this.events[P+1].point;ee.orient(F,s,tt)!==0&&(o.push(F),s=F)}if(o.length===1)return null;let h=o[0],c=o[1];ee.orient(h,s,c)===0&&o.shift(),o.push(o[0]);let m=this.isExteriorRing()?1:-1,y=this.isExteriorRing()?0:o.length-1,A=this.isExteriorRing()?o.length:-1,b=[];for(let P=y;P!=A;P+=m)b.push([o[P].x.toNumber(),o[P].y.toNumber()]);return b}isExteriorRing(){if(this._isExteriorRing===void 0){let s=this.enclosingRing();this._isExteriorRing=s?!s.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var c,m;let s=this.events[0];for(let y=1,A=this.events.length;y<A;y++){let b=this.events[y];Qe.compare(s,b)>0&&(s=b)}let o=s.segment.prevInResult(),h=o?o.prevInResult():null;for(;;){if(!o)return null;if(!h)return o.ringOut;if(h.ringOut!==o.ringOut)return((c=h.ringOut)==null?void 0:c.enclosingRing())!==o.ringOut?o.ringOut:(m=o.ringOut)==null?void 0:m.enclosingRing();o=h.prevInResult(),h=o?o.prevInResult():null}}},hl=class{constructor(i){Lt(this,"exteriorRing");Lt(this,"interiorRings");this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){let i=this.exteriorRing.getGeom();if(i===null)return null;let s=[i];for(let o=0,h=this.interiorRings.length;o<h;o++){let c=this.interiorRings[o].getGeom();c!==null&&s.push(c)}return s}},Zf=class{constructor(i){Lt(this,"rings");Lt(this,"polys");this.rings=i,this.polys=this._composePolys(i)}getGeom(){let i=[];for(let s=0,o=this.polys.length;s<o;s++){let h=this.polys[s].getGeom();h!==null&&i.push(h)}return i}_composePolys(i){var o;let s=[];for(let h=0,c=i.length;h<c;h++){let m=i[h];if(!m.poly)if(m.isExteriorRing())s.push(new hl(m));else{let y=m.enclosingRing();y!=null&&y.poly||s.push(new hl(y)),(o=y==null?void 0:y.poly)==null||o.addInterior(m)}}return s}},qf=class{constructor(i,s=Xi.compare){Lt(this,"queue");Lt(this,"tree");Lt(this,"segments");this.queue=i,this.tree=new ht(s),this.segments=[]}process(i){let s=i.segment,o=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(s),o;i.isLeft&&this.tree.add(s);let h=s,c=s;do h=this.tree.lastBefore(h);while(h!=null&&h.consumedBy!=null);do c=this.tree.firstAfter(c);while(c!=null&&c.consumedBy!=null);if(i.isLeft){let m=null;if(h){let A=h.getIntersection(s);if(A!==null&&(s.isAnEndpoint(A)||(m=A),!h.isAnEndpoint(A))){let b=this._splitSafely(h,A);for(let P=0,N=b.length;P<N;P++)o.push(b[P])}}let y=null;if(c){let A=c.getIntersection(s);if(A!==null&&(s.isAnEndpoint(A)||(y=A),!c.isAnEndpoint(A))){let b=this._splitSafely(c,A);for(let P=0,N=b.length;P<N;P++)o.push(b[P])}}if(m!==null||y!==null){let A=null;m===null?A=y:y===null?A=m:A=Qe.comparePoints(m,y)<=0?m:y,this.queue.delete(s.rightSE),o.push(s.rightSE);let b=s.split(A);for(let P=0,N=b.length;P<N;P++)o.push(b[P])}o.length>0?(this.tree.delete(s),o.push(i)):(this.segments.push(s),s.prev=h)}else{if(h&&c){let m=h.getIntersection(c);if(m!==null){if(!h.isAnEndpoint(m)){let y=this._splitSafely(h,m);for(let A=0,b=y.length;A<b;A++)o.push(y[A])}if(!c.isAnEndpoint(m)){let y=this._splitSafely(c,m);for(let A=0,b=y.length;A<b;A++)o.push(y[A])}}}this.tree.delete(s)}return o}_splitSafely(i,s){this.tree.delete(i);let o=i.rightSE;this.queue.delete(o);let h=i.split(s);return h.push(o),i.consumedBy===void 0&&this.tree.add(i),h}},Hf=class{constructor(){Lt(this,"type");Lt(this,"numMultiPolys")}run(i,s,o){la.type=i;let h=[new ol(s,!0)];for(let b=0,P=o.length;b<P;b++)h.push(new ol(o[b],!1));if(la.numMultiPolys=h.length,la.type==="difference"){let b=h[0],P=1;for(;P<h.length;)oa(h[P].bbox,b.bbox)!==null?P++:h.splice(P,1)}if(la.type==="intersection")for(let b=0,P=h.length;b<P;b++){let N=h[b];for(let F=b+1,tt=h.length;F<tt;F++)if(oa(N.bbox,h[F].bbox)===null)return[]}let c=new ht(Qe.compare);for(let b=0,P=h.length;b<P;b++){let N=h[b].getSweepEvents();for(let F=0,tt=N.length;F<tt;F++)c.add(N[F])}let m=new qf(c),y=null;for(c.size!=0&&(y=c.first(),c.delete(y));y;){let b=m.process(y);for(let P=0,N=b.length;P<N;P++){let F=b[P];F.consumedBy===void 0&&c.add(F)}c.size!=0?(y=c.first(),c.delete(y)):y=null}ee.reset();let A=jf.factory(m.segments);return new Zf(A).getGeom()}},la=new Hf,Mr=la,Vf=(i,...s)=>Mr.run("intersection",i,s),$f=(i,...s)=>Mr.run("difference",i,s);ee.set;function xr(i){let s={type:"Feature"};return s.geometry=i,s}function Lr(i){return i.type==="Feature"?i.geometry:i}function ll(i){return i&&i.geometry&&i.geometry.coordinates?i.geometry.coordinates:i}function Kf(i){return xr({type:"LineString",coordinates:i})}function Wf(i){return xr({type:"MultiLineString",coordinates:i})}function ul(i){return xr({type:"Polygon",coordinates:i})}function cl(i){return xr({type:"MultiPolygon",coordinates:i})}function Xf(i,s){let o=Lr(i),h=Lr(s),c=Vf(o.coordinates,h.coordinates);return c.length===0?null:c.length===1?ul(c[0]):cl(c)}function Yf(i,s){let o=Lr(i),h=Lr(s),c=$f(o.coordinates,h.coordinates);return c.length===0?null:c.length===1?ul(c[0]):cl(c)}function dl(i){return Array.isArray(i)?1+dl(i[0]):-1}function Jf(i){i instanceof L.Polyline&&(i=i.toGeoJSON(15));let s=ll(i),o=dl(s),h=[];return o>1?s.forEach(c=>{h.push(Kf(c))}):h.push(i),h}function Qf(i){let s=[];return i.eachLayer(o=>{s.push(ll(o.toGeoJSON(15)))}),Wf(s)}de.Cut=de.Polygon.extend({initialize(i){this._map=i,this._shape="Cut",this.toolbarButtonName="cutPolygon"},_finishShape(){if(this._editedLayers=[],!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=2)return;let s=L.polygon(i,this.options.pathOptions);s._latlngInfos=this._layer._latlngInfo,this.cut(s),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:h,originalLayer:c})=>{this._fireCut(c,h,c),this._fireCut(this._map,h,c),c.pm._fireEdit()}),this._editedLayers=[];let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},cut(i){let s=this._map._layers,o=i._latlngInfos||[];Object.keys(s).map(h=>s[h]).filter(h=>h.pm).filter(h=>!h._pmTempLayer).filter(h=>!L.PM.optIn&&!h.options.pmIgnore||L.PM.optIn&&h.options.pmIgnore===!1).filter(h=>h instanceof L.Polyline).filter(h=>h!==i).filter(h=>h.pm.options.allowCutting).filter(h=>this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0?this.options.layersToCut.indexOf(h)>-1:!0).filter(h=>!this._layerGroup.hasLayer(h)).filter(h=>{try{let c=!!Xe(i.toGeoJSON(15),h.toGeoJSON(15)).features.length>0;return c||h instanceof L.Polyline&&!(h instanceof L.Polygon)?c:!!Xf(i.toGeoJSON(15),h.toGeoJSON(15))}catch{return h instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(h=>{let c;if(h instanceof L.Polygon){c=L.polygon(h.getLatLngs());let b=c.getLatLngs();o.forEach(P=>{if(P&&P.snapInfo){let{latlng:N}=P,F=this._calcClosestLayer(N,[c]);if(F&&F.segment&&F.distance<this.options.snapDistance){let{segment:tt}=F;if(tt&&tt.length===2){let{indexPath:it,parentPath:lt,newIndex:ft}=L.PM.Utils._getIndexFromSegment(b,tt);(it.length>1?(0,hi.default)(b,lt):b).splice(ft,0,N)}}}})}else c=h;let m=this._cutLayer(i,c),y=L.geoJSON(m,h.options);y.getLayers().length===1&&([y]=y.getLayers()),this._setPane(y,"layerPane");let A=y.addTo(this._map.pm._getContainingLayer());if(A.pm.enable(h.pm.options),A.pm.disable(),h._pmTempLayer=!0,i._pmTempLayer=!0,h.remove(),h.removeFrom(this._map.pm._getContainingLayer()),i.remove(),i.removeFrom(this._map.pm._getContainingLayer()),A.getLayers&&A.getLayers().length===0&&this._map.pm.removeLayer({target:A}),A instanceof L.LayerGroup?(A.eachLayer(b=>{this._addDrawnLayerProp(b)}),this._addDrawnLayerProp(A)):this._addDrawnLayerProp(A),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let b=this.options.layersToCut.indexOf(h);b>-1&&this.options.layersToCut.splice(b,1)}this._editedLayers.push({layer:A,originalLayer:h})})},_cutLayer(i,s){let o=L.geoJSON(),h;if(s instanceof L.Polygon)h=Yf(s.toGeoJSON(15),i.toGeoJSON(15));else{let c=Jf(s);c.forEach(m=>{let y=qo(m,i.toGeoJSON(15)),A;y&&y.features.length>0?A=L.geoJSON(y):A=L.geoJSON(m),A.getLayers().forEach(b=>{Vo(i.toGeoJSON(15),b.toGeoJSON(15))||b.addTo(o)})}),c.length>1?h=Qf(o):h=o.toGeoJSON(15)}return h},_change:L.Util.falseFn}),de.Text=de.extend({initialize(i){this._map=i,this._shape="Text",this.toolbarButtonName="drawText"},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(St("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){var i;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),(i=this._hintMarker)==null||i.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let s=i;s.target=this._hintMarker,this._handleSnapping(s)}},_createMarker(i){var c,m,y,A;if(!i.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),(c=this.options.textOptions)==null?void 0:c.className){let b=this.options.textOptions.className.split(" ");this.textArea.classList.add(...b)}let o=this._createTextIcon(this.textArea),h=new L.Marker(s,{textMarker:!0,_textMarkerOverPM:!0,icon:o});if(this._setPane(h,"markerPane"),this._finishLayer(h),h.pm||(h.options.draggable=!1),h.addTo(this._map.pm._getContainingLayer()),h.pm){h.pm.textArea=this.textArea,L.setOptions(h.pm,{removeIfEmpty:((m=this.options.textOptions)==null?void 0:m.removeIfEmpty)??!0});let b=((y=this.options.textOptions)==null?void 0:y.focusAfterDraw)??!0;h.pm._createTextMarker(b),(A=this.options.textOptions)!=null&&A.text&&h.pm.setText(this.options.textOptions.text)}this._fireCreate(h),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(i){this.enable(),this._hintMarker.setLatLng(i.latlng)},_createTextArea(){let i=document.createElement("textarea");return i.readOnly=!0,i.classList.add("pm-textarea","pm-disabled"),i},_createTextIcon(i){return L.divIcon({className:"pm-text-marker",html:i})}});var tp={enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,Ae(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let i=this._getDOMElem();i&&(Ae(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(i)):L.DomEvent.on(i,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,Ae(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let i=this._getDOMElem();i&&(Ae(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(i)):L.DomEvent.off(i,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(i){let s=i.touches?i.touches[0]:i,o={originalEvent:s,target:this._layer};return o.containerPoint=this._map.mouseEventToContainerPoint(s),o.latlng=this._map.containerPointToLatLng(o.containerPoint),this._dragMixinOnMouseDown(o),!1},_simulateMouseMoveEvent(i){let s=i.touches?i.touches[0]:i,o={originalEvent:s,target:this._layer};return o.containerPoint=this._map.mouseEventToContainerPoint(s),o.latlng=this._map.containerPointToLatLng(o.containerPoint),this._dragMixinOnMouseMove(o),!1},_simulateMouseUpEvent(i){let s={originalEvent:i.touches?i.touches[0]:i,target:this._layer};return i.type.indexOf("touch")===-1&&(s.containerPoint=this._map.mouseEventToContainerPoint(i),s.latlng=this._map.containerPointToLatLng(s.containerPoint)),this._dragMixinOnMouseUp(s),!1},_dragMixinOnMouseDown(i){if(i.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(i);let s=i._fromLayerSync,o=this._syncLayers("_dragMixinOnMouseDown",i);if(this._layer instanceof L.Marker&&(this.options.snappable&&!s&&!o?this._initSnappableMarkers():this._disableSnapping()),this._layer instanceof L.CircleMarker){let h="resizeableCircleMarker";this._layer instanceof L.Circle&&(h="resizeableCircle"),this.options.snappable&&!s&&!o?this._layer.pm.options[h]||this._initSnappableMarkersDrag():this._layer.pm.options[h]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=i.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(i){this._overwriteEventIfItComesFromMarker(i);let s=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",i),this._dragging||(this._dragging=!0,L.DomUtil.addClass(s,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=i.latlng),this._onLayerDrag(i),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(i){let s=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",i),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),this._dragging?(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,s&&L.DomUtil.removeClass(s,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0):!1},_onLayerDrag(i){let{latlng:s}=i,o={lat:s.lat-this._tempDragCoord.lat,lng:s.lng-this._tempDragCoord.lng},h=c=>c.map(m=>{if(Array.isArray(m))return h(m);let y={lat:m.lat+o.lat,lng:m.lng+o.lng};return(m.alt||m.alt===0)&&(y.alt=m.alt),y});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let c=h([this._layer.getLatLng()]);this._layer.setLatLng(c[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let c=this._layer.getLatLng();this._layer._snapped&&(c=this._layer._orgLatLng);let m=h([c]);this._layer.setLatLng(m[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let c=h([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(c),this._fireChange(this._layer.getBounds(),"Edit")}else{let c=h(this._layer.getLatLngs());this._layer.setLatLngs(c),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=s,i.layer=this._layer,this._fireDrag(i)},addDraggingClass(){let i=this._getDOMElem();i&&L.DomUtil.addClass(i,"leaflet-pm-draggable")},removeDraggingClass(){let i=this._getDOMElem();i&&L.DomUtil.removeClass(i,"leaflet-pm-draggable")},_getDOMElem(){let i=null;return this._layer._path?i=this._layer._path:this._layer._renderer&&this._layer._renderer._container?i=this._layer._renderer._container:this._layer._image?i=this._layer._image:this._layer._icon&&(i=this._layer._icon),i},_overwriteEventIfItComesFromMarker(i){i.target.getLatLng&&(!i.target._radius||i.target._radius<=10)&&(i.containerPoint=this._map.mouseEventToContainerPoint(i.originalEvent),i.latlng=this._map.containerPointToLatLng(i.containerPoint))},_syncLayers(i,s){if(this.enabled())return!1;if(!s._fromLayerSync&&this._layer===s.target&&this.options.syncLayersOnDrag){s._fromLayerSync=!0;let o=[];if(L.Util.isArray(this.options.syncLayersOnDrag))o=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(h=>{h instanceof L.LayerGroup&&(o=o.concat(h.pm.getLayers(!0)))});else if(this.options.syncLayersOnDrag===!0&&this._parentLayerGroup)for(let h in this._parentLayerGroup){let c=this._parentLayerGroup[h];c.pm&&(o=c.pm.getLayers(!0))}return L.Util.isArray(o)&&o.length>0&&(o=o.filter(h=>!!h.pm).filter(h=>!!h.pm.options.draggable),o.forEach(h=>{h!==this._layer&&h.pm[i]&&(h._snapped=!1,h.pm[i](s))})),o.length>0}return!1},_stopDOMImageDrag(i){return i.preventDefault(),!1}},ep=tp,ip=M(pi());function np(i,s,o,h){return o.unproject(s.transform(o.project(i,h)),h)}function fl(i,s,o){let h=o.getMaxZoom();if(h===1/0&&(h=o.getZoom()),L.Util.isArray(i)){let c=[];return i.forEach(m=>{c.push(fl(m,s,o))}),c}return i instanceof L.LatLng?np(i,s,o,h):null}function rs(i,s){s instanceof L.Layer&&(s=s.getLatLng());let o=i.getMaxZoom();return o===1/0&&(o=i.getZoom()),i.project(s,o)}function br(i,s){let o=i.getMaxZoom();return o===1/0&&(o=i.getZoom()),i.unproject(s,o)}var sp={_onRotateStart(i){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=rs(this._map,this._rotationOriginLatLng),this._rotationStartPoint=rs(this._map,i.target.getLatLng()),this._initialRotateLatLng=Ke(this._layer),this._startAngle=this.getAngle();let s=Ke(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,s),this._fireRotationStart(this._map,s)},_onRotate(i){let s=rs(this._map,i.target.getLatLng()),o=this._rotationStartPoint,h=this._rotationOriginPoint,c=Math.atan2(s.y-h.y,s.x-h.x)-Math.atan2(o.y-h.y,o.x-h.x);this._layer.setLatLngs(this._rotateLayer(c,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let m=this;function y(N,F=[],tt=-1){if(tt>-1&&F.push(tt),L.Util.isArray(N[0]))N.forEach((it,lt)=>y(it,F.slice(),lt));else{let it=F.length>0?(0,ip.default)(m._markers,F):m._markers[0];N.forEach((lt,ft)=>{it[ft].setLatLng(lt)})}}y(this._layer.getLatLngs());let A=Ke(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(c,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let b=c*180/Math.PI;b=b<0?b+360:b;let P=b+this._startAngle;this._setAngle(P),this._rotationLayer.pm._setAngle(P),this._fireRotation(this._rotationLayer,b,A),this._fireRotation(this._map,b,A),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let i=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let s=Ke(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=Ke(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,i,s),this._fireRotationEnd(this._map,i,s),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(i,s,o,h,c){let m=rs(c,o);return this._matrix=h.clone().rotate(i,m).flip(),fl(s,this._matrix,c)},_setAngle(i){i=i<0?i+360:i,this._angle=i%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let i=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),s=i.getCenter();return i.removeFrom(this._layer._map),s},enableRotate(){if(!this.options.allowRotation){this.disableRotate();return}this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&this._angle===void 0&&this.setInitAngle(Nn(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let i={fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0};this._rotatePoly=L.polygon(this._layer.getLatLngs(),i),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=Ke(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(i){let s=this.getAngle(),o=this._layer.getLatLngs(),h=i*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(h,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+i),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(h,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let c=this.getAngle()-s;c=c<0?c+360:c,this._startAngle=s,this._fireRotation(this._layer,c,o,this._layer),this._fireRotation(this._map||this._layer._map,c,o,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(i){let s=i-this.getAngle();this.rotateLayer(s)},getAngle(){return this._angle||0},setInitAngle(i){this._setAngle(i)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(i){this._rotationCenter=i,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(i)}},ap=sp,rp=L.Class.extend({includes:[ep,Js,ap,Gn],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(i){L.Util.setOptions(this,i)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(i,s){s==="layerPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":s==="vertexPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":s==="markerPane"&&(i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(i,s){let o=s.target,h={layer:this._layer,marker:o,event:s},c="";return i==="move"?c="moveVertexValidation":i==="add"?c="addVertexValidation":i==="remove"&&(c="removeVertexValidation"),this.options[c]&&typeof this.options[c]=="function"&&!this.options[c](h)?(i==="move"&&(o._cancelDragEventChain=o.getLatLng()),!1):(o._cancelDragEventChain=null,!0)},_vertexValidationDrag(i){return i._cancelDragEventChain?(i._latlng=i._cancelDragEventChain,i.update(),!1):!0},_vertexValidationDragEnd(i){return i._cancelDragEventChain?(i._cancelDragEventChain=null,!1):!0}}),ge=rp;ge.LayerGroup=L.Class.extend({initialize(i){this._layerGroup=i,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(h=>this._initLayer(h));let s=h=>{if(h.layer._pmTempLayer)return;this._layers=this.getLayers();let c=this._layers.filter(m=>!m.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in m.pm._parentLayerGroup));c.forEach(m=>{this._initLayer(m)}),c.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(s,100,this),this),this._layerGroup.on("layerremove",h=>{this._removeLayerFromGroup(h.target)},this);let o=h=>{h.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(o,100,this),this)},enable(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this._options=i,this._layers.forEach(o=>{o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.enable(i,s)):o.pm.enable(i)})},disable(i=[]){i.length===0&&(this._layers=this.getLayers()),this._layers.forEach(s=>{s instanceof L.LayerGroup?i.indexOf(s._leaflet_id)===-1&&(i.push(s._leaflet_id),s.pm.disable(i)):s.pm.disable()})},enabled(i=[]){return i.length===0&&(this._layers=this.getLayers()),!!this._layers.find(s=>s instanceof L.LayerGroup?i.indexOf(s._leaflet_id)===-1?(i.push(s._leaflet_id),s.pm.enabled(i)):!1:s.pm.enabled())},toggleEdit(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this._options=i,this._layers.forEach(o=>{o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.toggleEdit(i,s)):o.pm.toggleEdit(i)})},_initLayer(i){let s=L.Util.stamp(this._layerGroup);i.pm._parentLayerGroup||(i.pm._parentLayerGroup={}),i.pm._parentLayerGroup[s]=this._layerGroup},_removeLayerFromGroup(i){if(i.pm&&i.pm._layerGroup){let s=L.Util.stamp(this._layerGroup);delete i.pm._layerGroup[s]}},dragging(){return this._layers=this.getLayers(),this._layers?!!this._layers.find(i=>i.pm.dragging()):!1},getOptions(){return this.options},_getMap(){var i;return this._map||((i=this._layers.find(s=>!!s._map))==null?void 0:i._map)||null},getLayers(i=!1,s=!0,o=!0,h=[]){let c=[];return i?this._layerGroup.getLayers().forEach(m=>{c.push(m),m instanceof L.LayerGroup&&h.indexOf(m._leaflet_id)===-1&&(h.push(m._leaflet_id),c=c.concat(m.pm.getLayers(!0,!0,!0,h)))}):c=this._layerGroup.getLayers(),o&&(c=c.filter(m=>!(m instanceof L.LayerGroup))),s&&(c=c.filter(m=>!!m.pm),c=c.filter(m=>!m._pmTempLayer),c=c.filter(m=>!L.PM.optIn&&!m.options.pmIgnore||L.PM.optIn&&m.options.pmIgnore===!1)),c},setOptions(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this.options=i,this._layers.forEach(o=>{o.pm&&(o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.setOptions(i,s)):o.pm.setOptions(i))})}}),ge.Marker=ge.extend({_shape:"Marker",initialize(i){this._layer=i,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(i={draggable:!0}){if(L.Util.setOptions(this,i),!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._fireEnable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(i){let s=i.target;s.remove(),this._fireRemove(s),this._fireRemove(this._map,s)},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)}});var Yi=M(pi()),op={filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let i=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=i.filter((s,o,h)=>h.indexOf(s)===o)},_removeFromCache(i){let s=this.markerCache.indexOf(i);s>-1&&this.markerCache.splice(s,1)},renderLimits(i){this.markerCache.forEach(s=>{i.includes(s)?this._markerGroup.addLayer(s):this._markerGroup.removeLayer(s)})},applyLimitFilters({latlng:i={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let s=[...this._filterClosestMarkers(i)];this.renderLimits(s)},_filterClosestMarkers(i){let s=[...this.markerCache],o=this.options.limitMarkersToCount;return o===-1?s:(s.sort((h,c)=>{let m=h._latlng.distanceTo(i),y=c._latlng.distanceTo(i);return m-y}),s.filter((h,c)=>o>-1?c<o:!0))},_preventRenderMarkers:!1,_preventRenderingMarkers(i){this._preventRenderMarkers=!!i}},hp=op;ge.Line=ge.extend({includes:[hp],_shape:"Line",initialize(i){this._layer=i,this._enabled=!1},enable(i){if(L.Util.setOptions(this,i),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}this.enabled()&&this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.on("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this),this.options.allowSelfIntersection?this.cachedColor=void 0:(this._layer.options.color!=="#f00000ff"?(this.cachedColor=this._layer.options.color,this.isRed=!1):this.isRed=!0,this._handleLayerStyle()),this._fireEnable()}},disable(){if(!this.enabled()||this._dragging)return;this._enabled=!1,this._markerGroup.clearLayers(),this._markerGroup.removeFrom(this._map),this._layer.off("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);let i=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(i,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(i){return this.enabled()?this.disable():this.enable(i),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let i=this._map,s=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(i),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let o=h=>{if(Array.isArray(h[0]))return h.map(o,this);let c=h.map(this._createMarker,this);return this.options.hideMiddleMarkers!==!0&&h.map((m,y)=>{let A=this.isPolygon()?(y+1)%h.length:y+1;return this._createMiddleMarker(c[y],c[A])}),c};this._markers=o(s),this.filterMarkerGroup(),i.addLayer(this._markerGroup)},_createMarker(i){let s=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this.options.rotate?(s.on("dragstart",this._onRotateStart,this),s.on("drag",this._onRotate,this),s.on("dragend",this._onRotateEnd,this)):(s.on("click",this._onVertexClick,this),s.on("dragstart",this._onMarkerDragStart,this),s.on("move",this._onMarkerDrag,this),s.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||s.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(s),s},_createMiddleMarker(i,s){if(!i||!s)return!1;let o=L.PM.Utils.calcMiddleLatLng(this._map,i.getLatLng(),s.getLatLng()),h=this._createMarker(o),c=L.divIcon({className:"marker-icon marker-icon-middle"});return h.setIcon(c),h.leftM=i,h.rightM=s,i._middleMarkerNext=h,s._middleMarkerPrev=h,h.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),h.on("movestart",this._onMiddleMarkerMoveStart,this),h},_onMiddleMarkerClick(i){let s=i.target;if(!this._vertexValidation("add",i))return;let o=L.divIcon({className:"marker-icon"});s.setIcon(o),this._addMarker(s,s.leftM,s.rightM)},_onMiddleMarkerMoveStart(i){let s=i.target;if(s.on("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidation("add",i)){s.on("move",this._onMiddleMarkerMovePrevent,this);return}s._dragging=!0,this._addMarker(s,s.leftM,s.rightM)},_onMiddleMarkerMovePrevent(i){let s=i.target;this._vertexValidationDrag(s)},_onMiddleMarkerMoveEnd(i){let s=i.target;if(s.off("move",this._onMiddleMarkerMovePrevent,this),s.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(s))return;let o=L.divIcon({className:"marker-icon"});s.setIcon(o),setTimeout(()=>{delete s._dragging},100)},_addMarker(i,s,o){i.off("movestart",this._onMiddleMarkerMoveStart,this),i.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let h=i.getLatLng(),c=this._layer._latlngs;delete i.leftM,delete i.rightM;let{indexPath:m,index:y,parentPath:A}=L.PM.Utils.findDeepMarkerIndex(this._markers,s),b=m.length>1?(0,Yi.default)(c,A):c,P=m.length>1?(0,Yi.default)(this._markers,A):this._markers;b.splice(y+1,0,h),P.splice(y+1,0,i),this._layer.setLatLngs(c),this.options.hideMiddleMarkers!==!0&&(this._createMiddleMarker(s,i),this._createMiddleMarker(i,o)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(i,L.PM.Utils.findDeepMarkerIndex(this._markers,i).indexPath,h),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return jn(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(i){let s=this._layer,o,h;if(this.options.allowSelfIntersection?o=!1:(h=jn(this._layer.toGeoJSON(15)),o=h.features.length>0),o){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return o;i?this._flashLayer():(s.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(h)}else s.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return o},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(i,s){i.forEach(o=>{Array.isArray(o)?this._updateDisabledMarkerStyle(o,s):o._icon&&(s&&!this._checkMarkerAllowedToDrag(o)?L.DomUtil.addClass(o._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(o._icon,"vertexmarker-disabled"))})},_removeMarker(i){let s=i.target;if(!this._vertexValidation("remove",i))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=Ke(this._layer,this._layer.getLatLngs()));let o=this._layer.getLatLngs(),{indexPath:h,index:c,parentPath:m}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);if(!h)return;let y=h.length>1?(0,Yi.default)(o,m):o,A=h.length>1?(0,Yi.default)(this._markers,m):this._markers,b=m[m.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!b&&(y.length<=2||this.isPolygon()&&y.length<=3)){this._flashLayer();return}y.splice(c,1),this._layer.setLatLngs(o),this.isPolygon()&&y.length<=2&&y.splice(0,y.length);let P=!1;if(y.length<=1&&(y.splice(0,y.length),m.length>1&&h.length>1&&(o=un(o)),this._layer.setLatLngs(o),this._initMarkers(),P=!0),Pi(o)||this._layer.remove(),o=un(o),this._layer.setLatLngs(o),this._markers=un(this._markers),!P&&(A=h.length>1?(0,Yi.default)(this._markers,m):this._markers,s._middleMarkerPrev&&(this._markerGroup.removeLayer(s._middleMarkerPrev),this._removeFromCache(s._middleMarkerPrev)),s._middleMarkerNext&&(this._markerGroup.removeLayer(s._middleMarkerNext),this._removeFromCache(s._middleMarkerNext)),this._markerGroup.removeLayer(s),this._removeFromCache(s),A)){let N,F;if(this.isPolygon()?(N=(c+1)%A.length,F=(c+(A.length-1))%A.length):(F=c-1<0?void 0:c-1,N=c+1>=A.length?void 0:c+1),N!==F){let tt=A[F],it=A[N];this.options.hideMiddleMarkers!==!0&&this._createMiddleMarker(tt,it)}A.splice(c,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(s,h),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(i){let s=this._layer.getLatLngs(),o=i.getLatLng(),{indexPath:h,index:c,parentPath:m}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);(h.length>1?(0,Yi.default)(s,m):s).splice(c,1,o),this._layer.setLatLngs(s)},_getNeighborMarkers(i){let{indexPath:s,index:o,parentPath:h}=L.PM.Utils.findDeepMarkerIndex(this._markers,i),c=s.length>1?(0,Yi.default)(this._markers,h):this._markers,m=(o+1)%c.length,y=(o+(c.length-1))%c.length,A=c[y],b=c[m];return{prevMarker:A,nextMarker:b}},_checkMarkerAllowedToDrag(i){let{prevMarker:s,nextMarker:o}=this._getNeighborMarkers(i),h=L.polyline([s.getLatLng(),i.getLatLng()]),c=L.polyline([i.getLatLng(),o.getLatLng()]),m=Xe(this._layer.toGeoJSON(15),h.toGeoJSON(15)).features.length,y=Xe(this._layer.toGeoJSON(15),c.toGeoJSON(15)).features.length;return i.getLatLng()===this._markers[0][0].getLatLng()?y+=1:i.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(m+=1),!(m<=2&&y<=2)},_onMarkerDragStart(i){let s=i.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",i))return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragStart(i,o),this.options.allowSelfIntersection||(this._coordsBeforeEdit=Ke(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(s):this._markerAllowedToDrag=null},_onMarkerDrag(i){let s=i.target;if(!this._vertexValidationDrag(s))return;let{indexPath:o,index:h,parentPath:c}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);if(!o)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&this._markerAllowedToDrag===!1){this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),this._handleLayerStyle();return}this.updatePolygonCoordsFromMarkerDrag(s);let m=o.length>1?(0,Yi.default)(this._markers,c):this._markers,y=(h+1)%m.length,A=(h+(m.length-1))%m.length,b=s.getLatLng(),P=m[A].getLatLng(),N=m[y].getLatLng();if(s._middleMarkerNext){let F=L.PM.Utils.calcMiddleLatLng(this._map,b,N);s._middleMarkerNext.setLatLng(F)}if(s._middleMarkerPrev){let F=L.PM.Utils.calcMiddleLatLng(this._map,b,P);s._middleMarkerPrev.setLatLng(F)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(i,o),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(i){let s=i.target;if(!this._vertexValidationDragEnd(s))return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s),h=!this.options.allowSelfIntersection&&this.hasSelfIntersection();h&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(h=!1);let c=!this.options.allowSelfIntersection&&h;if(this._fireMarkerDragEnd(i,o,c),c){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(i,o);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(i){let s=i.target;if(s._dragging)return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireVertexClick(i,o)}}),ge.Polygon=ge.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(i){let{prevMarker:s,nextMarker:o}=this._getNeighborMarkers(i),h=L.polyline([s.getLatLng(),i.getLatLng()]),c=L.polyline([i.getLatLng(),o.getLatLng()]),m=Xe(this._layer.toGeoJSON(15),h.toGeoJSON(15)).features.length,y=Xe(this._layer.toGeoJSON(15),c.toGeoJSON(15)).features.length;return!(m<=2&&y<=2)}}),ge.Rectangle=ge.Polygon.extend({_shape:"Rectangle",_initMarkers(){let i=this._map,s=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,i.addLayer(this._markerGroup),this._markers=[],this._markers[0]=s.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((o,h)=>{let c=this._cornerMarkers.find(m=>m._index===h);c&&c.setLatLng(o)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(i,s){let o=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(o,"vertexPane"),o._origLatLng=i,o._index=s,o._pmTempLayer=!0,o.on("click",this._onVertexClick,this),this._markerGroup.addLayer(o),o},_addMarkerEvents(){this._markers[0].forEach(i=>{i.on("dragstart",this._onMarkerDragStart,this),i.on("drag",this._onMarkerDrag,this),i.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||i.on("contextmenu",this._removeMarker,this)})},_removeMarker(){return null},_onMarkerDragStart(i){if(!this._vertexValidation("move",i))return;let s=i.target,o=this._cornerMarkers;s._oppositeCornerLatLng=o.find(c=>c._index===(s._index+2)%4).getLatLng(),s._snapped=!1;let{indexPath:h}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragStart(i,h)},_onMarkerDrag(i){let s=i.target;if(!this._vertexValidationDrag(s)||s._index===void 0)return;this._adjustRectangleForMarkerMove(s);let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDrag(i,o),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(i){let s=i.target;if(!this._vertexValidationDragEnd(s))return;this._cornerMarkers.forEach(h=>{delete h._oppositeCornerLatLng});let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragEnd(i,o),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(i){L.extend(i._origLatLng,i._latlng);let s=L.PM.Utils._getRotatedRectangle(i.getLatLng(),i._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(s),this._adjustAllMarkers(i),this._layer.redraw()},_adjustAllMarkers(i){let s=this._layer.getLatLngs()[0];if(s&&s.length!==4&&s.length>0)s.forEach((o,h)=>{this._cornerMarkers[h].setLatLng(o)}),this._cornerMarkers.slice(s.length).forEach(o=>{o.setLatLng(s[0])});else if(!s||!s.length)console.error("The layer has no LatLngs");else{let o=s.findIndex(h=>i.getLatLng().equals(h));o>-1?(this._cornerMarkers[(i._index+1)%4].setLatLng(s[(o+1)%4]),this._cornerMarkers[(i._index+2)%4].setLatLng(s[(o+2)%4]),this._cornerMarkers[(i._index+3)%4].setLatLng(s[(o+3)%4])):this._cornerMarkers.forEach(h=>{h.setLatLng(s[h._index])})}},_findCorners(){this._angle===void 0&&this.setInitAngle(Nn(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let i=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(i[0],i[2],this.getAngle(),this._map||this)}}),ge.CircleMarker=ge.extend({_shape:"CircleMarker",initialize(i){this._layer=i,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(i={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,i),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let i=this._map;this._helperLayers&&(this._helperLayers.removeFrom(i),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(i);let s=this._layer.getLatLng(),o=this._layer._radius,h=this._getLatLngOnCircle(s,o);this._centerMarker=this._createCenterMarker(s),this._outerMarker=this._createOuterMarker(h),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(i,s){let o=this._map.project(i),h=L.point(o.x+s,o.y);return this._map.unproject(h)},_createHintLine(i,s){let o=i.getLatLng(),h=s.getLatLng();this._hintline=L.polyline([o,h],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(i){let s=this._createMarker(i);return this.options.draggable?(L.DomUtil.addClass(s._icon,"leaflet-pm-draggable"),s.on("move",this._moveCircle,this)):s.dragging.disable(),s},_createOuterMarker(i){let s=this._createMarker(i);return s.on("drag",this._resizeCircle,this),s},_createMarker(i){let s=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._origLatLng=i,s._pmTempLayer=!0,s.on("dragstart",this._onMarkerDragStart,this),s.on("drag",this._onMarkerDrag,this),s.on("dragend",this._onMarkerDragEnd,this),s.on("click",this._onVertexClick,this),this._helperLayers.addLayer(s),s},_moveCircle(i){if(i.target._cancelDragEventChain)return;let s=this._centerMarker.getLatLng();this._layer.setLatLng(s);let o=this._layer._radius,h=this._getLatLngOnCircle(s,o);this._outerMarker._latlng=h,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let i=this._layer.getLatLng(),s=this._layer._radius,o=this._getLatLngOnCircle(i,s);this._outerMarker.setLatLng(o),this._centerMarker.setLatLng(i),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(o),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng();this._hintline.setLatLngs([i,s])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(i){this._vertexValidation("move",i)&&this._fireMarkerDragStart(i)},_onMarkerDrag(i){let s=i.target;s instanceof L.Marker&&!this._vertexValidationDrag(s)||this._fireMarkerDrag(i)},_onMarkerDragEnd(i){this._extedingMarkerDragEnd();let s=i.target;this._vertexValidationDragEnd(s)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(i))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let i=this._layer._map||this._map;if(i){let s=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),i,this._layer.getLatLng()),o=L.circle(this._layer.getLatLng(),this._layer.options);o.setRadius(s);let h=i&&i.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(o,200,!h).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(o,200,!h),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);return this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?s=Un(this._map,i,s,this._getMinDistanceInMeter(i)):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(s=Un(this._map,i,s,this._getMaxDistanceInMeter(i))),s},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._outerMarker.setLatLng(this._outerMarker._orgLatLng):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(i,s){return this._map.project(i).distanceTo(this._map.project(s))},_getMinDistanceInMeter(i){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,i)},_getMaxDistanceInMeter(i){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,i)},_onVertexClick(i){i.target._dragging||this._fireVertexClick(i,void 0)}}),ge.Circle=ge.CircleMarker.extend({_shape:"Circle",initialize(i){this._layer=i,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(i){L.PM.Edit.CircleMarker.prototype.enable.call(this,i||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let i=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(i,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let i=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!i).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!i),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(i,s){return this._map.distance(i,s)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(i){i.target._dragging||this._fireVertexClick(i,void 0)}}),ge.ImageOverlay=ge.extend({_shape:"ImageOverlay",initialize(i){this._layer=i,this._enabled=!1},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},enabled(){return this._enabled},enable(i={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,i),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let i=this._layer.getBounds(),s=i.getNorthWest(),o=i.getNorthEast(),h=i.getSouthEast(),c=i.getSouthWest();return[s,o,h,c]}}),ge.Text=ge.extend({_shape:"Text",initialize(i){this._layer=i,this._enabled=!1},enable(i){if(L.Util.setOptions(this,i),!!this.textArea){if(!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),L.DomEvent.off(document,"click",this._documentClick,this),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let i=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),i.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let i=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,s=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${i}px`,this.textArea.style.width=`${s}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&L.DomEvent.on(document,"click",this._documentClick,this)},100)},_documentClick(i){i.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(i={}){let s=this._hasFocus;this._hasFocus=i.type==="focus",!s!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(i){i&&(this.textArea.value=i),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let s=this.options.className.split(" ");this.textArea.classList.add(...s)}let i=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(i),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(i=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),i===!0&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(i){i.preventDefault()}});var ih=function(i,s,o,h,c,m){this._matrix=[i,s,o,h,c,m]};ih.init=()=>new L.PM.Matrix(1,0,0,1,0,0),ih.prototype={transform(i){return this._transform(i.clone())},_transform(i){let s=this._matrix,{x:o,y:h}=i;return i.x=s[0]*o+s[1]*h+s[4],i.y=s[2]*o+s[3]*h+s[5],i},untransform(i){let s=this._matrix;return new L.Point((i.x/s[0]-s[4])/s[0],(i.y/s[2]-s[5])/s[2])},clone(){let i=this._matrix;return new L.PM.Matrix(i[0],i[1],i[2],i[3],i[4],i[5])},translate(i){if(i===void 0)return new L.Point(this._matrix[4],this._matrix[5]);let s,o;return typeof i=="number"?(s=i,o=i):(s=i.x,o=i.y),this._add(1,0,0,1,s,o)},scale(i,s){if(i===void 0)return new L.Point(this._matrix[0],this._matrix[3]);let o,h;return s=s||L.point(0,0),typeof i=="number"?(o=i,h=i):(o=i.x,h=i.y),this._add(o,0,0,h,s.x,s.y)._add(1,0,0,1,-s.x,-s.y)},rotate(i,s){let o=Math.cos(i),h=Math.sin(i);return s=s||new L.Point(0,0),this._add(o,h,-h,o,s.x,s.y)._add(1,0,0,1,-s.x,-s.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(i,s,o,h,c,m){let y=[[],[],[]],A=this._matrix,b=[[A[0],A[2],A[4]],[A[1],A[3],A[5]],[0,0,1]],P=[[i,o,c],[s,h,m],[0,0,1]],N;i&&i instanceof L.PM.Matrix&&(A=i._matrix,P=[[A[0],A[2],A[4]],[A[1],A[3],A[5]],[0,0,1]]);for(let F=0;F<3;F+=1)for(let tt=0;tt<3;tt+=1){N=0;for(let it=0;it<3;it+=1)N+=b[F][it]*P[it][tt];y[F][tt]=N}return this._matrix=[y[0][0],y[1][0],y[0][1],y[1][1],y[0][2],y[1][2]],this}};var lp=ih,up={calcMiddleLatLng(i,s,o){let h=i.project(s),c=i.project(o);return i.unproject(h._add(c)._divideBy(2))},findLayers(i){let s=[];return i.eachLayer(o=>{(o instanceof L.Polyline||o instanceof L.Marker||o instanceof L.Circle||o instanceof L.CircleMarker||o instanceof L.ImageOverlay)&&s.push(o)}),s=s.filter(o=>!!o.pm),s=s.filter(o=>!o._pmTempLayer),s=s.filter(o=>!L.PM.optIn&&!o.options.pmIgnore||L.PM.optIn&&o.options.pmIgnore===!1),s},circleToPolygon(i,s=60,o=!0){let h=i.getLatLng(),c=i.getRadius(),m=zn(h,c,s,0,o),y=[];for(let A=0;A<m.length;A+=1){let b=[m[A].lat,m[A].lng];y.push(b)}return L.polygon(y,i.options)},disablePopup(i){i.getPopup()&&(i._tempPopupCopy=i.getPopup(),i.unbindPopup())},enablePopup(i){i._tempPopupCopy&&(i.bindPopup(i._tempPopupCopy),delete i._tempPopupCopy)},_fireEvent(i,s,o,h=!1){i.fire(s,o,h);let{groups:c}=this.getAllParentGroups(i);c.forEach(m=>{m.fire(s,o,h)})},getAllParentGroups(i){let s=[],o=[],h=c=>{for(let m in c._eventParents)if(s.indexOf(m)===-1){s.push(m);let y=c._eventParents[m];o.push(y),h(y)}};return!i._pmLastGroupFetch||!i._pmLastGroupFetch.time||new Date().getTime()-i._pmLastGroupFetch.time>1e3?(h(i),i._pmLastGroupFetch={time:new Date().getTime(),groups:o,groupIds:s},{groupIds:s,groups:o}):{groups:i._pmLastGroupFetch.groups,groupIds:i._pmLastGroupFetch.groupIds}},createGeodesicPolygon:zn,getTranslation:St,findDeepCoordIndex(i,s,o=!0){let h,c=y=>(A,b)=>{let P=y.concat(b);if(o){if(A.lat&&A.lat===s.lat&&A.lng===s.lng)return h=P,!0}else if(A.lat&&L.latLng(A).equals(s))return h=P,!0;return Array.isArray(A)&&A.some(c(P))};i.some(c([]));let m={};return h&&(m={indexPath:h,index:h[h.length-1],parentPath:h.slice(0,h.length-1)}),m},findDeepMarkerIndex(i,s){let o,h=m=>(y,A)=>{let b=m.concat(A);return y._leaflet_id===s._leaflet_id?(o=b,!0):Array.isArray(y)&&y.some(h(b))};i.some(h([]));let c={};return o&&(c={indexPath:o,index:o[o.length-1],parentPath:o.slice(0,o.length-1)}),c},_getIndexFromSegment(i,s){if(s&&s.length===2){let o=this.findDeepCoordIndex(i,s[0]),h=this.findDeepCoordIndex(i,s[1]),c=Math.max(o.index,h.index);return(o.index===0||h.index===0)&&c!==1&&(c+=1),{indexA:o,indexB:h,newIndex:c,indexPath:o.indexPath,parentPath:o.parentPath}}return null},_getRotatedRectangle(i,s,o,h){let c=rs(h,i),m=rs(h,s),y=o*Math.PI/180,A=Math.cos(y),b=Math.sin(y),P=(m.x-c.x)*A+(m.y-c.y)*b,N=(m.y-c.y)*A-(m.x-c.x)*b,F=P*A+c.x,tt=P*b+c.y,it=-N*b+c.x,lt=N*A+c.y,ft=br(h,c),At=br(h,{x:F,y:tt}),Gt=br(h,m),z=br(h,{x:it,y:lt});return[ft,At,Gt,z]},pxRadiusToMeterRadius(i,s,o){let h=s.project(o),c=L.point(h.x+i,h.y);return s.distance(s.unproject(c),o)}},cp=up;L.PM=L.PM||{version:zs.version,Map:or,Toolbar:Ys,Draw:de,Edit:ge,Utils:cp,Matrix:lp,activeLang:"en",optIn:!1,initialize(i){this.addInitHooks(i)},setOptIn(i){this.optIn=!!i},addInitHooks(){function i(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}L.Map.addInitHook(i);function s(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}L.LayerGroup.addInitHook(s);function o(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}L.Marker.addInitHook(o);function h(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}L.CircleMarker.addInitHook(h);function c(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}L.Polyline.addInitHook(c);function m(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}L.Polygon.addInitHook(m);function y(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}L.Rectangle.addInitHook(y);function A(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}L.Circle.addInitHook(A);function b(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))}L.ImageOverlay.addInitHook(b)},reInitLayer(i){i instanceof L.LayerGroup&&i.eachLayer(s=>{this.reInitLayer(s)}),i.pm||L.PM.optIn&&i.options.pmIgnore!==!1||i.options.pmIgnore||(i instanceof L.Map?i.pm=new L.PM.Map(i):i instanceof L.Marker?i.options.textMarker?(i.pm=new L.PM.Edit.Text(i),i.pm._initTextMarker(),i.pm._createTextMarker(!1)):i.pm=new L.PM.Edit.Marker(i):i instanceof L.Circle?i.pm=new L.PM.Edit.Circle(i):i instanceof L.CircleMarker?i.pm=new L.PM.Edit.CircleMarker(i):i instanceof L.Rectangle?i.pm=new L.PM.Edit.Rectangle(i):i instanceof L.Polygon?i.pm=new L.PM.Edit.Polygon(i):i instanceof L.Polyline?i.pm=new L.PM.Edit.Line(i):i instanceof L.LayerGroup?i.pm=new L.PM.Edit.LayerGroup(i):i instanceof L.ImageOverlay&&(i.pm=new L.PM.Edit.ImageOverlay(i)))}},L.version==="1.7.1"&&L.Canvas.include({_onClick(i){let s=this._map.mouseEventToLayerPoint(i),o,h;for(let c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(s)&&(!(i.type==="click"||i.type==="preclick")||!this._map._draggableMoved(o))&&(h=o);h&&(L.DomEvent.fakeStop(i),this._fireEvent([h],i))}}),L.PM.initialize()})();const vl={en_US:{showEagle:"Show Eagle Map",hideEagle:"Hide Eagle Map"},zh_CN:{showEagle:"显示鹰眼图",hideEagle:"隐藏鹰眼图"}},Ml={en_US:{coordinate:"Coordinate",zoomLevel:"Zoom Level",FPS:"FPS"},zh_CN:{coordinate:"坐标",zoomLevel:"层级",FPS:"每秒帧数"}},Er={en_US:{home:"Go Home",capture:"Screen Capture",center:"View Full",north:"Move North",south:"Move South",east:"Move East",west:"Move West",zoomIn:"Zoom In",zoomOut:"Zoom Out",zoom:"Zoom to this level",dragZoom:"Drag to zoom",more:"More",draw:"Plot",layer:"Layer Manager",lng:"Longitude",lat:"Latitude"},zh_CN:{home:"回到初始位置",capture:"截屏",center:"查看全图",north:"向上平移",south:"向下平移",east:"向右平移",west:"向左平移",zoomIn:"放大一级",zoomOut:"缩小一级",zoom:"缩放到此级别",dragZoom:"拖动缩放",more:"更多",draw:"标绘",layer:"图层管理",lng:"经度",lat:"纬度"}},Pr=U.Control.extend({options:{position:"bottomleft",coordinateUnit:"decimal",showCoordinate:!0,showLevel:!0,showFPS:!0,precision:6},initialize(t){U.setOptions(this,t),this.lastTime=+new Date,this.frames=0,U.Control.prototype.initialize.call(this,this.options)},onAdd(t){this.map=t,this.lang=t.lang,this.langDic=Ml,this._container=U.DomUtil.create("div",`${t.clsPrefix}-statusbar`),this.zoom=t.getZoom();const n=t.getCenter();return this.lng=n.lng,this.lat=n.lat,this.options.showCoordinate&&(this._latlngContainer=U.DomUtil.create("div",`${t.clsPrefix}-statusbar-item coordinate`,this._container),this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng)},${this.getCoordinate(this.lat)}`),this.options.showLevel&&(this._levelContainer=U.DomUtil.create("div",`${t.clsPrefix}-statusbar-item level`,this._container),this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`),this.options.showFPS&&(this._fpsContainer=U.DomUtil.create("div",`${t.clsPrefix}-statusbar-item fps`,this._container),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b>60`),this.initEvt(),this._container},initEvt(){this.map.on("mousemove",t=>{this.lat=t.latlng.lat,this.lng=t.latlng.lng,this._latlngContainer&&(this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng,"lng")},${this.getCoordinate(this.lat,"lat")}`)}),this.map.on("zoomend",()=>{this.zoom=this.map.getZoom(),this._levelContainer&&(this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`)}),this.options.showFPS&&this.calcFPS()},getCoordinate(t,n="lng"){switch(this.options.coordinateUnit){case"decimal":return t.toFixed(this.options.precision);case"radian":return(t*Math.PI/180).toFixed(this.options.precision);case"degrees":return this._formatDeg(t,n)}},_formatDeg(t,n){const r=parseFloat(t),u=parseInt(r);let d="";n==="lng"?d=u>0?"E":"W":n==="lat"&&(d=u>0?"N":"S");let f=parseInt((r-u)*60),p=(r-u)*3600-f*60;return u+"°"+f+"′"+p.toFixed(2)+"″"+d},calcFPS(){if(this.frames++,this.frames>=30){const t=Date.now()-this.lastTime,n=Math.round(1e3/(t/this.frames));this._fpsContainer&&(this.frames=0,this.lastTime=Date.now(),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b><span>${n}</span>`)}requestAnimationFrame(this.calcFPS.bind(this))}}),kr=U.Control.extend({includes:U.Evented?U.Evented.prototype:U.Mixin.Events,options:{position:"bottomright",toggleDisplay:!0,zoomLevelOffset:5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:100,height:100,collapsedWidth:22,collapsedHeight:22,aimingRectOptions:{color:"#ff7800",weight:1,interactive:!1},shadowRectOptions:{color:"#000000",weight:1,interactive:!1,opacity:0,fillOpacity:0},strings:{},mapOptions:{rotate:!0,rotateControl:!1}},initialize(t,n){U.Util.setOptions(this,n),this.options.aimingRectOptions.interactive=!1,this.options.shadowRectOptions.interactive=!1,this._layer=t},onAdd(t){this._mainMap=t,this.lang=t.options.lang??this.options.lang??"zh_CN",this.langDic=vl,this.options.strings={hideText:this.langDic[this.lang].hideEagle,showText:this.langDic[this.lang].showEagle},this._container=U.DomUtil.create("div",`${t.clsPrefix}-eaglemap`),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",U.DomEvent.disableClickPropagation(this._container),U.DomEvent.on(this._container,"mousewheel",U.DomEvent.stopPropagation);let n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:t.options.crs,rotateControl:t.options.rotateControl,rotate:t.options.rotate,bearing:t.options.bearing,lang:this.lang};return n=U.Util.extend(this.options.mapOptions,n),this._eagleMap=new U.Map(this._container,n),this._layer instanceof U.Layer&&this._eagleMap.addLayer(this._layer),this._mainMapMoving=!1,this._eagleMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._eagleMap.whenReady(U.Util.bind(function(){this._aimingRect=new U.Rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._eagleMap),this._shadowRect=new U.Rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._eagleMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._eagleMap.on("movestart",this._onEagleMapMoveStarted,this),this._eagleMap.on("move",this._onEagleMapMoving,this),this._eagleMap.on("moveend",this._onEagleMapMoved,this)},this)),this._container},addTo(t){U.Control.prototype.addTo.call(this,t);const n=this.options.centerFixed||this._mainMap.getCenter();return this._eagleMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._eagleMap.off("moveend",this._onEagleMapMoved,this),this._eagleMap.removeLayer(this._layer)},changeLayer(t){this._eagleMap.removeLayer(this._layer),this._layer=t,this._eagleMap.addLayer(this._layer)},_addToggleButton(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),`${this._mainMap.clsPrefix}-eaglemap-toggle-display ${this._mainMap.clsPrefix}-eaglemap-toggle-display-`+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText(){return this.options.minimized?this.langDic[this.lang].showEagle:this.langDic[this.lang].hideEagle},_createButton(t,n,r,u,d,f){const p=U.DomUtil.create("a",r,u);p.innerHTML=t,p.href="#",p.title=n;const g=U.DomEvent.stopPropagation;return U.DomEvent.on(p,"click",g).on(p,"mousedown",g).on(p,"dblclick",g).on(p,"click",U.DomEvent.preventDefault).on(p,"click",d,f),p},_toggleDisplayButtonClicked(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved(t){if(this._eagleMapMoving)this._eagleMapMoving=!1;else{const n=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._eagleMap.setView(n,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onEagleMapMoveStarted(t){if(!this.options.centerFixed){const n=this._aimingRect.getBounds(),r=this._eagleMap.latLngToContainerPoint(n.getSouthWest()),u=this._eagleMap.latLngToContainerPoint(n.getNorthEast());this._lastAimingRectPosition={sw:r,ne:u}}},_onEagleMapMoving(t){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new U.LatLngBounds(this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onEagleMapMoved(t){this._mainMapMoving?this._mainMapMoving=!1:(this._eagleMapMoving=!0,this._mainMap.setView(this._eagleMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed(){const t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()-this.options.zoomLevelOffset;{const n=this._eagleMap.getZoom()-this._mainMap.getZoom(),r=this._eagleMap.getZoom()+this.options.zoomLevelOffset;let u;return n<this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._eagleMap.getMinZoom()+this.options.zoomLevelOffset?this._eagleMap.getZoom()>this._lastEagleMapZoom?(u=this._mainMap.getZoom()+1,this._eagleMap.setZoom(this._eagleMap.getZoom()-1)):u=this._mainMap.getZoom():u=r,this._lastEagleMapZoom=this._eagleMap.getZoom(),u}},_decideMinimized(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._eagleMap.getBounds()):this._minimized},_isInteger(t){return typeof t=="number"},_isDefined(t){return typeof t<"u"},_onToggle(){U.Util.requestAnimFrame(function(){U.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),U.Browser.any3d||U.Util.requestAnimFrame(this._fireToggleEvents,this)},this)},_fireToggleEvents(){U.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);const t={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",t),this.fire("toggle",t)}}),Sr=L.FeatureGroup.extend({initialize(t,n){this.markers=[],L.Util.setOptions(this,n);const r=typeof this.options.cssClass=="string"?this.options.cssClass:"vertex-marker",u=this.options.iconSize!==void 0?this.options.iconSize:[24,24],d=this.options.iconAnchor!==void 0?this.options.iconAnchor:[12,12],f=this.options.textFn,p=typeof this.options.firstVertex=="boolean"?this.options.firstVertex:!0,g=typeof this.options.lastVertex=="boolean"?this.options.lastVertex:!0;this.dragable=this.options.dragable||!1;let M=t;typeof t.getLatLngs=="function"&&(M=t.getLatLngs());for(let C=p?0:1,T=M.length-(g?0:1);C<T;C++){const G=M[C];var B=typeof f=="function"?f.call(this,C,M):f||"",E=L.divIcon({className:r,html:B,iconSize:u,iconAnchor:d}),x=L.marker(G,{icon:E,pmIgnore:!0,index:C});this.markers.push(x)}L.FeatureGroup.prototype.initialize.call(this,this.markers)},onAdd(t){this.markers.forEach(n=>{L.FeatureGroup.prototype.addLayer.call(this,n)}),L.FeatureGroup.prototype.onAdd.call(this,t)},onRemove(t){this.markers.forEach(n=>{L.FeatureGroup.prototype.removeLayer.call(this,n)}),L.FeatureGroup.prototype.onRemove.call(this,t)}});class os extends L[L.Layer?"Layer":"Class"]{constructor(n,r,u,d,f){super(),L.setOptions(this,f),this._latlng=n,this._measurement=r,this._title=u,this._rotation=d,this.MEASUREDDATA=null,this.tempAcCurrDrawPoints=null}addTo(n){return n.addLayer(this),this}onAdd(n){this._map=n;const r=this.getPane?this.getPane():n.getPanes().markerPane,u=this._element=L.DomUtil.create("div","leaflet-zoom-animated leaflet-measure-path-measurement",r),d=L.DomUtil.create("div","",u);d.title=this._title,d.innerHTML=this._measurement,n.on("zoomanim",this._animateZoom,this),this._setPosition()}onRemove(n){n.off("zoomanim",this._animateZoom,this),(this.getPane?this.getPane():n.getPanes().markerPane).removeChild(this._element),this._map=null}_setPosition(){L.DomUtil.setPosition(this._element,this._map.latLngToLayerPoint(this._latlng)),this._element.style.transform+=" rotate("+this._rotation+"rad)"}_animateZoom(n){const r=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();L.DomUtil.setPosition(this._element,r),this._element.style.transform+=" rotate("+this._rotation+"rad)"}}U.Map.addInitHook(function(){var t,n,r;this.pm&&this.pm.setLang(this.options.lang.split("_")[0]),(t=this.options.eagleMapControl)!=null&&t.show&&(this.eagleMapControl=new kr(this.options.eagleMapControl),this.addControl(this.eagleMapControl)),(n=this.options.statusBarControl)!=null&&n.show&&(this.statusBarControl=new Pr(this.options.statusBarControl),this.addControl(this.statusBarControl)),(r=this.options.scaleControl)!=null&&r.show&&(this.scaleControl=new U.Control.Scale(Object.assign({position:"bottomleft",maxWidth:100,metric:!0,imperial:!1},this.options.scaleControl)),this.addControl(this.scaleControl)),this.keyboard.disable()}),U.Marker.addInitHook(function(){let n=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;n&&(n=n[0]+"px "+n[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||n||"center bottom",this.on("drag",r=>{r.target._applyRotation()})}),U.Marker.mergeOptions({scale:1,rotation:0,minZoom:0,maxZoom:16,hideOnMinZoom:!0,minificationScale:.6}),U.Marker.include({_setPos(t){this._icon.style.display="initial";const{rotation:n,minZoom:r,maxZoom:u,hideOnMinZoom:d,minificationScale:f}=this.options;if(r&&u&&u-r>0){const p=parseFloat(((1-f)/(u-r)).toFixed(2));this._map._zoom>=u?this.options.scale=1:this._map._zoom>r&this._map._zoom<u?this.options.scale=1-(u-this._map._zoom)*p:this._map._zoom<=r&&d?this._icon.style.display="none":this._map._zoom<=r&&!d&&(this.options.scale=f)}this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),this._icon&&U.DomUtil.setPosition(this._icon,t,n,t,this.options.scale),this._shadow&&U.DomUtil.setPosition(this._shadow,t,n,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_applyRotation(){this.options.rotation&&(this._icon.style[U.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,U.DomUtil.TRANSFORM==="msTransform"?this._icon.style[U.DomUtil.TRANSFORM]="rotate("+this.options.rotation+"deg)":this._icon.style[U.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotation+"deg)")},startTwinkle(t,n){this.twinkle(t,n)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(t=200,n=1/0){let r=!1,u=0;const d=()=>{u++,n&&t&&u>Math.floor(n/t)?(this.setOpacity(1),this.twinkleTimer=void 0):(r?(this.setOpacity(0),r=!1):(this.setOpacity(1),r=!0),this.twinkleTimer=setTimeout(d,t))};d()}}),U.Map.include({hasLayer:function(t){return t&&U.Util.stamp(t)in this._layers},removeLayerById:function(t){const n=this.getLayer(t);n&&this.removeLayer(n)}}),U.Path.addInitHook(function(){this.options.color&&(this.color=$t.Color.from(this.options.color)),this.options.fillColor&&(this.fillColor=$t.Color.from(this.options.fillColor))}),U.Polyline.addInitHook(function(){this.options.showMeasurements&&this.showMeasurements()}),U.Circle.include({toGeoJSON(){return{type:"Feature",properties:{},geometry:{type:"Circle",radius:this.getRadius(),coordinates:[this._latlng.lng,this._latlng.lat]}}}}),U.Layer.addInitHook(function(){this._leaflet_id=this.options.id||U.stamp({})}),U.LayerGroup.include({getLayerId(t){return t._leaflet_id},hasLayer(t){return t?(["number","string"].includes(typeof t)?t:this.getLayerId(t))in this._layers:!1}}),U.GridLayer.include({_setZoomTransform:function(t,u,r){var d=u,u=(d!=null&&this.options&&(this.options.corrdType=="gcj02"?d=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng):this.options.corrdType=="bd09"&&(u=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng),d=$t.CoordsUtil.bdEncrypt(u.lat,u.lng))),this._map.getZoomScale(r,t.zoom)),d=t.origin.multiplyBy(u).subtract(this._map._getNewPixelOrigin(d,r)).round();U.Browser.any3d?U.DomUtil.setTransform(t.el,d,u):U.DomUtil.setPosition(t.el,d)},_getTiledPixelBounds:function(u){var r=u,u=(r!=null&&this.options&&(this.options.corrdType=="gcj02"?r=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng):this.options.corrdType=="bd09"&&(u=$t.CoordsUtil.gcjEncrypt(u.lat,u.lng),r=$t.CoordsUtil.bdEncrypt(u.lat,u.lng))),this._map),n=u._animatingZoom?Math.max(u._animateToZoom,u.getZoom()):u.getZoom(),n=u.getZoomScale(n,this._tileZoom),r=u.project(r,this._tileZoom).floor(),u=u.getSize().divideBy(2*n);return new U.Bounds(r.subtract(u),r.add(u))}}),U.TileLayer.addInitHook(function(){this.on("add",function(t){this._container.style.filter=Object.keys(this.options.style||{}).map(n=>`${n}(${this.options.style[n]})`).join(" ")})}),U.Polyline.include({_originalOnAdd:U.Polyline.prototype.onAdd,_originalOnRemove:U.Polyline.prototype.onRemove,_originalSetLatLngs:U.Polyline.prototype.setLatLngs,_originalAddLatLng:U.Polyline.prototype.addLatLng,setLatLngs:function(t){var n=this._map&&this._vertexMarkers&&this._latlngs.length!==t.length;this._originalSetLatLngs(t),n&&(this.removeVertexMarkers(),this.destroyVertexMarkers(),this.createVertexMarkers()),this.options.showMeasurements&&this.updateMeasurements()},removeVertexMarkers:function(){this._map&&this._vertexMarkers&&(this._map.removeLayer(this._vertexMarkers),this._vertexMarkers=void 0)},onAdd:function(t){this._originalOnAdd(t),this.createVertexMarkers(),this.options.showMeasurements&&this.showMeasurements(this.options.measurementOptions)},createVertexMarkers:function(){if(this._map){var t=this.options.vertexMarkers||{};this._vertexMarkers===void 0&&this.options.vertexMarkers&&(this._vertexMarkers=new Sr(this,t).addTo(this._map))}},destroyVertexMarkers:function(){this._vertexMarkers&&(this._vertexMarkers=void 0)},onRemove:function(t){this.removeVertexMarkers(),this._originalOnRemove(t),this.options.showMeasurements&&this.hideMeasurements()},showMeasurements(t){return!this._map||this._measurementLayer?this:(this._measurementOptions=U.extend({showCloseButton:!1,minPixelDistance:30,showDistances:!0,showArea:!0,showAggregate:!0,lang:{totalLength:"Total length",totalArea:"Total area",segmentLength:"Segment length"},map:this._map},t||{}),this._measurementLayer=new U.LayerGroup().addTo(this._map),this.updateMeasurements(),this._map.on("zoomend",this.updateMeasurements,this),this)},hideMeasurements(){return this._map.off("zoomend",this.updateMeasurements,this),this._measurementLayer?(this._map.removeLayer(this._measurementLayer),this._measurementLayer=null,this):this},tempFormatDistance(t){const n=this._map.options.crs,r=new Array;for(let T=0;T<t.length;T++){const G=n.project(t[T]);r.push(G)}const u=r.length;let d=0,f,p,g,M,B,E;for(let T=0;T<u-1;T++)f=r[T],g=f.x,M=f.y,p=r[T+1],B=p.x,E=p.y,d+=Math.sqrt((g-B)*(g-B)+(M-E)*(M-E));const x=d;let C="";return x>1e3?C="总长:"+Number(x/1e3).toFixed(1)+"公里":C="总长:"+Math.round(x)+"米",C},tempMoveFormatDistance(t,n){const r=this._map.options.crs;t=r.project(t),t=new Array(t),n=r.project(n),t.push(n);const u=t.length;let d=0,f,p,g,M,B,E;for(let T=0;T<u-1;T++)f=t[T],g=f.x,M=f.y,p=t[T+1],B=p.x,E=p.y,d+=Math.sqrt((g-B)*(g-B)+(M-E)*(M-E));const x=d;let C="";return x>1e3?C=Number(x/1e3).toFixed(1)+"公里":C=Math.round(x)+"米",C},tempFormatArea(t){const n=this._map.options.crs,r=new Array;for(let j=0;j<t.length;j++){const W=n.project(t[j]);r.push(W)}let u=!0;for(var d=0;d<r.length-1;d++){r[d].x>180?u=!0:u=!1;break}const f=r.length;let p=0,g,M,B=0,E=0,x=0,C=0;if(r!=null){let j;if(u)for(var d=0;d<f;d++)j=(d+1)%f,g=r[d],M=r[j],p+=g.x*M.y,p-=g.y*M.x;else{let at,rt=0,ct=0;for(var d=0;d<f;d++)g=r[d],at=g.x,d==0?(rt=at,ct=at):(at<rt&&(rt=at),at>ct&&(ct=at));const yt=parseInt(((rt+ct)/2+3)/6);for(var d=0;d<f;d++)j=(d+1)%f,d==0?(g=r[d],B=widget.LonLatToXA80N(yt,g.x,g.y)[0],E=widget.LonLatToXA80N(yt,g.x,g.y)[1]):(B=x,E=C),M=r[j],x=widget.LonLatToXA80N(yt,M.x,M.y)[0],C=widget.LonLatToXA80N(yt,M.x,M.y)[1],p+=B*C,p-=x*E}}const T=Math.abs(p/2);let G="";return T>1e6?G="总面积:"+Number(T/1e6).toFixed(4)+`平方公里
5
+ (约:`+Number(T*.0015).toFixed(3)+"亩)":G="总面积:"+T.toFixed(0)+`平方米
6
+ (约:`+Number(T*.0015).toFixed(3)+"亩)",G},updateMeasurements(){if(!this._measurementLayer)return this;const t=this.getLatLngs();new Array().push(t);let r=this.getLatLngs();const u=this instanceof U.Polygon,d=this._measurementOptions;let f,p,g,M,B;if(r&&r.length&&U.Util.isArray(r[0])&&(r=r[0]),this._measurementLayer.clearLayers(),this._measurementOptions.showDistances&&r.length>1){t.length-1;for(let E=1,x=r.length;u&&E<=x||E<x;E++)if(f=r[E-1],p=r[E%x],f.distanceTo(p),g=this._map.latLngToLayerPoint(f),M=this._map.latLngToLayerPoint(p),B=g.distanceTo(M),B>=d.minPixelDistance){const C=this.tempMoveFormatDistance(f,p);new os(this._map.layerPointToLatLng([(g.x+M.x)/2,(g.y+M.y)/2]),C,d.lang.segmentLength,this._getRotation(f,p),d).addTo(this._measurementLayer)}!u&&this._measurementOptions.showAggregate&&(new os(p,this.tempFormatDistance(t),d.lang.totalLength,0,d).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatDistance(t))}return u&&d.showArea&&r.length>2&&(new os(this.getBounds().getCenter(),this.tempFormatArea(t[0]),d.lang.totalArea,0,d).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatArea(t[0])),this},_getRotation(t,n){const r=this._map.project(t),u=this._map.project(n);return Math.atan((u.y-r.y)/(u.x-r.x))}}),U.LatLng.prototype.toArray=function(){return[this.lat,this.lng]},U.Path.include({startTwinkle(t,n,r={}){this.twinkle(t,n,r)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(t=200,n=1/0,r){let u=!1,d=0;const f=this.options,p=()=>{d++,n&&t&&d>Math.floor(n/t)?(this.setStyle({...f,fill:!0,stroke:!0}),this.twinkleTimer=void 0):(u?(this.setStyle({...r,fill:!1,stroke:!1}),u=!1):(this.setStyle({...r,fill:!0,stroke:!0}),u=!0),this.twinkleTimer=setTimeout(p,t))};p()},getArea(t){if(this instanceof U.Polyline){var n,r=this._latlngs[0],u=(t||this._map).options.crs,d=r.length;let f=0,p,g;if(r!=null)for(let M=0;M<d;M++)n=(M+1)%d,p=180<r[M].lng&&90<r[M].lat?{x:r[M].lat,y:r[M].lng}:u.project(r[M]),g=180<r[n].lng&&90<r[n].lat?{x:r[n].lat,y:r[n].lng}:u.project(r[n]),f=(f+=p.x*g.y)-p.y*g.x;return Math.abs(f/2)}else return this instanceof U.Circle?2*Math.PI*this.getRadius():null},getLength(t){if(this instanceof U.Polyline){for(var n=[],r=(t||this._map).options.crs,u=this._latlngs,d=0;d<u.length;d++)this instanceof U.Polygon?n.push(...u[d]):this instanceof U.Polyline&&n.push(u[d]);let B=0,E,x;for(let C=0,T=n.length-1;C<T;C++){E=180<n[C][0]&&90<n[C][1]?{x:n[C].lat,y:n[C].lng}:r.project(n[C]),x=180<n[C+1][0]&&90<n[C+1][1]?{x:n[C+1].lat,y:n[C+1].lng}:r.project(n[C+1]);var f=E.x,p=E.y,g=x.x,M=x.y;B+=Math.sqrt((f-g)*(f-g)+(p-M)*(p-M))}return B}else return this instanceof U.Circle?Math.PI*Math.pow(this.getRadius(),2):null}}),U.Control.mergeOptions({offset:[0,0]}),U.Control.addInitHook(function(){const{className:t,offset:[n,r]}=this.options;(n||r)&&setTimeout(()=>{const u=this.getContainer();u&&(u.style.transform=`translate(${n}px, ${r}px)`,t&&u.classList.add(t))},200)}),U.Canvas.include({_fillStroke:function(t,n){var r=n.options;if(r.fill&&(t.globalAlpha=r.fillOpacity,t.fillStyle=r.fillColor||r.color,t.fill(r.fillRule||"evenodd")),r.stroke&&r.weight!==0&&(t.setLineDash&&t.setLineDash(n.options&&n.options._dashArray||[]),t.globalAlpha=r.opacity,t.lineWidth=r.weight,t.strokeStyle=r.color,t.lineCap=r.lineCap,t.lineJoin=r.lineJoin,t.stroke(),r.img)){const u=new Image;u.src=r.img,u.onload=function(){t.save(),t.clip();var d=n instanceof U.Circle?n._pxBounds:n._rawPxBounds,f=d.getSize(),p=t.createPattern(u,"repeat");t.fillStyle=p,t.fillRect(d.min.x,d.min.y,f.x,f.y),t.restore()}}}}),U.SVG.include({_updateStyle:function(t){var n=t._path,r=t.options;n&&(r.stroke?(n.setAttribute("stroke",r.color),n.setAttribute("stroke-opacity",r.opacity),n.setAttribute("stroke-width",r.weight),n.setAttribute("stroke-linecap",r.lineCap),n.setAttribute("stroke-linejoin",r.lineJoin),r.dashArray?n.setAttribute("stroke-dasharray",r.dashArray):n.removeAttribute("stroke-dasharray"),r.dashOffset?n.setAttribute("stroke-dashoffset",r.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),r.img?(typeof r.img=="string"&&r.img.match(/^url\(/)?this.__fillPattern(t):n.setAttribute("fill",r.fillColor||r.color),n.setAttribute("fill-opacity",r.fillOpacity),n.setAttribute("fill-rule",r.fillRule||"evenodd")):(n.setAttribute("fill",r.fillColor),n.setAttribute("fill-opacity",t instanceof U.Polyline?0:r.fillOpacity)))},__fillPattern:function(t){var n=t._path,r=t.options;this._defs||(this._defs=L.SVG.create("defs"),this._container.appendChild(this._defs));var u=r.img.substring(4,r.img.length-1),d=u+(Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17));d+=new Date().getUTCMilliseconds();var f=document.getElementById(d);if(!f){var p=new Image;p.src=u,f=L.SVG.create("pattern"),f.setAttribute("id",d),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("patternUnits","userSpaceOnUse"),f.setAttribute("width","24"),f.setAttribute("height","24");var g=L.SVG.create("rect");g.setAttribute("width",24),g.setAttribute("height",24),g.setAttribute("x",0),g.setAttribute("x",0),g.setAttribute("fill",r.fillColor||r.color),f.appendChild(g),this._defs.appendChild(f);var M=L.SVG.create("image");M.setAttribute("x","0"),M.setAttribute("y","0"),M.setAttributeNS("http://www.w3.org/1999/xlink","href",u),M.setAttribute("width","24"),M.setAttribute("height","24"),f.appendChild(M),p.onload=function(){f.setAttribute("width",p.width),f.setAttribute("height",p.height),M.setAttribute("width",p.width),M.setAttribute("height",p.height)}}n.setAttribute("fill","url(#"+d+")")}});var xl={exports:{}};function Ll(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var n=1;n<=60;++n)t("EPSG:"+(32600+n),"+proj=utm +zone="+n+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+n),"+proj=utm +zone="+n+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}var Ji=1,Qi=2,Mn=3,bl=4,Br=5,hh=6378137,wl=6356752314e-3,lh=.0066943799901413165,hs=484813681109536e-20,ut=Math.PI/2,Cl=.16666666666666666,El=.04722222222222222,Pl=.022156084656084655,dt=1e-10,ye=.017453292519943295,ui=57.29577951308232,Zt=Math.PI/4,ls=Math.PI*2,he=3.14159265359,Fe={};Fe.greenwich=0,Fe.lisbon=-9.131906111111,Fe.paris=2.337229166667,Fe.bogota=-74.080916666667,Fe.madrid=-3.687938888889,Fe.rome=12.452333333333,Fe.bern=7.439583333333,Fe.jakarta=106.807719444444,Fe.ferro=-17.666666666667,Fe.brussels=4.367975,Fe.stockholm=18.058277777778,Fe.athens=23.7163375,Fe.oslo=10.722916666667;const kl={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var uh=/[\s_\-\/\(\)]/g;function Di(t,n){if(t[n])return t[n];for(var r=Object.keys(t),u=n.toLowerCase().replace(uh,""),d=-1,f,p;++d<r.length;)if(f=r[d],p=f.toLowerCase().replace(uh,""),p===u)return t[f]}function Tr(t){var n={},r=t.split("+").map(function(g){return g.trim()}).filter(function(g){return g}).reduce(function(g,M){var B=M.split("=");return B.push(!0),g[B[0].toLowerCase()]=B[1],g},{}),u,d,f,p={proj:"projName",datum:"datumCode",rf:function(g){n.rf=parseFloat(g)},lat_0:function(g){n.lat0=g*ye},lat_1:function(g){n.lat1=g*ye},lat_2:function(g){n.lat2=g*ye},lat_ts:function(g){n.lat_ts=g*ye},lon_0:function(g){n.long0=g*ye},lon_1:function(g){n.long1=g*ye},lon_2:function(g){n.long2=g*ye},alpha:function(g){n.alpha=parseFloat(g)*ye},gamma:function(g){n.rectified_grid_angle=parseFloat(g)*ye},lonc:function(g){n.longc=g*ye},x_0:function(g){n.x0=parseFloat(g)},y_0:function(g){n.y0=parseFloat(g)},k_0:function(g){n.k0=parseFloat(g)},k:function(g){n.k0=parseFloat(g)},a:function(g){n.a=parseFloat(g)},b:function(g){n.b=parseFloat(g)},r:function(g){n.a=n.b=parseFloat(g)},r_a:function(){n.R_A=!0},zone:function(g){n.zone=parseInt(g,10)},south:function(){n.utmSouth=!0},towgs84:function(g){n.datum_params=g.split(",").map(function(M){return parseFloat(M)})},to_meter:function(g){n.to_meter=parseFloat(g)},units:function(g){n.units=g;var M=Di(kl,g);M&&(n.to_meter=M.to_meter)},from_greenwich:function(g){n.from_greenwich=g*ye},pm:function(g){var M=Di(Fe,g);n.from_greenwich=(M||parseFloat(g))*ye},nadgrids:function(g){g==="@null"?n.datumCode="none":n.nadgrids=g},axis:function(g){var M="ewnsud";g.length===3&&M.indexOf(g.substr(0,1))!==-1&&M.indexOf(g.substr(1,1))!==-1&&M.indexOf(g.substr(2,1))!==-1&&(n.axis=g)},approx:function(){n.approx=!0}};for(u in r)d=r[u],u in p?(f=p[u],typeof f=="function"?f(d):n[f]=d):n[u]=d;return typeof n.datumCode=="string"&&n.datumCode!=="WGS84"&&(n.datumCode=n.datumCode.toLowerCase()),n}class ch{static getId(n){const r=n.find(u=>Array.isArray(u)&&u[0]==="ID");return r&&r.length>=3?{authority:r[1],code:parseInt(r[2],10)}:null}static convertUnit(n,r="unit"){if(!n||n.length<3)return{type:r,name:"unknown",conversion_factor:null};const u=n[1],d=parseFloat(n[2])||null,f=n.find(g=>Array.isArray(g)&&g[0]==="ID"),p=f?{authority:f[1],code:parseInt(f[2],10)}:null;return{type:r,name:u,conversion_factor:d,id:p}}static convertAxis(n){const r=n[1]||"Unknown";let u;const d=r.match(/^\((.)\)$/);if(d){const B=d[1].toUpperCase();if(B==="E")u="east";else if(B==="N")u="north";else if(B==="U")u="up";else throw new Error(`Unknown axis abbreviation: ${B}`)}else u=n[2]?n[2].toLowerCase():"unknown";const f=n.find(B=>Array.isArray(B)&&B[0]==="ORDER"),p=f?parseInt(f[1],10):null,g=n.find(B=>Array.isArray(B)&&(B[0]==="LENGTHUNIT"||B[0]==="ANGLEUNIT"||B[0]==="SCALEUNIT")),M=this.convertUnit(g);return{name:r,direction:u,unit:M,order:p}}static extractAxes(n){return n.filter(r=>Array.isArray(r)&&r[0]==="AXIS").map(r=>this.convertAxis(r)).sort((r,u)=>(r.order||0)-(u.order||0))}static convert(n,r={}){switch(n[0]){case"PROJCRS":r.type="ProjectedCRS",r.name=n[1],r.base_crs=n.find(C=>Array.isArray(C)&&C[0]==="BASEGEOGCRS")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="BASEGEOGCRS")):null,r.conversion=n.find(C=>Array.isArray(C)&&C[0]==="CONVERSION")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="CONVERSION")):null;const u=n.find(C=>Array.isArray(C)&&C[0]==="CS");u&&(r.coordinate_system={type:u[1],axis:this.extractAxes(n)});const d=n.find(C=>Array.isArray(C)&&C[0]==="LENGTHUNIT");if(d){const C=this.convertUnit(d);r.coordinate_system.unit=C}r.id=this.getId(n);break;case"BASEGEOGCRS":case"GEOGCRS":r.type="GeographicCRS",r.name=n[1];const f=n.find(C=>Array.isArray(C)&&(C[0]==="DATUM"||C[0]==="ENSEMBLE"));if(f){const C=this.convert(f);f[0]==="ENSEMBLE"?r.datum_ensemble=C:r.datum=C;const T=n.find(G=>Array.isArray(G)&&G[0]==="PRIMEM");T&&T[1]!=="Greenwich"&&(C.prime_meridian={name:T[1],longitude:parseFloat(T[2])})}r.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(n)},r.id=this.getId(n);break;case"DATUM":r.type="GeodeticReferenceFrame",r.name=n[1],r.ellipsoid=n.find(C=>Array.isArray(C)&&C[0]==="ELLIPSOID")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":r.type="DatumEnsemble",r.name=n[1],r.members=n.filter(C=>Array.isArray(C)&&C[0]==="MEMBER").map(C=>({type:"DatumEnsembleMember",name:C[1],id:this.getId(C)}));const p=n.find(C=>Array.isArray(C)&&C[0]==="ENSEMBLEACCURACY");p&&(r.accuracy=parseFloat(p[1]));const g=n.find(C=>Array.isArray(C)&&C[0]==="ELLIPSOID");g&&(r.ellipsoid=this.convert(g)),r.id=this.getId(n);break;case"ELLIPSOID":r.type="Ellipsoid",r.name=n[1],r.semi_major_axis=parseFloat(n[2]),r.inverse_flattening=parseFloat(n[3]),n.find(C=>Array.isArray(C)&&C[0]==="LENGTHUNIT")&&this.convert(n.find(C=>Array.isArray(C)&&C[0]==="LENGTHUNIT"),r);break;case"CONVERSION":r.type="Conversion",r.name=n[1],r.method=n.find(C=>Array.isArray(C)&&C[0]==="METHOD")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="METHOD")):null,r.parameters=n.filter(C=>Array.isArray(C)&&C[0]==="PARAMETER").map(C=>this.convert(C));break;case"METHOD":r.type="Method",r.name=n[1],r.id=this.getId(n);break;case"PARAMETER":r.type="Parameter",r.name=n[1],r.value=parseFloat(n[2]),r.unit=this.convertUnit(n.find(C=>Array.isArray(C)&&(C[0]==="LENGTHUNIT"||C[0]==="ANGLEUNIT"||C[0]==="SCALEUNIT"))),r.id=this.getId(n);break;case"BOUNDCRS":r.type="BoundCRS";const M=n.find(C=>Array.isArray(C)&&C[0]==="SOURCECRS");if(M){const C=M.find(T=>Array.isArray(T));r.source_crs=C?this.convert(C):null}const B=n.find(C=>Array.isArray(C)&&C[0]==="TARGETCRS");if(B){const C=B.find(T=>Array.isArray(T));r.target_crs=C?this.convert(C):null}const E=n.find(C=>Array.isArray(C)&&C[0]==="ABRIDGEDTRANSFORMATION");E?r.transformation=this.convert(E):r.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(r.type="Transformation",r.name=n[1],r.method=n.find(C=>Array.isArray(C)&&C[0]==="METHOD")?this.convert(n.find(C=>Array.isArray(C)&&C[0]==="METHOD")):null,r.parameters=n.filter(C=>Array.isArray(C)&&(C[0]==="PARAMETER"||C[0]==="PARAMETERFILE")).map(C=>{if(C[0]==="PARAMETER")return this.convert(C);if(C[0]==="PARAMETERFILE")return{name:C[1],value:C[2],id:{authority:"EPSG",code:8656}}}),r.parameters.length===7){const C=r.parameters[6];C.name==="Scale difference"&&(C.value=Math.round((C.value-1)*1e12)/1e6)}r.id=this.getId(n);break;case"AXIS":r.coordinate_system||(r.coordinate_system={type:"unspecified",axis:[]}),r.coordinate_system.axis.push(this.convertAxis(n));break;case"LENGTHUNIT":const x=this.convertUnit(n,"LinearUnit");r.coordinate_system&&r.coordinate_system.axis&&r.coordinate_system.axis.forEach(C=>{C.unit||(C.unit=x)}),x.conversion_factor&&x.conversion_factor!==1&&r.semi_major_axis&&(r.semi_major_axis={value:r.semi_major_axis,unit:x});break;default:r.keyword=n[0];break}return r}}class Sl extends ch{static convert(n,r={}){return super.convert(n,r),r.coordinate_system&&r.coordinate_system.subtype==="Cartesian"&&delete r.coordinate_system,r.usage&&delete r.usage,r}}class Bl extends ch{static convert(n,r={}){super.convert(n,r);const u=n.find(f=>Array.isArray(f)&&f[0]==="CS");u&&(r.coordinate_system={subtype:u[1],axis:this.extractAxes(n)});const d=n.find(f=>Array.isArray(f)&&f[0]==="USAGE");if(d){const f=d.find(M=>Array.isArray(M)&&M[0]==="SCOPE"),p=d.find(M=>Array.isArray(M)&&M[0]==="AREA"),g=d.find(M=>Array.isArray(M)&&M[0]==="BBOX");r.usage={},f&&(r.usage.scope=f[1]),p&&(r.usage.area=p[1]),g&&(r.usage.bbox=g.slice(1))}return r}}function Tl(t){return t.find(n=>Array.isArray(n)&&n[0]==="USAGE")?"2019":(t.find(n=>Array.isArray(n)&&n[0]==="CS")||t[0]==="BOUNDCRS"||t[0]==="PROJCRS"||t[0]==="GEOGCRS","2015")}function Dl(t){return(Tl(t)==="2019"?Bl:Sl).convert(t)}function Ol(t){const n=t.toUpperCase();return n.includes("PROJCRS")||n.includes("GEOGCRS")||n.includes("BOUNDCRS")||n.includes("VERTCRS")||n.includes("LENGTHUNIT")||n.includes("ANGLEUNIT")||n.includes("SCALEUNIT")?"WKT2":(n.includes("PROJCS")||n.includes("GEOGCS")||n.includes("LOCAL_CS")||n.includes("VERT_CS")||n.includes("UNIT"),"WKT1")}var us=1,dh=2,fh=3,fa=4,ph=5,Dr=-1,Il=/\s/,Rl=/[A-Za-z]/,Fl=/[A-Za-z84_]/,pa=/[,\]]/,_h=/[\d\.E\-\+]/;function Mi(t){if(typeof t!="string")throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=us}Mi.prototype.readCharicter=function(){var t=this.text[this.place++];if(this.state!==fa)for(;Il.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case us:return this.neutral(t);case dh:return this.keyword(t);case fa:return this.quoted(t);case ph:return this.afterquote(t);case fh:return this.number(t);case Dr:return}},Mi.prototype.afterquote=function(t){if(t==='"'){this.word+='"',this.state=fa;return}if(pa.test(t)){this.word=this.word.trim(),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in afterquote yet, index '+this.place)},Mi.prototype.afterItem=function(t){if(t===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=us;return}if(t==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=us,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Dr);return}},Mi.prototype.number=function(t){if(_h.test(t)){this.word+=t;return}if(pa.test(t)){this.word=parseFloat(this.word),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in number yet, index '+this.place)},Mi.prototype.quoted=function(t){if(t==='"'){this.state=ph;return}this.word+=t},Mi.prototype.keyword=function(t){if(Fl.test(t)){this.word+=t;return}if(t==="["){var n=[];n.push(this.word),this.level++,this.root===null?this.root=n:this.currentObject.push(n),this.stack.push(this.currentObject),this.currentObject=n,this.state=us;return}if(pa.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in keyword yet, index '+this.place)},Mi.prototype.neutral=function(t){if(Rl.test(t)){this.word=t,this.state=dh;return}if(t==='"'){this.word="",this.state=fa;return}if(_h.test(t)){this.word=t,this.state=fh;return}if(pa.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in neutral yet, index '+this.place)},Mi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Dr)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Gl(t){var n=new Mi(t);return n.output()}function Or(t,n,r){Array.isArray(n)&&(r.unshift(n),n=null);var u=n?{}:t,d=r.reduce(function(f,p){return xn(p,f),f},u);n&&(t[n]=d)}function xn(t,n){if(!Array.isArray(t)){n[t]=!0;return}var r=t.shift();if(r==="PARAMETER"&&(r=t.shift()),t.length===1){if(Array.isArray(t[0])){n[r]={},xn(t[0],n[r]);return}n[r]=t[0];return}if(!t.length){n[r]=!0;return}if(r==="TOWGS84"){n[r]=t;return}if(r==="AXIS"){r in n||(n[r]=[]),n[r].push(t);return}Array.isArray(r)||(n[r]={});var u;switch(r){case"UNIT":case"PRIMEM":case"VERT_DATUM":n[r]={name:t[0].toLowerCase(),convert:t[1]},t.length===3&&xn(t[2],n[r]);return;case"SPHEROID":case"ELLIPSOID":n[r]={name:t[0],a:t[1],rf:t[2]},t.length===4&&xn(t[3],n[r]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":t[0]=["name",t[0]],Or(n,r,t);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":t[0]=["name",t[0]],Or(n,r,t),n[r].type=r;return;default:for(u=-1;++u<t.length;)if(!Array.isArray(t[u]))return xn(t,n[r]);return Or(n,r,t)}}var zl=.017453292519943295;function ei(t){return t*zl}function mh(t){const n=(t.projName||"").toLowerCase().replace(/_/g," ");!t.long0&&t.longc&&(n==="albers conic equal area"||n==="lambert azimuthal equal area")&&(t.long0=t.longc),!t.lat_ts&&t.lat1&&(n==="stereographic south pole"||n==="polar stereographic (variant b)")?(t.lat0=ei(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1):!t.lat_ts&&t.lat0&&(n==="polar stereographic"||n==="polar stereographic (variant a)")&&(t.lat_ts=t.lat0,t.lat0=ei(t.lat0>0?90:-90),delete t.lat1)}function gh(t){let n={units:null,to_meter:void 0};return typeof t=="string"?(n.units=t.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.units==="meter"&&(n.to_meter=1)):t&&t.name&&(n.units=t.name.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.to_meter=t.conversion_factor),n}function yh(t){return typeof t=="object"?t.value*t.unit.conversion_factor:t}function Ah(t,n){t.ellipsoid.radius?(n.a=t.ellipsoid.radius,n.rf=0):(n.a=yh(t.ellipsoid.semi_major_axis),t.ellipsoid.inverse_flattening!==void 0?n.rf=t.ellipsoid.inverse_flattening:t.ellipsoid.semi_major_axis!==void 0&&t.ellipsoid.semi_minor_axis!==void 0&&(n.rf=n.a/(n.a-yh(t.ellipsoid.semi_minor_axis))))}function _a(t,n={}){return!t||typeof t!="object"?t:t.type==="BoundCRS"?(_a(t.source_crs,n),t.transformation&&(t.transformation.method&&t.transformation.method.name==="NTv2"?n.nadgrids=t.transformation.parameters[0].value:n.datum_params=t.transformation.parameters.map(r=>r.value)),n):(Object.keys(t).forEach(r=>{const u=t[r];if(u!==null)switch(r){case"name":if(n.srsCode)break;n.name=u,n.srsCode=u;break;case"type":u==="GeographicCRS"?n.projName="longlat":u==="ProjectedCRS"&&t.conversion&&t.conversion.method&&(n.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":u.ellipsoid&&(n.ellps=u.ellipsoid.name,Ah(u,n)),u.prime_meridian&&(n.from_greenwich=u.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":n.ellps=u.name,Ah(u,n);break;case"prime_meridian":n.long0=(u.longitude||0)*Math.PI/180;break;case"coordinate_system":if(u.axis){if(n.axis=u.axis.map(d=>{const f=d.direction;if(f==="east")return"e";if(f==="north")return"n";if(f==="west")return"w";if(f==="south")return"s";throw new Error(`Unknown axis direction: ${f}`)}).join("")+"u",u.unit){const{units:d,to_meter:f}=gh(u.unit);n.units=d,n.to_meter=f}else if(u.axis[0]&&u.axis[0].unit){const{units:d,to_meter:f}=gh(u.axis[0].unit);n.units=d,n.to_meter=f}}break;case"id":u.authority&&u.code&&(n.title=u.authority+":"+u.code);break;case"conversion":u.method&&u.method.name&&(n.projName=u.method.name),u.parameters&&u.parameters.forEach(d=>{const f=d.name.toLowerCase().replace(/\s+/g,"_"),p=d.value;d.unit&&d.unit.conversion_factor?n[f]=p*d.unit.conversion_factor:d.unit==="degree"?n[f]=p*Math.PI/180:n[f]=p});break;case"unit":u.name&&(n.units=u.name.toLowerCase(),n.units==="metre"&&(n.units="meter")),u.conversion_factor&&(n.to_meter=u.conversion_factor);break;case"base_crs":_a(u,n),n.datumCode=u.id?u.id.authority+"_"+u.id.code:u.name;break}}),n.latitude_of_false_origin!==void 0&&(n.lat0=n.latitude_of_false_origin),n.longitude_of_false_origin!==void 0&&(n.long0=n.longitude_of_false_origin),n.latitude_of_standard_parallel!==void 0&&(n.lat0=n.latitude_of_standard_parallel,n.lat1=n.latitude_of_standard_parallel),n.latitude_of_1st_standard_parallel!==void 0&&(n.lat1=n.latitude_of_1st_standard_parallel),n.latitude_of_2nd_standard_parallel!==void 0&&(n.lat2=n.latitude_of_2nd_standard_parallel),n.latitude_of_projection_centre!==void 0&&(n.lat0=n.latitude_of_projection_centre),n.longitude_of_projection_centre!==void 0&&(n.longc=n.longitude_of_projection_centre),n.easting_at_false_origin!==void 0&&(n.x0=n.easting_at_false_origin),n.northing_at_false_origin!==void 0&&(n.y0=n.northing_at_false_origin),n.latitude_of_natural_origin!==void 0&&(n.lat0=n.latitude_of_natural_origin),n.longitude_of_natural_origin!==void 0&&(n.long0=n.longitude_of_natural_origin),n.longitude_of_origin!==void 0&&(n.long0=n.longitude_of_origin),n.false_easting!==void 0&&(n.x0=n.false_easting),n.easting_at_projection_centre&&(n.x0=n.easting_at_projection_centre),n.false_northing!==void 0&&(n.y0=n.false_northing),n.northing_at_projection_centre&&(n.y0=n.northing_at_projection_centre),n.standard_parallel_1!==void 0&&(n.lat1=n.standard_parallel_1),n.standard_parallel_2!==void 0&&(n.lat2=n.standard_parallel_2),n.scale_factor_at_natural_origin!==void 0&&(n.k0=n.scale_factor_at_natural_origin),n.scale_factor_at_projection_centre!==void 0&&(n.k0=n.scale_factor_at_projection_centre),n.scale_factor_on_pseudo_standard_parallel!==void 0&&(n.k0=n.scale_factor_on_pseudo_standard_parallel),n.azimuth!==void 0&&(n.alpha=n.azimuth),n.azimuth_at_projection_centre!==void 0&&(n.alpha=n.azimuth_at_projection_centre),n.angle_from_rectified_to_skew_grid&&(n.rectified_grid_angle=n.angle_from_rectified_to_skew_grid),mh(n),n)}var Nl=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Ul(t,n){var r=n[0],u=n[1];!(r in t)&&u in t&&(t[r]=t[u],n.length===3&&(t[r]=n[2](t[r])))}function vh(t){for(var n=Object.keys(t),r=0,u=n.length;r<u;++r){var d=n[r];Nl.indexOf(d)!==-1&&jl(t[d]),typeof t[d]=="object"&&vh(t[d])}}function jl(t){if(t.AUTHORITY){var n=Object.keys(t.AUTHORITY)[0];n&&n in t.AUTHORITY&&(t.title=n+":"+t.AUTHORITY[n])}if(t.type==="GEOGCS"?t.projName="longlat":t.type==="LOCAL_CS"?(t.projName="identity",t.local=!0):typeof t.PROJECTION=="object"?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var r="",u=0,d=t.AXIS.length;u<d;++u){var f=[t.AXIS[u][0].toLowerCase(),t.AXIS[u][1].toLowerCase()];f[0].indexOf("north")!==-1||(f[0]==="y"||f[0]==="lat")&&f[1]==="north"?r+="n":f[0].indexOf("south")!==-1||(f[0]==="y"||f[0]==="lat")&&f[1]==="south"?r+="s":f[0].indexOf("east")!==-1||(f[0]==="x"||f[0]==="lon")&&f[1]==="east"?r+="e":(f[0].indexOf("west")!==-1||(f[0]==="x"||f[0]==="lon")&&f[1]==="west")&&(r+="w")}r.length===2&&(r+="u"),r.length===3&&(t.axis=r)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.UNIT.convert&&(t.type==="GEOGCS"?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var p=t.GEOGCS;t.type==="GEOGCS"&&(p=t),p&&(p.DATUM?t.datumCode=p.DATUM.name.toLowerCase():t.datumCode=p.name.toLowerCase(),t.datumCode.slice(0,2)==="d_"&&(t.datumCode=t.datumCode.slice(2)),t.datumCode==="new_zealand_1949"&&(t.datumCode="nzgd49"),(t.datumCode==="wgs_1984"||t.datumCode==="world_geodetic_system_1984")&&(t.PROJECTION==="Mercator_Auxiliary_Sphere"&&(t.sphere=!0),t.datumCode="wgs84"),t.datumCode==="belge_1972"&&(t.datumCode="rnb72"),p.DATUM&&p.DATUM.SPHEROID&&(t.ellps=p.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),t.ellps.toLowerCase().slice(0,13)==="international"&&(t.ellps="intl"),t.a=p.DATUM.SPHEROID.a,t.rf=parseFloat(p.DATUM.SPHEROID.rf,10)),p.DATUM&&p.DATUM.TOWGS84&&(t.datum_params=p.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),t.datumCode==="ch1903+"&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=ei(t.rectified_grid_angle));function g(E){var x=t.to_meter||1;return E*x}var M=function(E){return Ul(t,E)},B=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",ei],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ei],["x0","false_easting",g],["y0","false_northing",g],["long0","central_meridian",ei],["lat0","latitude_of_origin",ei],["lat0","standard_parallel_1",ei],["lat1","standard_parallel_1",ei],["lat2","standard_parallel_2",ei],["azimuth","Azimuth"],["alpha","azimuth",ei],["srsCode","name"]];B.forEach(M),mh(t)}function Ir(t){if(typeof t=="object")return _a(t);const n=Ol(t);var r=Gl(t);if(n==="WKT2"){const f=Dl(r);return _a(f)}var u=r[0],d={};return xn(r,d),vh(d),d[u]}function Be(t){var n=this;if(arguments.length===2){var r=arguments[1];typeof r=="string"?r.charAt(0)==="+"?Be[t]=Tr(arguments[1]):Be[t]=Ir(arguments[1]):Be[t]=r}else if(arguments.length===1){if(Array.isArray(t))return t.map(function(u){return Array.isArray(u)?Be.apply(n,u):Be(u)});if(typeof t=="string"){if(t in Be)return Be[t]}else"EPSG"in t?Be["EPSG:"+t.EPSG]=t:"ESRI"in t?Be["ESRI:"+t.ESRI]=t:"IAU2000"in t?Be["IAU2000:"+t.IAU2000]=t:console.log(t);return}}Ll(Be);function Zl(t){return typeof t=="string"}function ql(t){return t in Be}function Hl(t){return t.indexOf("+")!==0&&t.indexOf("[")!==-1||typeof t=="object"&&!("srsCode"in t)}var Vl=["3857","900913","3785","102113"];function $l(t){var n=Di(t,"authority");if(n){var r=Di(n,"epsg");return r&&Vl.indexOf(r)>-1}}function Kl(t){var n=Di(t,"extension");if(n)return Di(n,"proj4")}function Wl(t){return t[0]==="+"}function Xl(t){if(Zl(t)){if(ql(t))return Be[t];if(Hl(t)){var n=Ir(t);if($l(n))return Be["EPSG:3857"];var r=Kl(n);return r?Tr(r):n}if(Wl(t))return Tr(t)}else return"projName"in t?t:Ir(t)}function Mh(t,n){t=t||{};var r,u;if(!n)return t;for(u in n)r=n[u],r!==void 0&&(t[u]=r);return t}function ci(t,n,r){var u=t*n;return r/Math.sqrt(1-u*u)}function cs(t){return t<0?-1:1}function _t(t){return Math.abs(t)<=he?t:t-cs(t)*ls}function ii(t,n,r){var u=t*r,d=.5*t;return u=Math.pow((1-u)/(1+u),d),Math.tan(.5*(ut-n))/u}function ds(t,n){for(var r=.5*t,u,d,f=ut-2*Math.atan(n),p=0;p<=15;p++)if(u=t*Math.sin(f),d=ut-2*Math.atan(n*Math.pow((1-u)/(1+u),r))-f,f+=d,Math.abs(d)<=1e-10)return f;return-9999}function Yl(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Jl(t){var n=t.x,r=t.y;if(r*ui>90&&r*ui<-90&&n*ui>180&&n*ui<-180)return null;var u,d;if(Math.abs(Math.abs(r)-ut)<=dt)return null;if(this.sphere)u=this.x0+this.a*this.k0*_t(n-this.long0),d=this.y0+this.a*this.k0*Math.log(Math.tan(Zt+.5*r));else{var f=Math.sin(r),p=ii(this.e,r,f);u=this.x0+this.a*this.k0*_t(n-this.long0),d=this.y0-this.a*this.k0*Math.log(p)}return t.x=u,t.y=d,t}function Ql(t){var n=t.x-this.x0,r=t.y-this.y0,u,d;if(this.sphere)d=ut-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var f=Math.exp(-r/(this.a*this.k0));if(d=ds(this.e,f),d===-9999)return null}return u=_t(this.long0+n/(this.a*this.k0)),t.x=u,t.y=d,t}var tu=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const eu={init:Yl,forward:Jl,inverse:Ql,names:tu};function iu(){}function xh(t){return t}var nu=["longlat","identity"],su=[eu,{init:iu,forward:xh,inverse:xh,names:nu}],tn={},Ln=[];function Lh(t,n){var r=Ln.length;return t.names?(Ln[r]=t,t.names.forEach(function(u){tn[u.toLowerCase()]=r}),this):(console.log(n),!0)}function bh(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function au(t){if(!t)return!1;var n=t.toLowerCase();if(typeof tn[n]<"u"&&Ln[tn[n]]||(n=bh(n),n in tn&&Ln[tn[n]]))return Ln[tn[n]]}function ru(){su.forEach(Lh)}const ou={start:ru,add:Lh,get:au};var wh={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const hu=wh.WGS84;function lu(t,n,r,u){var d=t*t,f=n*n,p=(d-f)/d,g=0;u?(t*=1-p*(Cl+p*(El+p*Pl)),d=t*t,p=0):g=Math.sqrt(p);var M=(d-f)/f;return{es:p,e:g,ep2:M}}function uu(t,n,r,u,d){if(!t){var f=Di(wh,u);f||(f=hu),t=f.a,n=f.b,r=f.rf}return r&&!n&&(n=(1-1/r)*t),(r===0||Math.abs(t-n)<dt)&&(d=!0,n=t),{a:t,b:n,rf:r,sphere:d}}var ma={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var cu in ma){var Rr=ma[cu];Rr.datumName&&(ma[Rr.datumName]=Rr)}function du(t,n,r,u,d,f,p){var g={};return t===void 0||t==="none"?g.datum_type=Br:g.datum_type=bl,n&&(g.datum_params=n.map(parseFloat),(g.datum_params[0]!==0||g.datum_params[1]!==0||g.datum_params[2]!==0)&&(g.datum_type=Ji),g.datum_params.length>3&&(g.datum_params[3]!==0||g.datum_params[4]!==0||g.datum_params[5]!==0||g.datum_params[6]!==0)&&(g.datum_type=Qi,g.datum_params[3]*=hs,g.datum_params[4]*=hs,g.datum_params[5]*=hs,g.datum_params[6]=g.datum_params[6]/1e6+1)),p&&(g.datum_type=Mn,g.grids=p),g.a=r,g.b=u,g.es=d,g.ep2=f,g}var Fr={};function fu(t,n,r){return n instanceof ArrayBuffer?pu(t,n,r):{ready:_u(t,n)}}function pu(t,n,r){var u=!0;r!==void 0&&r.includeErrorFields===!1&&(u=!1);var d=new DataView(n),f=yu(d),p=Au(d,f),g=vu(d,p,f,u),M={header:p,subgrids:g};return Fr[t]=M,M}async function _u(t,n){for(var r=[],u=await n.getImageCount(),d=u-1;d>=0;d--){var f=await n.getImage(d),p=await f.readRasters(),g=p,M=[f.getWidth(),f.getHeight()],B=f.getBoundingBox().map(Ch),E=[f.fileDirectory.ModelPixelScale[0],f.fileDirectory.ModelPixelScale[1]].map(Ch),x=B[0]+(M[0]-1)*E[0],C=B[3]-(M[1]-1)*E[1],T=g[0],G=g[1],j=[];for(let rt=M[1]-1;rt>=0;rt--)for(let ct=M[0]-1;ct>=0;ct--){var W=rt*M[0]+ct;j.push([-Oi(G[W]),Oi(T[W])])}r.push({del:E,lim:M,ll:[-x,C],cvs:j})}var at={header:{nSubgrids:u},subgrids:r};return Fr[t]=at,at}function mu(t){if(t===void 0)return null;var n=t.split(",");return n.map(gu)}function gu(t){if(t.length===0)return null;var n=t[0]==="@";return n&&(t=t.slice(1)),t==="null"?{name:"null",mandatory:!n,grid:null,isNull:!0}:{name:t,mandatory:!n,grid:Fr[t]||null,isNull:!1}}function Ch(t){return t*Math.PI/180}function Oi(t){return t/3600*Math.PI/180}function yu(t){var n=t.getInt32(8,!1);return n===11?!1:(n=t.getInt32(8,!0),n!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function Au(t,n){return{nFields:t.getInt32(8,n),nSubgridFields:t.getInt32(24,n),nSubgrids:t.getInt32(40,n),shiftType:Gr(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,n),fromSemiMinorAxis:t.getFloat64(136,n),toSemiMajorAxis:t.getFloat64(152,n),toSemiMinorAxis:t.getFloat64(168,n)}}function Gr(t,n,r){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(n,r)))}function vu(t,n,r,u){for(var d=176,f=[],p=0;p<n.nSubgrids;p++){var g=xu(t,d,r),M=Lu(t,d,g,r,u),B=Math.round(1+(g.upperLongitude-g.lowerLongitude)/g.longitudeInterval),E=Math.round(1+(g.upperLatitude-g.lowerLatitude)/g.latitudeInterval);f.push({ll:[Oi(g.lowerLongitude),Oi(g.lowerLatitude)],del:[Oi(g.longitudeInterval),Oi(g.latitudeInterval)],lim:[B,E],count:g.gridNodeCount,cvs:Mu(M)});var x=16;u===!1&&(x=8),d+=176+g.gridNodeCount*x}return f}function Mu(t){return t.map(function(n){return[Oi(n.longitudeShift),Oi(n.latitudeShift)]})}function xu(t,n,r){return{name:Gr(t,n+8,n+16).trim(),parent:Gr(t,n+24,n+24+8).trim(),lowerLatitude:t.getFloat64(n+72,r),upperLatitude:t.getFloat64(n+88,r),lowerLongitude:t.getFloat64(n+104,r),upperLongitude:t.getFloat64(n+120,r),latitudeInterval:t.getFloat64(n+136,r),longitudeInterval:t.getFloat64(n+152,r),gridNodeCount:t.getInt32(n+168,r)}}function Lu(t,n,r,u,d){var f=n+176,p=16;d===!1&&(p=8);for(var g=[],M=0;M<r.gridNodeCount;M++){var B={latitudeShift:t.getFloat32(f+M*p,u),longitudeShift:t.getFloat32(f+M*p+4,u)};d!==!1&&(B.latitudeAccuracy=t.getFloat32(f+M*p+8,u),B.longitudeAccuracy=t.getFloat32(f+M*p+12,u)),g.push(B)}return g}function ni(t,n){if(!(this instanceof ni))return new ni(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,n=n||function(B){if(B)throw B};var r=Xl(t);if(typeof r!="object"){n("Could not parse to valid json: "+t);return}var u=ni.projections.get(r.projName);if(!u){n("Could not get projection name from: "+t);return}if(r.datumCode&&r.datumCode!=="none"){var d=Di(ma,r.datumCode);d&&(r.datum_params=r.datum_params||(d.towgs84?d.towgs84.split(","):null),r.ellps=d.ellipse,r.datumName=d.datumName?d.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var f=uu(r.a,r.b,r.rf,r.ellps,r.sphere),p=lu(f.a,f.b,f.rf,r.R_A),g=mu(r.nadgrids),M=r.datum||du(r.datumCode,r.datum_params,f.a,f.b,p.es,p.ep2,g);Mh(this,r),Mh(this,u),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=M,"init"in this&&typeof this.init=="function"&&this.init(),n(null,this)}ni.projections=ou,ni.projections.start();function bu(t,n){return t.datum_type!==n.datum_type||t.a!==n.a||Math.abs(t.es-n.es)>5e-11?!1:t.datum_type===Ji?t.datum_params[0]===n.datum_params[0]&&t.datum_params[1]===n.datum_params[1]&&t.datum_params[2]===n.datum_params[2]:t.datum_type===Qi?t.datum_params[0]===n.datum_params[0]&&t.datum_params[1]===n.datum_params[1]&&t.datum_params[2]===n.datum_params[2]&&t.datum_params[3]===n.datum_params[3]&&t.datum_params[4]===n.datum_params[4]&&t.datum_params[5]===n.datum_params[5]&&t.datum_params[6]===n.datum_params[6]:!0}function Eh(t,n,r){var u=t.x,d=t.y,f=t.z?t.z:0,p,g,M,B;if(d<-ut&&d>-1.001*ut)d=-ut;else if(d>ut&&d<1.001*ut)d=ut;else{if(d<-ut)return{x:-1/0,y:-1/0,z:t.z};if(d>ut)return{x:1/0,y:1/0,z:t.z}}return u>Math.PI&&(u-=2*Math.PI),g=Math.sin(d),B=Math.cos(d),M=g*g,p=r/Math.sqrt(1-n*M),{x:(p+f)*B*Math.cos(u),y:(p+f)*B*Math.sin(u),z:(p*(1-n)+f)*g}}function Ph(t,n,r,u){var d=1e-12,f=d*d,p=30,g,M,B,E,x,C,T,G,j,W,at,rt,ct,yt=t.x,mt=t.y,xt=t.z?t.z:0,Dt,It,zt;if(g=Math.sqrt(yt*yt+mt*mt),M=Math.sqrt(yt*yt+mt*mt+xt*xt),g/r<d){if(Dt=0,M/r<d)return It=ut,zt=-u,{x:t.x,y:t.y,z:t.z}}else Dt=Math.atan2(mt,yt);B=xt/M,E=g/M,x=1/Math.sqrt(1-n*(2-n)*E*E),G=E*(1-n)*x,j=B*x,ct=0;do ct++,T=r/Math.sqrt(1-n*j*j),zt=g*G+xt*j-T*(1-n*j*j),C=n*T/(T+zt),x=1/Math.sqrt(1-C*(2-C)*E*E),W=E*(1-C)*x,at=B*x,rt=at*G-W*j,G=W,j=at;while(rt*rt>f&&ct<p);return It=Math.atan(at/Math.abs(W)),{x:Dt,y:It,z:zt}}function wu(t,n,r){if(n===Ji)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(n===Qi){var u=r[0],d=r[1],f=r[2],p=r[3],g=r[4],M=r[5],B=r[6];return{x:B*(t.x-M*t.y+g*t.z)+u,y:B*(M*t.x+t.y-p*t.z)+d,z:B*(-g*t.x+p*t.y+t.z)+f}}}function Cu(t,n,r){if(n===Ji)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(n===Qi){var u=r[0],d=r[1],f=r[2],p=r[3],g=r[4],M=r[5],B=r[6],E=(t.x-u)/B,x=(t.y-d)/B,C=(t.z-f)/B;return{x:E+M*x-g*C,y:-M*E+x+p*C,z:g*E-p*x+C}}}function ga(t){return t===Ji||t===Qi}function Eu(t,n,r){if(bu(t,n)||t.datum_type===Br||n.datum_type===Br)return r;var u=t.a,d=t.es;if(t.datum_type===Mn){var f=kh(t,!1,r);if(f!==0)return;u=hh,d=lh}var p=n.a,g=n.b,M=n.es;if(n.datum_type===Mn&&(p=hh,g=wl,M=lh),d===M&&u===p&&!ga(t.datum_type)&&!ga(n.datum_type))return r;if(r=Eh(r,d,u),ga(t.datum_type)&&(r=wu(r,t.datum_type,t.datum_params)),ga(n.datum_type)&&(r=Cu(r,n.datum_type,n.datum_params)),r=Ph(r,M,p,g),n.datum_type===Mn){var B=kh(n,!0,r);if(B!==0)return}return r}function kh(t,n,r){if(t.grids===null||t.grids.length===0)return console.log("Grid shift grids not found"),-1;var u={x:-r.x,y:r.y},d={x:Number.NaN,y:Number.NaN},f=[];t:for(var p=0;p<t.grids.length;p++){var g=t.grids[p];if(f.push(g.name),g.isNull){d=u;break}if(g.grid===null){if(g.mandatory)return console.log("Unable to find mandatory grid '"+g.name+"'"),-1;continue}for(var M=g.grid.subgrids,B=0,E=M.length;B<E;B++){var x=M[B],C=(Math.abs(x.del[1])+Math.abs(x.del[0]))/1e4,T=x.ll[0]-C,G=x.ll[1]-C,j=x.ll[0]+(x.lim[0]-1)*x.del[0]+C,W=x.ll[1]+(x.lim[1]-1)*x.del[1]+C;if(!(G>u.y||T>u.x||W<u.y||j<u.x)&&(d=Pu(u,n,x),!isNaN(d.x)))break t}}return isNaN(d.x)?(console.log("Failed to find a grid shift table for location '"+-u.x*ui+" "+u.y*ui+" tried: '"+f+"'"),-1):(r.x=-d.x,r.y=d.y,0)}function Pu(t,n,r){var u={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return u;var d={x:t.x,y:t.y};d.x-=r.ll[0],d.y-=r.ll[1],d.x=_t(d.x-Math.PI)+Math.PI;var f=Sh(d,r);if(n){if(isNaN(f.x))return u;f.x=d.x-f.x,f.y=d.y-f.y;var p=9,g=1e-12,M,B;do{if(B=Sh(f,r),isNaN(B.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}M={x:d.x-(B.x+f.x),y:d.y-(B.y+f.y)},f.x+=M.x,f.y+=M.y}while(p--&&Math.abs(M.x)>g&&Math.abs(M.y)>g);if(p<0)return console.log("Inverse grid shift iterator failed to converge."),u;u.x=_t(f.x+r.ll[0]),u.y=f.y+r.ll[1]}else isNaN(f.x)||(u.x=t.x+f.x,u.y=t.y+f.y);return u}function Sh(t,n){var r={x:t.x/n.del[0],y:t.y/n.del[1]},u={x:Math.floor(r.x),y:Math.floor(r.y)},d={x:r.x-1*u.x,y:r.y-1*u.y},f={x:Number.NaN,y:Number.NaN},p;if(u.x<0||u.x>=n.lim[0]||u.y<0||u.y>=n.lim[1])return f;p=u.y*n.lim[0]+u.x;var g={x:n.cvs[p][0],y:n.cvs[p][1]};p++;var M={x:n.cvs[p][0],y:n.cvs[p][1]};p+=n.lim[0];var B={x:n.cvs[p][0],y:n.cvs[p][1]};p--;var E={x:n.cvs[p][0],y:n.cvs[p][1]},x=d.x*d.y,C=d.x*(1-d.y),T=(1-d.x)*(1-d.y),G=(1-d.x)*d.y;return f.x=T*g.x+C*M.x+G*E.x+x*B.x,f.y=T*g.y+C*M.y+G*E.y+x*B.y,f}function Bh(t,n,r){var u=r.x,d=r.y,f=r.z||0,p,g,M,B={};for(M=0;M<3;M++)if(!(n&&M===2&&r.z===void 0))switch(M===0?(p=u,"ew".indexOf(t.axis[M])!==-1?g="x":g="y"):M===1?(p=d,"ns".indexOf(t.axis[M])!==-1?g="y":g="x"):(p=f,g="z"),t.axis[M]){case"e":B[g]=p;break;case"w":B[g]=-p;break;case"n":B[g]=p;break;case"s":B[g]=-p;break;case"u":r[g]!==void 0&&(B.z=p);break;case"d":r[g]!==void 0&&(B.z=-p);break;default:return null}return B}function Th(t){var n={x:t[0],y:t[1]};return t.length>2&&(n.z=t[2]),t.length>3&&(n.m=t[3]),n}function ku(t){Dh(t.x),Dh(t.y)}function Dh(t){if(typeof Number.isFinite=="function"){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if(typeof t!="number"||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function Su(t,n){return(t.datum.datum_type===Ji||t.datum.datum_type===Qi||t.datum.datum_type===Mn)&&n.datumCode!=="WGS84"||(n.datum.datum_type===Ji||n.datum.datum_type===Qi||n.datum.datum_type===Mn)&&t.datumCode!=="WGS84"}function ya(t,n,r,u){var d;Array.isArray(r)?r=Th(r):r={x:r.x,y:r.y,z:r.z,m:r.m};var f=r.z!==void 0;if(ku(r),t.datum&&n.datum&&Su(t,n)&&(d=new ni("WGS84"),r=ya(t,d,r,u),t=d),u&&t.axis!=="enu"&&(r=Bh(t,!1,r)),t.projName==="longlat")r={x:r.x*ye,y:r.y*ye,z:r.z||0};else if(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter,z:r.z||0}),r=t.inverse(r),!r)return;if(t.from_greenwich&&(r.x+=t.from_greenwich),r=Eu(t.datum,n.datum,r),!!r)return r=r,n.from_greenwich&&(r={x:r.x-n.from_greenwich,y:r.y,z:r.z||0}),n.projName==="longlat"?r={x:r.x*ui,y:r.y*ui,z:r.z||0}:(r=n.forward(r),n.to_meter&&(r={x:r.x/n.to_meter,y:r.y/n.to_meter,z:r.z||0})),u&&n.axis!=="enu"?Bh(n,!0,r):(r&&!f&&delete r.z,r)}var Oh=ni("WGS84");function zr(t,n,r,u){var d,f,p;return Array.isArray(r)?(d=ya(t,n,r,u)||{x:NaN,y:NaN},r.length>2?typeof t.name<"u"&&t.name==="geocent"||typeof n.name<"u"&&n.name==="geocent"?typeof d.z=="number"?[d.x,d.y,d.z].concat(r.slice(3)):[d.x,d.y,r[2]].concat(r.slice(3)):[d.x,d.y].concat(r.slice(2)):[d.x,d.y]):(f=ya(t,n,r,u),p=Object.keys(r),p.length===2||p.forEach(function(g){if(typeof t.name<"u"&&t.name==="geocent"||typeof n.name<"u"&&n.name==="geocent"){if(g==="x"||g==="y"||g==="z")return}else if(g==="x"||g==="y")return;f[g]=r[g]}),f)}function Aa(t){return t instanceof ni?t:typeof t=="object"&&"oProj"in t?t.oProj:ni(t)}function Bu(t,n,r){var u,d,f=!1,p;return typeof n>"u"?(d=Aa(t),u=Oh,f=!0):(typeof n.x<"u"||Array.isArray(n))&&(r=n,d=Aa(t),u=Oh,f=!0),u||(u=Aa(t)),d||(d=Aa(n)),r?zr(u,d,r):(p={forward:function(g,M){return zr(u,d,g,M)},inverse:function(g,M){return zr(d,u,g,M)}},f&&(p.oProj=d),p)}var Ih=6,Rh="AJSAJS",Fh="AFAFAF",bn=65,Ge=73,Ve=79,fs=86,ps=90;const Tu={forward:Gh,inverse:Du,toPoint:zh};function Gh(t,n){return n=n||5,Ru(Ou({lat:t[1],lon:t[0]}),n)}function Du(t){var n=Ur(jh(t.toUpperCase()));return n.lat&&n.lon?[n.lon,n.lat,n.lon,n.lat]:[n.left,n.bottom,n.right,n.top]}function zh(t){var n=Ur(jh(t.toUpperCase()));return n.lat&&n.lon?[n.lon,n.lat]:[(n.left+n.right)/2,(n.top+n.bottom)/2]}function Nr(t){return t*(Math.PI/180)}function Nh(t){return 180*(t/Math.PI)}function Ou(t){var n=t.lat,r=t.lon,u=6378137,d=.00669438,f=.9996,p,g,M,B,E,x,C,T=Nr(n),G=Nr(r),j,W;W=Math.floor((r+180)/6)+1,r===180&&(W=60),n>=56&&n<64&&r>=3&&r<12&&(W=32),n>=72&&n<84&&(r>=0&&r<9?W=31:r>=9&&r<21?W=33:r>=21&&r<33?W=35:r>=33&&r<42&&(W=37)),p=(W-1)*6-180+3,j=Nr(p),g=d/(1-d),M=u/Math.sqrt(1-d*Math.sin(T)*Math.sin(T)),B=Math.tan(T)*Math.tan(T),E=g*Math.cos(T)*Math.cos(T),x=Math.cos(T)*(G-j),C=u*((1-d/4-3*d*d/64-5*d*d*d/256)*T-(3*d/8+3*d*d/32+45*d*d*d/1024)*Math.sin(2*T)+(15*d*d/256+45*d*d*d/1024)*Math.sin(4*T)-35*d*d*d/3072*Math.sin(6*T));var at=f*M*(x+(1-B+E)*x*x*x/6+(5-18*B+B*B+72*E-58*g)*x*x*x*x*x/120)+5e5,rt=f*(C+M*Math.tan(T)*(x*x/2+(5-B+9*E+4*E*E)*x*x*x*x/24+(61-58*B+B*B+600*E-330*g)*x*x*x*x*x*x/720));return n<0&&(rt+=1e7),{northing:Math.round(rt),easting:Math.round(at),zoneNumber:W,zoneLetter:Iu(n)}}function Ur(t){var n=t.northing,r=t.easting,u=t.zoneLetter,d=t.zoneNumber;if(d<0||d>60)return null;var f=.9996,p=6378137,g=.00669438,M,B=(1-Math.sqrt(1-g))/(1+Math.sqrt(1-g)),E,x,C,T,G,j,W,at,rt,ct=r-5e5,yt=n;u<"N"&&(yt-=1e7),W=(d-1)*6-180+3,M=g/(1-g),j=yt/f,at=j/(p*(1-g/4-3*g*g/64-5*g*g*g/256)),rt=at+(3*B/2-27*B*B*B/32)*Math.sin(2*at)+(21*B*B/16-55*B*B*B*B/32)*Math.sin(4*at)+151*B*B*B/96*Math.sin(6*at),E=p/Math.sqrt(1-g*Math.sin(rt)*Math.sin(rt)),x=Math.tan(rt)*Math.tan(rt),C=M*Math.cos(rt)*Math.cos(rt),T=p*(1-g)/Math.pow(1-g*Math.sin(rt)*Math.sin(rt),1.5),G=ct/(E*f);var mt=rt-E*Math.tan(rt)/T*(G*G/2-(5+3*x+10*C-4*C*C-9*M)*G*G*G*G/24+(61+90*x+298*C+45*x*x-252*M-3*C*C)*G*G*G*G*G*G/720);mt=Nh(mt);var xt=(G-(1+2*x+C)*G*G*G/6+(5-2*C+28*x-3*C*C+8*M+24*x*x)*G*G*G*G*G/120)/Math.cos(rt);xt=W+Nh(xt);var Dt;if(t.accuracy){var It=Ur({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});Dt={top:It.lat,right:It.lon,bottom:mt,left:xt}}else Dt={lat:mt,lon:xt};return Dt}function Iu(t){var n="Z";return 84>=t&&t>=72?n="X":72>t&&t>=64?n="W":64>t&&t>=56?n="V":56>t&&t>=48?n="U":48>t&&t>=40?n="T":40>t&&t>=32?n="S":32>t&&t>=24?n="R":24>t&&t>=16?n="Q":16>t&&t>=8?n="P":8>t&&t>=0?n="N":0>t&&t>=-8?n="M":-8>t&&t>=-16?n="L":-16>t&&t>=-24?n="K":-24>t&&t>=-32?n="J":-32>t&&t>=-40?n="H":-40>t&&t>=-48?n="G":-48>t&&t>=-56?n="F":-56>t&&t>=-64?n="E":-64>t&&t>=-72?n="D":-72>t&&t>=-80&&(n="C"),n}function Ru(t,n){var r="00000"+t.easting,u="00000"+t.northing;return t.zoneNumber+t.zoneLetter+Fu(t.easting,t.northing,t.zoneNumber)+r.substr(r.length-5,n)+u.substr(u.length-5,n)}function Fu(t,n,r){var u=Uh(r),d=Math.floor(t/1e5),f=Math.floor(n/1e5)%20;return Gu(d,f,u)}function Uh(t){var n=t%Ih;return n===0&&(n=Ih),n}function Gu(t,n,r){var u=r-1,d=Rh.charCodeAt(u),f=Fh.charCodeAt(u),p=d+t-1,g=f+n,M=!1;p>ps&&(p=p-ps+bn-1,M=!0),(p===Ge||d<Ge&&p>Ge||(p>Ge||d<Ge)&&M)&&p++,(p===Ve||d<Ve&&p>Ve||(p>Ve||d<Ve)&&M)&&(p++,p===Ge&&p++),p>ps&&(p=p-ps+bn-1),g>fs?(g=g-fs+bn-1,M=!0):M=!1,(g===Ge||f<Ge&&g>Ge||(g>Ge||f<Ge)&&M)&&g++,(g===Ve||f<Ve&&g>Ve||(g>Ve||f<Ve)&&M)&&(g++,g===Ge&&g++),g>fs&&(g=g-fs+bn-1);var B=String.fromCharCode(p)+String.fromCharCode(g);return B}function jh(t){if(t&&t.length===0)throw"MGRSPoint coverting from nothing";for(var n=t.length,r=null,u="",d,f=0;!/[A-Z]/.test(d=t.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+t;u+=d,f++}var p=parseInt(u,10);if(f===0||f+3>n)throw"MGRSPoint bad conversion from: "+t;var g=t.charAt(f++);if(g<="A"||g==="B"||g==="Y"||g>="Z"||g==="I"||g==="O")throw"MGRSPoint zone letter "+g+" not handled: "+t;r=t.substring(f,f+=2);for(var M=Uh(p),B=zu(r.charAt(0),M),E=Nu(r.charAt(1),M);E<Uu(g);)E+=2e6;var x=n-f;if(x%2!==0)throw`MGRSPoint has to have an even number
7
7
  of digits after the zone letter and two 100km letters - front
8
8
  half for easting meters, second half for
9
- northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10,C),W=e.substring(f,f+C),D=parseFloat(W)*j,at=e.substring(f+C),G=parseFloat(at)*j),rt=D+B,ct=G+E,{easting:rt,northing:ct,zoneLetter:g,zoneNumber:m,accuracy:j}}function Fu(e,n){for(var r=Oh.charCodeAt(n-1),u=1e5,d=!1;r!==e.charCodeAt(0);){if(r++,r===Ge&&r++,r===Ve&&r++,r>ps){if(d)throw"Bad character: "+e;r=bn,d=!0}u+=1e5}return u}function Gu(e,n){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var r=Ih.charCodeAt(n-1),u=0,d=!1;r!==e.charCodeAt(0);){if(r++,r===Ge&&r++,r===Ve&&r++,r>fs){if(d)throw"Bad character: "+e;r=bn,d=!0}u+=1e5}return u}function zu(e){var n;switch(e){case"C":n=11e5;break;case"D":n=2e6;break;case"E":n=28e5;break;case"F":n=37e5;break;case"G":n=46e5;break;case"H":n=55e5;break;case"J":n=64e5;break;case"K":n=73e5;break;case"L":n=82e5;break;case"M":n=91e5;break;case"N":n=0;break;case"P":n=8e5;break;case"Q":n=17e5;break;case"R":n=26e5;break;case"S":n=35e5;break;case"T":n=44e5;break;case"U":n=53e5;break;case"V":n=62e5;break;case"W":n=7e6;break;case"X":n=79e5;break;default:n=-1}if(n>=0)return n;throw"Invalid zone letter: "+e}function wn(e,n,r){if(!(this instanceof wn))return new wn(e,n,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if(typeof e=="object")this.x=e.x,this.y=e.y,this.z=e.z||0;else if(typeof e=="string"&&typeof n>"u"){var u=e.split(",");this.x=parseFloat(u[0]),this.y=parseFloat(u[1]),this.z=parseFloat(u[2])||0}else this.x=e,this.y=n,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}wn.fromMGRS=function(e){return new wn(Fh(e))},wn.prototype.toMGRS=function(e){return Rh([this.x,this.y],e)};var Nu=1,Uu=.25,Uh=.046875,Zh=.01953125,jh=.01068115234375,Zu=.75,ju=.46875,qu=.013020833333333334,Hu=.007120768229166667,Vu=.3645833333333333,$u=.005696614583333333,Ku=.3076171875;function Ur(e){var n=[];n[0]=Nu-e*(Uu+e*(Uh+e*(Zh+e*jh))),n[1]=e*(Zu-e*(Uh+e*(Zh+e*jh)));var r=e*e;return n[2]=r*(ju-e*(qu+e*Hu)),r*=e,n[3]=r*(Vu-e*$u),n[4]=r*e*Ku,n}function Cn(e,n,r,u){return r*=n,n*=n,u[0]*e-r*(u[1]+n*(u[2]+n*(u[3]+n*u[4])))}var Wu=20;function Zr(e,n,r){for(var u=1/(1-n),d=e,f=Wu;f;--f){var m=Math.sin(d),g=1-n*m*m;if(g=(Cn(d,m,Math.cos(d),r)-e)*(g*Math.sqrt(g))*u,d-=g,Math.abs(g)<dt)return d}return d}function Xu(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Ur(this.es),this.ml0=Cn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Yu(e){var n=e.x,r=e.y,u=_t(n-this.long0),d,f,m,g=Math.sin(r),M=Math.cos(r);if(this.es){var E=M*u,b=Math.pow(E,2),C=this.ep2*Math.pow(M,2),D=Math.pow(C,2),G=Math.abs(M)>dt?Math.tan(r):0,j=Math.pow(G,2),W=Math.pow(j,2);d=1-this.es*Math.pow(g,2),E=E/Math.sqrt(d);var at=Cn(r,g,M,this.en);f=this.a*(this.k0*E*(1+b/6*(1-j+C+b/20*(5-18*j+W+14*C-58*j*C+b/42*(61+179*W-W*j-479*j)))))+this.x0,m=this.a*(this.k0*(at-this.ml0+g*u*E/2*(1+b/12*(5-j+9*C+4*D+b/30*(61+W-58*j+270*C-330*j*C+b/56*(1385+543*W-W*j-3111*j))))))+this.y0}else{var B=M*Math.sin(u);if(Math.abs(Math.abs(B)-1)<dt)return 93;if(f=.5*this.a*this.k0*Math.log((1+B)/(1-B))+this.x0,m=M*Math.cos(u)/Math.sqrt(1-Math.pow(B,2)),B=Math.abs(m),B>=1){if(B-1>dt)return 93;m=0}else m=Math.acos(m);r<0&&(m=-m),m=this.a*this.k0*(m-this.lat0)+this.y0}return e.x=f,e.y=m,e}function Ju(e){var n,r,u,d,f=(e.x-this.x0)*(1/this.a),m=(e.y-this.y0)*(1/this.a);if(this.es)if(n=this.ml0+m/this.k0,r=Zr(n,this.es,this.en),Math.abs(r)<ut){var b=Math.sin(r),C=Math.cos(r),D=Math.abs(C)>dt?Math.tan(r):0,G=this.ep2*Math.pow(C,2),j=Math.pow(G,2),W=Math.pow(D,2),at=Math.pow(W,2);n=1-this.es*Math.pow(b,2);var rt=f*Math.sqrt(n)/this.k0,ct=Math.pow(rt,2);n=n*D,u=r-n*ct/(1-this.es)*.5*(1-ct/12*(5+3*W-9*G*W+G-4*j-ct/30*(61+90*W-252*G*W+45*at+46*G-ct/56*(1385+3633*W+4095*at+1574*at*W)))),d=_t(this.long0+rt*(1-ct/6*(1+2*W+G-ct/20*(5+28*W+24*at+8*G*W+6*G-ct/42*(61+662*W+1320*at+720*at*W))))/C)}else u=ut*cs(m),d=0;else{var g=Math.exp(f/this.k0),M=.5*(g-1/g),B=this.lat0+m/this.k0,E=Math.cos(B);n=Math.sqrt((1-Math.pow(E,2))/(1+Math.pow(M,2))),u=Math.asin(n),m<0&&(u=-u),M===0&&E===0?d=0:d=_t(Math.atan2(M,E)+this.long0)}return e.x=d,e.y=u,e}var Qu=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const va={init:Xu,forward:Yu,inverse:Ju,names:Qu};function qh(e){var n=Math.exp(e);return n=(n-1/n)/2,n}function ze(e,n){e=Math.abs(e),n=Math.abs(n);var r=Math.max(e,n),u=Math.min(e,n)/(r||1);return r*Math.sqrt(1+Math.pow(u,2))}function tc(e){var n=1+e,r=n-1;return r===0?e:e*Math.log(n)/r}function ec(e){var n=Math.abs(e);return n=tc(n*(1+n/(ze(1,n)+1))),e<0?-n:n}function jr(e,n){for(var r=2*Math.cos(2*n),u=e.length-1,d=e[u],f=0,m;--u>=0;)m=-f+r*d+e[u],f=d,d=m;return n+m*Math.sin(2*n)}function ic(e,n){for(var r=2*Math.cos(n),u=e.length-1,d=e[u],f=0,m;--u>=0;)m=-f+r*d+e[u],f=d,d=m;return Math.sin(n)*m}function nc(e){var n=Math.exp(e);return n=(n+1/n)/2,n}function Hh(e,n,r){for(var u=Math.sin(n),d=Math.cos(n),f=qh(r),m=nc(r),g=2*d*m,M=-2*u*f,B=e.length-1,E=e[B],b=0,C=0,D=0,G,j;--B>=0;)G=C,j=b,C=E,b=D,E=-G+g*C-M*b+e[B],D=-j+M*C+g*b;return g=u*m,M=d*f,[g*E-M*D,g*D+M*E]}function sc(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(va.init.apply(this),this.forward=va.forward,this.inverse=va.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),n=e/(2-e),r=n;this.cgb[0]=n*(2+n*(-2/3+n*(-2+n*(116/45+n*(26/45+n*(-2854/675)))))),this.cbg[0]=n*(-2+n*(2/3+n*(4/3+n*(-82/45+n*(32/45+n*(4642/4725)))))),r=r*n,this.cgb[1]=r*(7/3+n*(-8/5+n*(-227/45+n*(2704/315+n*(2323/945))))),this.cbg[1]=r*(5/3+n*(-16/15+n*(-13/9+n*(904/315+n*(-1522/945))))),r=r*n,this.cgb[2]=r*(56/15+n*(-136/35+n*(-1262/105+n*(73814/2835)))),this.cbg[2]=r*(-26/15+n*(34/21+n*(8/5+n*(-12686/2835)))),r=r*n,this.cgb[3]=r*(4279/630+n*(-332/35+n*(-399572/14175))),this.cbg[3]=r*(1237/630+n*(-12/5+n*(-24832/14175))),r=r*n,this.cgb[4]=r*(4174/315+n*(-144838/6237)),this.cbg[4]=r*(-734/315+n*(109598/31185)),r=r*n,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(n,2),this.Qn=this.k0/(1+n)*(1+r*(1/4+r*(1/64+r/256))),this.utg[0]=n*(-.5+n*(2/3+n*(-37/96+n*(1/360+n*(81/512+n*(-96199/604800)))))),this.gtu[0]=n*(.5+n*(-2/3+n*(5/16+n*(41/180+n*(-127/288+n*(7891/37800)))))),this.utg[1]=r*(-1/48+n*(-1/15+n*(437/1440+n*(-46/105+n*(1118711/3870720))))),this.gtu[1]=r*(13/48+n*(-3/5+n*(557/1440+n*(281/630+n*(-1983433/1935360))))),r=r*n,this.utg[2]=r*(-17/480+n*(37/840+n*(209/4480+n*(-5569/90720)))),this.gtu[2]=r*(61/240+n*(-103/140+n*(15061/26880+n*(167603/181440)))),r=r*n,this.utg[3]=r*(-4397/161280+n*(11/504+n*(830251/7257600))),this.gtu[3]=r*(49561/161280+n*(-179/168+n*(6601661/7257600))),r=r*n,this.utg[4]=r*(-4583/161280+n*(108847/3991680)),this.gtu[4]=r*(34729/80640+n*(-3418889/1995840)),r=r*n,this.utg[5]=r*(-20648693/638668800),this.gtu[5]=r*(212378941/319334400);var u=jr(this.cbg,this.lat0);this.Zb=-this.Qn*(u+ic(this.gtu,2*u))}function ac(e){var n=_t(e.x-this.long0),r=e.y;r=jr(this.cbg,r);var u=Math.sin(r),d=Math.cos(r),f=Math.sin(n),m=Math.cos(n);r=Math.atan2(u,m*d),n=Math.atan2(f*d,ze(u,d*m)),n=ec(Math.tan(n));var g=Hh(this.gtu,2*r,2*n);r=r+g[0],n=n+g[1];var M,B;return Math.abs(n)<=2.623395162778?(M=this.a*(this.Qn*n)+this.x0,B=this.a*(this.Qn*r+this.Zb)+this.y0):(M=1/0,B=1/0),e.x=M,e.y=B,e}function rc(e){var n=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);r=(r-this.Zb)/this.Qn,n=n/this.Qn;var u,d;if(Math.abs(n)<=2.623395162778){var f=Hh(this.utg,2*r,2*n);r=r+f[0],n=n+f[1],n=Math.atan(qh(n));var m=Math.sin(r),g=Math.cos(r),M=Math.sin(n),B=Math.cos(n);r=Math.atan2(m*B,ze(M,B*g)),n=Math.atan2(M,B*g),u=_t(n+this.long0),d=jr(this.cgb,r)}else u=1/0,d=1/0;return e.x=u,e.y=d,e}var oc=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Ma={init:sc,forward:ac,inverse:rc,names:oc};function hc(e,n){if(e===void 0){if(e=Math.floor((_t(n)+Math.PI)*30/Math.PI)+1,e<0)return 0;if(e>60)return 60}return e}var lc="etmerc";function uc(){var e=hc(this.zone,this.long0);if(e===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*ye,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ma.init.apply(this),this.forward=Ma.forward,this.inverse=Ma.inverse}var cc=["Universal Transverse Mercator System","utm"];const dc={init:uc,names:cc,dependsOn:lc};function qr(e,n){return Math.pow((1-e)/(1+e),n)}var fc=20;function pc(){var e=Math.sin(this.lat0),n=Math.cos(this.lat0);n*=n,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*n*n/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+jt)/(Math.pow(Math.tan(.5*this.lat0+jt),this.C)*qr(this.e*e,this.ratexp))}function _c(e){var n=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+jt),this.C)*qr(this.e*Math.sin(r),this.ratexp))-ut,e.x=this.C*n,e}function mc(e){for(var n=1e-14,r=e.x/this.C,u=e.y,d=Math.pow(Math.tan(.5*u+jt)/this.K,1/this.C),f=fc;f>0&&(u=2*Math.atan(d*qr(this.e*Math.sin(e.y),-.5*this.e))-ut,!(Math.abs(u-e.y)<n));--f)e.y=u;return f?(e.x=r,e.y=u,e):null}const Hr={init:pc,forward:_c,inverse:mc};function gc(){Hr.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function yc(e){var n,r,u,d;return e.x=_t(e.x-this.long0),Hr.forward.apply(this,[e]),n=Math.sin(e.y),r=Math.cos(e.y),u=Math.cos(e.x),d=this.k0*this.R2/(1+this.sinc0*n+this.cosc0*r*u),e.x=d*r*Math.sin(e.x),e.y=d*(this.cosc0*n-this.sinc0*r*u),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function Ac(e){var n,r,u,d,f;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,f=ze(e.x,e.y)){var m=2*Math.atan2(f,this.R2);n=Math.sin(m),r=Math.cos(m),d=Math.asin(r*this.sinc0+e.y*n*this.cosc0/f),u=Math.atan2(e.x*n,f*this.cosc0*r-e.y*this.sinc0*n)}else d=this.phic0,u=0;return e.x=u,e.y=d,Hr.inverse.apply(this,[e]),e.x=_t(e.x+this.long0),e}var vc=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const Mc={init:gc,forward:yc,inverse:Ac,names:vc};function Vr(e,n,r){return n*=r,Math.tan(.5*(ut+e))*Math.pow((1-n)/(1+n),.5*r)}function xc(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dt&&(this.k0=.5*(1+cs(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=dt&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dt&&Math.abs(Math.cos(this.lat_ts))>dt&&(this.k0=.5*this.cons*ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ii(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ci(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(Vr(this.lat0,this.sinlat0,this.e))-ut,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function Lc(e){var n=e.x,r=e.y,u=Math.sin(r),d=Math.cos(r),f,m,g,M,B,E,b=_t(n-this.long0);return Math.abs(Math.abs(n-this.long0)-Math.PI)<=dt&&Math.abs(r+this.lat0)<=dt?(e.x=NaN,e.y=NaN,e):this.sphere?(f=2*this.k0/(1+this.sinlat0*u+this.coslat0*d*Math.cos(b)),e.x=this.a*f*d*Math.sin(b)+this.x0,e.y=this.a*f*(this.coslat0*u-this.sinlat0*d*Math.cos(b))+this.y0,e):(m=2*Math.atan(Vr(r,u,this.e))-ut,M=Math.cos(m),g=Math.sin(m),Math.abs(this.coslat0)<=dt?(B=ii(this.e,r*this.con,this.con*u),E=2*this.a*this.k0*B/this.cons,e.x=this.x0+E*Math.sin(n-this.long0),e.y=this.y0-this.con*E*Math.cos(n-this.long0),e):(Math.abs(this.sinlat0)<dt?(f=2*this.a*this.k0/(1+M*Math.cos(b)),e.y=f*g):(f=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*g+this.cosX0*M*Math.cos(b))),e.y=f*(this.cosX0*g-this.sinX0*M*Math.cos(b))+this.y0),e.x=f*M*Math.sin(b)+this.x0,e))}function bc(e){e.x-=this.x0,e.y-=this.y0;var n,r,u,d,f,m=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var g=2*Math.atan(m/(2*this.a*this.k0));return n=this.long0,r=this.lat0,m<=dt?(e.x=n,e.y=r,e):(r=Math.asin(Math.cos(g)*this.sinlat0+e.y*Math.sin(g)*this.coslat0/m),Math.abs(this.coslat0)<dt?this.lat0>0?n=_t(this.long0+Math.atan2(e.x,-1*e.y)):n=_t(this.long0+Math.atan2(e.x,e.y)):n=_t(this.long0+Math.atan2(e.x*Math.sin(g),m*this.coslat0*Math.cos(g)-e.y*this.sinlat0*Math.sin(g))),e.x=n,e.y=r,e)}else if(Math.abs(this.coslat0)<=dt){if(m<=dt)return r=this.lat0,n=this.long0,e.x=n,e.y=r,e;e.x*=this.con,e.y*=this.con,u=m*this.cons/(2*this.a*this.k0),r=this.con*ds(this.e,u),n=this.con*_t(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else d=2*Math.atan(m*this.cosX0/(2*this.a*this.k0*this.ms1)),n=this.long0,m<=dt?f=this.X0:(f=Math.asin(Math.cos(d)*this.sinX0+e.y*Math.sin(d)*this.cosX0/m),n=_t(this.long0+Math.atan2(e.x*Math.sin(d),m*this.cosX0*Math.cos(d)-e.y*this.sinX0*Math.sin(d)))),r=-1*ds(this.e,Math.tan(.5*(ut+f)));return e.x=n,e.y=r,e}var wc=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const Cc={init:xc,forward:Lc,inverse:bc,names:wc,ssfn_:Vr};function Ec(){var e=this.lat0;this.lambda0=this.long0;var n=Math.sin(e),r=this.a,u=this.rf,d=1/u,f=2*d-Math.pow(d,2),m=this.e=Math.sqrt(f);this.R=this.k0*r*Math.sqrt(1-f)/(1-f*Math.pow(n,2)),this.alpha=Math.sqrt(1+f/(1-f)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(n/this.alpha);var g=Math.log(Math.tan(Math.PI/4+this.b0/2)),M=Math.log(Math.tan(Math.PI/4+e/2)),B=Math.log((1+m*n)/(1-m*n));this.K=g-this.alpha*M+this.alpha*m/2*B}function Pc(e){var n=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),u=-this.alpha*(n+r)+this.K,d=2*(Math.atan(Math.exp(u))-Math.PI/4),f=this.alpha*(e.x-this.lambda0),m=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(d)+Math.cos(this.b0)*Math.cos(f))),g=Math.asin(Math.cos(this.b0)*Math.sin(d)-Math.sin(this.b0)*Math.cos(d)*Math.cos(f));return e.y=this.R/2*Math.log((1+Math.sin(g))/(1-Math.sin(g)))+this.y0,e.x=this.R*m+this.x0,e}function kc(e){for(var n=e.x-this.x0,r=e.y-this.y0,u=n/this.R,d=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(d)+Math.sin(this.b0)*Math.cos(d)*Math.cos(u)),m=Math.atan(Math.sin(u)/(Math.cos(this.b0)*Math.cos(u)-Math.sin(this.b0)*Math.tan(d))),g=this.lambda0+m/this.alpha,M=0,B=f,E=-1e3,b=0;Math.abs(B-E)>1e-7;){if(++b>20)return;M=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(B))/2)),E=B,B=2*Math.atan(Math.exp(M))-Math.PI/2}return e.x=g,e.y=B,e}var Sc=["somerc"];const Bc={init:Ec,forward:Pc,inverse:kc,names:Sc};var En=1e-7;function Tc(e){var n=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],r=typeof e.projName=="object"?Object.keys(e.projName)[0]:e.projName;return"no_uoff"in e||"no_off"in e||n.indexOf(r)!==-1||n.indexOf(xh(r))!==-1}function Dc(){var e,n,r,u,d,f,m,g,M,B,E=0,b,C=0,D=0,G=0,j=0,W=0,at=0;this.no_off=Tc(this),this.no_rot="no_rot"in this;var rt=!1;"alpha"in this&&(rt=!0);var ct=!1;if("rectified_grid_angle"in this&&(ct=!0),rt&&(at=this.alpha),ct&&(E=this.rectified_grid_angle),rt||ct)C=this.longc;else if(D=this.long1,j=this.lat1,G=this.long2,W=this.lat2,Math.abs(j-W)<=En||(e=Math.abs(j))<=En||Math.abs(e-ut)<=En||Math.abs(Math.abs(this.lat0)-ut)<=En||Math.abs(Math.abs(W)-ut)<=En)throw new Error;var yt=1-this.es;n=Math.sqrt(yt),Math.abs(this.lat0)>dt?(g=Math.sin(this.lat0),r=Math.cos(this.lat0),e=1-this.es*g*g,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/yt),this.A=this.B*this.k0*n/e,u=this.B*n/(r*Math.sqrt(e)),d=u*u-1,d<=0?d=0:(d=Math.sqrt(d),this.lat0<0&&(d=-d)),this.E=d+=u,this.E*=Math.pow(ii(this.e,this.lat0,g),this.B)):(this.B=1/n,this.A=this.k0,this.E=u=d=1),rt||ct?(rt?(b=Math.asin(Math.sin(at)/u),ct||(E=at)):(b=E,at=Math.asin(u*Math.sin(b))),this.lam0=C-Math.asin(.5*(d-1/d)*Math.tan(b))/this.B):(f=Math.pow(ii(this.e,j,Math.sin(j)),this.B),m=Math.pow(ii(this.e,W,Math.sin(W)),this.B),d=this.E/f,M=(m-f)/(m+f),B=this.E*this.E,B=(B-m*f)/(B+m*f),e=D-G,e<-Math.PI?G-=ls:e>Math.PI&&(G+=ls),this.lam0=_t(.5*(D+G)-Math.atan(B*Math.tan(.5*this.B*(D-G))/M)/this.B),b=Math.atan(2*Math.sin(this.B*_t(D-this.lam0))/(d-1/d)),E=at=Math.asin(u*Math.sin(b))),this.singam=Math.sin(b),this.cosgam=Math.cos(b),this.sinrot=Math.sin(E),this.cosrot=Math.cos(E),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(u*u-1)/Math.cos(at))),this.lat0<0&&(this.u_0=-this.u_0)),d=.5*b,this.v_pole_n=this.ArB*Math.log(Math.tan(jt-d)),this.v_pole_s=this.ArB*Math.log(Math.tan(jt+d))}function Oc(e){var n={},r,u,d,f,m,g,M,B;if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-ut)>dt){if(m=this.E/Math.pow(ii(this.e,e.y,Math.sin(e.y)),this.B),g=1/m,r=.5*(m-g),u=.5*(m+g),f=Math.sin(this.B*e.x),d=(r*this.singam-f*this.cosgam)/u,Math.abs(Math.abs(d)-1)<dt)throw new Error;B=.5*this.ArB*Math.log((1-d)/(1+d)),g=Math.cos(this.B*e.x),Math.abs(g)<En?M=this.A*e.x:M=this.ArB*Math.atan2(r*this.cosgam+f*this.singam,g)}else B=e.y>0?this.v_pole_n:this.v_pole_s,M=this.ArB*e.y;return this.no_rot?(n.x=M,n.y=B):(M-=this.u_0,n.x=B*this.cosrot+M*this.sinrot,n.y=M*this.cosrot-B*this.sinrot),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function Ic(e){var n,r,u,d,f,m,g,M={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(r=e.y,n=e.x):(r=e.x*this.cosrot-e.y*this.sinrot,n=e.y*this.cosrot+e.x*this.sinrot+this.u_0),u=Math.exp(-this.BrA*r),d=.5*(u-1/u),f=.5*(u+1/u),m=Math.sin(this.BrA*n),g=(m*this.cosgam+d*this.singam)/f,Math.abs(Math.abs(g)-1)<dt)M.x=0,M.y=g<0?-ut:ut;else{if(M.y=this.E/Math.sqrt((1+g)/(1-g)),M.y=ds(this.e,Math.pow(M.y,1/this.B)),M.y===1/0)throw new Error;M.x=-this.rB*Math.atan2(d*this.cosgam-m*this.singam,Math.cos(this.BrA*n))}return M.x+=this.lam0,M}var Rc=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const Fc={init:Dc,forward:Oc,inverse:Ic,names:Rc};function Gc(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<dt)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var n=Math.sin(this.lat1),r=Math.cos(this.lat1),u=ci(this.e,n,r),d=ii(this.e,this.lat1,n),f=Math.sin(this.lat2),m=Math.cos(this.lat2),g=ci(this.e,f,m),M=ii(this.e,this.lat2,f),B=Math.abs(Math.abs(this.lat0)-ut)<dt?0:ii(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>dt?this.ns=Math.log(u/g)/Math.log(d/M):this.ns=n,isNaN(this.ns)&&(this.ns=n),this.f0=u/(this.ns*Math.pow(d,this.ns)),this.rh=this.a*this.f0*Math.pow(B,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function zc(e){var n=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=dt&&(r=cs(r)*(ut-2*dt));var u=Math.abs(Math.abs(r)-ut),d,f;if(u>dt)d=ii(this.e,r,Math.sin(r)),f=this.a*this.f0*Math.pow(d,this.ns);else{if(u=r*this.ns,u<=0)return null;f=0}var m=this.ns*_t(n-this.long0);return e.x=this.k0*(f*Math.sin(m))+this.x0,e.y=this.k0*(this.rh-f*Math.cos(m))+this.y0,e}function Nc(e){var n,r,u,d,f,m=(e.x-this.x0)/this.k0,g=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(n=Math.sqrt(m*m+g*g),r=1):(n=-Math.sqrt(m*m+g*g),r=-1);var M=0;if(n!==0&&(M=Math.atan2(r*m,r*g)),n!==0||this.ns>0){if(r=1/this.ns,u=Math.pow(n/(this.a*this.f0),r),d=ds(this.e,u),d===-9999)return null}else d=-ut;return f=_t(M/this.ns+this.long0),e.x=f,e.y=d,e}var Uc=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const Zc={init:Gc,forward:zc,inverse:Nc,names:Uc};function jc(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function qc(e){var n,r,u,d,f,m,g,M=e.x,B=e.y,E=_t(M-this.long0);return n=Math.pow((1+this.e*Math.sin(B))/(1-this.e*Math.sin(B)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(B/2+this.s45),this.alfa)/n)-this.s45),u=-E*this.alfa,d=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(u)),f=Math.asin(Math.cos(r)*Math.sin(u)/Math.cos(d)),m=this.n*f,g=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(d/2+this.s45),this.n),e.y=g*Math.cos(m)/1,e.x=g*Math.sin(m)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Hc(e){var n,r,u,d,f,m,g,M,B=e.x;e.x=e.y,e.y=B,this.czech||(e.y*=-1,e.x*=-1),m=Math.sqrt(e.x*e.x+e.y*e.y),f=Math.atan2(e.y,e.x),d=f/Math.sin(this.s0),u=2*(Math.atan(Math.pow(this.ro0/m,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),n=Math.asin(Math.cos(this.ad)*Math.sin(u)-Math.sin(this.ad)*Math.cos(u)*Math.cos(d)),r=Math.asin(Math.cos(u)*Math.sin(d)/Math.cos(n)),e.x=this.long0-r/this.alfa,g=n,M=0;var E=0;do e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(n/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(g))/(1-this.e*Math.sin(g)),this.e/2))-this.s45),Math.abs(g-e.y)<1e-10&&(M=1),g=e.y,E+=1;while(M===0&&E<15);return E>=15?null:e}var Vc=["Krovak","krovak"];const $c={init:jc,forward:qc,inverse:Hc,names:Vc};function Te(e,n,r,u,d){return e*d-n*Math.sin(2*d)+r*Math.sin(4*d)-u*Math.sin(6*d)}function _s(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function ms(e){return .375*e*(1+.25*e*(1+.46875*e))}function gs(e){return .05859375*e*e*(1+.75*e)}function ys(e){return e*e*e*(35/3072)}function $r(e,n,r){var u=n*r;return e/Math.sqrt(1-u*u)}function Ii(e){return Math.abs(e)<ut?e:e-cs(e)*Math.PI}function xa(e,n,r,u,d){var f,m;f=e/n;for(var g=0;g<15;g++)if(m=(e-(n*f-r*Math.sin(2*f)+u*Math.sin(4*f)-d*Math.sin(6*f)))/(n-2*r*Math.cos(2*f)+4*u*Math.cos(4*f)-6*d*Math.cos(6*f)),f+=m,Math.abs(m)<=1e-10)return f;return NaN}function Kc(){this.sphere||(this.e0=_s(this.es),this.e1=ms(this.es),this.e2=gs(this.es),this.e3=ys(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Wc(e){var n,r,u=e.x,d=e.y;if(u=_t(u-this.long0),this.sphere)n=this.a*Math.asin(Math.cos(d)*Math.sin(u)),r=this.a*(Math.atan2(Math.tan(d),Math.cos(u))-this.lat0);else{var f=Math.sin(d),m=Math.cos(d),g=$r(this.a,this.e,f),M=Math.tan(d)*Math.tan(d),B=u*Math.cos(d),E=B*B,b=this.es*m*m/(1-this.es),C=this.a*Te(this.e0,this.e1,this.e2,this.e3,d);n=g*B*(1-E*M*(1/6-(8-M+8*b)*E/120)),r=C-this.ml0+g*f/m*E*(.5+(5-M+6*b)*E/24)}return e.x=n+this.x0,e.y=r+this.y0,e}function Xc(e){e.x-=this.x0,e.y-=this.y0;var n=e.x/this.a,r=e.y/this.a,u,d;if(this.sphere){var f=r+this.lat0;u=Math.asin(Math.sin(f)*Math.cos(n)),d=Math.atan2(Math.tan(n),Math.cos(f))}else{var m=this.ml0/this.a+r,g=xa(m,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(g)-ut)<=dt)return e.x=this.long0,e.y=ut,r<0&&(e.y*=-1),e;var M=$r(this.a,this.e,Math.sin(g)),B=M*M*M/this.a/this.a*(1-this.es),E=Math.pow(Math.tan(g),2),b=n*this.a/M,C=b*b;u=g-M*Math.tan(g)/B*b*b*(.5-(1+3*E)*b*b/24),d=b*(1-C*(E/3+(1+3*E)*E*C/15))/Math.cos(g)}return e.x=_t(d+this.long0),e.y=Ii(u),e}var Yc=["Cassini","Cassini_Soldner","cass"];const Jc={init:Kc,forward:Wc,inverse:Xc,names:Yc};function Ri(e,n){var r;return e>1e-7?(r=e*n,(1-e*e)*(n/(1-r*r)-.5/e*Math.log((1-r)/(1+r)))):2*n}var Kr=1,Wr=2,Xr=3,La=4;function Qc(){var e=Math.abs(this.lat0);if(Math.abs(e-ut)<dt?this.mode=this.lat0<0?Kr:Wr:Math.abs(e)<dt?this.mode=Xr:this.mode=La,this.es>0){var n;switch(this.qp=Ri(this.e,1),this.mmf=.5/(1-this.es),this.apa=hd(this.es),this.mode){case Wr:this.dd=1;break;case Kr:this.dd=1;break;case Xr:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case La:this.rq=Math.sqrt(.5*this.qp),n=Math.sin(this.lat0),this.sinb1=Ri(this.e,n)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*n*n)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===La&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function td(e){var n,r,u,d,f,m,g,M,B,E,b=e.x,C=e.y;if(b=_t(b-this.long0),this.sphere){if(f=Math.sin(C),E=Math.cos(C),u=Math.cos(b),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(r=this.mode===this.EQUIT?1+E*u:1+this.sinph0*f+this.cosph0*E*u,r<=dt)return null;r=Math.sqrt(2/r),n=r*E*Math.sin(b),r*=this.mode===this.EQUIT?f:this.cosph0*f-this.sinph0*E*u}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(u=-u),Math.abs(C+this.lat0)<dt)return null;r=jt-C*.5,r=2*(this.mode===this.S_POLE?Math.cos(r):Math.sin(r)),n=r*Math.sin(b),r*=u}}else{switch(g=0,M=0,B=0,u=Math.cos(b),d=Math.sin(b),f=Math.sin(C),m=Ri(this.e,f),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(g=m/this.qp,M=Math.sqrt(1-g*g)),this.mode){case this.OBLIQ:B=1+this.sinb1*g+this.cosb1*M*u;break;case this.EQUIT:B=1+M*u;break;case this.N_POLE:B=ut+C,m=this.qp-m;break;case this.S_POLE:B=C-ut,m=this.qp+m;break}if(Math.abs(B)<dt)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:B=Math.sqrt(2/B),this.mode===this.OBLIQ?r=this.ymf*B*(this.cosb1*g-this.sinb1*M*u):r=(B=Math.sqrt(2/(1+M*u)))*g*this.ymf,n=this.xmf*B*M*d;break;case this.N_POLE:case this.S_POLE:m>=0?(n=(B=Math.sqrt(m))*d,r=u*(this.mode===this.S_POLE?B:-B)):n=r=0;break}}return e.x=this.a*n+this.x0,e.y=this.a*r+this.y0,e}function ed(e){e.x-=this.x0,e.y-=this.y0;var n=e.x/this.a,r=e.y/this.a,u,d,f,m,g,M,B;if(this.sphere){var E=0,b,C=0;if(b=Math.sqrt(n*n+r*r),d=b*.5,d>1)return null;switch(d=2*Math.asin(d),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(C=Math.sin(d),E=Math.cos(d)),this.mode){case this.EQUIT:d=Math.abs(b)<=dt?0:Math.asin(r*C/b),n*=C,r=E*b;break;case this.OBLIQ:d=Math.abs(b)<=dt?this.lat0:Math.asin(E*this.sinph0+r*C*this.cosph0/b),n*=C*this.cosph0,r=(E-Math.sin(d)*this.sinph0)*b;break;case this.N_POLE:r=-r,d=ut-d;break;case this.S_POLE:d-=ut;break}u=r===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(n,r)}else{if(B=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(n/=this.dd,r*=this.dd,M=Math.sqrt(n*n+r*r),M<dt)return e.x=this.long0,e.y=this.lat0,e;m=2*Math.asin(.5*M/this.rq),f=Math.cos(m),n*=m=Math.sin(m),this.mode===this.OBLIQ?(B=f*this.sinb1+r*m*this.cosb1/M,g=this.qp*B,r=M*this.cosb1*f-r*this.sinb1*m):(B=r*m/M,g=this.qp*B,r=M*f)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),g=n*n+r*r,!g)return e.x=this.long0,e.y=this.lat0,e;B=1-g/this.qp,this.mode===this.S_POLE&&(B=-B)}u=Math.atan2(n,r),d=ld(Math.asin(B),this.apa)}return e.x=_t(this.long0+u),e.y=d,e}var id=.3333333333333333,nd=.17222222222222222,sd=.10257936507936508,ad=.06388888888888888,rd=.0664021164021164,od=.016415012942191543;function hd(e){var n,r=[];return r[0]=e*id,n=e*e,r[0]+=n*nd,r[1]=n*ad,n*=e,r[0]+=n*sd,r[1]+=n*rd,r[2]=n*od,r}function ld(e,n){var r=e+e;return e+n[0]*Math.sin(r)+n[1]*Math.sin(r+r)+n[2]*Math.sin(r+r+r)}var ud=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const cd={init:Qc,forward:td,inverse:ed,names:ud,S_POLE:Kr,N_POLE:Wr,EQUIT:Xr,OBLIQ:La};function Fi(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}function dd(){Math.abs(this.lat1+this.lat2)<dt||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ci(this.e3,this.sin_po,this.cos_po),this.qs1=Ri(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ci(this.e3,this.sin_po,this.cos_po),this.qs2=Ri(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ri(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>dt?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function fd(e){var n=e.x,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var u=Ri(this.e3,this.sin_phi),d=this.a*Math.sqrt(this.c-this.ns0*u)/this.ns0,f=this.ns0*_t(n-this.long0),m=d*Math.sin(f)+this.x0,g=this.rh-d*Math.cos(f)+this.y0;return e.x=m,e.y=g,e}function pd(e){var n,r,u,d,f,m;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(n=Math.sqrt(e.x*e.x+e.y*e.y),u=1):(n=-Math.sqrt(e.x*e.x+e.y*e.y),u=-1),d=0,n!==0&&(d=Math.atan2(u*e.x,u*e.y)),u=n*this.ns0/this.a,this.sphere?m=Math.asin((this.c-u*u)/(2*this.ns0)):(r=(this.c-u*u)/this.ns0,m=this.phi1z(this.e3,r)),f=_t(d/this.ns0+this.long0),e.x=f,e.y=m,e}function _d(e,n){var r,u,d,f,m,g=Fi(.5*n);if(e<dt)return g;for(var M=e*e,B=1;B<=25;B++)if(r=Math.sin(g),u=Math.cos(g),d=e*r,f=1-d*d,m=.5*f*f/u*(n/(1-M)-r/f+.5/e*Math.log((1-d)/(1+d))),g=g+m,Math.abs(m)<=1e-7)return g;return null}var md=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const gd={init:dd,forward:fd,inverse:pd,names:md,phi1z:_d};function yd(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Ad(e){var n,r,u,d,f,m,g,M,B=e.x,E=e.y;return u=_t(B-this.long0),n=Math.sin(E),r=Math.cos(E),d=Math.cos(u),m=this.sin_p14*n+this.cos_p14*r*d,f=1,m>0||Math.abs(m)<=dt?(g=this.x0+this.a*f*r*Math.sin(u)/m,M=this.y0+this.a*f*(this.cos_p14*n-this.sin_p14*r*d)/m):(g=this.x0+this.infinity_dist*r*Math.sin(u),M=this.y0+this.infinity_dist*(this.cos_p14*n-this.sin_p14*r*d)),e.x=g,e.y=M,e}function vd(e){var n,r,u,d,f,m;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(n=Math.sqrt(e.x*e.x+e.y*e.y))?(d=Math.atan2(n,this.rc),r=Math.sin(d),u=Math.cos(d),m=Fi(u*this.sin_p14+e.y*r*this.cos_p14/n),f=Math.atan2(e.x*r,n*this.cos_p14*u-e.y*this.sin_p14*r),f=_t(this.long0+f)):(m=this.phic0,f=0),e.x=f,e.y=m,e}var Md=["gnom"];const xd={init:yd,forward:Ad,inverse:vd,names:Md};function Ld(e,n){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(n)-r)<1e-6)return n<0?-1*ut:ut;for(var u=Math.asin(.5*n),d,f,m,g,M=0;M<30;M++)if(f=Math.sin(u),m=Math.cos(u),g=e*f,d=Math.pow(1-g*g,2)/(2*m)*(n/(1-e*e)-f/(1-g*g)+.5/e*Math.log((1-g)/(1+g))),u+=d,Math.abs(d)<=1e-10)return u;return NaN}function bd(){this.sphere||(this.k0=ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function wd(e){var n=e.x,r=e.y,u,d,f=_t(n-this.long0);if(this.sphere)u=this.x0+this.a*f*Math.cos(this.lat_ts),d=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var m=Ri(this.e,Math.sin(r));u=this.x0+this.a*this.k0*f,d=this.y0+this.a*m*.5/this.k0}return e.x=u,e.y=d,e}function Cd(e){e.x-=this.x0,e.y-=this.y0;var n,r;return this.sphere?(n=_t(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=Ld(this.e,2*e.y*this.k0/this.a),n=_t(this.long0+e.x/(this.a*this.k0))),e.x=n,e.y=r,e}var Ed=["cea"];const Pd={init:bd,forward:wd,inverse:Cd,names:Ed};function kd(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Sd(e){var n=e.x,r=e.y,u=_t(n-this.long0),d=Ii(r-this.lat0);return e.x=this.x0+this.a*u*this.rc,e.y=this.y0+this.a*d,e}function Bd(e){var n=e.x,r=e.y;return e.x=_t(this.long0+(n-this.x0)/(this.a*this.rc)),e.y=Ii(this.lat0+(r-this.y0)/this.a),e}var Td=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const Dd={init:kd,forward:Sd,inverse:Bd,names:Td};var Vh=20;function Od(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=_s(this.es),this.e1=ms(this.es),this.e2=gs(this.es),this.e3=ys(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Id(e){var n=e.x,r=e.y,u,d,f,m=_t(n-this.long0);if(f=m*Math.sin(r),this.sphere)Math.abs(r)<=dt?(u=this.a*m,d=-1*this.a*this.lat0):(u=this.a*Math.sin(f)/Math.tan(r),d=this.a*(Ii(r-this.lat0)+(1-Math.cos(f))/Math.tan(r)));else if(Math.abs(r)<=dt)u=this.a*m,d=-1*this.ml0;else{var g=$r(this.a,this.e,Math.sin(r))/Math.tan(r);u=g*Math.sin(f),d=this.a*Te(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+g*(1-Math.cos(f))}return e.x=u+this.x0,e.y=d+this.y0,e}function Rd(e){var n,r,u,d,f,m,g,M,B;if(u=e.x-this.x0,d=e.y-this.y0,this.sphere)if(Math.abs(d+this.a*this.lat0)<=dt)n=_t(u/this.a+this.long0),r=0;else{m=this.lat0+d/this.a,g=u*u/this.a/this.a+m*m,M=m;var E;for(f=Vh;f;--f)if(E=Math.tan(M),B=-1*(m*(M*E+1)-M-.5*(M*M+g)*E)/((M-m)/E-1),M+=B,Math.abs(B)<=dt){r=M;break}n=_t(this.long0+Math.asin(u*Math.tan(M)/this.a)/Math.sin(r))}else if(Math.abs(d+this.ml0)<=dt)r=0,n=_t(this.long0+u/this.a);else{m=(this.ml0+d)/this.a,g=u*u/this.a/this.a+m*m,M=m;var b,C,D,G,j;for(f=Vh;f;--f)if(j=this.e*Math.sin(M),b=Math.sqrt(1-j*j)*Math.tan(M),C=this.a*Te(this.e0,this.e1,this.e2,this.e3,M),D=this.e0-2*this.e1*Math.cos(2*M)+4*this.e2*Math.cos(4*M)-6*this.e3*Math.cos(6*M),G=C/this.a,B=(m*(b*G+1)-G-.5*b*(G*G+g))/(this.es*Math.sin(2*M)*(G*G+g-2*m*G)/(4*b)+(m-G)*(b*D-2/Math.sin(2*M))-D),M-=B,Math.abs(B)<=dt){r=M;break}b=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),n=_t(this.long0+Math.asin(u*b/this.a)/Math.sin(r))}return e.x=n,e.y=r,e}var Fd=["Polyconic","American_Polyconic","poly"];const Gd={init:Od,forward:Id,inverse:Rd,names:Fd};function zd(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function Nd(e){var n,r=e.x,u=e.y,d=u-this.lat0,f=r-this.long0,m=d/hs*1e-5,g=f,M=1,B=0;for(n=1;n<=10;n++)M=M*m,B=B+this.A[n]*M;var E=B,b=g,C=1,D=0,G,j,W=0,at=0;for(n=1;n<=6;n++)G=C*E-D*b,j=D*E+C*b,C=G,D=j,W=W+this.B_re[n]*C-this.B_im[n]*D,at=at+this.B_im[n]*C+this.B_re[n]*D;return e.x=at*this.a+this.x0,e.y=W*this.a+this.y0,e}function Ud(e){var n,r=e.x,u=e.y,d=r-this.x0,f=u-this.y0,m=f/this.a,g=d/this.a,M=1,B=0,E,b,C=0,D=0;for(n=1;n<=6;n++)E=M*m-B*g,b=B*m+M*g,M=E,B=b,C=C+this.C_re[n]*M-this.C_im[n]*B,D=D+this.C_im[n]*M+this.C_re[n]*B;for(var G=0;G<this.iterations;G++){var j=C,W=D,at,rt,ct=m,yt=g;for(n=2;n<=6;n++)at=j*C-W*D,rt=W*C+j*D,j=at,W=rt,ct=ct+(n-1)*(this.B_re[n]*j-this.B_im[n]*W),yt=yt+(n-1)*(this.B_im[n]*j+this.B_re[n]*W);j=1,W=0;var mt=this.B_re[1],xt=this.B_im[1];for(n=2;n<=6;n++)at=j*C-W*D,rt=W*C+j*D,j=at,W=rt,mt=mt+n*(this.B_re[n]*j-this.B_im[n]*W),xt=xt+n*(this.B_im[n]*j+this.B_re[n]*W);var Dt=mt*mt+xt*xt;C=(ct*mt+yt*xt)/Dt,D=(yt*mt-ct*xt)/Dt}var It=C,zt=D,Yt=1,Et=0;for(n=1;n<=9;n++)Yt=Yt*It,Et=Et+this.D[n]*Yt;var Zt=this.lat0+Et*hs*1e5,be=this.long0+zt;return e.x=be,e.y=Zt,e}var Zd=["New_Zealand_Map_Grid","nzmg"];const jd={init:zd,forward:Nd,inverse:Ud,names:Zd};function qd(){}function Hd(e){var n=e.x,r=e.y,u=_t(n-this.long0),d=this.x0+this.a*u,f=this.y0+this.a*Math.log(Math.tan(Math.PI/4+r/2.5))*1.25;return e.x=d,e.y=f,e}function Vd(e){e.x-=this.x0,e.y-=this.y0;var n=_t(this.long0+e.x/this.a),r=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=n,e.y=r,e}var $d=["Miller_Cylindrical","mill"];const Kd={init:qd,forward:Hd,inverse:Vd,names:$d};var Wd=20;function Xd(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Ur(this.es)}function Yd(e){var n,r,u=e.x,d=e.y;if(u=_t(u-this.long0),this.sphere){if(!this.m)d=this.n!==1?Math.asin(this.n*Math.sin(d)):d;else for(var f=this.n*Math.sin(d),m=Wd;m;--m){var g=(this.m*d+Math.sin(d)-f)/(this.m+Math.cos(d));if(d-=g,Math.abs(g)<dt)break}n=this.a*this.C_x*u*(this.m+Math.cos(d)),r=this.a*this.C_y*d}else{var M=Math.sin(d),B=Math.cos(d);r=this.a*Cn(d,M,B,this.en),n=this.a*u*B/Math.sqrt(1-this.es*M*M)}return e.x=n,e.y=r,e}function Jd(e){var n,r,u,d;return e.x-=this.x0,u=e.x/this.a,e.y-=this.y0,n=e.y/this.a,this.sphere?(n/=this.C_y,u=u/(this.C_x*(this.m+Math.cos(n))),this.m?n=Fi((this.m*n+Math.sin(n))/this.n):this.n!==1&&(n=Fi(Math.sin(n)/this.n)),u=_t(u+this.long0),n=Ii(n)):(n=Zr(e.y/this.a,this.es,this.en),d=Math.abs(n),d<ut?(d=Math.sin(n),r=this.long0+e.x*Math.sqrt(1-this.es*d*d)/(this.a*Math.cos(n)),u=_t(r)):d-dt<ut&&(u=this.long0)),e.x=u,e.y=n,e}var Qd=["Sinusoidal","sinu"];const t0={init:Xd,forward:Yd,inverse:Jd,names:Qd};function e0(){}function i0(e){for(var n=e.x,r=e.y,u=_t(n-this.long0),d=r,f=Math.PI*Math.sin(r);;){var m=-(d+Math.sin(d)-f)/(1+Math.cos(d));if(d+=m,Math.abs(m)<dt)break}d/=2,Math.PI/2-Math.abs(r)<dt&&(u=0);var g=.900316316158*this.a*u*Math.cos(d)+this.x0,M=1.4142135623731*this.a*Math.sin(d)+this.y0;return e.x=g,e.y=M,e}function n0(e){var n,r;e.x-=this.x0,e.y-=this.y0,r=e.y/(1.4142135623731*this.a),Math.abs(r)>.999999999999&&(r=.999999999999),n=Math.asin(r);var u=_t(this.long0+e.x/(.900316316158*this.a*Math.cos(n)));u<-Math.PI&&(u=-Math.PI),u>Math.PI&&(u=Math.PI),r=(2*n+Math.sin(2*n))/Math.PI,Math.abs(r)>1&&(r=1);var d=Math.asin(r);return e.x=u,e.y=d,e}var s0=["Mollweide","moll"];const a0={init:e0,forward:i0,inverse:n0,names:s0};function r0(){Math.abs(this.lat1+this.lat2)<dt||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=_s(this.es),this.e1=ms(this.es),this.e2=gs(this.es),this.e3=ys(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=ci(this.e,this.sin_phi,this.cos_phi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<dt?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=ci(this.e,this.sin_phi,this.cos_phi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function o0(e){var n=e.x,r=e.y,u;if(this.sphere)u=this.a*(this.g-r);else{var d=Te(this.e0,this.e1,this.e2,this.e3,r);u=this.a*(this.g-d)}var f=this.ns*_t(n-this.long0),m=this.x0+u*Math.sin(f),g=this.y0+this.rh-u*Math.cos(f);return e.x=m,e.y=g,e}function h0(e){e.x-=this.x0,e.y=this.rh-e.y+this.y0;var n,r,u,d;this.ns>=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1);var f=0;if(r!==0&&(f=Math.atan2(n*e.x,n*e.y)),this.sphere)return d=_t(this.long0+f/this.ns),u=Ii(this.g-r/this.a),e.x=d,e.y=u,e;var m=this.g-r/this.a;return u=xa(m,this.e0,this.e1,this.e2,this.e3),d=_t(this.long0+f/this.ns),e.x=d,e.y=u,e}var l0=["Equidistant_Conic","eqdc"];const u0={init:r0,forward:o0,inverse:h0,names:l0};function c0(){this.R=this.a}function d0(e){var n=e.x,r=e.y,u=_t(n-this.long0),d,f;Math.abs(r)<=dt&&(d=this.x0+this.R*u,f=this.y0);var m=Fi(2*Math.abs(r/Math.PI));(Math.abs(u)<=dt||Math.abs(Math.abs(r)-ut)<=dt)&&(d=this.x0,r>=0?f=this.y0+Math.PI*this.R*Math.tan(.5*m):f=this.y0+Math.PI*this.R*-Math.tan(.5*m));var g=.5*Math.abs(Math.PI/u-u/Math.PI),M=g*g,B=Math.sin(m),E=Math.cos(m),b=E/(B+E-1),C=b*b,D=b*(2/B-1),G=D*D,j=Math.PI*this.R*(g*(b-G)+Math.sqrt(M*(b-G)*(b-G)-(G+M)*(C-G)))/(G+M);u<0&&(j=-j),d=this.x0+j;var W=M+b;return j=Math.PI*this.R*(D*W-g*Math.sqrt((G+M)*(M+1)-W*W))/(G+M),r>=0?f=this.y0+j:f=this.y0-j,e.x=d,e.y=f,e}function f0(e){var n,r,u,d,f,m,g,M,B,E,b,C,D;return e.x-=this.x0,e.y-=this.y0,b=Math.PI*this.R,u=e.x/b,d=e.y/b,f=u*u+d*d,m=-Math.abs(d)*(1+f),g=m-2*d*d+u*u,M=-2*m+1+2*d*d+f*f,D=d*d/M+(2*g*g*g/M/M/M-9*m*g/M/M)/27,B=(m-g*g/3/M)/M,E=2*Math.sqrt(-B/3),b=3*D/B/E,Math.abs(b)>1&&(b>=0?b=1:b=-1),C=Math.acos(b)/3,e.y>=0?r=(-E*Math.cos(C+Math.PI/3)-g/3/M)*Math.PI:r=-(-E*Math.cos(C+Math.PI/3)-g/3/M)*Math.PI,Math.abs(u)<dt?n=this.long0:n=_t(this.long0+Math.PI*(f-1+Math.sqrt(1+2*(u*u-d*d)+f*f))/2/u),e.x=n,e.y=r,e}var p0=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const _0={init:c0,forward:d0,inverse:f0,names:p0};function m0(e,n,r,u,d,f){const m=u-n,g=Math.atan((1-f)*Math.tan(e)),M=Math.atan((1-f)*Math.tan(r)),B=Math.sin(g),E=Math.cos(g),b=Math.sin(M),C=Math.cos(M);let D=m,G,j=100,W,at,rt,ct,yt,mt,xt,Dt,It,zt,Yt,Et,Zt,be;do{if(W=Math.sin(D),at=Math.cos(D),rt=Math.sqrt(C*W*(C*W)+(E*b-B*C*at)*(E*b-B*C*at)),rt===0)return{azi1:0,s12:0};ct=B*b+E*C*at,yt=Math.atan2(rt,ct),mt=E*C*W/rt,xt=1-mt*mt,Dt=xt!==0?ct-2*B*b/xt:0,It=f/16*xt*(4+f*(4-3*xt)),G=D,D=m+(1-It)*f*mt*(yt+It*rt*(Dt+It*ct*(-1+2*Dt*Dt)))}while(Math.abs(D-G)>1e-12&&--j>0);return j===0?{azi1:NaN,s12:NaN}:(zt=xt*(d*d-d*(1-f)*(d*(1-f)))/(d*(1-f)*(d*(1-f))),Yt=1+zt/16384*(4096+zt*(-768+zt*(320-175*zt))),Et=zt/1024*(256+zt*(-128+zt*(74-47*zt))),Zt=Et*rt*(Dt+Et/4*(ct*(-1+2*Dt*Dt)-Et/6*Dt*(-3+4*rt*rt)*(-3+4*Dt*Dt))),be=d*(1-f)*Yt*(yt-Zt),{azi1:Math.atan2(C*W,E*b-B*C*at),s12:be})}function g0(e,n,r,u,d,f){const m=Math.atan((1-f)*Math.tan(e)),g=Math.sin(m),M=Math.cos(m),B=Math.sin(r),E=Math.cos(r),b=Math.atan2(g,M*E),C=M*B,D=1-C*C,G=D*(d*d-d*(1-f)*(d*(1-f)))/(d*(1-f)*(d*(1-f))),j=1+G/16384*(4096+G*(-768+G*(320-175*G))),W=G/1024*(256+G*(-128+G*(74-47*G)));let at=u/(d*(1-f)*j),rt,ct=100,yt,mt,xt,Dt;do yt=Math.cos(2*b+at),mt=Math.sin(at),xt=Math.cos(at),Dt=W*mt*(yt+W/4*(xt*(-1+2*yt*yt)-W/6*yt*(-3+4*mt*mt)*(-3+4*yt*yt))),rt=at,at=u/(d*(1-f)*j)+Dt;while(Math.abs(at-rt)>1e-12&&--ct>0);if(ct===0)return{lat2:NaN,lon2:NaN};const It=g*mt-M*xt*E,zt=Math.atan2(g*xt+M*mt*E,(1-f)*Math.sqrt(C*C+It*It)),Yt=Math.atan2(mt*B,M*xt-g*mt*E),Et=f/16*D*(4+f*(4-3*D)),Zt=Yt-(1-Et)*f*C*(at+Et*mt*(yt+Et*xt*(-1+2*yt*yt))),be=n+Zt;return{lat2:zt,lon2:be}}function y0(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))}function A0(e){var n=e.x,r=e.y,u=Math.sin(e.y),d=Math.cos(e.y),f=_t(n-this.long0),m,g,M,B,E,b,C,D,G,j,W;return this.sphere?Math.abs(this.sin_p12-1)<=dt?(e.x=this.x0+this.a*(ut-r)*Math.sin(f),e.y=this.y0-this.a*(ut-r)*Math.cos(f),e):Math.abs(this.sin_p12+1)<=dt?(e.x=this.x0+this.a*(ut+r)*Math.sin(f),e.y=this.y0+this.a*(ut+r)*Math.cos(f),e):(G=this.sin_p12*u+this.cos_p12*d*Math.cos(f),C=Math.acos(G),D=C?C/Math.sin(C):1,e.x=this.x0+this.a*D*d*Math.sin(f),e.y=this.y0+this.a*D*(this.cos_p12*u-this.sin_p12*d*Math.cos(f)),e):(m=_s(this.es),g=ms(this.es),M=gs(this.es),B=ys(this.es),Math.abs(this.sin_p12-1)<=dt?(E=this.a*Te(m,g,M,B,ut),b=this.a*Te(m,g,M,B,r),e.x=this.x0+(E-b)*Math.sin(f),e.y=this.y0-(E-b)*Math.cos(f),e):Math.abs(this.sin_p12+1)<=dt?(E=this.a*Te(m,g,M,B,ut),b=this.a*Te(m,g,M,B,r),e.x=this.x0+(E+b)*Math.sin(f),e.y=this.y0+(E+b)*Math.cos(f),e):Math.abs(n)<dt&&Math.abs(r-this.lat0)<dt?(e.x=e.y=0,e):(j=m0(this.lat0,this.long0,r,n,this.a,this.f),W=j.azi1,e.x=j.s12*Math.sin(W),e.y=j.s12*Math.cos(W),e))}function v0(e){e.x-=this.x0,e.y-=this.y0;var n,r,u,d,f,m,g,M,B,E,b,C,D,G,j,W;return this.sphere?(n=Math.sqrt(e.x*e.x+e.y*e.y),n>2*ut*this.a?void 0:(r=n/this.a,u=Math.sin(r),d=Math.cos(r),f=this.long0,Math.abs(n)<=dt?m=this.lat0:(m=Fi(d*this.sin_p12+e.y*u*this.cos_p12/n),g=Math.abs(this.lat0)-ut,Math.abs(g)<=dt?this.lat0>=0?f=_t(this.long0+Math.atan2(e.x,-e.y)):f=_t(this.long0-Math.atan2(-e.x,e.y)):f=_t(this.long0+Math.atan2(e.x*u,n*this.cos_p12*d-e.y*this.sin_p12*u))),e.x=f,e.y=m,e)):(M=_s(this.es),B=ms(this.es),E=gs(this.es),b=ys(this.es),Math.abs(this.sin_p12-1)<=dt?(C=this.a*Te(M,B,E,b,ut),n=Math.sqrt(e.x*e.x+e.y*e.y),D=C-n,m=xa(D/this.a,M,B,E,b),f=_t(this.long0+Math.atan2(e.x,-1*e.y)),e.x=f,e.y=m,e):Math.abs(this.sin_p12+1)<=dt?(C=this.a*Te(M,B,E,b,ut),n=Math.sqrt(e.x*e.x+e.y*e.y),D=n-C,m=xa(D/this.a,M,B,E,b),f=_t(this.long0+Math.atan2(e.x,e.y)),e.x=f,e.y=m,e):(G=Math.atan2(e.x,e.y),j=Math.sqrt(e.x*e.x+e.y*e.y),W=g0(this.lat0,this.long0,G,j,this.a,this.f),e.x=W.lon2,e.y=W.lat2,e))}var M0=["Azimuthal_Equidistant","aeqd"];const x0={init:y0,forward:A0,inverse:v0,names:M0};function L0(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function b0(e){var n,r,u,d,f,m,g,M,B=e.x,E=e.y;return u=_t(B-this.long0),n=Math.sin(E),r=Math.cos(E),d=Math.cos(u),m=this.sin_p14*n+this.cos_p14*r*d,f=1,(m>0||Math.abs(m)<=dt)&&(g=this.a*f*r*Math.sin(u),M=this.y0+this.a*f*(this.cos_p14*n-this.sin_p14*r*d)),e.x=g,e.y=M,e}function w0(e){var n,r,u,d,f,m,g;return e.x-=this.x0,e.y-=this.y0,n=Math.sqrt(e.x*e.x+e.y*e.y),r=Fi(n/this.a),u=Math.sin(r),d=Math.cos(r),m=this.long0,Math.abs(n)<=dt?(g=this.lat0,e.x=m,e.y=g,e):(g=Fi(d*this.sin_p14+e.y*u*this.cos_p14/n),f=Math.abs(this.lat0)-ut,Math.abs(f)<=dt?(this.lat0>=0?m=_t(this.long0+Math.atan2(e.x,-e.y)):m=_t(this.long0-Math.atan2(-e.x,e.y)),e.x=m,e.y=g,e):(m=_t(this.long0+Math.atan2(e.x*u,n*this.cos_p14*d-e.y*this.sin_p14*u)),e.x=m,e.y=g,e))}var C0=["ortho"];const E0={init:L0,forward:b0,inverse:w0,names:C0};var ie={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},qt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function P0(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ut-jt/2?this.face=ie.TOP:this.lat0<=-(ut-jt/2)?this.face=ie.BOTTOM:Math.abs(this.long0)<=jt?this.face=ie.FRONT:Math.abs(this.long0)<=ut+jt?this.face=this.long0>0?ie.RIGHT:ie.LEFT:this.face=ie.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function k0(e){var n={x:0,y:0},r,u,d,f,m,g,M={value:0};if(e.x-=this.long0,this.es!==0?r=Math.atan(this.one_minus_f_squared*Math.tan(e.y)):r=e.y,u=e.x,this.face===ie.TOP)f=ut-r,u>=jt&&u<=ut+jt?(M.value=qt.AREA_0,d=u-ut):u>ut+jt||u<=-(ut+jt)?(M.value=qt.AREA_1,d=u>0?u-he:u+he):u>-(ut+jt)&&u<=-jt?(M.value=qt.AREA_2,d=u+ut):(M.value=qt.AREA_3,d=u);else if(this.face===ie.BOTTOM)f=ut+r,u>=jt&&u<=ut+jt?(M.value=qt.AREA_0,d=-u+ut):u<jt&&u>=-jt?(M.value=qt.AREA_1,d=-u):u<-jt&&u>=-(ut+jt)?(M.value=qt.AREA_2,d=-u-ut):(M.value=qt.AREA_3,d=u>0?-u+he:-u-he);else{var B,E,b,C,D,G,j;this.face===ie.RIGHT?u=Pn(u,+ut):this.face===ie.BACK?u=Pn(u,+he):this.face===ie.LEFT&&(u=Pn(u,-ut)),C=Math.sin(r),D=Math.cos(r),G=Math.sin(u),j=Math.cos(u),B=D*j,E=D*G,b=C,this.face===ie.FRONT?(f=Math.acos(B),d=ba(f,b,E,M)):this.face===ie.RIGHT?(f=Math.acos(E),d=ba(f,b,-B,M)):this.face===ie.BACK?(f=Math.acos(-B),d=ba(f,b,-E,M)):this.face===ie.LEFT?(f=Math.acos(-E),d=ba(f,b,B,M)):(f=d=0,M.value=qt.AREA_0)}return g=Math.atan(12/he*(d+Math.acos(Math.sin(d)*Math.cos(jt))-ut)),m=Math.sqrt((1-Math.cos(f))/(Math.cos(g)*Math.cos(g))/(1-Math.cos(Math.atan(1/Math.cos(d))))),M.value===qt.AREA_1?g+=ut:M.value===qt.AREA_2?g+=he:M.value===qt.AREA_3&&(g+=1.5*he),n.x=m*Math.cos(g),n.y=m*Math.sin(g),n.x=n.x*this.a+this.x0,n.y=n.y*this.a+this.y0,e.x=n.x,e.y=n.y,e}function S0(e){var n={lam:0,phi:0},r,u,d,f,m,g,M,B,E,b={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,u=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),r=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?b.value=qt.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(b.value=qt.AREA_1,r-=ut):e.x<0&&-e.x>=Math.abs(e.y)?(b.value=qt.AREA_2,r=r<0?r+he:r-he):(b.value=qt.AREA_3,r+=ut),E=he/12*Math.tan(r),m=Math.sin(E)/(Math.cos(E)-1/Math.sqrt(2)),g=Math.atan(m),d=Math.cos(r),f=Math.tan(u),M=1-d*d*f*f*(1-Math.cos(Math.atan(1/Math.cos(g)))),M<-1?M=-1:M>1&&(M=1),this.face===ie.TOP)B=Math.acos(M),n.phi=ut-B,b.value===qt.AREA_0?n.lam=g+ut:b.value===qt.AREA_1?n.lam=g<0?g+he:g-he:b.value===qt.AREA_2?n.lam=g-ut:n.lam=g;else if(this.face===ie.BOTTOM)B=Math.acos(M),n.phi=B-ut,b.value===qt.AREA_0?n.lam=-g+ut:b.value===qt.AREA_1?n.lam=-g:b.value===qt.AREA_2?n.lam=-g-ut:n.lam=g<0?-g-he:-g+he;else{var C,D,G;C=M,E=C*C,E>=1?G=0:G=Math.sqrt(1-E)*Math.sin(g),E+=G*G,E>=1?D=0:D=Math.sqrt(1-E),b.value===qt.AREA_1?(E=D,D=-G,G=E):b.value===qt.AREA_2?(D=-D,G=-G):b.value===qt.AREA_3&&(E=D,D=G,G=-E),this.face===ie.RIGHT?(E=C,C=-D,D=E):this.face===ie.BACK?(C=-C,D=-D):this.face===ie.LEFT&&(E=C,C=D,D=-E),n.phi=Math.acos(-G)-ut,n.lam=Math.atan2(D,C),this.face===ie.RIGHT?n.lam=Pn(n.lam,-ut):this.face===ie.BACK?n.lam=Pn(n.lam,-he):this.face===ie.LEFT&&(n.lam=Pn(n.lam,+ut))}if(this.es!==0){var j,W,at;j=n.phi<0?1:0,W=Math.tan(n.phi),at=this.b/Math.sqrt(W*W+this.one_minus_f_squared),n.phi=Math.atan(Math.sqrt(this.a*this.a-at*at)/(this.one_minus_f*at)),j&&(n.phi=-n.phi)}return n.lam+=this.long0,e.x=n.lam,e.y=n.phi,e}function ba(e,n,r,u){var d;return e<dt?(u.value=qt.AREA_0,d=0):(d=Math.atan2(n,r),Math.abs(d)<=jt?u.value=qt.AREA_0:d>jt&&d<=ut+jt?(u.value=qt.AREA_1,d-=ut):d>ut+jt||d<=-(ut+jt)?(u.value=qt.AREA_2,d=d>=0?d-he:d+he):(u.value=qt.AREA_3,d+=ut)),d}function Pn(e,n){var r=e+n;return r<-he?r+=ls:r>+he&&(r-=ls),r}var B0=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const T0={init:P0,forward:k0,inverse:S0,names:B0};var Yr=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],As=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],$h=.8487,Kh=1.3523,Wh=ui/5,D0=1/Wh,kn=18,wa=function(e,n){return e[0]+n*(e[1]+n*(e[2]+n*e[3]))},O0=function(e,n){return e[1]+n*(2*e[2]+n*3*e[3])};function I0(e,n,r,u){for(var d=n;u;--u){var f=e(d);if(d-=f,Math.abs(f)<r)break}return d}function R0(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function F0(e){var n=_t(e.x-this.long0),r=Math.abs(e.y),u=Math.floor(r*Wh);u<0?u=0:u>=kn&&(u=kn-1),r=ui*(r-D0*u);var d={x:wa(Yr[u],r)*n,y:wa(As[u],r)};return e.y<0&&(d.y=-d.y),d.x=d.x*this.a*$h+this.x0,d.y=d.y*this.a*Kh+this.y0,d}function G0(e){var n={x:(e.x-this.x0)/(this.a*$h),y:Math.abs(e.y-this.y0)/(this.a*Kh)};if(n.y>=1)n.x/=Yr[kn][0],n.y=e.y<0?-ut:ut;else{var r=Math.floor(n.y*kn);for(r<0?r=0:r>=kn&&(r=kn-1);;)if(As[r][0]>n.y)--r;else if(As[r+1][0]<=n.y)++r;else break;var u=As[r],d=5*(n.y-u[0])/(As[r+1][0]-u[0]);d=I0(function(f){return(wa(u,f)-n.y)/O0(u,f)},d,dt,100),n.x/=wa(Yr[r],d),n.y=(5*r+d)*ye,e.y<0&&(n.y=-n.y)}return n.x=_t(n.x+this.long0),n}var z0=["Robinson","robin"];const N0={init:R0,forward:F0,inverse:G0,names:z0};function U0(){this.name="geocent"}function Z0(e){var n=wh(e,this.es,this.a);return n}function j0(e){var n=Ch(e,this.es,this.a,this.b);return n}var q0=["Geocentric","geocentric","geocent","Geocent"];const H0={init:U0,forward:Z0,inverse:j0,names:q0};var Le={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},vs={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function V0(){if(Object.keys(vs).forEach((function(r){if(typeof this[r]>"u")this[r]=vs[r].def;else{if(vs[r].num&&isNaN(this[r]))throw new Error("Invalid parameter value, must be numeric "+r+" = "+this[r]);vs[r].num&&(this[r]=parseFloat(this[r]))}vs[r].degrees&&(this[r]=this[r]*ye)}).bind(this)),Math.abs(Math.abs(this.lat0)-ut)<dt?this.mode=this.lat0<0?Le.S_POLE:Le.N_POLE:Math.abs(this.lat0)<dt?this.mode=Le.EQUIT:(this.mode=Le.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,n=this.azi;this.cg=Math.cos(n),this.sg=Math.sin(n),this.cw=Math.cos(e),this.sw=Math.sin(e)}function $0(e){e.x-=this.long0;var n=Math.sin(e.y),r=Math.cos(e.y),u=Math.cos(e.x),d,f;switch(this.mode){case Le.OBLIQ:f=this.sinph0*n+this.cosph0*r*u;break;case Le.EQUIT:f=r*u;break;case Le.S_POLE:f=-n;break;case Le.N_POLE:f=n;break}switch(f=this.pn1/(this.p-f),d=f*r*Math.sin(e.x),this.mode){case Le.OBLIQ:f*=this.cosph0*n-this.sinph0*r*u;break;case Le.EQUIT:f*=n;break;case Le.N_POLE:f*=-(r*u);break;case Le.S_POLE:f*=r*u;break}var m,g;return m=f*this.cg+d*this.sg,g=1/(m*this.sw*this.h1+this.cw),d=(d*this.cg-f*this.sg)*this.cw*g,f=m*g,e.x=d*this.a,e.y=f*this.a,e}function K0(e){e.x/=this.a,e.y/=this.a;var n={x:e.x,y:e.y},r,u,d;d=1/(this.pn1-e.y*this.sw),r=this.pn1*e.x*d,u=this.pn1*e.y*this.cw*d,e.x=r*this.cg+u*this.sg,e.y=u*this.cg-r*this.sg;var f=ze(e.x,e.y);if(Math.abs(f)<dt)n.x=0,n.y=e.y;else{var m,g;switch(g=1-f*f*this.pfact,g=(this.p-Math.sqrt(g))/(this.pn1/f+f/this.pn1),m=Math.sqrt(1-g*g),this.mode){case Le.OBLIQ:n.y=Math.asin(m*this.sinph0+e.y*g*this.cosph0/f),e.y=(m-this.sinph0*Math.sin(n.y))*f,e.x*=g*this.cosph0;break;case Le.EQUIT:n.y=Math.asin(e.y*g/f),e.y=m*f,e.x*=g;break;case Le.N_POLE:n.y=Math.asin(m),e.y=-e.y;break;case Le.S_POLE:n.y=-Math.asin(m);break}n.x=Math.atan2(e.x,e.y)}return e.x=n.x+this.long0,e.y=n.y,e}var W0=["Tilted_Perspective","tpers"];const X0={init:V0,forward:$0,inverse:K0,names:W0};function Y0(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var e=1-this.es,n=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=n,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function J0(e){var n=e.x,r=e.y,u,d,f,m;if(n=n-this.long0,this.shape==="ellipse"){r=Math.atan(this.radius_p2*Math.tan(r));var g=this.radius_p/ze(this.radius_p*Math.cos(r),Math.sin(r));if(d=g*Math.cos(n)*Math.cos(r),f=g*Math.sin(n)*Math.cos(r),m=g*Math.sin(r),(this.radius_g-d)*d-f*f-m*m*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;u=this.radius_g-d,this.flip_axis?(e.x=this.radius_g_1*Math.atan(f/ze(m,u)),e.y=this.radius_g_1*Math.atan(m/u)):(e.x=this.radius_g_1*Math.atan(f/u),e.y=this.radius_g_1*Math.atan(m/ze(f,u)))}else this.shape==="sphere"&&(u=Math.cos(r),d=Math.cos(n)*u,f=Math.sin(n)*u,m=Math.sin(r),u=this.radius_g-d,this.flip_axis?(e.x=this.radius_g_1*Math.atan(f/ze(m,u)),e.y=this.radius_g_1*Math.atan(m/u)):(e.x=this.radius_g_1*Math.atan(f/u),e.y=this.radius_g_1*Math.atan(m/ze(f,u))));return e.x=e.x*this.a,e.y=e.y*this.a,e}function Q0(e){var n=-1,r=0,u=0,d,f,m,g;if(e.x=e.x/this.a,e.y=e.y/this.a,this.shape==="ellipse"){this.flip_axis?(u=Math.tan(e.y/this.radius_g_1),r=Math.tan(e.x/this.radius_g_1)*ze(1,u)):(r=Math.tan(e.x/this.radius_g_1),u=Math.tan(e.y/this.radius_g_1)*ze(1,r));var M=u/this.radius_p;if(d=r*r+M*M+n*n,f=2*this.radius_g*n,m=f*f-4*d*this.C,m<0)return e.x=Number.NaN,e.y=Number.NaN,e;g=(-f-Math.sqrt(m))/(2*d),n=this.radius_g+g*n,r*=g,u*=g,e.x=Math.atan2(r,n),e.y=Math.atan(u*Math.cos(e.x)/n),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if(this.shape==="sphere"){if(this.flip_axis?(u=Math.tan(e.y/this.radius_g_1),r=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+u*u)):(r=Math.tan(e.x/this.radius_g_1),u=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+r*r)),d=r*r+u*u+n*n,f=2*this.radius_g*n,m=f*f-4*d*this.C,m<0)return e.x=Number.NaN,e.y=Number.NaN,e;g=(-f-Math.sqrt(m))/(2*d),n=this.radius_g+g*n,r*=g,u*=g,e.x=Math.atan2(r,n),e.y=Math.atan(u*Math.cos(e.x)/n)}return e.x=e.x+this.long0,e}var tf=["Geostationary Satellite View","Geostationary_Satellite","geos"];const ef={init:Y0,forward:J0,inverse:Q0,names:tf};var Ms=1.340264,xs=-.081106,Ls=893e-6,bs=.003796,Ca=Math.sqrt(3)/2;function nf(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function sf(e){var n=_t(e.x-this.long0),r=e.y,u=Math.asin(Ca*Math.sin(r)),d=u*u,f=d*d*d;return e.x=n*Math.cos(u)/(Ca*(Ms+3*xs*d+f*(7*Ls+9*bs*d))),e.y=u*(Ms+xs*d+f*(Ls+bs*d)),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function af(e){e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a;var n=1e-9,r=12,u=e.y,d,f,m,g,M,B;for(B=0;B<r&&(d=u*u,f=d*d*d,m=u*(Ms+xs*d+f*(Ls+bs*d))-e.y,g=Ms+3*xs*d+f*(7*Ls+9*bs*d),u-=M=m/g,!(Math.abs(M)<n));++B);return d=u*u,f=d*d*d,e.x=Ca*e.x*(Ms+3*xs*d+f*(7*Ls+9*bs*d))/Math.cos(u),e.y=Math.asin(Math.sin(u)/Ca),e.x=_t(e.x+this.long0),e}var rf=["eqearth","Equal Earth","Equal_Earth"];const of={init:nf,forward:sf,inverse:af,names:rf};var ws=1e-10;function hf(){var e;if(this.phi1=this.lat1,Math.abs(this.phi1)<ws)throw new Error;this.es?(this.en=Ur(this.es),this.m1=Cn(this.phi1,this.am1=Math.sin(this.phi1),e=Math.cos(this.phi1),this.en),this.am1=e/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=uf,this.forward=lf):(Math.abs(this.phi1)+ws>=ut?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=df,this.forward=cf)}function lf(e){var n=_t(e.x-(this.long0||0)),r=e.y,u,d,f;return u=this.am1+this.m1-Cn(r,d=Math.sin(r),f=Math.cos(r),this.en),d=f*n/(u*Math.sqrt(1-this.es*d*d)),e.x=u*Math.sin(d),e.y=this.am1-u*Math.cos(d),e.x=this.a*e.x+(this.x0||0),e.y=this.a*e.y+(this.y0||0),e}function uf(e){e.x=(e.x-(this.x0||0))/this.a,e.y=(e.y-(this.y0||0))/this.a;var n,r,u,d;if(r=ze(e.x,e.y=this.am1-e.y),d=Zr(this.am1+this.m1-r,this.es,this.en),(n=Math.abs(d))<ut)n=Math.sin(d),u=r*Math.atan2(e.x,e.y)*Math.sqrt(1-this.es*n*n)/Math.cos(d);else if(Math.abs(n-ut)<=ws)u=0;else throw new Error;return e.x=_t(u+(this.long0||0)),e.y=Ii(d),e}function cf(e){var n=_t(e.x-(this.long0||0)),r=e.y,u,d;return d=this.cphi1+this.phi1-r,Math.abs(d)>ws?(e.x=d*Math.sin(u=n*Math.cos(r)/d),e.y=this.cphi1-d*Math.cos(u)):e.x=e.y=0,e.x=this.a*e.x+(this.x0||0),e.y=this.a*e.y+(this.y0||0),e}function df(e){e.x=(e.x-(this.x0||0))/this.a,e.y=(e.y-(this.y0||0))/this.a;var n,r,u=ze(e.x,e.y=this.cphi1-e.y);if(r=this.cphi1+this.phi1-u,Math.abs(r)>ut)throw new Error;return Math.abs(Math.abs(r)-ut)<=ws?n=0:n=u*Math.atan2(e.x,e.y)/Math.cos(r),e.x=_t(n+(this.long0||0)),e.y=Ii(r),e}var ff=["bonne","Bonne (Werner lat_1=90)"];const pf={init:hf,names:ff};function _f(e){e.Proj.projections.add(va),e.Proj.projections.add(Ma),e.Proj.projections.add(dc),e.Proj.projections.add(Mc),e.Proj.projections.add(Cc),e.Proj.projections.add(Bc),e.Proj.projections.add(Fc),e.Proj.projections.add(Zc),e.Proj.projections.add($c),e.Proj.projections.add(Jc),e.Proj.projections.add(cd),e.Proj.projections.add(gd),e.Proj.projections.add(xd),e.Proj.projections.add(Pd),e.Proj.projections.add(Dd),e.Proj.projections.add(Gd),e.Proj.projections.add(jd),e.Proj.projections.add(Kd),e.Proj.projections.add(t0),e.Proj.projections.add(a0),e.Proj.projections.add(u0),e.Proj.projections.add(_0),e.Proj.projections.add(x0),e.Proj.projections.add(E0),e.Proj.projections.add(T0),e.Proj.projections.add(N0),e.Proj.projections.add(H0),e.Proj.projections.add(X0),e.Proj.projections.add(ef),e.Proj.projections.add(of),e.Proj.projections.add(pf)}const Xh=Object.assign(ku,{defaultDatum:"WGS84",Proj:ni,WGS84:new ni("WGS84"),Point:wn,toPoint:Sh,defs:Be,nadgrid:cu,transform:ya,mgrs:Su,version:"__VERSION__"});_f(Xh);const mf=gl(Object.freeze(Object.defineProperty({__proto__:null,default:Xh},Symbol.toStringTag,{value:"Module"})));(function(e){(function(n){var r,u;r=ah(),u=mf,e.exports=n(r,u)})(function(n,r){return r.__esModule&&r.default&&(r=r.default),n.Proj={},n.Proj._isProj4Obj=function(u){return typeof u.inverse<"u"&&typeof u.forward<"u"},n.Proj.Projection=n.Class.extend({initialize:function(u,d,f){var m=n.Proj._isProj4Obj(u);this._proj=m?u:this._projFromCodeDef(u,d),this.bounds=m?d:f},project:function(u){var d=this._proj.forward([u.lng,u.lat]);return new n.Point(d[0],d[1])},unproject:function(u,d){var f=this._proj.inverse([u.x,u.y]);return new n.LatLng(f[1],f[0],d)},_projFromCodeDef:function(u,d){if(d)r.defs(u,d);else if(r.defs[u]===void 0){var f=u.split(":");if(f.length>3&&(u=f[f.length-3]+":"+f[f.length-1]),r.defs[u]===void 0)throw"No projection definition for code "+u}return r(u)}}),n.Proj.CRS=n.Class.extend({includes:n.CRS,options:{transformation:new n.Transformation(1,0,-1,0)},initialize:function(u,d,f){var m,g,M,B;if(n.Proj._isProj4Obj(u)?(g=u,m=g.srsCode,B=d||{},this.projection=new n.Proj.Projection(g,B.bounds)):(m=u,M=d,B=f||{},this.projection=new n.Proj.Projection(m,M,B.bounds)),n.Util.setOptions(this,B),this.code=m,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new n.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var E=this.options.resolutions.length-1;E>=0;E--)this.options.resolutions[E]&&(this._scales[E]=1/this.options.resolutions[E])}this.infinite=!this.options.bounds},scale:function(u){var d=Math.floor(u),f,m,g,M;return u===d?this._scales[u]:(f=this._scales[d],m=this._scales[d+1],g=m-f,M=u-d,f+g*M)},zoom:function(u){var d=this._closestElement(this._scales,u),f=this._scales.indexOf(d),m,g,M;return u===d?f:d===void 0?-1/0:(g=f+1,m=this._scales[g],m===void 0?1/0:(M=m-d,(u-d)/M+f))},distance:n.CRS.Earth.distance,R:n.CRS.Earth.R,_closestElement:function(u,d){for(var f,m=u.length;m--;)u[m]<=d&&(f===void 0||f<u[m])&&(f=u[m]);return f}}),n.Proj.GeoJSON=n.GeoJSON.extend({initialize:function(u,d){this._callLevel=0,n.GeoJSON.prototype.initialize.call(this,u,d)},addData:function(u){var d;u&&(u.crs&&u.crs.type==="name"?d=new n.Proj.CRS(u.crs.properties.name):u.crs&&u.crs.type&&(d=new n.Proj.CRS(u.crs.type+":"+u.crs.properties.code)),d!==void 0&&(this.options.coordsToLatLng=function(f){var m=n.point(f[0],f[1]);return d.projection.unproject(m)})),this._callLevel++;try{n.GeoJSON.prototype.addData.call(this,u)}finally{this._callLevel--,this._callLevel===0&&delete this.options.coordsToLatLng}}}),n.Proj.geoJson=function(u,d){return new n.Proj.GeoJSON(u,d)},n.Proj.ImageOverlay=n.ImageOverlay.extend({initialize:function(u,d,f){n.ImageOverlay.prototype.initialize.call(this,u,null,f),this._projectedBounds=d},_animateZoom:function(u){var d=this._map.getZoomScale(u.zoom),f=n.point(this._projectedBounds.min.x,this._projectedBounds.max.y),m=this._projectedToNewLayerPoint(f,u.zoom,u.center);n.DomUtil.setTransform(this._image,m,d)},_reset:function(){var u=this._map.getZoom(),d=this._map.getPixelOrigin(),f=n.bounds(this._transform(this._projectedBounds.min,u)._subtract(d),this._transform(this._projectedBounds.max,u)._subtract(d)),m=f.getSize();n.DomUtil.setPosition(this._image,f.min),this._image.style.width=m.x+"px",this._image.style.height=m.y+"px"},_projectedToNewLayerPoint:function(u,d,f){var m=this._map.getSize()._divideBy(2),g=this._map.project(f,d)._subtract(m)._round(),M=g.add(this._map._getMapPanePos());return this._transform(u,d)._subtract(M)},_transform:function(u,d){var f=this._map.options.crs,m=f.transformation,g=f.scale(d);return m.transform(u,g)}}),n.Proj.imageOverlay=function(u,d,f){return new n.Proj.ImageOverlay(u,d,f)},n.Proj})})(vl);const Jr=new U.Proj.CRS("EPSG:900913","+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",{resolutions:function(){var e=[];e[0]=Math.pow(2,18);for(var n=1;n<21;n++)e[n]=Math.pow(2,18-n);return e}(),origin:[0,0],bounds:U.bounds([20037508342789244e-9,0],[0,20037508342789244e-9])}),Yh=U.Marker.extend({options:{fontSize:"12px",color:"#f00",fontShadowColor:"none",fontWeight:"normal",background:"rgba(0, 0, 0, 0)",minZoom:void 0,maxZoom:void 0,clsName:"leaflet-text",offset:[6,6]},initialize(e,n,r={}){this._latlng=e,this._enabled=!1,this.options.id=r.id||"text_"+$t.Util.guid(),this.options.text=n||"",r=Object.assign(this.options,r),U.setOptions(this,r);const{id:u,fontSize:d,color:f,fontWeight:m,background:g,fontShadowColor:M,clsName:B,offset:E}=this.options;this.options.icon=new U.DivIcon({html:`<span id=${u} class="leaflet-text-label" style="font-weight:${m};font-size:${d};color:${f};background:${g};text-shadow:${M} 1px 0px 2px">${n||""}</span>`,className:B,iconAnchor:E}),U.Marker.prototype.initialize.call(this,e,this.options)},setStyle(e){const n=document.getElementById(this.options.id),{text:r,color:u,fontSize:d,fontShadowColor:f,fontWeight:m}=e,g=e.background||"none";return n&&(u&&(this.options.color=u,n.style.color=u),m&&(this.options.fontWeight=m,n.style.fontWeight=m),d&&(this.options.fontSize=d,n.style.fontSize=d),this.options.background=g,n.style.background=g,r&&(this.options.text=r,n.textContent=r),f?(this.options.fontShadowColor=f,n.style["text-shadow"]=f+" 1px 0px 2px"):(this.options.fontShadowColor="none",n.style["text-shadow"]="none")),this},enableEdit(e){const{fontSize:n,color:r,text:u}=this.options;if(!this._enabled){this._enabled=!0;const d=new U.DivIcon({html:`<input type="text" id="text-input-icon" style="font-size:${n};color:${r};" value=${u}></input>`,className:"leaflet-text"});return this.setIcon(d),document.getElementById("text-input-icon").onblur=f=>{this.options.text=f.target.value,setTimeout(()=>{this.disableEdit(),e&&e(this)},100)},document.getElementById("text-input-icon").onkeydown=function(f){f.keyCode===13&&(this.options.text=f.target.value,this.blur(f))},this}},disableEdit(e){if(this._enabled){this._enabled=!1;const{id:n,color:r,fontSize:u,fontWeight:d,fontShadowColor:f}=this.options,m=new U.DivIcon({html:`<span id=${n} style="padding:2px 4px;white-space:nowrap;font-weight:${d};font-size:${u};color:${r};text-shadow:${f} 1px 2px 3px">${this.options.text}</span>`,className:"leaflet-text"});return this.setIcon(m),e&&e(this),this}}}),Jh=U.Marker.extend({options:{color:"#f00",diveColor:"#f00",iconSize:[14,14],level:0,speedTime:2,animation:!0},initialize(e,n){U.setOptions(this,n);const{clsPrefix:r}=this.options;this.tempDivEle=document.createElement("div"),this.spanEl=$t.DomUtil.create("span",`${r}-pulse-icon`),this.aEl=$t.DomUtil.create("a",`${r}-dive-icon`),this.tempDivEle.append(this.spanEl),this.spanEl.append(this.aEl),this._init(),U.Marker.prototype.initialize.call(this,e,this.options)},_init(){const{color:e,iconSize:n,diveColor:r,level:u,speedTime:d,animation:f,clsPrefix:m}=this.options;e&&(this.spanEl.style.backgroundColor=e,r||(this.aEl.style.boxShadow="0 0 6px 2px "+e)),n&&(this.spanEl.style.width=n[0]+"px",this.spanEl.style.height=n[1]+"px"),f&&d?(this.aEl.style.setProperty("animation","pulsate "+d+"s infinite"),u?r?this.aEl.style.boxShadow="0 0 "+u*3+"px "+u+"px "+r:e&&(this.aEl.style.boxShadow="0 0 "+u*3+"px "+u+"px "+e):r&&(u?this.aEl.style.boxShadow="0 0 "+u*3+"px "+u+"px "+r:this.aEl.style.boxShadow="0 0 6px 2px "+r)):(this.aEl.style.removeProperty("animation"),this.aEl.style.removeProperty("box-shadow"));const g=L.divIcon({iconSize:n,iconAnchor:n.map(M=>M/2),className:`${m}-blink-marker`,html:this.tempDivEle.innerHTML});this.options.icon?this.setIcon(g):this.options.icon=g},setOptions(e){U.setOptions(this,e),this._init()},start(e){U.setOptions(this,e),this.options.animation=!0,this._init()},stop(e){U.setOptions(this,e),this.options.animation=!1,this._init()}}),Qh=U.Layer.extend({initialize:function(e){L.setOptions(this,e),this._onClickListeners=[],this._onHoverListeners=[]},setOptions:function(e){return L.setOptions(this,e),this.redraw()},redraw:function(){this._redraw(!0)},addMarkers:function(e){var n=this,r=[],u=[];e.forEach(function(d){if(!(d.options.pane=="markerPane"&&d.options.icon)){console.error("Layer isn't a marker");return}var f=d.getLatLng(),m=n._map.getBounds().contains(f),g=n._addMarker(d,f,m);m===!0&&r.push(g[0]),u.push(g[1])}),n._markers.load(r),n._latlngMarkers.load(u)},addMarker:function(e){var n=this,r=e.getLatLng(),u=n._map.getBounds().contains(r),d=n._addMarker(e,r,u);u===!0&&n._markers.insert(d[0]),n._latlngMarkers.insert(d[1])},addLayer:function(e){e.options.pane=="markerPane"&&e.options.icon?this.addMarker(e):console.error("Layer isn't a marker")},addLayers:function(e){this.addMarkers(e)},removeLayer:function(e){this.removeMarker(e,!0)},removeMarker:function(e,n){var r=this;e.minX&&(e=e.data);var u=e.getLatLng(),d=r._map.getBounds().contains(u),f={minX:u.lng,minY:u.lat,maxX:u.lng,maxY:u.lat,data:e};r._latlngMarkers.remove(f,function(m,g){return m.data._leaflet_id===g.data._leaflet_id}),r._latlngMarkers.total--,r._latlngMarkers.dirty++,d===!0&&n===!0&&r._redraw(!0)},onAdd:function(e){this._map=e,this._canvas||this._initCanvas(),this.options.pane?this.getPane().appendChild(this._canvas):e._panes.overlayPane.appendChild(this._canvas),e.on("moveend",this._reset,this),e.on("resize",this._reset,this),e.on("click",this._executeListeners,this),e.on("mousemove",this._executeListeners,this)},onRemove:function(e){this.options.pane?this.getPane().removeChild(this._canvas):e.getPanes().overlayPane.removeChild(this._canvas),e.off("click",this._executeListeners,this),e.off("mousemove",this._executeListeners,this),e.off("moveend",this._reset,this),e.off("resize",this._reset,this)},addTo:function(e){return e.addLayer(this),this},clearLayers:function(){this._latlngMarkers=null,this._markers=null,this._redraw(!0)},_addMarker:function(e,n,r){var u=this;e._map=u._map,u._markers||(u._markers=new rbush),u._latlngMarkers||(u._latlngMarkers=new rbush,u._latlngMarkers.dirty=0,u._latlngMarkers.total=0),L.Util.stamp(e);var d=u._map.latLngToContainerPoint(n),f=e.options.icon.options.iconSize,m=f[0]/2,g=f[1]/2,M=[{minX:d.x-m,minY:d.y-g,maxX:d.x+m,maxY:d.y+g,data:e},{minX:n.lng,minY:n.lat,maxX:n.lng,maxY:n.lat,data:e}];return u._latlngMarkers.dirty++,u._latlngMarkers.total++,r===!0&&u._drawMarker(e,d),M},_drawMarker:function(e,n){var r=this;this._imageLookup||(this._imageLookup={}),n||(n=r._map.latLngToContainerPoint(e.getLatLng()));var u=e.options.icon.options.iconUrl;if(e.canvas_img)r._drawImage(e,n);else if(r._imageLookup[u])e.canvas_img=r._imageLookup[u][0],r._imageLookup[u][1]===!1?r._imageLookup[u][2].push([e,n]):r._drawImage(e,n);else{var d=new Image;d.src=u,e.canvas_img=d,r._imageLookup[u]=[d,!1,[[e,n]]],d.onload=function(){r._imageLookup[u][1]=!0,r._imageLookup[u][2].forEach(function(f){r._drawImage(f[0],f[1])})}}},_drawImage:function(e,n){var r=e.options.icon.options;this._context.drawImage(e.canvas_img,n.x-r.iconAnchor[0],n.y-r.iconAnchor[1],r.iconSize[0],r.iconSize[1])},_reset:function(){var e=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,e);var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y,this._redraw()},_redraw:function(e){var n=this;if(e&&this._context.clearRect(0,0,this._canvas.width,this._canvas.height),!(!this._map||!this._latlngMarkers)){var r=[];n._latlngMarkers.dirty/n._latlngMarkers.total>=.1&&(n._latlngMarkers.all().forEach(function(f){r.push(f)}),n._latlngMarkers.clear(),n._latlngMarkers.load(r),n._latlngMarkers.dirty=0,r=[]);var u=n._map.getBounds(),d={minX:u.getWest(),minY:u.getSouth(),maxX:u.getEast(),maxY:u.getNorth()};n._latlngMarkers.search(d).forEach(function(f){var m=n._map.latLngToContainerPoint(f.data.getLatLng()),g=f.data.options.icon.options.iconSize,M=g[0]/2,B=g[1]/2,E={minX:m.x-M,minY:m.y-B,maxX:m.x+M,maxY:m.y+B,data:f.data};r.push(E),n._drawMarker(f.data,m)}),this._markers.clear(),this._markers.load(r)}},_initCanvas:function(){this._canvas=L.DomUtil.create("canvas","leaflet-canvas-icon-layer leaflet-layer");var e=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this._canvas.style[e]="50% 50%";var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y,this._context=this._canvas.getContext("2d");var r=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(r?"animated":"hide"))},addOnClickListener:function(e){this._onClickListeners.push(e)},addOnHoverListener:function(e){this._onHoverListeners.push(e)},_executeListeners:function(e){if(this._markers){var n=this,r=e.containerPoint.x,u=e.containerPoint.y;n._openToolTip&&(n._openToolTip.closeTooltip(),delete n._openToolTip);var d=this._markers.search({minX:r,minY:u,maxX:r,maxY:u});if(d&&d.length>0){if(n._map._container.style.cursor="pointer",e.type==="click"){var f=d[0].data.getPopup();f&&d[0].data.openPopup(),n._onClickListeners.forEach(function(g){g(e,d)})}if(e.type==="mousemove"){var m=d[0].data.getTooltip();m&&(n._openToolTip=d[0].data,d[0].data.openTooltip()),n._onHoverListeners.forEach(function(g){g(e,d)})}}else n._map._container.style.cursor=""}}}),gf=U.FeatureGroup.extend({addLayer:function(e){this._originLayers.push(e),this._isInViewport(e)&&U.FeatureGroup.prototype.addLayer.call(this,e)},onAdd(e){this._map=e,this._originLayers=[],this._cleanupLayers(),e.on("moveend",this._update,this),U.FeatureGroup.prototype.onAdd.call(this,e)},onRemove:function(){map.off("moveend",this._update),this._originLayers=[],U.FeatureGroup.prototype.onRemove.call(this,map)},_update(){this.clearLayers();for(let e=0;e<this._originLayers.length;e++){const n=this._originLayers[e];this._isInViewport(n)&&U.FeatureGroup.prototype.addLayer.call(this,n)}},_isInViewport(e){var n=this._map.getBounds();return e instanceof U.Marker||e instanceof U.CircleMarker?n.contains(e.getLatLng()):e instanceof U.Circle||e instanceof U.Polyline?n.intersects(e.getBounds()):!1},_cleanupLayers:function(){this.eachLayer(function(e){!this._isInViewport(e)&&(!e._popup||!e._popup._container)&&this.removeLayer(e)},this)}}),yf=U.Layer.extend({provide:{TDT:"tdt",BAIDU:"bd",GAODE:"gd",YANDEX:"yandex"},source:{VECTOR:"vec",SATELITE:"img",ANNO:"cia",VEC_NO_ANNO:"vec_no_anno",SATELITE_NO_ANNO:"img_no_anno"},style:{NORMAL:"normal",GRAY:"gray",DARK:"dark",BROWN:"brown",BLUR:"blur"},options:{provide:"tdt",source:"img",style:"normal",accessToken:"016b31f15f25e1365e85aec7e7b0464e"},initialize(e){e=$t.Util.deleteEmptyProperty(e),U.Util.setOptions(this,e)},onAdd(e){this.map=e,this.replaceProjection(),this.tileLayers=this.getLayerGroup(),e.addLayer(this.tileLayers)},onRemove(e){e.removeLayer(this.tileLayers)},replaceProjection(){const e=this.map.getCenter(),n=this.map.getZoom();this.options.provide===this.provide.BAIDU?this.map.options.crs=Jr:this.options.provide===this.provide.YANDEX?this.map.options.crs=U.CRS.EPSG3395:this.map.options.crs=U.CRS.EPSG3857,this._resetMapStatus(e,n)},_resetMapStatus(e,n){this.map.setView(e),this.map._resetView(e,n,!0)},getLayerGroup(){let e={},n={};switch(this.options.style&&this.options.style.split(",").forEach(r=>{switch(r){case this.style.DARK:e.invert=1;break;case this.style.GRAY:e.grayscale=1;break;case this.style.BROWN:e.sepia=1;break;case this.style.BLUR:e.blur="1px";break}}),this.options.provide){case this.provide.TDT:n={subdomains:$t.ArrayUtil.create(8),maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.BAIDU:n={subdomains:$t.ArrayUtil.create(10),tms:!0,corrdType:"bd09",maxNativeZoom:19,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.GAODE:n={subdomains:$t.ArrayUtil.create(4).map(r=>r+1),corrdType:"gcj02",maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.YANDEX:n={maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break}if(this.options.opacity>=0&&(e.opacity=this.options.opacity),this.options.url)return new U.TileLayer(this.options.url,{...n,style:e});switch(this.options.provide){case this.provide.TDT:let r;switch(n.maxNativeZoom=18,this.options.source){case this.source.VECTOR:r=["vec_w","cva_w"];break;case this.source.SATELITE:r=["img_w","cia_w"];break;case this.source.ANNO:r=["cva_w"];break;case this.source.VEC_NO_ANNO:r=["vec_w"];break;case this.source.SATELITE_NO_ANNO:r=["img_w"];break}return new U.LayerGroup(r.map(u=>new U.TileLayer(`http://t{s}.tianditu.gov.cn/DataServer?T=${u}&x={x}&y={y}&l={z}&tk=${this.options.accessToken}`,{...n,style:e})));case this.provide.BAIDU:switch(this.options.source){case this.source.VECTOR:return n.maxNativeZoom=19,new U.TileLayer("http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1",{...n,style:e});case this.source.ANNO:return n.maxNativeZoom=19,new U.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...n,style:e});case this.source.SATELITE:return n.maxNativeZoom=17,new U.LayerGroup([new U.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...n,style:e}),new U.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...n,style:e})]);case this.source.SATELITE_NO_ANNO:return n.maxNativeZoom=19,new U.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...n,style:e})}break;case this.provide.GAODE:switch(this.options.source){case this.source.VECTOR:return n.maxNativeZoom=18,new U.TileLayer("http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:e});case this.source.ANNO:return n.maxNativeZoom=18,new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:e});case this.source.SATELITE:return n.maxNativeZoom=16,new U.LayerGroup([new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...n,style:e}),new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:e})]);case this.source.SATELITE_NO_ANNO:return n.maxNativeZoom=18,new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...n,style:e})}break;case this.provide.YANDEX:switch(this.options.source){case this.source.ANNO:return new U.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...n,style:e});case this.source.SATELITE:return new U.LayerGroup([new U.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...n,subdomains:["01","02","03","04"],style:e}),new U.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...n,style:e})]);case this.source.SATELITE_NO_ANNO:return new U.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...n,subdomains:["01","02","03","04"],style:e})}break}},setOptions(e){U.Util.setOptions(this,e);const n=this.getLayerGroup();this.map.removeLayer(this.tileLayers),setTimeout(()=>{this.replaceProjection(),this.tileLayers=n.addTo(this.map)},500)}}),Af=U.ImageOverlay.extend({initialize(e,n={},r=new U.Marker,u=new U.Marker){typeof e=="string"?this._url=e:this._rawImage=e,this.topRightMarker=r,this.bottomLeftMarker=u,this.angle=0,U.setOptions(this,n),this._topLeft=new U.LatLng(n.corners[0]),this._topRight=new U.LatLng(n.corners[1]),this._bottomLeft=new U.LatLng(n.corners[3]),r.on("drag dragend",this.reposition,this),u.on("drag dragend",this.reposition,this)},onAdd(e){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(U.DomUtil.addClass(this._rawImage,"leaflet-interactive"),this.addInteractiveTarget(this._rawImage)),e.on("zoomend resetview",this._reset,this),this.getPane().appendChild(this._image),this._reset()},onRemove(e){e.off("zoomend resetview",this._reset,this),U.ImageOverlay.prototype.onRemove.call(this,e)},_initImage(){let e=this._rawImage;this._url&&(e=U.DomUtil.create("img"),e.style.display="none",this.options.crossOrigin&&(e.crossOrigin=""),e.src=this._url,this._rawImage=e),U.DomUtil.addClass(e,"leaflet-image-layer");const n=this._image=U.DomUtil.create("div","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));this._updateZIndex&&this._updateZIndex(),n.appendChild(e),n.onselectstart=U.Util.falseFn,n.onmousemove=U.Util.falseFn,e.onload=(function(){this._reset(),e.style.display="block",this.options.w=this._rawImage.width,this.options.h=this._rawImage.height,this.boundsRectBottomLeft=new U.Point(0,0),this.boundsRectTopRight=new U.Point(this.options.w,this.options.h),this.diagonalVector=this.boundsRectTopRight.subtract(this.boundsRectBottomLeft),this.fire("load")}).bind(this),e.alt=this.options.alt},_reset(){const e=this._image,n=this._map.latLngToLayerPoint(this._topLeft),r=this._map.latLngToLayerPoint(this._topRight),u=this._map.latLngToLayerPoint(this._bottomLeft),d=r.subtract(n).add(u),f=new U.Bounds([n,r,u,d]),m=f.getSize(),g=n.subtract(f.min),M=r.subtract(n),B=u.subtract(n),E=Math.atan2(M.y,M.x),b=Math.atan2(B.x,B.y);this.angle=((Math.abs(E)+Math.abs(b))/2*180).toFixed(2),this._bounds=new U.LatLngBounds(this._map.layerPointToLatLng(f.min),this._map.layerPointToLatLng(f.max)),U.DomUtil.setPosition(e,f.min),e.pxBounds=f,e.style.width=m.x+"px",e.style.height=m.y+"px";const C=this._rawImage.width,D=this._rawImage.height;if(!C||!D)return;const G=n.distanceTo(r)/C*Math.cos(E),j=n.distanceTo(u)/D*Math.cos(b);this._rawImage.style.transformOrigin="0 0",this._rawImage.style.transform="translate("+g.x+"px, "+g.y+"px)skew("+b+"rad, "+E+"rad) scale("+G+", "+j+") "},_animateZoom(e){const n=this._map.getZoomScale(e.zoom),u=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;U.DomUtil.setTransform(this._image,u,n)},reposition(){const e=this.topRightMarker.getLatLng(),n=this.bottomLeftMarker.getLatLng(),r=this.options.w,u=this.options.h,d=this.getCornerLatLng(new U.Point(0,u),n,e),f=this.getCornerLatLng(new U.Point(r,u),n,e),m=this.getCornerLatLng(new U.Point(0,0),n,e),g=this.getCornerLatLng(new U.Point(r,0),n,e);this.options.corners=[d,f,g,m],this._topLeft=new U.LatLng(d),this._topRight=new U.LatLng(f),this._bottomLeft=new U.LatLng(m),this._reset()},getCornerLatLng(e,n,r){const u=this.boundsRectBottomLeft,d=this.diagonalVector,f=e.subtract(u),m=this.getClockWiseRotate90DegreePoint(d),g=this.getDotProduction(d,f)/this.getDotProduction(d,d),M=-this.getDotProduction(m,f)/this.getDotProduction(m,m),B=new U.Projection.SphericalMercator.project(n),E=new U.Projection.SphericalMercator.project(r),b=B.add(E.subtract(B).multiplyBy(g)),C=this.getClockWiseRotate90DegreePoint(B.subtract(E)).multiplyBy(M),D=b.add(C);return new U.Projection.SphericalMercator.unproject(D)},setUrl(e){return this._url=e,this._rawImage&&(this._rawImage.src=e),this},getDotProduction(e,n){return e.x*n.x+e.y*n.y},getClockWiseRotate90DegreePoint(e){return new U.Point([e.y,-e.x])}});var tl={exports:{}};(function(e){(function(n,r,u){e.exports?e.exports=u():r[n]=u()})("h337",vn,function(){var n={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},r=function(){var B=function(C){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=C.xField||C.defaultXField,this._yField=C.yField||C.defaultYField,this._valueField=C.valueField||C.defaultValueField,C.radius&&(this._cfgRadius=C.radius)},E=n.defaultRadius;return B.prototype={_organiseData:function(b,C){var D=b[this._xField],G=b[this._yField],j=this._radi,W=this._data,at=this._max,rt=this._min,ct=b[this._valueField]||1,yt=b.radius||this._cfgRadius||E;W[D]||(W[D]=[],j[D]=[]),W[D][G]?W[D][G]+=ct:(W[D][G]=ct,j[D][G]=yt);var mt=W[D][G];return mt>at?(C?this.setDataMax(mt):this._max=mt,!1):mt<rt?(C?this.setDataMin(mt):this._min=mt,!1):{x:D,y:G,value:ct,radius:yt,min:rt,max:at}},_unOrganizeData:function(){var b=[],C=this._data,D=this._radi;for(var G in C)for(var j in C[G])b.push({x:G,y:j,radius:D[G][j],value:C[G][j]});return{min:this._min,max:this._max,data:b}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var b=arguments[0],C=b.length;C--;)this.addData.call(this,b[C]);else{var D=this._organiseData(arguments[0],!0);D&&(this._data.length===0&&(this._min=this._max=D.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[D]}))}return this},setData:function(b){var C=b.data,D=C.length;this._data=[],this._radi=[];for(var G=0;G<D;G++)this._organiseData(C[G],!1);return this._max=b.max,this._min=b.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(b){return this._max=b,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(b){return this._min=b,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(b){this._coordinator=b},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},B}(),u=function(){var B=function(D){var G=D.gradient||D.defaultGradient,j=document.createElement("canvas"),W=j.getContext("2d");j.width=256,j.height=1;var at=W.createLinearGradient(0,0,256,1);for(var rt in G)at.addColorStop(rt,G[rt]);return W.fillStyle=at,W.fillRect(0,0,256,1),W.getImageData(0,0,256,1).data},E=function(D,G){var j=document.createElement("canvas"),W=j.getContext("2d"),at=D,rt=D;if(j.width=j.height=D*2,G==1)W.beginPath(),W.arc(at,rt,D,0,2*Math.PI,!1),W.fillStyle="rgba(0,0,0,1)",W.fill();else{var ct=W.createRadialGradient(at,rt,D*G,at,rt,D);ct.addColorStop(0,"rgba(0,0,0,1)"),ct.addColorStop(1,"rgba(0,0,0,0)"),W.fillStyle=ct,W.fillRect(0,0,2*D,2*D)}return j},b=function(rt){for(var G=[],j=rt.min,W=rt.max,at=rt.radi,rt=rt.data,ct=Object.keys(rt),yt=ct.length;yt--;)for(var mt=ct[yt],xt=Object.keys(rt[mt]),Dt=xt.length;Dt--;){var It=xt[Dt],zt=rt[mt][It],Yt=at[mt][It];G.push({x:mt,y:It,value:zt,radius:Yt})}return{min:j,max:W,data:G}};function C(D){var G=D.container,j=this.shadowCanvas=document.createElement("canvas"),W=this.canvas=D.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var at=getComputedStyle(D.container)||{};W.className="heatmap-canvas",this._width=W.width=j.width=D.width||+at.width.replace(/px/,""),this._height=W.height=j.height=D.height||+at.height.replace(/px/,""),this.shadowCtx=j.getContext("2d"),this.ctx=W.getContext("2d"),W.style.cssText=j.style.cssText="position:absolute;left:0;top:0;",G.style.position="relative",G.appendChild(W),this._palette=B(D),this._templates={},this._setStyles(D)}return C.prototype={renderPartial:function(D){D.data.length>0&&(this._drawAlpha(D),this._colorize())},renderAll:function(D){this._clear(),D.data.length>0&&(this._drawAlpha(b(D)),this._colorize())},_updateGradient:function(D){this._palette=B(D)},updateConfig:function(D){D.gradient&&this._updateGradient(D),this._setStyles(D)},setDimensions:function(D,G){this._width=D,this._height=G,this.canvas.width=this.shadowCanvas.width=D,this.canvas.height=this.shadowCanvas.height=G},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(D){this._blur=D.blur==0?0:D.blur||D.defaultBlur,D.backgroundColor&&(this.canvas.style.backgroundColor=D.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=D.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=D.height||this._height,this._opacity=(D.opacity||0)*255,this._maxOpacity=(D.maxOpacity||D.defaultMaxOpacity)*255,this._minOpacity=(D.minOpacity||D.defaultMinOpacity)*255,this._useGradientOpacity=!!D.useGradientOpacity},_drawAlpha:function(W){for(var G=this._min=W.min,j=this._max=W.max,W=W.data||[],at=W.length,rt=1-this._blur;at--;){var ct=W[at],yt=ct.x,mt=ct.y,xt=ct.radius,Dt=Math.min(ct.value,j),It=yt-xt,zt=mt-xt,Yt=this.shadowCtx,Et;this._templates[xt]?Et=this._templates[xt]:this._templates[xt]=Et=E(xt,rt);var Zt=(Dt-G)/(j-G);Yt.globalAlpha=Zt<.01?.01:Zt,Yt.drawImage(Et,It,zt),It<this._renderBoundaries[0]&&(this._renderBoundaries[0]=It),zt<this._renderBoundaries[1]&&(this._renderBoundaries[1]=zt),It+2*xt>this._renderBoundaries[2]&&(this._renderBoundaries[2]=It+2*xt),zt+2*xt>this._renderBoundaries[3]&&(this._renderBoundaries[3]=zt+2*xt)}},_colorize:function(){var D=this._renderBoundaries[0],G=this._renderBoundaries[1],j=this._renderBoundaries[2]-D,W=this._renderBoundaries[3]-G,at=this._width,rt=this._height,ct=this._opacity,yt=this._maxOpacity,mt=this._minOpacity,xt=this._useGradientOpacity;D<0&&(D=0),G<0&&(G=0),D+j>at&&(j=at-D),G+W>rt&&(W=rt-G);for(var Dt=this.shadowCtx.getImageData(D,G,j,W),It=Dt.data,zt=It.length,Yt=this._palette,Et=3;Et<zt;Et+=4){var Zt=It[Et],be=Zt*4;if(be){var pe;ct>0?pe=ct:Zt<yt?Zt<mt?pe=mt:pe=Zt:pe=yt,It[Et-3]=Yt[be],It[Et-2]=Yt[be+1],It[Et-1]=Yt[be+2],It[Et]=xt?Yt[be+3]:pe}}Dt.data=It,this.ctx.putImageData(Dt,D,G),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(D){var G,j=this.shadowCtx,W=j.getImageData(D.x,D.y,1,1),at=W.data[3],rt=this._max,ct=this._min;return G=Math.abs(rt-ct)*(at/255)>>0,G},getDataURL:function(){return this.canvas.toDataURL()}},C}(),d=function(){var B=!1;return n.defaultRenderer==="canvas2d"&&(B=u),B}(),f={merge:function(){for(var M={},B=arguments.length,E=0;E<B;E++){var b=arguments[E];for(var C in b)M[C]=b[C]}return M}},m=function(){var B=function(){function D(){this.cStore={}}return D.prototype={on:function(G,j,W){var at=this.cStore;at[G]||(at[G]=[]),at[G].push(function(rt){return j.call(W,rt)})},emit:function(G,j){var W=this.cStore;if(W[G])for(var at=W[G].length,rt=0;rt<at;rt++){var ct=W[G][rt];ct(j)}}},D}(),E=function(C){var D=C._renderer,G=C._coordinator,j=C._store;G.on("renderpartial",D.renderPartial,D),G.on("renderall",D.renderAll,D),G.on("extremachange",function(W){C._config.onExtremaChange&&C._config.onExtremaChange({min:W.min,max:W.max,gradient:C._config.gradient||C._config.defaultGradient})}),j.setCoordinator(G)};function b(){var C=this._config=f.merge(n,arguments[0]||{});if(this._coordinator=new B,C.plugin){var D=C.plugin;if(n.plugins[D]){var G=n.plugins[D];this._renderer=new G.renderer(C),this._store=new G.store(C)}else throw new Error("Plugin '"+D+"' not found. Maybe it was not registered.")}else this._renderer=new d(C),this._store=new r(C);E(this)}return b.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(C){return this._config=f.merge(this._config,C),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(C){return this._store.getValueAt?this._store.getValueAt(C):this._renderer.getValueAt?this._renderer.getValueAt(C):null}},b}(),g={create:function(M){return new m(M)},register:function(M,B){n.plugins[M]=B}};return g})})(tl);var vf=tl.exports;const Mf=ml(vf);var Qr=L.Layer.extend({initialize:function(e){this.cfg=e,this._el=L.DomUtil.create("div","leaflet-zoom-hide"),this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(e){var n=e.getSize();this._map=e,this._width=n.x,this._height=n.y,this._el.style.width=n.x+"px",this._el.style.height=n.y+"px",this._el.style.position="absolute",this._resetOrigin(),e.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=Mf.create(this.cfg)),e.on("moveend",this._resetOrigin,this),this._draw()},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){e.getPanes().overlayPane.removeChild(this._el),e.off("moveend",this._resetOrigin,this)},_draw:function(){if(this._map){var e=this._map.getPanes().mapPane,n=e._leaflet_pos;this._el.style[Qr.CSS_TRANSFORM]="translate("+-Math.round(n.x)+"px,"+-Math.round(n.y)+"px)",this._update()}},_update:function(){var e,n,r,u={max:this._max,min:this._min,data:[]};if(e=this._map.getBounds(),n=this._map.getZoom(),r=Math.pow(2,n),this._data.length==0){this._heatmap&&this._heatmap.setData(u);return}for(var d=[],f=this.cfg.scaleRadius?r:1,m=0,g=0,M=this.cfg.valueField,B=this._data.length;B--;){var E=this._data[B],b=E[M],C=E.latlng;if(e.contains(C)){m=Math.max(b,m),g=Math.min(b,g);var D=this._map.latLngToContainerPoint(C),G={x:Math.round(D.x),y:Math.round(D.y)};G[M]=b;var j;E.radius?j=E.radius*f:j=(this.cfg.radius||2)*f,G.radius=j,d.push(G)}}this.cfg.useLocalExtrema&&(u.max=m,u.min=g),u.data=d,this._heatmap.setData(u)},setData:function(d){this._max=d.max||this._max,this._min=d.min||this._min;for(var n=this.cfg.latField||"lat",r=this.cfg.lngField||"lng",u=this.cfg.valueField||"value",d=d.data,f=d.length,m=[];f--;){var g=d[f],M=new L.LatLng(g[n],g[r]),B={latlng:M};B[u]=g[u],g.radius&&(B.radius=g.radius),m.push(B)}this._data=m,this._draw()},addData:function(e){if(e.length>0)for(var n=e.length;n--;)this.addData(e[n]);else{var r=this.cfg.latField||"lat",u=this.cfg.lngField||"lng",d=this.cfg.valueField||"value",f=e,m=new L.LatLng(f[r],f[u]),g={latlng:m};g[d]=f[d],this._max=Math.max(this._max,g[d]),this._min=Math.min(this._min,g[d]),f.radius&&(g.radius=f.radius),this._data.push(g),this._draw()}},_resetOrigin:function(){this._origin=this._map.layerPointToLatLng(new L.Point(0,0));var e=this._map.getSize();(this._width!==e.x||this._height!==e.y)&&(this._width=e.x,this._height=e.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px"),this._draw()}});Qr.CSS_TRANSFORM=function(){for(var e=document.createElement("div"),n=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],r=0;r<n.length;r++){var u=n[r];if(e.style[u]!==void 0)return u}return n[0]}();const xf=L.TileLayer.extend({defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"",format:"image/jpeg"},initialize:function(e,n){this._url=e;var r={},u=Object.keys(n);u.forEach(g=>{r[g.toLowerCase()]=n[g]});var d=L.extend({},this.defaultWmtsParams),f=r.tileSize||this.options.tileSize;r.detectRetina&&L.Browser.retina?d.width=d.height=f*2:d.width=d.height=f;for(var m in r)d.hasOwnProperty(m)&&m!="matrixIds"&&(d[m]=r[m]);this.wmtsParams=d,this.matrixIds=n.matrixIds||this.getDefaultMatrix(),L.setOptions(this,n)},onAdd:function(e){this._crs=this.options.crs||e.options.crs,L.TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var n=this.options.tileSize,r=e.multiplyBy(n);r.x+=1,r.y-=1;var u=r.add(new L.Point(n,n)),d=this._tileZoom,f=this._crs.project(this._map.unproject(r,d)),m=this._crs.project(this._map.unproject(u,d));tilewidth=m.x-f.x;var g=this.matrixIds[d].identifier,M=this.wmtsParams.tilematrixset+":"+g,B=this.matrixIds[d].topLeftCorner.lng,E=this.matrixIds[d].topLeftCorner.lat,b=Math.floor((f.x-B)/tilewidth),C=-Math.floor((f.y-E)/tilewidth),D=L.Util.template(this._url,{s:this._getSubdomain(e)});return D+L.Util.getParamString(this.wmtsParams,D)+"&tilematrix="+M+"&tilerow="+C+"&tilecol="+b},setParams:function(e,n){return L.extend(this.wmtsParams,e),n||this.redraw(),this},getDefaultMatrix:function(){for(var e=new Array(22),n=0;n<22;n++)e[n]={identifier:""+n,topLeftCorner:new L.LatLng(200375083428e-4,-200375083428e-4)};return e}});var fe={};fe.Source=L.Layer.extend({options:{untiled:!0,identify:!0},initialize:function(e,n){L.setOptions(this,n),this.options.tiled&&(this.options.untiled=!1),this._url=e,this._subLayers={},this._overlay=this.createOverlay(this.options.untiled)},createOverlay:function(e){var n={};for(var r in this.options)r!="untiled"&&r!="identify"&&(n[r]=this.options[r]);return e?fe.overlay(this._url,n):fe.tileLayer(this._url,n)},onAdd:function(){this.refreshOverlay()},getEvents:function(){return this.options.identify?{click:this.identify}:{}},setOpacity:function(e){this.options.opacity=e,this._overlay&&this._overlay.setOpacity(e)},bringToBack:function(){this.options.isBack=!0,this._overlay&&this._overlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._overlay&&this._overlay.bringToFront()},getLayer:function(e){return fe.layer(this,e)},addSubLayer:function(e){this._subLayers[e]=!0,this.refreshOverlay()},removeSubLayer:function(e){delete this._subLayers[e],this.refreshOverlay()},refreshOverlay:function(){var e=Object.keys(this._subLayers).join(",");this._map&&(e?(this._overlay.setParams({layers:e}),this._overlay.addTo(this._map)):this._overlay.remove())},identify:function(e){var n=this.getIdentifyLayers();n.length&&this.getFeatureInfo(e.containerPoint,e.latlng,n,this.showFeatureInfo)},getFeatureInfo:function(e,n,r,u){var d=this.getFeatureInfoParams(e,r),f=this._url+L.Util.getParamString(d,this._url);this.showWaiting(),this.ajax(f,m);function m(g){this.hideWaiting();var M=this.parseFeatureInfo(g,f);u.call(this,n,M)}},ajax:function(e,n){Lf.call(this,e,n)},getIdentifyLayers:function(){return this.options.identifyLayers?this.options.identifyLayers:Object.keys(this._subLayers)},getFeatureInfoParams:function(e,n){var r,u;this.options.untiled?r=this._overlay.wmsParams:(u=this.createOverlay(!0),u.updateWmsParams(this._map),r=u.wmsParams,r.layers=n.join(","));var d={request:"GetFeatureInfo",query_layers:n.join(","),X:Math.round(e.x),Y:Math.round(e.y)};return L.extend({},r,d)},parseFeatureInfo:function(e,n){return e=="error"&&(e="<iframe src='"+n+"' style='border:none'>"),e},showFeatureInfo:function(e,n){this._map&&this._map.openPopup(n,e)},showWaiting:function(){this._map&&(this._map._container.style.cursor="progress")},hideWaiting:function(){this._map&&(this._map._container.style.cursor="default")}}),fe.source=function(e,n){return new fe.Source(e,n)},fe.Layer=L.Layer.extend({initialize:function(e,n,r){L.setOptions(this,r),e.addSubLayer||(e=fe.getSourceForUrl(e,r)),this._source=e,this._name=n},onAdd:function(){this._source._map||this._source.addTo(this._map),this._source.addSubLayer(this._name)},onRemove:function(){this._source.removeSubLayer(this._name)},setOpacity:function(e){this._source.setOpacity(e)},bringToBack:function(){this._source.bringToBack()},bringToFront:function(){this._source.bringToFront()}}),fe.layer=function(e,n){return new fe.Layer(e,n)};var to={};fe.getSourceForUrl=function(e,n){return to[e]||(to[e]=fe.source(e,n)),to[e]},fe.TileLayer=L.TileLayer.WMS,fe.tileLayer=L.tileLayer.wms,fe.Overlay=L.Layer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,maxZoom:18},initialize:function(e,n){this._url=e;var r={},u={};for(var d in n)d in this.options?u[d]=n[d]:r[d]=n[d];L.setOptions(this,u),this.wmsParams=L.extend({},this.defaultWmsParams,r)},setParams:function(e){L.extend(this.wmsParams,e),this.update()},getAttribution:function(){return this.options.attribution},onAdd:function(){this.update()},onRemove:function(e){this._currentOverlay&&(e.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl},getEvents:function(){return{moveend:this.update}},update:function(){if(!this._map)return;this.updateWmsParams();var e=this.getImageUrl();if(this._currentUrl==e)return;this._currentUrl=e;var n=this._map.getBounds(),r=L.imageOverlay(e,n,{opacity:0});r.addTo(this._map),r.once("load",u,this);function u(){if(this._map){if(r._url!=this._currentUrl){this._map.removeLayer(r);return}else this._currentOverlay&&this._map.removeLayer(this._currentOverlay);this._currentOverlay=r,r.setOpacity(this.options.opacity?this.options.opacity:1),this.options.isBack===!0&&r.bringToBack(),this.options.isBack===!1&&r.bringToFront()}}(this._map.getZoom()<this.options.minZoom||this._map.getZoom()>this.options.maxZoom)&&this._map.removeLayer(r)},setOpacity:function(e){this.options.opacity=e,this._currentOverlay&&this._currentOverlay.setOpacity(e)},bringToBack:function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},updateWmsParams:function(e){e||(e=this._map);var n=e.getBounds(),r=e.getSize(),u=parseFloat(this.wmsParams.version),d=this.options.crs||e.options.crs,f=u>=1.3?"crs":"srs",m=d.project(n.getNorthWest()),g=d.project(n.getSouthEast()),M={width:r.x,height:r.y};M[f]=d.code,M.bbox=(u>=1.3&&d===L.CRS.EPSG4326?[g.y,m.x,m.y,g.x]:[m.x,g.y,g.x,m.y]).join(","),L.extend(this.wmsParams,M)},getImageUrl:function(){var e=this.options.uppercase||!1,n=L.Util.getParamString(this.wmsParams,this._url,e);return this._url+n}}),fe.overlay=function(e,n){return new fe.Overlay(e,n)};function Lf(e,n){var r=this,u=new XMLHttpRequest;u.onreadystatechange=d,u.open("GET",e),u.send();function d(){u.readyState===4&&(u.status===200?n.call(r,u.responseText):n.call(r,"error"))}}const el=U.Draggable.extend({initialize(e,n,r){U.Draggable.prototype.initialize.call(this,e,e),this._element=e,this._stepHeight=n??5.45,this._knobHeight=r??10,this.on("predrag",function(){this._newPos.x=0,this._newPos.y=this._adjust(this._newPos.y)},this)},_adjust(e){let n=Math.round(this._toValue(e));return n=Math.max(0,Math.min(this._maxValue,n)),this._toY(n)},_toY(e){return this._k*e+this._m},_toValue(e){return(e-this._m)/this._k},setSteps(e){this._maxValue=e-1,this._k=-this._stepHeight,this._m=0},setPosition(e){U.DomUtil.setPosition(this._element,L.point(0,this._adjust(e)))},setValue(e){this.setPosition(this._toY(e))},getValue(){return this._toValue(U.DomUtil.getPosition(this._element).y)}}),eo=U.Handler.extend({options:{color:"#f00",weight:2,fillColor:"#ff0",fillOpacity:.7,radius:5},PointEvents:{_mouseMove(e){this.tooltip.setLatLng(e.latlng),this.tempPoint.setLatLng(e.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(e.latlng):(this.tooltip.setContent("点击开始绘制"),this.geometry=new U.CircleMarker(e.latlng,this.options).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(e){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},CircleEvents:{_mouseMove(e){if(this.tooltip.setLatLng(e.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)){const n=this.latlng?this._map.distance(e.latlng,this.latlng):0;this.geometry.setRadius(n),n!==0?this.tooltip.setContent(`半径:<b>${n.toFixed(2)}m</b><br/>继续点击完成绘制`):this.tooltip.setContent("点击开始绘制")}this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(e){this.latlng=e.latlng,this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry&&this.geometry.getRadius()!==0?(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null):this.geometry=new U.Circle(this.latlng,0,this.options).addTo(this._map)},_mouseDblClick(e){}},PolylineEvents:{_mouseMove(e){this.tooltip.setLatLng(e.latlng),this.tempPoint.setLatLng(e.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,e.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Polyline([e.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(e){this.latlngs.push(e.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(e){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},RectangleEvents:{_mouseMove(e){this.tooltip.setLatLng(e.latlng),this.tempPoint.setLatLng(e.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setBounds([...this.latlngs,e.latlng]),this.latlngs.length?this.tooltip.setContent("继续点击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Rectangle([e.latlng,e.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(e){this.latlngs.push(e.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setBounds(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry),this.latlngs.length===2&&(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null)},_mouseDblClick(e){}},PolygonEvents:{_mouseMove(e){this.tooltip.setLatLng(e.latlng),this.tempPoint.setLatLng(e.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,e.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Polygon([e.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(e){this.latlngs.push(e.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(e){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},addHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.on("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.on("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.on("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},removeHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.off("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.off("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.off("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},setOptions(e){return U.Util.setOptions(this,e),this},enable(e,n={}){return U.Util.setOptions(this,n),this.onFinish=n.onFinish||new Function,this.onDrawing=n.onDrawing||new Function,this.onVertexAdd=n.onVertexAdd||new Function,this.drawType=$t.StringUtil.changeCase(e,1),this.latlngs=n.latlngs||[],this._map.setCursor("data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA="),this.tempPoint=new U.CircleMarker([0,0],{weight:1,radius:5,color:"#3388ff",fillColor:"#fff",fillOpacity:1}).addTo(this._map),this.tooltip=new U.Tooltip({offset:[10,-10]}).setContent("点击开始绘制"),U.Handler.prototype.enable.call(this),this},disable(){if(this._map.setCursor(),this.removeHooks(),this._map.closeTooltip(this.tooltip),this._map.removeLayer(this.tempPoint),this.options.showCloseButton&&this.options.showMeasurements&&this.geometry._measurementLayer){const e=this.geometry._measurementLayer;let n;this.geometry instanceof U.Path?n=this.geometry._latlngs.flat().at(-1):n=this.geometry._latlng;const r=this.geometry._leaflet_id;new U.Marker(n,{icon:new U.Icon({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAFRJREFUKFOlklEKACAIQ7f7H9rQkJYFFUVfY49NiwBgcc+HABlmu/K7HQMge0SFVd8CCqU5tQlwUQ06UqYuwA7Siv/AU6U6YK3n1f7Wen7onvD6NRqqukP5oM7XCQAAAABJRU5ErkJggg==",iconSize:[12,12],iconAnchor:[6,6]})}).on("click",u=>{this._map.removeLayerById(r),e==null||e.clearLayers()}).addTo(e)}return U.Handler.prototype.disable.call(this),this}});U.Map.addInitHook("addHandler","drawHandler",eo);const di=U.Handler.extend({_touchstart:U.Browser.msPointer?"MSPointerDown":U.Browser.pointer?"pointerdown":"touchstart",initialize(e){U.Handler.prototype.initialize.call(this,e),this._items=[],this._visible=!1,di.BASE_CLS=`${e.clsPrefix}-contextmenu`;const n=this._container=U.DomUtil.create("div",`${e.clsPrefix}-contextmenu`,e._container);n.style.zIndex=1e4,n.style.position="absolute",e.options.contextmenuWidth&&(n.style.width=e.options.contextmenuWidth+"px"),this._createItems(),U.DomEvent.on(n,"click",U.DomEvent.stop).on(n,"mousedown",U.DomEvent.stop).on(n,"dblclick",U.DomEvent.stop).on(n,"contextmenu",U.DomEvent.stop)},addHooks(){const e=this._map.getContainer();U.DomEvent.on(e,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),U.Browser.touch&&U.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},removeHooks(){const e=this._map.getContainer();U.DomEvent.off(e,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),U.Browser.touch&&U.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},showAt(e,n){e instanceof U.LatLng&&(e=this._map.latLngToContainerPoint(e)),this._showAtPoint(e,n)},hide(){this._hide()},addItem(e){return this.insertItem(e)},insertItem(e,n){n=n!==void 0?n:this._items.length;const r=this._createItem(this._container,e,n);return this._items.push(r),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:r.el,index:n}),r.el},removeItem(e){const n=this._container;return isNaN(e)||(e=n.children[e]),e?(this._removeItem(U.Util.stamp(e)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:e}),e):null},removeAllItems(){const e=this._container.children;let n;for(;e.length;)n=e[0],this._removeItem(U.Util.stamp(n));return e},hideAllItems(){let e,n,r;for(n=0,r=this._items.length;n<r;n++)e=this._items[n],e.el.style.display="none"},showAllItems(){let e,n,r;for(n=0,r=this._items.length;n<r;n++)e=this._items[n],e.el.style.display=""},setDisabled(e,n){const r=this._container,u=di.BASE_CLS+"-item";isNaN(e)||(e=r.children[e]),e&&U.DomUtil.hasClass(e,u)&&(n?(U.DomUtil.addClass(e,u+"-disabled"),this._map.fire("contextmenu.disableitem",{contextmenu:this,el:e})):(U.DomUtil.removeClass(e,u+"-disabled"),this._map.fire("contextmenu.enableitem",{contextmenu:this,el:e})))},isVisible(){return this._visible},_createItems(){const e=this._map.options.contextmenuItems;let n,r;for(n=0,r=e.length;n<r;n++)this._items.push(this._createItem(this._container,e[n]))},_createItem(e,n,r){if(n.separator||n==="-")return this._createSeparator(e,r);const u=di.BASE_CLS+"-item",d=n.disabled?u+" "+u+"-disabled":u,f=this._insertElementAt("a",d,e,r),m=this._createEventHandler(f,n.callback,n.context,n.hideOnSelect),g=this._getIcon(n),M=this._getIconCls(n);let B="";return g?B='<img class="'+di.BASE_CLS+'-icon" src="'+g+'"/>':M&&(B='<span class="'+di.BASE_CLS+"-icon "+M+'"></span>'),f.innerHTML=B+n.text,f.href="#",U.DomEvent.on(f,"mouseover",this._onItemMouseOver,this).on(f,"mouseout",this._onItemMouseOut,this).on(f,"mousedown",U.DomEvent.stopPropagation).on(f,"click",m),U.Browser.touch&&U.DomEvent.on(f,this._touchstart,U.DomEvent.stopPropagation),U.Browser.pointer||U.DomEvent.on(f,"click",this._onItemMouseOut,this),{id:U.Util.stamp(f),el:f,callback:m}},_removeItem(e){let n,r,u,d,f;for(u=0,d=this._items.length;u<d;u++)if(n=this._items[u],n.id===e)return r=n.el,f=n.callback,f&&(U.DomEvent.off(r,"mouseover",this._onItemMouseOver,this).off(r,"mouseover",this._onItemMouseOut,this).off(r,"mousedown",U.DomEvent.stopPropagation).off(r,"click",f),U.Browser.touch&&U.DomEvent.off(r,this._touchstart,U.DomEvent.stopPropagation),U.Browser.pointer||U.DomEvent.on(r,"click",this._onItemMouseOut,this)),this._container.removeChild(r),this._items.splice(u,1),n;return null},_createSeparator(e,n){const r=this._insertElementAt("div",di.BASE_CLS+"-separator",e,n);return{id:U.Util.stamp(r),el:r}},_createEventHandler(e,n,r,m){const d=this;this._map;const f=di.BASE_CLS+"-item-disabled";var m=m!==void 0?m:!0;return function(g){if(U.DomUtil.hasClass(e,f))return;const M=d._map,B=d._showLocation.containerPoint,E=M.containerPointToLayerPoint(B),b=M.layerPointToLatLng(E),C=d._showLocation.relatedTarget,D={containerPoint:B,layerPoint:E,latlng:b,relatedTarget:C};m&&d._hide(),n&&n.call(r||M,D),d._map.fire("contextmenu.select",{contextmenu:d,el:e})}},_insertElementAt(e,n,r,u){let d;const f=document.createElement(e);return f.className=n,u!==void 0&&(d=r.children[u]),d?r.insertBefore(f,d):r.appendChild(f),f},_show(e){this._showAtPoint(e.containerPoint,e)},_showAtPoint(e,n){if(this._items.length){this._map;const r=U.extend(n||{},{contextmenu:this});this._showLocation={containerPoint:e},n&&n.relatedTarget&&(this._showLocation.relatedTarget=n.relatedTarget),this._setPosition(e),this._visible||(this._container.style.display="block",this._visible=!0),this._map.fire("contextmenu.show",r)}},_hide(){this._visible&&(this._visible=!1,this._container.style.display="none",this._map.fire("contextmenu.hide",{contextmenu:this}))},_getIcon(e){return U.Browser.retina&&e.retinaIcon||e.icon},_getIconCls(e){return U.Browser.retina&&e.retinaIconCls||e.iconCls},_setPosition(e){const n=this._map.getSize(),r=this._container,u=this._getElementSize(r);let d;this._map.options.contextmenuAnchor&&(d=new U.Point(this._map.options.contextmenuAnchor),e=e.add(d)),r._leaflet_pos=e,e.x+u.x>n.x?(r.style.left="auto",r.style.right=Math.min(Math.max(n.x-e.x,0),n.x-u.x-1)+"px"):(r.style.left=Math.max(e.x,0)+"px",r.style.right="auto"),e.y+u.y>n.y?(r.style.top="auto",r.style.bottom=Math.min(Math.max(n.y-e.y,0),n.y-u.y-1)+"px"):(r.style.top=Math.max(e.y,0)+"px",r.style.bottom="auto")},_getElementSize(e){let n=this._size;const r=e.style.display;return(!n||this._sizeChanged)&&(n={},e.style.left="-999999px",e.style.right="auto",e.style.display="block",n.x=e.offsetWidth,n.y=e.offsetHeight,e.style.left="auto",e.style.display=r,this._sizeChanged=!1),n},_onKeyDown(e){e.keyCode===27&&this._hide()},_onItemMouseOver(e){U.DomUtil.addClass(e.target||e.srcElement,"over")},_onItemMouseOut(e){U.DomUtil.removeClass(e.target||e.srcElement,"over")}});U.Map.mergeOptions({contextmenuItems:[]}),U.Map.addInitHook("addHandler","contextmenu",di);const bf={bindContextMenu(e){return L.setOptions(this,e),this._initContextMenu(),this},unbindContextMenu(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem(e){this.options.contextmenuItems.push(e)},removeContextMenuItemWithIndex(e){const n=[];for(let u=0;u<this.options.contextmenuItems.length;u++)this.options.contextmenuItems[u].index==e&&n.push(u);let r=n.pop();for(;r!==void 0;)this.options.contextmenuItems.splice(r,1),r=n.pop()},replaceContextMenuItem(e){this.removeContextMenuItemWithIndex(e.index),this.addContextMenuItem(e)},_initContextMenu(){this._items=[],this.on("contextmenu",this._showContextMenu,this)},_showContextMenu(e){let n,r,u,d,f;if(this._items=[],this._map.contextmenu){for(r=L.extend({relatedTarget:this},e),u=this._map.mouseEventToContainerPoint(e.originalEvent),this.options.contextmenuInheritItems||this._map.contextmenu.hideAllItems(),d=0,f=this.options.contextmenuItems.length;d<f;d++)n=this.options.contextmenuItems[d],this._items.push(this._map.contextmenu.insertItem(n,n.index));this._map.once("contextmenu.hide",this._hideContextMenu,this),this._map.contextmenu.showAt(u,r)}},_hideContextMenu(){let e,n;if(this._items){for(e=0,n=this._items.length;e<n;e++)this._map.contextmenu.removeItem(this._items[e]);this._items.length=0,this.options.contextmenuInheritItems||this._map.contextmenu.showAllItems()}}},il=[U.Marker,U.Path],nl={contextmenu:!1,contextmenuItems:[],contextmenuInheritItems:!1};for(let e=0,n=il.length;e<n;e++){const r=il[e];r.prototype.options?r.mergeOptions(nl):r.prototype.options=nl,r.addInitHook(function(){this.options.contextmenu&&this._initContextMenu()}),r.include(bf)}const io=U.Handler.extend({options:{moveStep:10,zoomSnap:1,moveKeyCodeMap:{65:"left",68:"right",87:"top",83:"bottom"},zoomKeyCodeMap:{69:"add",81:"minus"}},enable(e){U.Util.setOptions(this,e),U.Handler.prototype.enable.call(this)},addHooks(){this._map.on("keydown",this._keyDownEvent,this)},removeHooks(){this._map.off("keydown",this._keyDownEvent,this)},_keyDownEvent(e){let n=this.options.moveKeyCodeMap[e.originalEvent.keyCode],r=this.options.zoomKeyCodeMap[e.originalEvent.keyCode];n&&this.moveByMeters(n,this.options.moveStep),r&&this.setZoom(r)},moveByMeters(e,n){let r=this._map.project(this._map.getCenter());switch(e){case"left":r.x-=n;break;case"right":r.x+=n;break;case"bottom":r.y+=n;break;case"top":r.y-=n;break}r=this._map.unproject(r),this._map.panTo(r)},setZoom(e){let n=this._map.getZoom();switch(e){case"add":n+=this.options.zoomSnap;break;case"minus":n-=this.options.zoomSnap;break}this._map.setZoom(n)}});U.Map.addInitHook("addHandler","keyboard",io);const sl=U.LayerGroup.extend({initialize(e){U.Util.setOptions(this,e),U.LayerGroup.prototype.initialize.call(this,e)},getRasterLayers(){const e={},n=r=>{if(r._layers&&r.getLayer)for(const u in r._layers){const d=r._layers[u];d._layers&&d.getLayer?n(d):e[d._leaflet_id]=d}else e[r._leaflet_id]=r};return n(this),e},removeRasterLayer(e){const n=function(r){if(r._layers&&r.getLayer&&r.getLayer(e)){const u=r.getLayer(e);r.removeLayer(u)}else if(r._layers)for(const u in r._layers){const d=r._layers[u];if(d._layers&&d.getLayer&&d.getLayer(e)){const f=d.getLayer(e);d.removeLayer(f)}else d._layers&&n(d)}};n(this)},getRasterTop(){const e=Object.values(this.getRasterLayers());return e.length?Math.max(...e.map(n=>n.options.zIndex))+1:null}});function wf(e){const n=document.createElement("style"),r=document.head||document.documentElement;n.innerHTML=`
10
- .${e}-statusbar {
9
+ northing meters`+t;var C=x/2,T=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10,C),W=t.substring(f,f+C),T=parseFloat(W)*j,at=t.substring(f+C),G=parseFloat(at)*j),rt=T+B,ct=G+E,{easting:rt,northing:ct,zoneLetter:g,zoneNumber:p,accuracy:j}}function zu(t,n){for(var r=Rh.charCodeAt(n-1),u=1e5,d=!1;r!==t.charCodeAt(0);){if(r++,r===Ge&&r++,r===Ve&&r++,r>ps){if(d)throw"Bad character: "+t;r=bn,d=!0}u+=1e5}return u}function Nu(t,n){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var r=Fh.charCodeAt(n-1),u=0,d=!1;r!==t.charCodeAt(0);){if(r++,r===Ge&&r++,r===Ve&&r++,r>fs){if(d)throw"Bad character: "+t;r=bn,d=!0}u+=1e5}return u}function Uu(t){var n;switch(t){case"C":n=11e5;break;case"D":n=2e6;break;case"E":n=28e5;break;case"F":n=37e5;break;case"G":n=46e5;break;case"H":n=55e5;break;case"J":n=64e5;break;case"K":n=73e5;break;case"L":n=82e5;break;case"M":n=91e5;break;case"N":n=0;break;case"P":n=8e5;break;case"Q":n=17e5;break;case"R":n=26e5;break;case"S":n=35e5;break;case"T":n=44e5;break;case"U":n=53e5;break;case"V":n=62e5;break;case"W":n=7e6;break;case"X":n=79e5;break;default:n=-1}if(n>=0)return n;throw"Invalid zone letter: "+t}function wn(t,n,r){if(!(this instanceof wn))return new wn(t,n,r);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if(typeof t=="object")this.x=t.x,this.y=t.y,this.z=t.z||0;else if(typeof t=="string"&&typeof n>"u"){var u=t.split(",");this.x=parseFloat(u[0]),this.y=parseFloat(u[1]),this.z=parseFloat(u[2])||0}else this.x=t,this.y=n,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}wn.fromMGRS=function(t){return new wn(zh(t))},wn.prototype.toMGRS=function(t){return Gh([this.x,this.y],t)};var ju=1,Zu=.25,Zh=.046875,qh=.01953125,Hh=.01068115234375,qu=.75,Hu=.46875,Vu=.013020833333333334,$u=.007120768229166667,Ku=.3645833333333333,Wu=.005696614583333333,Xu=.3076171875;function jr(t){var n=[];n[0]=ju-t*(Zu+t*(Zh+t*(qh+t*Hh))),n[1]=t*(qu-t*(Zh+t*(qh+t*Hh)));var r=t*t;return n[2]=r*(Hu-t*(Vu+t*$u)),r*=t,n[3]=r*(Ku-t*Wu),n[4]=r*t*Xu,n}function Cn(t,n,r,u){return r*=n,n*=n,u[0]*t-r*(u[1]+n*(u[2]+n*(u[3]+n*u[4])))}var Yu=20;function Zr(t,n,r){for(var u=1/(1-n),d=t,f=Yu;f;--f){var p=Math.sin(d),g=1-n*p*p;if(g=(Cn(d,p,Math.cos(d),r)-t)*(g*Math.sqrt(g))*u,d-=g,Math.abs(g)<dt)return d}return d}function Ju(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=jr(this.es),this.ml0=Cn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Qu(t){var n=t.x,r=t.y,u=_t(n-this.long0),d,f,p,g=Math.sin(r),M=Math.cos(r);if(this.es){var E=M*u,x=Math.pow(E,2),C=this.ep2*Math.pow(M,2),T=Math.pow(C,2),G=Math.abs(M)>dt?Math.tan(r):0,j=Math.pow(G,2),W=Math.pow(j,2);d=1-this.es*Math.pow(g,2),E=E/Math.sqrt(d);var at=Cn(r,g,M,this.en);f=this.a*(this.k0*E*(1+x/6*(1-j+C+x/20*(5-18*j+W+14*C-58*j*C+x/42*(61+179*W-W*j-479*j)))))+this.x0,p=this.a*(this.k0*(at-this.ml0+g*u*E/2*(1+x/12*(5-j+9*C+4*T+x/30*(61+W-58*j+270*C-330*j*C+x/56*(1385+543*W-W*j-3111*j))))))+this.y0}else{var B=M*Math.sin(u);if(Math.abs(Math.abs(B)-1)<dt)return 93;if(f=.5*this.a*this.k0*Math.log((1+B)/(1-B))+this.x0,p=M*Math.cos(u)/Math.sqrt(1-Math.pow(B,2)),B=Math.abs(p),B>=1){if(B-1>dt)return 93;p=0}else p=Math.acos(p);r<0&&(p=-p),p=this.a*this.k0*(p-this.lat0)+this.y0}return t.x=f,t.y=p,t}function tc(t){var n,r,u,d,f=(t.x-this.x0)*(1/this.a),p=(t.y-this.y0)*(1/this.a);if(this.es)if(n=this.ml0+p/this.k0,r=Zr(n,this.es,this.en),Math.abs(r)<ut){var x=Math.sin(r),C=Math.cos(r),T=Math.abs(C)>dt?Math.tan(r):0,G=this.ep2*Math.pow(C,2),j=Math.pow(G,2),W=Math.pow(T,2),at=Math.pow(W,2);n=1-this.es*Math.pow(x,2);var rt=f*Math.sqrt(n)/this.k0,ct=Math.pow(rt,2);n=n*T,u=r-n*ct/(1-this.es)*.5*(1-ct/12*(5+3*W-9*G*W+G-4*j-ct/30*(61+90*W-252*G*W+45*at+46*G-ct/56*(1385+3633*W+4095*at+1574*at*W)))),d=_t(this.long0+rt*(1-ct/6*(1+2*W+G-ct/20*(5+28*W+24*at+8*G*W+6*G-ct/42*(61+662*W+1320*at+720*at*W))))/C)}else u=ut*cs(p),d=0;else{var g=Math.exp(f/this.k0),M=.5*(g-1/g),B=this.lat0+p/this.k0,E=Math.cos(B);n=Math.sqrt((1-Math.pow(E,2))/(1+Math.pow(M,2))),u=Math.asin(n),p<0&&(u=-u),M===0&&E===0?d=0:d=_t(Math.atan2(M,E)+this.long0)}return t.x=d,t.y=u,t}var ec=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const va={init:Ju,forward:Qu,inverse:tc,names:ec};function Vh(t){var n=Math.exp(t);return n=(n-1/n)/2,n}function ze(t,n){t=Math.abs(t),n=Math.abs(n);var r=Math.max(t,n),u=Math.min(t,n)/(r||1);return r*Math.sqrt(1+Math.pow(u,2))}function ic(t){var n=1+t,r=n-1;return r===0?t:t*Math.log(n)/r}function nc(t){var n=Math.abs(t);return n=ic(n*(1+n/(ze(1,n)+1))),t<0?-n:n}function qr(t,n){for(var r=2*Math.cos(2*n),u=t.length-1,d=t[u],f=0,p;--u>=0;)p=-f+r*d+t[u],f=d,d=p;return n+p*Math.sin(2*n)}function sc(t,n){for(var r=2*Math.cos(n),u=t.length-1,d=t[u],f=0,p;--u>=0;)p=-f+r*d+t[u],f=d,d=p;return Math.sin(n)*p}function ac(t){var n=Math.exp(t);return n=(n+1/n)/2,n}function $h(t,n,r){for(var u=Math.sin(n),d=Math.cos(n),f=Vh(r),p=ac(r),g=2*d*p,M=-2*u*f,B=t.length-1,E=t[B],x=0,C=0,T=0,G,j;--B>=0;)G=C,j=x,C=E,x=T,E=-G+g*C-M*x+t[B],T=-j+M*C+g*x;return g=u*p,M=d*f,[g*E-M*T,g*T+M*E]}function rc(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(va.init.apply(this),this.forward=va.forward,this.inverse=va.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),n=t/(2-t),r=n;this.cgb[0]=n*(2+n*(-2/3+n*(-2+n*(116/45+n*(26/45+n*(-2854/675)))))),this.cbg[0]=n*(-2+n*(2/3+n*(4/3+n*(-82/45+n*(32/45+n*(4642/4725)))))),r=r*n,this.cgb[1]=r*(7/3+n*(-8/5+n*(-227/45+n*(2704/315+n*(2323/945))))),this.cbg[1]=r*(5/3+n*(-16/15+n*(-13/9+n*(904/315+n*(-1522/945))))),r=r*n,this.cgb[2]=r*(56/15+n*(-136/35+n*(-1262/105+n*(73814/2835)))),this.cbg[2]=r*(-26/15+n*(34/21+n*(8/5+n*(-12686/2835)))),r=r*n,this.cgb[3]=r*(4279/630+n*(-332/35+n*(-399572/14175))),this.cbg[3]=r*(1237/630+n*(-12/5+n*(-24832/14175))),r=r*n,this.cgb[4]=r*(4174/315+n*(-144838/6237)),this.cbg[4]=r*(-734/315+n*(109598/31185)),r=r*n,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(n,2),this.Qn=this.k0/(1+n)*(1+r*(1/4+r*(1/64+r/256))),this.utg[0]=n*(-.5+n*(2/3+n*(-37/96+n*(1/360+n*(81/512+n*(-96199/604800)))))),this.gtu[0]=n*(.5+n*(-2/3+n*(5/16+n*(41/180+n*(-127/288+n*(7891/37800)))))),this.utg[1]=r*(-1/48+n*(-1/15+n*(437/1440+n*(-46/105+n*(1118711/3870720))))),this.gtu[1]=r*(13/48+n*(-3/5+n*(557/1440+n*(281/630+n*(-1983433/1935360))))),r=r*n,this.utg[2]=r*(-17/480+n*(37/840+n*(209/4480+n*(-5569/90720)))),this.gtu[2]=r*(61/240+n*(-103/140+n*(15061/26880+n*(167603/181440)))),r=r*n,this.utg[3]=r*(-4397/161280+n*(11/504+n*(830251/7257600))),this.gtu[3]=r*(49561/161280+n*(-179/168+n*(6601661/7257600))),r=r*n,this.utg[4]=r*(-4583/161280+n*(108847/3991680)),this.gtu[4]=r*(34729/80640+n*(-3418889/1995840)),r=r*n,this.utg[5]=r*(-20648693/638668800),this.gtu[5]=r*(212378941/319334400);var u=qr(this.cbg,this.lat0);this.Zb=-this.Qn*(u+sc(this.gtu,2*u))}function oc(t){var n=_t(t.x-this.long0),r=t.y;r=qr(this.cbg,r);var u=Math.sin(r),d=Math.cos(r),f=Math.sin(n),p=Math.cos(n);r=Math.atan2(u,p*d),n=Math.atan2(f*d,ze(u,d*p)),n=nc(Math.tan(n));var g=$h(this.gtu,2*r,2*n);r=r+g[0],n=n+g[1];var M,B;return Math.abs(n)<=2.623395162778?(M=this.a*(this.Qn*n)+this.x0,B=this.a*(this.Qn*r+this.Zb)+this.y0):(M=1/0,B=1/0),t.x=M,t.y=B,t}function hc(t){var n=(t.x-this.x0)*(1/this.a),r=(t.y-this.y0)*(1/this.a);r=(r-this.Zb)/this.Qn,n=n/this.Qn;var u,d;if(Math.abs(n)<=2.623395162778){var f=$h(this.utg,2*r,2*n);r=r+f[0],n=n+f[1],n=Math.atan(Vh(n));var p=Math.sin(r),g=Math.cos(r),M=Math.sin(n),B=Math.cos(n);r=Math.atan2(p*B,ze(M,B*g)),n=Math.atan2(M,B*g),u=_t(n+this.long0),d=qr(this.cgb,r)}else u=1/0,d=1/0;return t.x=u,t.y=d,t}var lc=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Ma={init:rc,forward:oc,inverse:hc,names:lc};function uc(t,n){if(t===void 0){if(t=Math.floor((_t(n)+Math.PI)*30/Math.PI)+1,t<0)return 0;if(t>60)return 60}return t}var cc="etmerc";function dc(){var t=uc(this.zone,this.long0);if(t===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*ye,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ma.init.apply(this),this.forward=Ma.forward,this.inverse=Ma.inverse}var fc=["Universal Transverse Mercator System","utm"];const pc={init:dc,names:fc,dependsOn:cc};function Hr(t,n){return Math.pow((1-t)/(1+t),n)}var _c=20;function mc(){var t=Math.sin(this.lat0),n=Math.cos(this.lat0);n*=n,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*n*n/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Zt)/(Math.pow(Math.tan(.5*this.lat0+Zt),this.C)*Hr(this.e*t,this.ratexp))}function gc(t){var n=t.x,r=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+Zt),this.C)*Hr(this.e*Math.sin(r),this.ratexp))-ut,t.x=this.C*n,t}function yc(t){for(var n=1e-14,r=t.x/this.C,u=t.y,d=Math.pow(Math.tan(.5*u+Zt)/this.K,1/this.C),f=_c;f>0&&(u=2*Math.atan(d*Hr(this.e*Math.sin(t.y),-.5*this.e))-ut,!(Math.abs(u-t.y)<n));--f)t.y=u;return f?(t.x=r,t.y=u,t):null}const Vr={init:mc,forward:gc,inverse:yc};function Ac(){Vr.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function vc(t){var n,r,u,d;return t.x=_t(t.x-this.long0),Vr.forward.apply(this,[t]),n=Math.sin(t.y),r=Math.cos(t.y),u=Math.cos(t.x),d=this.k0*this.R2/(1+this.sinc0*n+this.cosc0*r*u),t.x=d*r*Math.sin(t.x),t.y=d*(this.cosc0*n-this.sinc0*r*u),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function Mc(t){var n,r,u,d,f;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,f=ze(t.x,t.y)){var p=2*Math.atan2(f,this.R2);n=Math.sin(p),r=Math.cos(p),d=Math.asin(r*this.sinc0+t.y*n*this.cosc0/f),u=Math.atan2(t.x*n,f*this.cosc0*r-t.y*this.sinc0*n)}else d=this.phic0,u=0;return t.x=u,t.y=d,Vr.inverse.apply(this,[t]),t.x=_t(t.x+this.long0),t}var xc=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const Lc={init:Ac,forward:vc,inverse:Mc,names:xc};function $r(t,n,r){return n*=r,Math.tan(.5*(ut+t))*Math.pow((1-n)/(1+n),.5*r)}function bc(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dt&&(this.k0=.5*(1+cs(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=dt&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dt&&Math.abs(Math.cos(this.lat_ts))>dt&&(this.k0=.5*this.cons*ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ii(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ci(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan($r(this.lat0,this.sinlat0,this.e))-ut,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function wc(t){var n=t.x,r=t.y,u=Math.sin(r),d=Math.cos(r),f,p,g,M,B,E,x=_t(n-this.long0);return Math.abs(Math.abs(n-this.long0)-Math.PI)<=dt&&Math.abs(r+this.lat0)<=dt?(t.x=NaN,t.y=NaN,t):this.sphere?(f=2*this.k0/(1+this.sinlat0*u+this.coslat0*d*Math.cos(x)),t.x=this.a*f*d*Math.sin(x)+this.x0,t.y=this.a*f*(this.coslat0*u-this.sinlat0*d*Math.cos(x))+this.y0,t):(p=2*Math.atan($r(r,u,this.e))-ut,M=Math.cos(p),g=Math.sin(p),Math.abs(this.coslat0)<=dt?(B=ii(this.e,r*this.con,this.con*u),E=2*this.a*this.k0*B/this.cons,t.x=this.x0+E*Math.sin(n-this.long0),t.y=this.y0-this.con*E*Math.cos(n-this.long0),t):(Math.abs(this.sinlat0)<dt?(f=2*this.a*this.k0/(1+M*Math.cos(x)),t.y=f*g):(f=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*g+this.cosX0*M*Math.cos(x))),t.y=f*(this.cosX0*g-this.sinX0*M*Math.cos(x))+this.y0),t.x=f*M*Math.sin(x)+this.x0,t))}function Cc(t){t.x-=this.x0,t.y-=this.y0;var n,r,u,d,f,p=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var g=2*Math.atan(p/(2*this.a*this.k0));return n=this.long0,r=this.lat0,p<=dt?(t.x=n,t.y=r,t):(r=Math.asin(Math.cos(g)*this.sinlat0+t.y*Math.sin(g)*this.coslat0/p),Math.abs(this.coslat0)<dt?this.lat0>0?n=_t(this.long0+Math.atan2(t.x,-1*t.y)):n=_t(this.long0+Math.atan2(t.x,t.y)):n=_t(this.long0+Math.atan2(t.x*Math.sin(g),p*this.coslat0*Math.cos(g)-t.y*this.sinlat0*Math.sin(g))),t.x=n,t.y=r,t)}else if(Math.abs(this.coslat0)<=dt){if(p<=dt)return r=this.lat0,n=this.long0,t.x=n,t.y=r,t;t.x*=this.con,t.y*=this.con,u=p*this.cons/(2*this.a*this.k0),r=this.con*ds(this.e,u),n=this.con*_t(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else d=2*Math.atan(p*this.cosX0/(2*this.a*this.k0*this.ms1)),n=this.long0,p<=dt?f=this.X0:(f=Math.asin(Math.cos(d)*this.sinX0+t.y*Math.sin(d)*this.cosX0/p),n=_t(this.long0+Math.atan2(t.x*Math.sin(d),p*this.cosX0*Math.cos(d)-t.y*this.sinX0*Math.sin(d)))),r=-1*ds(this.e,Math.tan(.5*(ut+f)));return t.x=n,t.y=r,t}var Ec=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const Pc={init:bc,forward:wc,inverse:Cc,names:Ec,ssfn_:$r};function kc(){var t=this.lat0;this.lambda0=this.long0;var n=Math.sin(t),r=this.a,u=this.rf,d=1/u,f=2*d-Math.pow(d,2),p=this.e=Math.sqrt(f);this.R=this.k0*r*Math.sqrt(1-f)/(1-f*Math.pow(n,2)),this.alpha=Math.sqrt(1+f/(1-f)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(n/this.alpha);var g=Math.log(Math.tan(Math.PI/4+this.b0/2)),M=Math.log(Math.tan(Math.PI/4+t/2)),B=Math.log((1+p*n)/(1-p*n));this.K=g-this.alpha*M+this.alpha*p/2*B}function Sc(t){var n=Math.log(Math.tan(Math.PI/4-t.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),u=-this.alpha*(n+r)+this.K,d=2*(Math.atan(Math.exp(u))-Math.PI/4),f=this.alpha*(t.x-this.lambda0),p=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(d)+Math.cos(this.b0)*Math.cos(f))),g=Math.asin(Math.cos(this.b0)*Math.sin(d)-Math.sin(this.b0)*Math.cos(d)*Math.cos(f));return t.y=this.R/2*Math.log((1+Math.sin(g))/(1-Math.sin(g)))+this.y0,t.x=this.R*p+this.x0,t}function Bc(t){for(var n=t.x-this.x0,r=t.y-this.y0,u=n/this.R,d=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(d)+Math.sin(this.b0)*Math.cos(d)*Math.cos(u)),p=Math.atan(Math.sin(u)/(Math.cos(this.b0)*Math.cos(u)-Math.sin(this.b0)*Math.tan(d))),g=this.lambda0+p/this.alpha,M=0,B=f,E=-1e3,x=0;Math.abs(B-E)>1e-7;){if(++x>20)return;M=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(B))/2)),E=B,B=2*Math.atan(Math.exp(M))-Math.PI/2}return t.x=g,t.y=B,t}var Tc=["somerc"];const Dc={init:kc,forward:Sc,inverse:Bc,names:Tc};var En=1e-7;function Oc(t){var n=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],r=typeof t.projName=="object"?Object.keys(t.projName)[0]:t.projName;return"no_uoff"in t||"no_off"in t||n.indexOf(r)!==-1||n.indexOf(bh(r))!==-1}function Ic(){var t,n,r,u,d,f,p,g,M,B,E=0,x,C=0,T=0,G=0,j=0,W=0,at=0;this.no_off=Oc(this),this.no_rot="no_rot"in this;var rt=!1;"alpha"in this&&(rt=!0);var ct=!1;if("rectified_grid_angle"in this&&(ct=!0),rt&&(at=this.alpha),ct&&(E=this.rectified_grid_angle),rt||ct)C=this.longc;else if(T=this.long1,j=this.lat1,G=this.long2,W=this.lat2,Math.abs(j-W)<=En||(t=Math.abs(j))<=En||Math.abs(t-ut)<=En||Math.abs(Math.abs(this.lat0)-ut)<=En||Math.abs(Math.abs(W)-ut)<=En)throw new Error;var yt=1-this.es;n=Math.sqrt(yt),Math.abs(this.lat0)>dt?(g=Math.sin(this.lat0),r=Math.cos(this.lat0),t=1-this.es*g*g,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/yt),this.A=this.B*this.k0*n/t,u=this.B*n/(r*Math.sqrt(t)),d=u*u-1,d<=0?d=0:(d=Math.sqrt(d),this.lat0<0&&(d=-d)),this.E=d+=u,this.E*=Math.pow(ii(this.e,this.lat0,g),this.B)):(this.B=1/n,this.A=this.k0,this.E=u=d=1),rt||ct?(rt?(x=Math.asin(Math.sin(at)/u),ct||(E=at)):(x=E,at=Math.asin(u*Math.sin(x))),this.lam0=C-Math.asin(.5*(d-1/d)*Math.tan(x))/this.B):(f=Math.pow(ii(this.e,j,Math.sin(j)),this.B),p=Math.pow(ii(this.e,W,Math.sin(W)),this.B),d=this.E/f,M=(p-f)/(p+f),B=this.E*this.E,B=(B-p*f)/(B+p*f),t=T-G,t<-Math.PI?G-=ls:t>Math.PI&&(G+=ls),this.lam0=_t(.5*(T+G)-Math.atan(B*Math.tan(.5*this.B*(T-G))/M)/this.B),x=Math.atan(2*Math.sin(this.B*_t(T-this.lam0))/(d-1/d)),E=at=Math.asin(u*Math.sin(x))),this.singam=Math.sin(x),this.cosgam=Math.cos(x),this.sinrot=Math.sin(E),this.cosrot=Math.cos(E),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(u*u-1)/Math.cos(at))),this.lat0<0&&(this.u_0=-this.u_0)),d=.5*x,this.v_pole_n=this.ArB*Math.log(Math.tan(Zt-d)),this.v_pole_s=this.ArB*Math.log(Math.tan(Zt+d))}function Rc(t){var n={},r,u,d,f,p,g,M,B;if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-ut)>dt){if(p=this.E/Math.pow(ii(this.e,t.y,Math.sin(t.y)),this.B),g=1/p,r=.5*(p-g),u=.5*(p+g),f=Math.sin(this.B*t.x),d=(r*this.singam-f*this.cosgam)/u,Math.abs(Math.abs(d)-1)<dt)throw new Error;B=.5*this.ArB*Math.log((1-d)/(1+d)),g=Math.cos(this.B*t.x),Math.abs(g)<En?M=this.A*t.x:M=this.ArB*Math.atan2(r*this.cosgam+f*this.singam,g)}else B=t.y>0?this.v_pole_n:this.v_pole_s,M=this.ArB*t.y;return this.no_rot?(n.x=M,n.y=B):(M-=this.u_0,n.x=B*this.cosrot+M*this.sinrot,n.y=M*this.cosrot-B*this.sinrot),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function Fc(t){var n,r,u,d,f,p,g,M={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(r=t.y,n=t.x):(r=t.x*this.cosrot-t.y*this.sinrot,n=t.y*this.cosrot+t.x*this.sinrot+this.u_0),u=Math.exp(-this.BrA*r),d=.5*(u-1/u),f=.5*(u+1/u),p=Math.sin(this.BrA*n),g=(p*this.cosgam+d*this.singam)/f,Math.abs(Math.abs(g)-1)<dt)M.x=0,M.y=g<0?-ut:ut;else{if(M.y=this.E/Math.sqrt((1+g)/(1-g)),M.y=ds(this.e,Math.pow(M.y,1/this.B)),M.y===1/0)throw new Error;M.x=-this.rB*Math.atan2(d*this.cosgam-p*this.singam,Math.cos(this.BrA*n))}return M.x+=this.lam0,M}var Gc=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const zc={init:Ic,forward:Rc,inverse:Fc,names:Gc};function Nc(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<dt)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var n=Math.sin(this.lat1),r=Math.cos(this.lat1),u=ci(this.e,n,r),d=ii(this.e,this.lat1,n),f=Math.sin(this.lat2),p=Math.cos(this.lat2),g=ci(this.e,f,p),M=ii(this.e,this.lat2,f),B=Math.abs(Math.abs(this.lat0)-ut)<dt?0:ii(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>dt?this.ns=Math.log(u/g)/Math.log(d/M):this.ns=n,isNaN(this.ns)&&(this.ns=n),this.f0=u/(this.ns*Math.pow(d,this.ns)),this.rh=this.a*this.f0*Math.pow(B,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Uc(t){var n=t.x,r=t.y;Math.abs(2*Math.abs(r)-Math.PI)<=dt&&(r=cs(r)*(ut-2*dt));var u=Math.abs(Math.abs(r)-ut),d,f;if(u>dt)d=ii(this.e,r,Math.sin(r)),f=this.a*this.f0*Math.pow(d,this.ns);else{if(u=r*this.ns,u<=0)return null;f=0}var p=this.ns*_t(n-this.long0);return t.x=this.k0*(f*Math.sin(p))+this.x0,t.y=this.k0*(this.rh-f*Math.cos(p))+this.y0,t}function jc(t){var n,r,u,d,f,p=(t.x-this.x0)/this.k0,g=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(n=Math.sqrt(p*p+g*g),r=1):(n=-Math.sqrt(p*p+g*g),r=-1);var M=0;if(n!==0&&(M=Math.atan2(r*p,r*g)),n!==0||this.ns>0){if(r=1/this.ns,u=Math.pow(n/(this.a*this.f0),r),d=ds(this.e,u),d===-9999)return null}else d=-ut;return f=_t(M/this.ns+this.long0),t.x=f,t.y=d,t}var Zc=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const qc={init:Nc,forward:Uc,inverse:jc,names:Zc};function Hc(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function Vc(t){var n,r,u,d,f,p,g,M=t.x,B=t.y,E=_t(M-this.long0);return n=Math.pow((1+this.e*Math.sin(B))/(1-this.e*Math.sin(B)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(B/2+this.s45),this.alfa)/n)-this.s45),u=-E*this.alfa,d=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(u)),f=Math.asin(Math.cos(r)*Math.sin(u)/Math.cos(d)),p=this.n*f,g=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(d/2+this.s45),this.n),t.y=g*Math.cos(p)/1,t.x=g*Math.sin(p)/1,this.czech||(t.y*=-1,t.x*=-1),t}function $c(t){var n,r,u,d,f,p,g,M,B=t.x;t.x=t.y,t.y=B,this.czech||(t.y*=-1,t.x*=-1),p=Math.sqrt(t.x*t.x+t.y*t.y),f=Math.atan2(t.y,t.x),d=f/Math.sin(this.s0),u=2*(Math.atan(Math.pow(this.ro0/p,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),n=Math.asin(Math.cos(this.ad)*Math.sin(u)-Math.sin(this.ad)*Math.cos(u)*Math.cos(d)),r=Math.asin(Math.cos(u)*Math.sin(d)/Math.cos(n)),t.x=this.long0-r/this.alfa,g=n,M=0;var E=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(n/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(g))/(1-this.e*Math.sin(g)),this.e/2))-this.s45),Math.abs(g-t.y)<1e-10&&(M=1),g=t.y,E+=1;while(M===0&&E<15);return E>=15?null:t}var Kc=["Krovak","krovak"];const Wc={init:Hc,forward:Vc,inverse:$c,names:Kc};function Te(t,n,r,u,d){return t*d-n*Math.sin(2*d)+r*Math.sin(4*d)-u*Math.sin(6*d)}function _s(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function ms(t){return .375*t*(1+.25*t*(1+.46875*t))}function gs(t){return .05859375*t*t*(1+.75*t)}function ys(t){return t*t*t*(35/3072)}function Kr(t,n,r){var u=n*r;return t/Math.sqrt(1-u*u)}function Ii(t){return Math.abs(t)<ut?t:t-cs(t)*Math.PI}function xa(t,n,r,u,d){var f,p;f=t/n;for(var g=0;g<15;g++)if(p=(t-(n*f-r*Math.sin(2*f)+u*Math.sin(4*f)-d*Math.sin(6*f)))/(n-2*r*Math.cos(2*f)+4*u*Math.cos(4*f)-6*d*Math.cos(6*f)),f+=p,Math.abs(p)<=1e-10)return f;return NaN}function Xc(){this.sphere||(this.e0=_s(this.es),this.e1=ms(this.es),this.e2=gs(this.es),this.e3=ys(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Yc(t){var n,r,u=t.x,d=t.y;if(u=_t(u-this.long0),this.sphere)n=this.a*Math.asin(Math.cos(d)*Math.sin(u)),r=this.a*(Math.atan2(Math.tan(d),Math.cos(u))-this.lat0);else{var f=Math.sin(d),p=Math.cos(d),g=Kr(this.a,this.e,f),M=Math.tan(d)*Math.tan(d),B=u*Math.cos(d),E=B*B,x=this.es*p*p/(1-this.es),C=this.a*Te(this.e0,this.e1,this.e2,this.e3,d);n=g*B*(1-E*M*(1/6-(8-M+8*x)*E/120)),r=C-this.ml0+g*f/p*E*(.5+(5-M+6*x)*E/24)}return t.x=n+this.x0,t.y=r+this.y0,t}function Jc(t){t.x-=this.x0,t.y-=this.y0;var n=t.x/this.a,r=t.y/this.a,u,d;if(this.sphere){var f=r+this.lat0;u=Math.asin(Math.sin(f)*Math.cos(n)),d=Math.atan2(Math.tan(n),Math.cos(f))}else{var p=this.ml0/this.a+r,g=xa(p,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(g)-ut)<=dt)return t.x=this.long0,t.y=ut,r<0&&(t.y*=-1),t;var M=Kr(this.a,this.e,Math.sin(g)),B=M*M*M/this.a/this.a*(1-this.es),E=Math.pow(Math.tan(g),2),x=n*this.a/M,C=x*x;u=g-M*Math.tan(g)/B*x*x*(.5-(1+3*E)*x*x/24),d=x*(1-C*(E/3+(1+3*E)*E*C/15))/Math.cos(g)}return t.x=_t(d+this.long0),t.y=Ii(u),t}var Qc=["Cassini","Cassini_Soldner","cass"];const td={init:Xc,forward:Yc,inverse:Jc,names:Qc};function Ri(t,n){var r;return t>1e-7?(r=t*n,(1-t*t)*(n/(1-r*r)-.5/t*Math.log((1-r)/(1+r)))):2*n}var Wr=1,Xr=2,Yr=3,La=4;function ed(){var t=Math.abs(this.lat0);if(Math.abs(t-ut)<dt?this.mode=this.lat0<0?Wr:Xr:Math.abs(t)<dt?this.mode=Yr:this.mode=La,this.es>0){var n;switch(this.qp=Ri(this.e,1),this.mmf=.5/(1-this.es),this.apa=ud(this.es),this.mode){case Xr:this.dd=1;break;case Wr:this.dd=1;break;case Yr:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case La:this.rq=Math.sqrt(.5*this.qp),n=Math.sin(this.lat0),this.sinb1=Ri(this.e,n)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*n*n)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===La&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function id(t){var n,r,u,d,f,p,g,M,B,E,x=t.x,C=t.y;if(x=_t(x-this.long0),this.sphere){if(f=Math.sin(C),E=Math.cos(C),u=Math.cos(x),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(r=this.mode===this.EQUIT?1+E*u:1+this.sinph0*f+this.cosph0*E*u,r<=dt)return null;r=Math.sqrt(2/r),n=r*E*Math.sin(x),r*=this.mode===this.EQUIT?f:this.cosph0*f-this.sinph0*E*u}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(u=-u),Math.abs(C+this.lat0)<dt)return null;r=Zt-C*.5,r=2*(this.mode===this.S_POLE?Math.cos(r):Math.sin(r)),n=r*Math.sin(x),r*=u}}else{switch(g=0,M=0,B=0,u=Math.cos(x),d=Math.sin(x),f=Math.sin(C),p=Ri(this.e,f),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(g=p/this.qp,M=Math.sqrt(1-g*g)),this.mode){case this.OBLIQ:B=1+this.sinb1*g+this.cosb1*M*u;break;case this.EQUIT:B=1+M*u;break;case this.N_POLE:B=ut+C,p=this.qp-p;break;case this.S_POLE:B=C-ut,p=this.qp+p;break}if(Math.abs(B)<dt)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:B=Math.sqrt(2/B),this.mode===this.OBLIQ?r=this.ymf*B*(this.cosb1*g-this.sinb1*M*u):r=(B=Math.sqrt(2/(1+M*u)))*g*this.ymf,n=this.xmf*B*M*d;break;case this.N_POLE:case this.S_POLE:p>=0?(n=(B=Math.sqrt(p))*d,r=u*(this.mode===this.S_POLE?B:-B)):n=r=0;break}}return t.x=this.a*n+this.x0,t.y=this.a*r+this.y0,t}function nd(t){t.x-=this.x0,t.y-=this.y0;var n=t.x/this.a,r=t.y/this.a,u,d,f,p,g,M,B;if(this.sphere){var E=0,x,C=0;if(x=Math.sqrt(n*n+r*r),d=x*.5,d>1)return null;switch(d=2*Math.asin(d),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(C=Math.sin(d),E=Math.cos(d)),this.mode){case this.EQUIT:d=Math.abs(x)<=dt?0:Math.asin(r*C/x),n*=C,r=E*x;break;case this.OBLIQ:d=Math.abs(x)<=dt?this.lat0:Math.asin(E*this.sinph0+r*C*this.cosph0/x),n*=C*this.cosph0,r=(E-Math.sin(d)*this.sinph0)*x;break;case this.N_POLE:r=-r,d=ut-d;break;case this.S_POLE:d-=ut;break}u=r===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(n,r)}else{if(B=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(n/=this.dd,r*=this.dd,M=Math.sqrt(n*n+r*r),M<dt)return t.x=this.long0,t.y=this.lat0,t;p=2*Math.asin(.5*M/this.rq),f=Math.cos(p),n*=p=Math.sin(p),this.mode===this.OBLIQ?(B=f*this.sinb1+r*p*this.cosb1/M,g=this.qp*B,r=M*this.cosb1*f-r*this.sinb1*p):(B=r*p/M,g=this.qp*B,r=M*f)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),g=n*n+r*r,!g)return t.x=this.long0,t.y=this.lat0,t;B=1-g/this.qp,this.mode===this.S_POLE&&(B=-B)}u=Math.atan2(n,r),d=cd(Math.asin(B),this.apa)}return t.x=_t(this.long0+u),t.y=d,t}var sd=.3333333333333333,ad=.17222222222222222,rd=.10257936507936508,od=.06388888888888888,hd=.0664021164021164,ld=.016415012942191543;function ud(t){var n,r=[];return r[0]=t*sd,n=t*t,r[0]+=n*ad,r[1]=n*od,n*=t,r[0]+=n*rd,r[1]+=n*hd,r[2]=n*ld,r}function cd(t,n){var r=t+t;return t+n[0]*Math.sin(r)+n[1]*Math.sin(r+r)+n[2]*Math.sin(r+r+r)}var dd=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const fd={init:ed,forward:id,inverse:nd,names:dd,S_POLE:Wr,N_POLE:Xr,EQUIT:Yr,OBLIQ:La};function Fi(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}function pd(){Math.abs(this.lat1+this.lat2)<dt||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ci(this.e3,this.sin_po,this.cos_po),this.qs1=Ri(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ci(this.e3,this.sin_po,this.cos_po),this.qs2=Ri(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ri(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>dt?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function _d(t){var n=t.x,r=t.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var u=Ri(this.e3,this.sin_phi),d=this.a*Math.sqrt(this.c-this.ns0*u)/this.ns0,f=this.ns0*_t(n-this.long0),p=d*Math.sin(f)+this.x0,g=this.rh-d*Math.cos(f)+this.y0;return t.x=p,t.y=g,t}function md(t){var n,r,u,d,f,p;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),u=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),u=-1),d=0,n!==0&&(d=Math.atan2(u*t.x,u*t.y)),u=n*this.ns0/this.a,this.sphere?p=Math.asin((this.c-u*u)/(2*this.ns0)):(r=(this.c-u*u)/this.ns0,p=this.phi1z(this.e3,r)),f=_t(d/this.ns0+this.long0),t.x=f,t.y=p,t}function gd(t,n){var r,u,d,f,p,g=Fi(.5*n);if(t<dt)return g;for(var M=t*t,B=1;B<=25;B++)if(r=Math.sin(g),u=Math.cos(g),d=t*r,f=1-d*d,p=.5*f*f/u*(n/(1-M)-r/f+.5/t*Math.log((1-d)/(1+d))),g=g+p,Math.abs(p)<=1e-7)return g;return null}var yd=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const Ad={init:pd,forward:_d,inverse:md,names:yd,phi1z:gd};function vd(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Md(t){var n,r,u,d,f,p,g,M,B=t.x,E=t.y;return u=_t(B-this.long0),n=Math.sin(E),r=Math.cos(E),d=Math.cos(u),p=this.sin_p14*n+this.cos_p14*r*d,f=1,p>0||Math.abs(p)<=dt?(g=this.x0+this.a*f*r*Math.sin(u)/p,M=this.y0+this.a*f*(this.cos_p14*n-this.sin_p14*r*d)/p):(g=this.x0+this.infinity_dist*r*Math.sin(u),M=this.y0+this.infinity_dist*(this.cos_p14*n-this.sin_p14*r*d)),t.x=g,t.y=M,t}function xd(t){var n,r,u,d,f,p;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(n=Math.sqrt(t.x*t.x+t.y*t.y))?(d=Math.atan2(n,this.rc),r=Math.sin(d),u=Math.cos(d),p=Fi(u*this.sin_p14+t.y*r*this.cos_p14/n),f=Math.atan2(t.x*r,n*this.cos_p14*u-t.y*this.sin_p14*r),f=_t(this.long0+f)):(p=this.phic0,f=0),t.x=f,t.y=p,t}var Ld=["gnom"];const bd={init:vd,forward:Md,inverse:xd,names:Ld};function wd(t,n){var r=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(n)-r)<1e-6)return n<0?-1*ut:ut;for(var u=Math.asin(.5*n),d,f,p,g,M=0;M<30;M++)if(f=Math.sin(u),p=Math.cos(u),g=t*f,d=Math.pow(1-g*g,2)/(2*p)*(n/(1-t*t)-f/(1-g*g)+.5/t*Math.log((1-g)/(1+g))),u+=d,Math.abs(d)<=1e-10)return u;return NaN}function Cd(){this.sphere||(this.k0=ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Ed(t){var n=t.x,r=t.y,u,d,f=_t(n-this.long0);if(this.sphere)u=this.x0+this.a*f*Math.cos(this.lat_ts),d=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var p=Ri(this.e,Math.sin(r));u=this.x0+this.a*this.k0*f,d=this.y0+this.a*p*.5/this.k0}return t.x=u,t.y=d,t}function Pd(t){t.x-=this.x0,t.y-=this.y0;var n,r;return this.sphere?(n=_t(this.long0+t.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(r=wd(this.e,2*t.y*this.k0/this.a),n=_t(this.long0+t.x/(this.a*this.k0))),t.x=n,t.y=r,t}var kd=["cea"];const Sd={init:Cd,forward:Ed,inverse:Pd,names:kd};function Bd(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Td(t){var n=t.x,r=t.y,u=_t(n-this.long0),d=Ii(r-this.lat0);return t.x=this.x0+this.a*u*this.rc,t.y=this.y0+this.a*d,t}function Dd(t){var n=t.x,r=t.y;return t.x=_t(this.long0+(n-this.x0)/(this.a*this.rc)),t.y=Ii(this.lat0+(r-this.y0)/this.a),t}var Od=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const Id={init:Bd,forward:Td,inverse:Dd,names:Od};var Kh=20;function Rd(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=_s(this.es),this.e1=ms(this.es),this.e2=gs(this.es),this.e3=ys(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Fd(t){var n=t.x,r=t.y,u,d,f,p=_t(n-this.long0);if(f=p*Math.sin(r),this.sphere)Math.abs(r)<=dt?(u=this.a*p,d=-1*this.a*this.lat0):(u=this.a*Math.sin(f)/Math.tan(r),d=this.a*(Ii(r-this.lat0)+(1-Math.cos(f))/Math.tan(r)));else if(Math.abs(r)<=dt)u=this.a*p,d=-1*this.ml0;else{var g=Kr(this.a,this.e,Math.sin(r))/Math.tan(r);u=g*Math.sin(f),d=this.a*Te(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+g*(1-Math.cos(f))}return t.x=u+this.x0,t.y=d+this.y0,t}function Gd(t){var n,r,u,d,f,p,g,M,B;if(u=t.x-this.x0,d=t.y-this.y0,this.sphere)if(Math.abs(d+this.a*this.lat0)<=dt)n=_t(u/this.a+this.long0),r=0;else{p=this.lat0+d/this.a,g=u*u/this.a/this.a+p*p,M=p;var E;for(f=Kh;f;--f)if(E=Math.tan(M),B=-1*(p*(M*E+1)-M-.5*(M*M+g)*E)/((M-p)/E-1),M+=B,Math.abs(B)<=dt){r=M;break}n=_t(this.long0+Math.asin(u*Math.tan(M)/this.a)/Math.sin(r))}else if(Math.abs(d+this.ml0)<=dt)r=0,n=_t(this.long0+u/this.a);else{p=(this.ml0+d)/this.a,g=u*u/this.a/this.a+p*p,M=p;var x,C,T,G,j;for(f=Kh;f;--f)if(j=this.e*Math.sin(M),x=Math.sqrt(1-j*j)*Math.tan(M),C=this.a*Te(this.e0,this.e1,this.e2,this.e3,M),T=this.e0-2*this.e1*Math.cos(2*M)+4*this.e2*Math.cos(4*M)-6*this.e3*Math.cos(6*M),G=C/this.a,B=(p*(x*G+1)-G-.5*x*(G*G+g))/(this.es*Math.sin(2*M)*(G*G+g-2*p*G)/(4*x)+(p-G)*(x*T-2/Math.sin(2*M))-T),M-=B,Math.abs(B)<=dt){r=M;break}x=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),n=_t(this.long0+Math.asin(u*x/this.a)/Math.sin(r))}return t.x=n,t.y=r,t}var zd=["Polyconic","American_Polyconic","poly"];const Nd={init:Rd,forward:Fd,inverse:Gd,names:zd};function Ud(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function jd(t){var n,r=t.x,u=t.y,d=u-this.lat0,f=r-this.long0,p=d/hs*1e-5,g=f,M=1,B=0;for(n=1;n<=10;n++)M=M*p,B=B+this.A[n]*M;var E=B,x=g,C=1,T=0,G,j,W=0,at=0;for(n=1;n<=6;n++)G=C*E-T*x,j=T*E+C*x,C=G,T=j,W=W+this.B_re[n]*C-this.B_im[n]*T,at=at+this.B_im[n]*C+this.B_re[n]*T;return t.x=at*this.a+this.x0,t.y=W*this.a+this.y0,t}function Zd(t){var n,r=t.x,u=t.y,d=r-this.x0,f=u-this.y0,p=f/this.a,g=d/this.a,M=1,B=0,E,x,C=0,T=0;for(n=1;n<=6;n++)E=M*p-B*g,x=B*p+M*g,M=E,B=x,C=C+this.C_re[n]*M-this.C_im[n]*B,T=T+this.C_im[n]*M+this.C_re[n]*B;for(var G=0;G<this.iterations;G++){var j=C,W=T,at,rt,ct=p,yt=g;for(n=2;n<=6;n++)at=j*C-W*T,rt=W*C+j*T,j=at,W=rt,ct=ct+(n-1)*(this.B_re[n]*j-this.B_im[n]*W),yt=yt+(n-1)*(this.B_im[n]*j+this.B_re[n]*W);j=1,W=0;var mt=this.B_re[1],xt=this.B_im[1];for(n=2;n<=6;n++)at=j*C-W*T,rt=W*C+j*T,j=at,W=rt,mt=mt+n*(this.B_re[n]*j-this.B_im[n]*W),xt=xt+n*(this.B_im[n]*j+this.B_re[n]*W);var Dt=mt*mt+xt*xt;C=(ct*mt+yt*xt)/Dt,T=(yt*mt-ct*xt)/Dt}var It=C,zt=T,Yt=1,Et=0;for(n=1;n<=9;n++)Yt=Yt*It,Et=Et+this.D[n]*Yt;var jt=this.lat0+Et*hs*1e5,be=this.long0+zt;return t.x=be,t.y=jt,t}var qd=["New_Zealand_Map_Grid","nzmg"];const Hd={init:Ud,forward:jd,inverse:Zd,names:qd};function Vd(){}function $d(t){var n=t.x,r=t.y,u=_t(n-this.long0),d=this.x0+this.a*u,f=this.y0+this.a*Math.log(Math.tan(Math.PI/4+r/2.5))*1.25;return t.x=d,t.y=f,t}function Kd(t){t.x-=this.x0,t.y-=this.y0;var n=_t(this.long0+t.x/this.a),r=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=n,t.y=r,t}var Wd=["Miller_Cylindrical","mill"];const Xd={init:Vd,forward:$d,inverse:Kd,names:Wd};var Yd=20;function Jd(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=jr(this.es)}function Qd(t){var n,r,u=t.x,d=t.y;if(u=_t(u-this.long0),this.sphere){if(!this.m)d=this.n!==1?Math.asin(this.n*Math.sin(d)):d;else for(var f=this.n*Math.sin(d),p=Yd;p;--p){var g=(this.m*d+Math.sin(d)-f)/(this.m+Math.cos(d));if(d-=g,Math.abs(g)<dt)break}n=this.a*this.C_x*u*(this.m+Math.cos(d)),r=this.a*this.C_y*d}else{var M=Math.sin(d),B=Math.cos(d);r=this.a*Cn(d,M,B,this.en),n=this.a*u*B/Math.sqrt(1-this.es*M*M)}return t.x=n,t.y=r,t}function t0(t){var n,r,u,d;return t.x-=this.x0,u=t.x/this.a,t.y-=this.y0,n=t.y/this.a,this.sphere?(n/=this.C_y,u=u/(this.C_x*(this.m+Math.cos(n))),this.m?n=Fi((this.m*n+Math.sin(n))/this.n):this.n!==1&&(n=Fi(Math.sin(n)/this.n)),u=_t(u+this.long0),n=Ii(n)):(n=Zr(t.y/this.a,this.es,this.en),d=Math.abs(n),d<ut?(d=Math.sin(n),r=this.long0+t.x*Math.sqrt(1-this.es*d*d)/(this.a*Math.cos(n)),u=_t(r)):d-dt<ut&&(u=this.long0)),t.x=u,t.y=n,t}var e0=["Sinusoidal","sinu"];const i0={init:Jd,forward:Qd,inverse:t0,names:e0};function n0(){}function s0(t){for(var n=t.x,r=t.y,u=_t(n-this.long0),d=r,f=Math.PI*Math.sin(r);;){var p=-(d+Math.sin(d)-f)/(1+Math.cos(d));if(d+=p,Math.abs(p)<dt)break}d/=2,Math.PI/2-Math.abs(r)<dt&&(u=0);var g=.900316316158*this.a*u*Math.cos(d)+this.x0,M=1.4142135623731*this.a*Math.sin(d)+this.y0;return t.x=g,t.y=M,t}function a0(t){var n,r;t.x-=this.x0,t.y-=this.y0,r=t.y/(1.4142135623731*this.a),Math.abs(r)>.999999999999&&(r=.999999999999),n=Math.asin(r);var u=_t(this.long0+t.x/(.900316316158*this.a*Math.cos(n)));u<-Math.PI&&(u=-Math.PI),u>Math.PI&&(u=Math.PI),r=(2*n+Math.sin(2*n))/Math.PI,Math.abs(r)>1&&(r=1);var d=Math.asin(r);return t.x=u,t.y=d,t}var r0=["Mollweide","moll"];const o0={init:n0,forward:s0,inverse:a0,names:r0};function h0(){Math.abs(this.lat1+this.lat2)<dt||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=_s(this.es),this.e1=ms(this.es),this.e2=gs(this.es),this.e3=ys(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=ci(this.e,this.sin_phi,this.cos_phi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<dt?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=ci(this.e,this.sin_phi,this.cos_phi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function l0(t){var n=t.x,r=t.y,u;if(this.sphere)u=this.a*(this.g-r);else{var d=Te(this.e0,this.e1,this.e2,this.e3,r);u=this.a*(this.g-d)}var f=this.ns*_t(n-this.long0),p=this.x0+u*Math.sin(f),g=this.y0+this.rh-u*Math.cos(f);return t.x=p,t.y=g,t}function u0(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var n,r,u,d;this.ns>=0?(r=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(r=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1);var f=0;if(r!==0&&(f=Math.atan2(n*t.x,n*t.y)),this.sphere)return d=_t(this.long0+f/this.ns),u=Ii(this.g-r/this.a),t.x=d,t.y=u,t;var p=this.g-r/this.a;return u=xa(p,this.e0,this.e1,this.e2,this.e3),d=_t(this.long0+f/this.ns),t.x=d,t.y=u,t}var c0=["Equidistant_Conic","eqdc"];const d0={init:h0,forward:l0,inverse:u0,names:c0};function f0(){this.R=this.a}function p0(t){var n=t.x,r=t.y,u=_t(n-this.long0),d,f;Math.abs(r)<=dt&&(d=this.x0+this.R*u,f=this.y0);var p=Fi(2*Math.abs(r/Math.PI));(Math.abs(u)<=dt||Math.abs(Math.abs(r)-ut)<=dt)&&(d=this.x0,r>=0?f=this.y0+Math.PI*this.R*Math.tan(.5*p):f=this.y0+Math.PI*this.R*-Math.tan(.5*p));var g=.5*Math.abs(Math.PI/u-u/Math.PI),M=g*g,B=Math.sin(p),E=Math.cos(p),x=E/(B+E-1),C=x*x,T=x*(2/B-1),G=T*T,j=Math.PI*this.R*(g*(x-G)+Math.sqrt(M*(x-G)*(x-G)-(G+M)*(C-G)))/(G+M);u<0&&(j=-j),d=this.x0+j;var W=M+x;return j=Math.PI*this.R*(T*W-g*Math.sqrt((G+M)*(M+1)-W*W))/(G+M),r>=0?f=this.y0+j:f=this.y0-j,t.x=d,t.y=f,t}function _0(t){var n,r,u,d,f,p,g,M,B,E,x,C,T;return t.x-=this.x0,t.y-=this.y0,x=Math.PI*this.R,u=t.x/x,d=t.y/x,f=u*u+d*d,p=-Math.abs(d)*(1+f),g=p-2*d*d+u*u,M=-2*p+1+2*d*d+f*f,T=d*d/M+(2*g*g*g/M/M/M-9*p*g/M/M)/27,B=(p-g*g/3/M)/M,E=2*Math.sqrt(-B/3),x=3*T/B/E,Math.abs(x)>1&&(x>=0?x=1:x=-1),C=Math.acos(x)/3,t.y>=0?r=(-E*Math.cos(C+Math.PI/3)-g/3/M)*Math.PI:r=-(-E*Math.cos(C+Math.PI/3)-g/3/M)*Math.PI,Math.abs(u)<dt?n=this.long0:n=_t(this.long0+Math.PI*(f-1+Math.sqrt(1+2*(u*u-d*d)+f*f))/2/u),t.x=n,t.y=r,t}var m0=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const g0={init:f0,forward:p0,inverse:_0,names:m0};function y0(t,n,r,u,d,f){const p=u-n,g=Math.atan((1-f)*Math.tan(t)),M=Math.atan((1-f)*Math.tan(r)),B=Math.sin(g),E=Math.cos(g),x=Math.sin(M),C=Math.cos(M);let T=p,G,j=100,W,at,rt,ct,yt,mt,xt,Dt,It,zt,Yt,Et,jt,be;do{if(W=Math.sin(T),at=Math.cos(T),rt=Math.sqrt(C*W*(C*W)+(E*x-B*C*at)*(E*x-B*C*at)),rt===0)return{azi1:0,s12:0};ct=B*x+E*C*at,yt=Math.atan2(rt,ct),mt=E*C*W/rt,xt=1-mt*mt,Dt=xt!==0?ct-2*B*x/xt:0,It=f/16*xt*(4+f*(4-3*xt)),G=T,T=p+(1-It)*f*mt*(yt+It*rt*(Dt+It*ct*(-1+2*Dt*Dt)))}while(Math.abs(T-G)>1e-12&&--j>0);return j===0?{azi1:NaN,s12:NaN}:(zt=xt*(d*d-d*(1-f)*(d*(1-f)))/(d*(1-f)*(d*(1-f))),Yt=1+zt/16384*(4096+zt*(-768+zt*(320-175*zt))),Et=zt/1024*(256+zt*(-128+zt*(74-47*zt))),jt=Et*rt*(Dt+Et/4*(ct*(-1+2*Dt*Dt)-Et/6*Dt*(-3+4*rt*rt)*(-3+4*Dt*Dt))),be=d*(1-f)*Yt*(yt-jt),{azi1:Math.atan2(C*W,E*x-B*C*at),s12:be})}function A0(t,n,r,u,d,f){const p=Math.atan((1-f)*Math.tan(t)),g=Math.sin(p),M=Math.cos(p),B=Math.sin(r),E=Math.cos(r),x=Math.atan2(g,M*E),C=M*B,T=1-C*C,G=T*(d*d-d*(1-f)*(d*(1-f)))/(d*(1-f)*(d*(1-f))),j=1+G/16384*(4096+G*(-768+G*(320-175*G))),W=G/1024*(256+G*(-128+G*(74-47*G)));let at=u/(d*(1-f)*j),rt,ct=100,yt,mt,xt,Dt;do yt=Math.cos(2*x+at),mt=Math.sin(at),xt=Math.cos(at),Dt=W*mt*(yt+W/4*(xt*(-1+2*yt*yt)-W/6*yt*(-3+4*mt*mt)*(-3+4*yt*yt))),rt=at,at=u/(d*(1-f)*j)+Dt;while(Math.abs(at-rt)>1e-12&&--ct>0);if(ct===0)return{lat2:NaN,lon2:NaN};const It=g*mt-M*xt*E,zt=Math.atan2(g*xt+M*mt*E,(1-f)*Math.sqrt(C*C+It*It)),Yt=Math.atan2(mt*B,M*xt-g*mt*E),Et=f/16*T*(4+f*(4-3*T)),jt=Yt-(1-Et)*f*C*(at+Et*mt*(yt+Et*xt*(-1+2*yt*yt))),be=n+jt;return{lat2:zt,lon2:be}}function v0(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))}function M0(t){var n=t.x,r=t.y,u=Math.sin(t.y),d=Math.cos(t.y),f=_t(n-this.long0),p,g,M,B,E,x,C,T,G,j,W;return this.sphere?Math.abs(this.sin_p12-1)<=dt?(t.x=this.x0+this.a*(ut-r)*Math.sin(f),t.y=this.y0-this.a*(ut-r)*Math.cos(f),t):Math.abs(this.sin_p12+1)<=dt?(t.x=this.x0+this.a*(ut+r)*Math.sin(f),t.y=this.y0+this.a*(ut+r)*Math.cos(f),t):(G=this.sin_p12*u+this.cos_p12*d*Math.cos(f),C=Math.acos(G),T=C?C/Math.sin(C):1,t.x=this.x0+this.a*T*d*Math.sin(f),t.y=this.y0+this.a*T*(this.cos_p12*u-this.sin_p12*d*Math.cos(f)),t):(p=_s(this.es),g=ms(this.es),M=gs(this.es),B=ys(this.es),Math.abs(this.sin_p12-1)<=dt?(E=this.a*Te(p,g,M,B,ut),x=this.a*Te(p,g,M,B,r),t.x=this.x0+(E-x)*Math.sin(f),t.y=this.y0-(E-x)*Math.cos(f),t):Math.abs(this.sin_p12+1)<=dt?(E=this.a*Te(p,g,M,B,ut),x=this.a*Te(p,g,M,B,r),t.x=this.x0+(E+x)*Math.sin(f),t.y=this.y0+(E+x)*Math.cos(f),t):Math.abs(n)<dt&&Math.abs(r-this.lat0)<dt?(t.x=t.y=0,t):(j=y0(this.lat0,this.long0,r,n,this.a,this.f),W=j.azi1,t.x=j.s12*Math.sin(W),t.y=j.s12*Math.cos(W),t))}function x0(t){t.x-=this.x0,t.y-=this.y0;var n,r,u,d,f,p,g,M,B,E,x,C,T,G,j,W;return this.sphere?(n=Math.sqrt(t.x*t.x+t.y*t.y),n>2*ut*this.a?void 0:(r=n/this.a,u=Math.sin(r),d=Math.cos(r),f=this.long0,Math.abs(n)<=dt?p=this.lat0:(p=Fi(d*this.sin_p12+t.y*u*this.cos_p12/n),g=Math.abs(this.lat0)-ut,Math.abs(g)<=dt?this.lat0>=0?f=_t(this.long0+Math.atan2(t.x,-t.y)):f=_t(this.long0-Math.atan2(-t.x,t.y)):f=_t(this.long0+Math.atan2(t.x*u,n*this.cos_p12*d-t.y*this.sin_p12*u))),t.x=f,t.y=p,t)):(M=_s(this.es),B=ms(this.es),E=gs(this.es),x=ys(this.es),Math.abs(this.sin_p12-1)<=dt?(C=this.a*Te(M,B,E,x,ut),n=Math.sqrt(t.x*t.x+t.y*t.y),T=C-n,p=xa(T/this.a,M,B,E,x),f=_t(this.long0+Math.atan2(t.x,-1*t.y)),t.x=f,t.y=p,t):Math.abs(this.sin_p12+1)<=dt?(C=this.a*Te(M,B,E,x,ut),n=Math.sqrt(t.x*t.x+t.y*t.y),T=n-C,p=xa(T/this.a,M,B,E,x),f=_t(this.long0+Math.atan2(t.x,t.y)),t.x=f,t.y=p,t):(G=Math.atan2(t.x,t.y),j=Math.sqrt(t.x*t.x+t.y*t.y),W=A0(this.lat0,this.long0,G,j,this.a,this.f),t.x=W.lon2,t.y=W.lat2,t))}var L0=["Azimuthal_Equidistant","aeqd"];const b0={init:v0,forward:M0,inverse:x0,names:L0};function w0(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function C0(t){var n,r,u,d,f,p,g,M,B=t.x,E=t.y;return u=_t(B-this.long0),n=Math.sin(E),r=Math.cos(E),d=Math.cos(u),p=this.sin_p14*n+this.cos_p14*r*d,f=1,(p>0||Math.abs(p)<=dt)&&(g=this.a*f*r*Math.sin(u),M=this.y0+this.a*f*(this.cos_p14*n-this.sin_p14*r*d)),t.x=g,t.y=M,t}function E0(t){var n,r,u,d,f,p,g;return t.x-=this.x0,t.y-=this.y0,n=Math.sqrt(t.x*t.x+t.y*t.y),r=Fi(n/this.a),u=Math.sin(r),d=Math.cos(r),p=this.long0,Math.abs(n)<=dt?(g=this.lat0,t.x=p,t.y=g,t):(g=Fi(d*this.sin_p14+t.y*u*this.cos_p14/n),f=Math.abs(this.lat0)-ut,Math.abs(f)<=dt?(this.lat0>=0?p=_t(this.long0+Math.atan2(t.x,-t.y)):p=_t(this.long0-Math.atan2(-t.x,t.y)),t.x=p,t.y=g,t):(p=_t(this.long0+Math.atan2(t.x*u,n*this.cos_p14*d-t.y*this.sin_p14*u)),t.x=p,t.y=g,t))}var P0=["ortho"];const k0={init:w0,forward:C0,inverse:E0,names:P0};var ie={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},qt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function S0(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ut-Zt/2?this.face=ie.TOP:this.lat0<=-(ut-Zt/2)?this.face=ie.BOTTOM:Math.abs(this.long0)<=Zt?this.face=ie.FRONT:Math.abs(this.long0)<=ut+Zt?this.face=this.long0>0?ie.RIGHT:ie.LEFT:this.face=ie.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function B0(t){var n={x:0,y:0},r,u,d,f,p,g,M={value:0};if(t.x-=this.long0,this.es!==0?r=Math.atan(this.one_minus_f_squared*Math.tan(t.y)):r=t.y,u=t.x,this.face===ie.TOP)f=ut-r,u>=Zt&&u<=ut+Zt?(M.value=qt.AREA_0,d=u-ut):u>ut+Zt||u<=-(ut+Zt)?(M.value=qt.AREA_1,d=u>0?u-he:u+he):u>-(ut+Zt)&&u<=-Zt?(M.value=qt.AREA_2,d=u+ut):(M.value=qt.AREA_3,d=u);else if(this.face===ie.BOTTOM)f=ut+r,u>=Zt&&u<=ut+Zt?(M.value=qt.AREA_0,d=-u+ut):u<Zt&&u>=-Zt?(M.value=qt.AREA_1,d=-u):u<-Zt&&u>=-(ut+Zt)?(M.value=qt.AREA_2,d=-u-ut):(M.value=qt.AREA_3,d=u>0?-u+he:-u-he);else{var B,E,x,C,T,G,j;this.face===ie.RIGHT?u=Pn(u,+ut):this.face===ie.BACK?u=Pn(u,+he):this.face===ie.LEFT&&(u=Pn(u,-ut)),C=Math.sin(r),T=Math.cos(r),G=Math.sin(u),j=Math.cos(u),B=T*j,E=T*G,x=C,this.face===ie.FRONT?(f=Math.acos(B),d=ba(f,x,E,M)):this.face===ie.RIGHT?(f=Math.acos(E),d=ba(f,x,-B,M)):this.face===ie.BACK?(f=Math.acos(-B),d=ba(f,x,-E,M)):this.face===ie.LEFT?(f=Math.acos(-E),d=ba(f,x,B,M)):(f=d=0,M.value=qt.AREA_0)}return g=Math.atan(12/he*(d+Math.acos(Math.sin(d)*Math.cos(Zt))-ut)),p=Math.sqrt((1-Math.cos(f))/(Math.cos(g)*Math.cos(g))/(1-Math.cos(Math.atan(1/Math.cos(d))))),M.value===qt.AREA_1?g+=ut:M.value===qt.AREA_2?g+=he:M.value===qt.AREA_3&&(g+=1.5*he),n.x=p*Math.cos(g),n.y=p*Math.sin(g),n.x=n.x*this.a+this.x0,n.y=n.y*this.a+this.y0,t.x=n.x,t.y=n.y,t}function T0(t){var n={lam:0,phi:0},r,u,d,f,p,g,M,B,E,x={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,u=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),r=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?x.value=qt.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(x.value=qt.AREA_1,r-=ut):t.x<0&&-t.x>=Math.abs(t.y)?(x.value=qt.AREA_2,r=r<0?r+he:r-he):(x.value=qt.AREA_3,r+=ut),E=he/12*Math.tan(r),p=Math.sin(E)/(Math.cos(E)-1/Math.sqrt(2)),g=Math.atan(p),d=Math.cos(r),f=Math.tan(u),M=1-d*d*f*f*(1-Math.cos(Math.atan(1/Math.cos(g)))),M<-1?M=-1:M>1&&(M=1),this.face===ie.TOP)B=Math.acos(M),n.phi=ut-B,x.value===qt.AREA_0?n.lam=g+ut:x.value===qt.AREA_1?n.lam=g<0?g+he:g-he:x.value===qt.AREA_2?n.lam=g-ut:n.lam=g;else if(this.face===ie.BOTTOM)B=Math.acos(M),n.phi=B-ut,x.value===qt.AREA_0?n.lam=-g+ut:x.value===qt.AREA_1?n.lam=-g:x.value===qt.AREA_2?n.lam=-g-ut:n.lam=g<0?-g-he:-g+he;else{var C,T,G;C=M,E=C*C,E>=1?G=0:G=Math.sqrt(1-E)*Math.sin(g),E+=G*G,E>=1?T=0:T=Math.sqrt(1-E),x.value===qt.AREA_1?(E=T,T=-G,G=E):x.value===qt.AREA_2?(T=-T,G=-G):x.value===qt.AREA_3&&(E=T,T=G,G=-E),this.face===ie.RIGHT?(E=C,C=-T,T=E):this.face===ie.BACK?(C=-C,T=-T):this.face===ie.LEFT&&(E=C,C=T,T=-E),n.phi=Math.acos(-G)-ut,n.lam=Math.atan2(T,C),this.face===ie.RIGHT?n.lam=Pn(n.lam,-ut):this.face===ie.BACK?n.lam=Pn(n.lam,-he):this.face===ie.LEFT&&(n.lam=Pn(n.lam,+ut))}if(this.es!==0){var j,W,at;j=n.phi<0?1:0,W=Math.tan(n.phi),at=this.b/Math.sqrt(W*W+this.one_minus_f_squared),n.phi=Math.atan(Math.sqrt(this.a*this.a-at*at)/(this.one_minus_f*at)),j&&(n.phi=-n.phi)}return n.lam+=this.long0,t.x=n.lam,t.y=n.phi,t}function ba(t,n,r,u){var d;return t<dt?(u.value=qt.AREA_0,d=0):(d=Math.atan2(n,r),Math.abs(d)<=Zt?u.value=qt.AREA_0:d>Zt&&d<=ut+Zt?(u.value=qt.AREA_1,d-=ut):d>ut+Zt||d<=-(ut+Zt)?(u.value=qt.AREA_2,d=d>=0?d-he:d+he):(u.value=qt.AREA_3,d+=ut)),d}function Pn(t,n){var r=t+n;return r<-he?r+=ls:r>+he&&(r-=ls),r}var D0=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const O0={init:S0,forward:B0,inverse:T0,names:D0};var Jr=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],As=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Wh=.8487,Xh=1.3523,Yh=ui/5,I0=1/Yh,kn=18,wa=function(t,n){return t[0]+n*(t[1]+n*(t[2]+n*t[3]))},R0=function(t,n){return t[1]+n*(2*t[2]+n*3*t[3])};function F0(t,n,r,u){for(var d=n;u;--u){var f=t(d);if(d-=f,Math.abs(f)<r)break}return d}function G0(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function z0(t){var n=_t(t.x-this.long0),r=Math.abs(t.y),u=Math.floor(r*Yh);u<0?u=0:u>=kn&&(u=kn-1),r=ui*(r-I0*u);var d={x:wa(Jr[u],r)*n,y:wa(As[u],r)};return t.y<0&&(d.y=-d.y),d.x=d.x*this.a*Wh+this.x0,d.y=d.y*this.a*Xh+this.y0,d}function N0(t){var n={x:(t.x-this.x0)/(this.a*Wh),y:Math.abs(t.y-this.y0)/(this.a*Xh)};if(n.y>=1)n.x/=Jr[kn][0],n.y=t.y<0?-ut:ut;else{var r=Math.floor(n.y*kn);for(r<0?r=0:r>=kn&&(r=kn-1);;)if(As[r][0]>n.y)--r;else if(As[r+1][0]<=n.y)++r;else break;var u=As[r],d=5*(n.y-u[0])/(As[r+1][0]-u[0]);d=F0(function(f){return(wa(u,f)-n.y)/R0(u,f)},d,dt,100),n.x/=wa(Jr[r],d),n.y=(5*r+d)*ye,t.y<0&&(n.y=-n.y)}return n.x=_t(n.x+this.long0),n}var U0=["Robinson","robin"];const j0={init:G0,forward:z0,inverse:N0,names:U0};function Z0(){this.name="geocent"}function q0(t){var n=Eh(t,this.es,this.a);return n}function H0(t){var n=Ph(t,this.es,this.a,this.b);return n}var V0=["Geocentric","geocentric","geocent","Geocent"];const $0={init:Z0,forward:q0,inverse:H0,names:V0};var Le={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},vs={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function K0(){if(Object.keys(vs).forEach((function(r){if(typeof this[r]>"u")this[r]=vs[r].def;else{if(vs[r].num&&isNaN(this[r]))throw new Error("Invalid parameter value, must be numeric "+r+" = "+this[r]);vs[r].num&&(this[r]=parseFloat(this[r]))}vs[r].degrees&&(this[r]=this[r]*ye)}).bind(this)),Math.abs(Math.abs(this.lat0)-ut)<dt?this.mode=this.lat0<0?Le.S_POLE:Le.N_POLE:Math.abs(this.lat0)<dt?this.mode=Le.EQUIT:(this.mode=Le.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,n=this.azi;this.cg=Math.cos(n),this.sg=Math.sin(n),this.cw=Math.cos(t),this.sw=Math.sin(t)}function W0(t){t.x-=this.long0;var n=Math.sin(t.y),r=Math.cos(t.y),u=Math.cos(t.x),d,f;switch(this.mode){case Le.OBLIQ:f=this.sinph0*n+this.cosph0*r*u;break;case Le.EQUIT:f=r*u;break;case Le.S_POLE:f=-n;break;case Le.N_POLE:f=n;break}switch(f=this.pn1/(this.p-f),d=f*r*Math.sin(t.x),this.mode){case Le.OBLIQ:f*=this.cosph0*n-this.sinph0*r*u;break;case Le.EQUIT:f*=n;break;case Le.N_POLE:f*=-(r*u);break;case Le.S_POLE:f*=r*u;break}var p,g;return p=f*this.cg+d*this.sg,g=1/(p*this.sw*this.h1+this.cw),d=(d*this.cg-f*this.sg)*this.cw*g,f=p*g,t.x=d*this.a,t.y=f*this.a,t}function X0(t){t.x/=this.a,t.y/=this.a;var n={x:t.x,y:t.y},r,u,d;d=1/(this.pn1-t.y*this.sw),r=this.pn1*t.x*d,u=this.pn1*t.y*this.cw*d,t.x=r*this.cg+u*this.sg,t.y=u*this.cg-r*this.sg;var f=ze(t.x,t.y);if(Math.abs(f)<dt)n.x=0,n.y=t.y;else{var p,g;switch(g=1-f*f*this.pfact,g=(this.p-Math.sqrt(g))/(this.pn1/f+f/this.pn1),p=Math.sqrt(1-g*g),this.mode){case Le.OBLIQ:n.y=Math.asin(p*this.sinph0+t.y*g*this.cosph0/f),t.y=(p-this.sinph0*Math.sin(n.y))*f,t.x*=g*this.cosph0;break;case Le.EQUIT:n.y=Math.asin(t.y*g/f),t.y=p*f,t.x*=g;break;case Le.N_POLE:n.y=Math.asin(p),t.y=-t.y;break;case Le.S_POLE:n.y=-Math.asin(p);break}n.x=Math.atan2(t.x,t.y)}return t.x=n.x+this.long0,t.y=n.y,t}var Y0=["Tilted_Perspective","tpers"];const J0={init:K0,forward:W0,inverse:X0,names:Y0};function Q0(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var t=1-this.es,n=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=n,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function tf(t){var n=t.x,r=t.y,u,d,f,p;if(n=n-this.long0,this.shape==="ellipse"){r=Math.atan(this.radius_p2*Math.tan(r));var g=this.radius_p/ze(this.radius_p*Math.cos(r),Math.sin(r));if(d=g*Math.cos(n)*Math.cos(r),f=g*Math.sin(n)*Math.cos(r),p=g*Math.sin(r),(this.radius_g-d)*d-f*f-p*p*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;u=this.radius_g-d,this.flip_axis?(t.x=this.radius_g_1*Math.atan(f/ze(p,u)),t.y=this.radius_g_1*Math.atan(p/u)):(t.x=this.radius_g_1*Math.atan(f/u),t.y=this.radius_g_1*Math.atan(p/ze(f,u)))}else this.shape==="sphere"&&(u=Math.cos(r),d=Math.cos(n)*u,f=Math.sin(n)*u,p=Math.sin(r),u=this.radius_g-d,this.flip_axis?(t.x=this.radius_g_1*Math.atan(f/ze(p,u)),t.y=this.radius_g_1*Math.atan(p/u)):(t.x=this.radius_g_1*Math.atan(f/u),t.y=this.radius_g_1*Math.atan(p/ze(f,u))));return t.x=t.x*this.a,t.y=t.y*this.a,t}function ef(t){var n=-1,r=0,u=0,d,f,p,g;if(t.x=t.x/this.a,t.y=t.y/this.a,this.shape==="ellipse"){this.flip_axis?(u=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*ze(1,u)):(r=Math.tan(t.x/this.radius_g_1),u=Math.tan(t.y/this.radius_g_1)*ze(1,r));var M=u/this.radius_p;if(d=r*r+M*M+n*n,f=2*this.radius_g*n,p=f*f-4*d*this.C,p<0)return t.x=Number.NaN,t.y=Number.NaN,t;g=(-f-Math.sqrt(p))/(2*d),n=this.radius_g+g*n,r*=g,u*=g,t.x=Math.atan2(r,n),t.y=Math.atan(u*Math.cos(t.x)/n),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if(this.shape==="sphere"){if(this.flip_axis?(u=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+u*u)):(r=Math.tan(t.x/this.radius_g_1),u=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+r*r)),d=r*r+u*u+n*n,f=2*this.radius_g*n,p=f*f-4*d*this.C,p<0)return t.x=Number.NaN,t.y=Number.NaN,t;g=(-f-Math.sqrt(p))/(2*d),n=this.radius_g+g*n,r*=g,u*=g,t.x=Math.atan2(r,n),t.y=Math.atan(u*Math.cos(t.x)/n)}return t.x=t.x+this.long0,t}var nf=["Geostationary Satellite View","Geostationary_Satellite","geos"];const sf={init:Q0,forward:tf,inverse:ef,names:nf};var Ms=1.340264,xs=-.081106,Ls=893e-6,bs=.003796,Ca=Math.sqrt(3)/2;function af(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function rf(t){var n=_t(t.x-this.long0),r=t.y,u=Math.asin(Ca*Math.sin(r)),d=u*u,f=d*d*d;return t.x=n*Math.cos(u)/(Ca*(Ms+3*xs*d+f*(7*Ls+9*bs*d))),t.y=u*(Ms+xs*d+f*(Ls+bs*d)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function of(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var n=1e-9,r=12,u=t.y,d,f,p,g,M,B;for(B=0;B<r&&(d=u*u,f=d*d*d,p=u*(Ms+xs*d+f*(Ls+bs*d))-t.y,g=Ms+3*xs*d+f*(7*Ls+9*bs*d),u-=M=p/g,!(Math.abs(M)<n));++B);return d=u*u,f=d*d*d,t.x=Ca*t.x*(Ms+3*xs*d+f*(7*Ls+9*bs*d))/Math.cos(u),t.y=Math.asin(Math.sin(u)/Ca),t.x=_t(t.x+this.long0),t}var hf=["eqearth","Equal Earth","Equal_Earth"];const lf={init:af,forward:rf,inverse:of,names:hf};var ws=1e-10;function uf(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<ws)throw new Error;this.es?(this.en=jr(this.es),this.m1=Cn(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=df,this.forward=cf):(Math.abs(this.phi1)+ws>=ut?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=pf,this.forward=ff)}function cf(t){var n=_t(t.x-(this.long0||0)),r=t.y,u,d,f;return u=this.am1+this.m1-Cn(r,d=Math.sin(r),f=Math.cos(r),this.en),d=f*n/(u*Math.sqrt(1-this.es*d*d)),t.x=u*Math.sin(d),t.y=this.am1-u*Math.cos(d),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function df(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n,r,u,d;if(r=ze(t.x,t.y=this.am1-t.y),d=Zr(this.am1+this.m1-r,this.es,this.en),(n=Math.abs(d))<ut)n=Math.sin(d),u=r*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*n*n)/Math.cos(d);else if(Math.abs(n-ut)<=ws)u=0;else throw new Error;return t.x=_t(u+(this.long0||0)),t.y=Ii(d),t}function ff(t){var n=_t(t.x-(this.long0||0)),r=t.y,u,d;return d=this.cphi1+this.phi1-r,Math.abs(d)>ws?(t.x=d*Math.sin(u=n*Math.cos(r)/d),t.y=this.cphi1-d*Math.cos(u)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function pf(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n,r,u=ze(t.x,t.y=this.cphi1-t.y);if(r=this.cphi1+this.phi1-u,Math.abs(r)>ut)throw new Error;return Math.abs(Math.abs(r)-ut)<=ws?n=0:n=u*Math.atan2(t.x,t.y)/Math.cos(r),t.x=_t(n+(this.long0||0)),t.y=Ii(r),t}var _f=["bonne","Bonne (Werner lat_1=90)"];const mf={init:uf,names:_f};function gf(t){t.Proj.projections.add(va),t.Proj.projections.add(Ma),t.Proj.projections.add(pc),t.Proj.projections.add(Lc),t.Proj.projections.add(Pc),t.Proj.projections.add(Dc),t.Proj.projections.add(zc),t.Proj.projections.add(qc),t.Proj.projections.add(Wc),t.Proj.projections.add(td),t.Proj.projections.add(fd),t.Proj.projections.add(Ad),t.Proj.projections.add(bd),t.Proj.projections.add(Sd),t.Proj.projections.add(Id),t.Proj.projections.add(Nd),t.Proj.projections.add(Hd),t.Proj.projections.add(Xd),t.Proj.projections.add(i0),t.Proj.projections.add(o0),t.Proj.projections.add(d0),t.Proj.projections.add(g0),t.Proj.projections.add(b0),t.Proj.projections.add(k0),t.Proj.projections.add(O0),t.Proj.projections.add(j0),t.Proj.projections.add($0),t.Proj.projections.add(J0),t.Proj.projections.add(sf),t.Proj.projections.add(lf),t.Proj.projections.add(mf)}const Jh=Object.assign(Bu,{defaultDatum:"WGS84",Proj:ni,WGS84:new ni("WGS84"),Point:wn,toPoint:Th,defs:Be,nadgrid:fu,transform:ya,mgrs:Tu,version:"__VERSION__"});gf(Jh);const yf=Al(Object.freeze(Object.defineProperty({__proto__:null,default:Jh},Symbol.toStringTag,{value:"Module"})));(function(t){(function(n){var r,u;r=oh(),u=yf,t.exports=n(r,u)})(function(n,r){return r.__esModule&&r.default&&(r=r.default),n.Proj={},n.Proj._isProj4Obj=function(u){return typeof u.inverse<"u"&&typeof u.forward<"u"},n.Proj.Projection=n.Class.extend({initialize:function(u,d,f){var p=n.Proj._isProj4Obj(u);this._proj=p?u:this._projFromCodeDef(u,d),this.bounds=p?d:f},project:function(u){var d=this._proj.forward([u.lng,u.lat]);return new n.Point(d[0],d[1])},unproject:function(u,d){var f=this._proj.inverse([u.x,u.y]);return new n.LatLng(f[1],f[0],d)},_projFromCodeDef:function(u,d){if(d)r.defs(u,d);else if(r.defs[u]===void 0){var f=u.split(":");if(f.length>3&&(u=f[f.length-3]+":"+f[f.length-1]),r.defs[u]===void 0)throw"No projection definition for code "+u}return r(u)}}),n.Proj.CRS=n.Class.extend({includes:n.CRS,options:{transformation:new n.Transformation(1,0,-1,0)},initialize:function(u,d,f){var p,g,M,B;if(n.Proj._isProj4Obj(u)?(g=u,p=g.srsCode,B=d||{},this.projection=new n.Proj.Projection(g,B.bounds)):(p=u,M=d,B=f||{},this.projection=new n.Proj.Projection(p,M,B.bounds)),n.Util.setOptions(this,B),this.code=p,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new n.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var E=this.options.resolutions.length-1;E>=0;E--)this.options.resolutions[E]&&(this._scales[E]=1/this.options.resolutions[E])}this.infinite=!this.options.bounds},scale:function(u){var d=Math.floor(u),f,p,g,M;return u===d?this._scales[u]:(f=this._scales[d],p=this._scales[d+1],g=p-f,M=u-d,f+g*M)},zoom:function(u){var d=this._closestElement(this._scales,u),f=this._scales.indexOf(d),p,g,M;return u===d?f:d===void 0?-1/0:(g=f+1,p=this._scales[g],p===void 0?1/0:(M=p-d,(u-d)/M+f))},distance:n.CRS.Earth.distance,R:n.CRS.Earth.R,_closestElement:function(u,d){for(var f,p=u.length;p--;)u[p]<=d&&(f===void 0||f<u[p])&&(f=u[p]);return f}}),n.Proj.GeoJSON=n.GeoJSON.extend({initialize:function(u,d){this._callLevel=0,n.GeoJSON.prototype.initialize.call(this,u,d)},addData:function(u){var d;u&&(u.crs&&u.crs.type==="name"?d=new n.Proj.CRS(u.crs.properties.name):u.crs&&u.crs.type&&(d=new n.Proj.CRS(u.crs.type+":"+u.crs.properties.code)),d!==void 0&&(this.options.coordsToLatLng=function(f){var p=n.point(f[0],f[1]);return d.projection.unproject(p)})),this._callLevel++;try{n.GeoJSON.prototype.addData.call(this,u)}finally{this._callLevel--,this._callLevel===0&&delete this.options.coordsToLatLng}}}),n.Proj.geoJson=function(u,d){return new n.Proj.GeoJSON(u,d)},n.Proj.ImageOverlay=n.ImageOverlay.extend({initialize:function(u,d,f){n.ImageOverlay.prototype.initialize.call(this,u,null,f),this._projectedBounds=d},_animateZoom:function(u){var d=this._map.getZoomScale(u.zoom),f=n.point(this._projectedBounds.min.x,this._projectedBounds.max.y),p=this._projectedToNewLayerPoint(f,u.zoom,u.center);n.DomUtil.setTransform(this._image,p,d)},_reset:function(){var u=this._map.getZoom(),d=this._map.getPixelOrigin(),f=n.bounds(this._transform(this._projectedBounds.min,u)._subtract(d),this._transform(this._projectedBounds.max,u)._subtract(d)),p=f.getSize();n.DomUtil.setPosition(this._image,f.min),this._image.style.width=p.x+"px",this._image.style.height=p.y+"px"},_projectedToNewLayerPoint:function(u,d,f){var p=this._map.getSize()._divideBy(2),g=this._map.project(f,d)._subtract(p)._round(),M=g.add(this._map._getMapPanePos());return this._transform(u,d)._subtract(M)},_transform:function(u,d){var f=this._map.options.crs,p=f.transformation,g=f.scale(d);return p.transform(u,g)}}),n.Proj.imageOverlay=function(u,d,f){return new n.Proj.ImageOverlay(u,d,f)},n.Proj})})(xl);const Qr=new U.Proj.CRS("EPSG:900913","+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",{resolutions:function(){var t=[];t[0]=Math.pow(2,18);for(var n=1;n<21;n++)t[n]=Math.pow(2,18-n);return t}(),origin:[0,0],bounds:U.bounds([20037508342789244e-9,0],[0,20037508342789244e-9])}),Qh=U.Marker.extend({options:{fontSize:"12px",color:"#f00",fontShadowColor:"none",fontWeight:"normal",background:"rgba(0, 0, 0, 0)",minZoom:void 0,maxZoom:void 0,clsName:"leaflet-text",offset:[6,6]},initialize(t,n,r={}){this._latlng=t,this._enabled=!1,this.options.id=r.id||"text_"+$t.Util.guid(),this.options.text=n||"",r=Object.assign(this.options,r),U.setOptions(this,r);const{id:u,fontSize:d,color:f,fontWeight:p,background:g,fontShadowColor:M,clsName:B,offset:E}=this.options;this.options.icon=new U.DivIcon({html:`<span id=${u} class="leaflet-text-label" style="font-weight:${p};font-size:${d};color:${f};background:${g};text-shadow:${M} 1px 0px 2px">${n||""}</span>`,className:B,iconAnchor:E}),U.Marker.prototype.initialize.call(this,t,this.options)},setStyle(t){const n=document.getElementById(this.options.id),{text:r,color:u,fontSize:d,fontShadowColor:f,fontWeight:p}=t,g=t.background||"none";return n&&(u&&(this.options.color=u,n.style.color=u),p&&(this.options.fontWeight=p,n.style.fontWeight=p),d&&(this.options.fontSize=d,n.style.fontSize=d),this.options.background=g,n.style.background=g,r&&(this.options.text=r,n.textContent=r),f?(this.options.fontShadowColor=f,n.style["text-shadow"]=f+" 1px 0px 2px"):(this.options.fontShadowColor="none",n.style["text-shadow"]="none")),this},enableEdit(t){const{fontSize:n,color:r,text:u}=this.options;if(!this._enabled){this._enabled=!0;const d=new U.DivIcon({html:`<input type="text" id="text-input-icon" style="font-size:${n};color:${r};" value=${u}></input>`,className:"leaflet-text"});return this.setIcon(d),document.getElementById("text-input-icon").onblur=f=>{this.options.text=f.target.value,setTimeout(()=>{this.disableEdit(),t&&t(this)},100)},document.getElementById("text-input-icon").onkeydown=function(f){f.keyCode===13&&(this.options.text=f.target.value,this.blur(f))},this}},disableEdit(t){if(this._enabled){this._enabled=!1;const{id:n,color:r,fontSize:u,fontWeight:d,fontShadowColor:f}=this.options,p=new U.DivIcon({html:`<span id=${n} style="padding:2px 4px;white-space:nowrap;font-weight:${d};font-size:${u};color:${r};text-shadow:${f} 1px 2px 3px">${this.options.text}</span>`,className:"leaflet-text"});return this.setIcon(p),t&&t(this),this}}}),tl=U.Marker.extend({options:{color:"#f00",diveColor:"#f00",iconSize:[14,14],level:0,speedTime:2,animation:!0},initialize(t,n){U.setOptions(this,n);const{clsPrefix:r}=this.options;this.tempDivEle=document.createElement("div"),this.spanEl=$t.DomUtil.create("span",`${r}-pulse-icon`),this.aEl=$t.DomUtil.create("a",`${r}-dive-icon`),this.tempDivEle.append(this.spanEl),this.spanEl.append(this.aEl),this._init(),U.Marker.prototype.initialize.call(this,t,this.options)},_init(){const{color:t,iconSize:n,diveColor:r,level:u,speedTime:d,animation:f,clsPrefix:p}=this.options;t&&(this.spanEl.style.backgroundColor=t,r||(this.aEl.style.boxShadow="0 0 6px 2px "+t)),n&&(this.spanEl.style.width=n[0]+"px",this.spanEl.style.height=n[1]+"px"),f&&d?(this.aEl.style.setProperty("animation","pulsate "+d+"s infinite"),u?r?this.aEl.style.boxShadow="0 0 "+u*3+"px "+u+"px "+r:t&&(this.aEl.style.boxShadow="0 0 "+u*3+"px "+u+"px "+t):r&&(u?this.aEl.style.boxShadow="0 0 "+u*3+"px "+u+"px "+r:this.aEl.style.boxShadow="0 0 6px 2px "+r)):(this.aEl.style.removeProperty("animation"),this.aEl.style.removeProperty("box-shadow"));const g=L.divIcon({iconSize:n,iconAnchor:n.map(M=>M/2),className:`${p}-blink-marker`,html:this.tempDivEle.innerHTML});this.options.icon?this.setIcon(g):this.options.icon=g},setOptions(t){U.setOptions(this,t),this._init()},start(t){U.setOptions(this,t),this.options.animation=!0,this._init()},stop(t){U.setOptions(this,t),this.options.animation=!1,this._init()}}),el=U.Layer.extend({initialize:function(t){L.setOptions(this,t),this._onClickListeners=[],this._onHoverListeners=[]},setOptions:function(t){return L.setOptions(this,t),this.redraw()},redraw:function(){this._redraw(!0)},addMarkers:function(t){var n=this,r=[],u=[];t.forEach(function(d){if(!(d.options.pane=="markerPane"&&d.options.icon)){console.error("Layer isn't a marker");return}var f=d.getLatLng(),p=n._map.getBounds().contains(f),g=n._addMarker(d,f,p);p===!0&&r.push(g[0]),u.push(g[1])}),n._markers.load(r),n._latlngMarkers.load(u)},addMarker:function(t){var n=this,r=t.getLatLng(),u=n._map.getBounds().contains(r),d=n._addMarker(t,r,u);u===!0&&n._markers.insert(d[0]),n._latlngMarkers.insert(d[1])},addLayer:function(t){t.options.pane=="markerPane"&&t.options.icon?this.addMarker(t):console.error("Layer isn't a marker")},addLayers:function(t){this.addMarkers(t)},removeLayer:function(t){this.removeMarker(t,!0)},removeMarker:function(t,n){var r=this;t.minX&&(t=t.data);var u=t.getLatLng(),d=r._map.getBounds().contains(u),f={minX:u.lng,minY:u.lat,maxX:u.lng,maxY:u.lat,data:t};r._latlngMarkers.remove(f,function(p,g){return p.data._leaflet_id===g.data._leaflet_id}),r._latlngMarkers.total--,r._latlngMarkers.dirty++,d===!0&&n===!0&&r._redraw(!0)},onAdd:function(t){this._map=t,this._canvas||this._initCanvas(),this.options.pane?this.getPane().appendChild(this._canvas):t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.on("resize",this._reset,this),t.on("click",this._executeListeners,this),t.on("mousemove",this._executeListeners,this)},onRemove:function(t){this.options.pane?this.getPane().removeChild(this._canvas):t.getPanes().overlayPane.removeChild(this._canvas),t.off("click",this._executeListeners,this),t.off("mousemove",this._executeListeners,this),t.off("moveend",this._reset,this),t.off("resize",this._reset,this)},addTo:function(t){return t.addLayer(this),this},clearLayers:function(){this._latlngMarkers=null,this._markers=null,this._redraw(!0)},_addMarker:function(t,n,r){var u=this;t._map=u._map,u._markers||(u._markers=new rbush),u._latlngMarkers||(u._latlngMarkers=new rbush,u._latlngMarkers.dirty=0,u._latlngMarkers.total=0),L.Util.stamp(t);var d=u._map.latLngToContainerPoint(n),f=t.options.icon.options.iconSize,p=f[0]/2,g=f[1]/2,M=[{minX:d.x-p,minY:d.y-g,maxX:d.x+p,maxY:d.y+g,data:t},{minX:n.lng,minY:n.lat,maxX:n.lng,maxY:n.lat,data:t}];return u._latlngMarkers.dirty++,u._latlngMarkers.total++,r===!0&&u._drawMarker(t,d),M},_drawMarker:function(t,n){var r=this;this._imageLookup||(this._imageLookup={}),n||(n=r._map.latLngToContainerPoint(t.getLatLng()));var u=t.options.icon.options.iconUrl;if(t.canvas_img)r._drawImage(t,n);else if(r._imageLookup[u])t.canvas_img=r._imageLookup[u][0],r._imageLookup[u][1]===!1?r._imageLookup[u][2].push([t,n]):r._drawImage(t,n);else{var d=new Image;d.src=u,t.canvas_img=d,r._imageLookup[u]=[d,!1,[[t,n]]],d.onload=function(){r._imageLookup[u][1]=!0,r._imageLookup[u][2].forEach(function(f){r._drawImage(f[0],f[1])})}}},_drawImage:function(t,n){var r=t.options.icon.options;this._context.drawImage(t.canvas_img,n.x-r.iconAnchor[0],n.y-r.iconAnchor[1],r.iconSize[0],r.iconSize[1])},_reset:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t);var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y,this._redraw()},_redraw:function(t){var n=this;if(t&&this._context.clearRect(0,0,this._canvas.width,this._canvas.height),!(!this._map||!this._latlngMarkers)){var r=[];n._latlngMarkers.dirty/n._latlngMarkers.total>=.1&&(n._latlngMarkers.all().forEach(function(f){r.push(f)}),n._latlngMarkers.clear(),n._latlngMarkers.load(r),n._latlngMarkers.dirty=0,r=[]);var u=n._map.getBounds(),d={minX:u.getWest(),minY:u.getSouth(),maxX:u.getEast(),maxY:u.getNorth()};n._latlngMarkers.search(d).forEach(function(f){var p=n._map.latLngToContainerPoint(f.data.getLatLng()),g=f.data.options.icon.options.iconSize,M=g[0]/2,B=g[1]/2,E={minX:p.x-M,minY:p.y-B,maxX:p.x+M,maxY:p.y+B,data:f.data};r.push(E),n._drawMarker(f.data,p)}),this._markers.clear(),this._markers.load(r)}},_initCanvas:function(){this._canvas=L.DomUtil.create("canvas","leaflet-canvas-icon-layer leaflet-layer");var t=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this._canvas.style[t]="50% 50%";var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y,this._context=this._canvas.getContext("2d");var r=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(r?"animated":"hide"))},addOnClickListener:function(t){this._onClickListeners.push(t)},addOnHoverListener:function(t){this._onHoverListeners.push(t)},_executeListeners:function(t){if(this._markers){var n=this,r=t.containerPoint.x,u=t.containerPoint.y;n._openToolTip&&(n._openToolTip.closeTooltip(),delete n._openToolTip);var d=this._markers.search({minX:r,minY:u,maxX:r,maxY:u});if(d&&d.length>0){if(n._map._container.style.cursor="pointer",t.type==="click"){var f=d[0].data.getPopup();f&&d[0].data.openPopup(),n._onClickListeners.forEach(function(g){g(t,d)})}if(t.type==="mousemove"){var p=d[0].data.getTooltip();p&&(n._openToolTip=d[0].data,d[0].data.openTooltip()),n._onHoverListeners.forEach(function(g){g(t,d)})}}else n._map._container.style.cursor=""}}}),Af=U.FeatureGroup.extend({addLayer:function(t){this._originLayers.push(t),this._isInViewport(t)&&U.FeatureGroup.prototype.addLayer.call(this,t)},onAdd(t){this._map=t,this._originLayers=[],this._cleanupLayers(),t.on("moveend",this._update,this),U.FeatureGroup.prototype.onAdd.call(this,t)},onRemove:function(){map.off("moveend",this._update),this._originLayers=[],U.FeatureGroup.prototype.onRemove.call(this,map)},_update(){this.clearLayers();for(let t=0;t<this._originLayers.length;t++){const n=this._originLayers[t];this._isInViewport(n)&&U.FeatureGroup.prototype.addLayer.call(this,n)}},_isInViewport(t){var n=this._map.getBounds();return t instanceof U.Marker||t instanceof U.CircleMarker?n.contains(t.getLatLng()):t instanceof U.Circle||t instanceof U.Polyline?n.intersects(t.getBounds()):!1},_cleanupLayers:function(){this.eachLayer(function(t){!this._isInViewport(t)&&(!t._popup||!t._popup._container)&&this.removeLayer(t)},this)}}),vf=U.Layer.extend({provide:{TDT:"tdt",BAIDU:"bd",GAODE:"gd",YANDEX:"yandex"},source:{VECTOR:"vec",SATELITE:"img",ANNO:"cia",VEC_NO_ANNO:"vec_no_anno",SATELITE_NO_ANNO:"img_no_anno"},style:{NORMAL:"normal",GRAY:"gray",DARK:"dark",BROWN:"brown",BLUR:"blur"},options:{provide:"tdt",source:"img",style:"normal",accessToken:"016b31f15f25e1365e85aec7e7b0464e"},initialize(t){t=$t.Util.deleteEmptyProperty(t),U.Util.setOptions(this,t)},onAdd(t){this.map=t,this.replaceProjection(),this.tileLayers=this.getLayerGroup(),t.addLayer(this.tileLayers)},onRemove(t){t.removeLayer(this.tileLayers)},replaceProjection(){const t=this.map.getCenter(),n=this.map.getZoom();this.options.provide===this.provide.BAIDU?this.map.options.crs=Qr:this.options.provide===this.provide.YANDEX?this.map.options.crs=U.CRS.EPSG3395:this.map.options.crs=U.CRS.EPSG3857,this._resetMapStatus(t,n)},_resetMapStatus(t,n){this.map.setView(t),this.map._resetView(t,n,!0)},getLayerGroup(){let t={},n={};switch(this.options.style&&this.options.style.split(",").forEach(r=>{switch(r){case this.style.DARK:t.invert=1;break;case this.style.GRAY:t.grayscale=1;break;case this.style.BROWN:t.sepia=1;break;case this.style.BLUR:t.blur="1px";break}}),this.options.provide){case this.provide.TDT:n={subdomains:$t.ArrayUtil.create(8),maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.BAIDU:n={subdomains:$t.ArrayUtil.create(10),tms:!0,corrdType:"bd09",maxNativeZoom:19,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.GAODE:n={subdomains:$t.ArrayUtil.create(4).map(r=>r+1),corrdType:"gcj02",maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.YANDEX:n={maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break}if(this.options.opacity>=0&&(t.opacity=this.options.opacity),this.options.url)return new U.TileLayer(this.options.url,{...n,style:t});switch(this.options.provide){case this.provide.TDT:let r;switch(n.maxNativeZoom=18,this.options.source){case this.source.VECTOR:r=["vec_w","cva_w"];break;case this.source.SATELITE:r=["img_w","cia_w"];break;case this.source.ANNO:r=["cva_w"];break;case this.source.VEC_NO_ANNO:r=["vec_w"];break;case this.source.SATELITE_NO_ANNO:r=["img_w"];break}return new U.LayerGroup(r.map(u=>new U.TileLayer(`http://t{s}.tianditu.gov.cn/DataServer?T=${u}&x={x}&y={y}&l={z}&tk=${this.options.accessToken}`,{...n,style:t})));case this.provide.BAIDU:switch(this.options.source){case this.source.VECTOR:return n.maxNativeZoom=19,new U.TileLayer("http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1",{...n,style:t});case this.source.ANNO:return n.maxNativeZoom=19,new U.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...n,style:t});case this.source.SATELITE:return n.maxNativeZoom=17,new U.LayerGroup([new U.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...n,style:t}),new U.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...n,style:t})]);case this.source.SATELITE_NO_ANNO:return n.maxNativeZoom=19,new U.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...n,style:t})}break;case this.provide.GAODE:switch(this.options.source){case this.source.VECTOR:return n.maxNativeZoom=18,new U.TileLayer("http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:t});case this.source.ANNO:return n.maxNativeZoom=18,new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:t});case this.source.SATELITE:return n.maxNativeZoom=16,new U.LayerGroup([new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...n,style:t}),new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:t})]);case this.source.SATELITE_NO_ANNO:return n.maxNativeZoom=18,new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...n,style:t})}break;case this.provide.YANDEX:switch(this.options.source){case this.source.ANNO:return new U.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...n,style:t});case this.source.SATELITE:return new U.LayerGroup([new U.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...n,subdomains:["01","02","03","04"],style:t}),new U.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...n,style:t})]);case this.source.SATELITE_NO_ANNO:return new U.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...n,subdomains:["01","02","03","04"],style:t})}break}},setOptions(t){U.Util.setOptions(this,t);const n=this.getLayerGroup();this.map.removeLayer(this.tileLayers),setTimeout(()=>{this.replaceProjection(),this.tileLayers=n.addTo(this.map)},500)}}),Mf=U.ImageOverlay.extend({initialize(t,n={},r=new U.Marker,u=new U.Marker){typeof t=="string"?this._url=t:this._rawImage=t,this.topRightMarker=r,this.bottomLeftMarker=u,this.angle=0,U.setOptions(this,n),this._topLeft=new U.LatLng(n.corners[0]),this._topRight=new U.LatLng(n.corners[1]),this._bottomLeft=new U.LatLng(n.corners[3]),r.on("drag dragend",this.reposition,this),u.on("drag dragend",this.reposition,this)},onAdd(t){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(U.DomUtil.addClass(this._rawImage,"leaflet-interactive"),this.addInteractiveTarget(this._rawImage)),t.on("zoomend resetview",this._reset,this),this.getPane().appendChild(this._image),this._reset()},onRemove(t){t.off("zoomend resetview",this._reset,this),U.ImageOverlay.prototype.onRemove.call(this,t)},_initImage(){let t=this._rawImage;this._url&&(t=U.DomUtil.create("img"),t.style.display="none",this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,this._rawImage=t),U.DomUtil.addClass(t,"leaflet-image-layer");const n=this._image=U.DomUtil.create("div","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));this._updateZIndex&&this._updateZIndex(),n.appendChild(t),n.onselectstart=U.Util.falseFn,n.onmousemove=U.Util.falseFn,t.onload=(function(){this._reset(),t.style.display="block",this.options.w=this._rawImage.width,this.options.h=this._rawImage.height,this.boundsRectBottomLeft=new U.Point(0,0),this.boundsRectTopRight=new U.Point(this.options.w,this.options.h),this.diagonalVector=this.boundsRectTopRight.subtract(this.boundsRectBottomLeft),this.fire("load")}).bind(this),t.alt=this.options.alt},_reset(){const t=this._image,n=this._map.latLngToLayerPoint(this._topLeft),r=this._map.latLngToLayerPoint(this._topRight),u=this._map.latLngToLayerPoint(this._bottomLeft),d=r.subtract(n).add(u),f=new U.Bounds([n,r,u,d]),p=f.getSize(),g=n.subtract(f.min),M=r.subtract(n),B=u.subtract(n),E=Math.atan2(M.y,M.x),x=Math.atan2(B.x,B.y);this.angle=((Math.abs(E)+Math.abs(x))/2*180).toFixed(2),this._bounds=new U.LatLngBounds(this._map.layerPointToLatLng(f.min),this._map.layerPointToLatLng(f.max)),U.DomUtil.setPosition(t,f.min),t.pxBounds=f,t.style.width=p.x+"px",t.style.height=p.y+"px";const C=this._rawImage.width,T=this._rawImage.height;if(!C||!T)return;const G=n.distanceTo(r)/C*Math.cos(E),j=n.distanceTo(u)/T*Math.cos(x);this._rawImage.style.transformOrigin="0 0",this._rawImage.style.transform="translate("+g.x+"px, "+g.y+"px)skew("+x+"rad, "+E+"rad) scale("+G+", "+j+") "},_animateZoom(t){const n=this._map.getZoomScale(t.zoom),u=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;U.DomUtil.setTransform(this._image,u,n)},reposition(){const t=this.topRightMarker.getLatLng(),n=this.bottomLeftMarker.getLatLng(),r=this.options.w,u=this.options.h,d=this.getCornerLatLng(new U.Point(0,u),n,t),f=this.getCornerLatLng(new U.Point(r,u),n,t),p=this.getCornerLatLng(new U.Point(0,0),n,t),g=this.getCornerLatLng(new U.Point(r,0),n,t);this.options.corners=[d,f,g,p],this._topLeft=new U.LatLng(d),this._topRight=new U.LatLng(f),this._bottomLeft=new U.LatLng(p),this._reset()},getCornerLatLng(t,n,r){const u=this.boundsRectBottomLeft,d=this.diagonalVector,f=t.subtract(u),p=this.getClockWiseRotate90DegreePoint(d),g=this.getDotProduction(d,f)/this.getDotProduction(d,d),M=-this.getDotProduction(p,f)/this.getDotProduction(p,p),B=new U.Projection.SphericalMercator.project(n),E=new U.Projection.SphericalMercator.project(r),x=B.add(E.subtract(B).multiplyBy(g)),C=this.getClockWiseRotate90DegreePoint(B.subtract(E)).multiplyBy(M),T=x.add(C);return new U.Projection.SphericalMercator.unproject(T)},setUrl(t){return this._url=t,this._rawImage&&(this._rawImage.src=t),this},getDotProduction(t,n){return t.x*n.x+t.y*n.y},getClockWiseRotate90DegreePoint(t){return new U.Point([t.y,-t.x])}});var il={exports:{}};(function(t){(function(n,r,u){t.exports?t.exports=u():r[n]=u()})("h337",vn,function(){var n={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},r=function(){var B=function(C){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=C.xField||C.defaultXField,this._yField=C.yField||C.defaultYField,this._valueField=C.valueField||C.defaultValueField,C.radius&&(this._cfgRadius=C.radius)},E=n.defaultRadius;return B.prototype={_organiseData:function(x,C){var T=x[this._xField],G=x[this._yField],j=this._radi,W=this._data,at=this._max,rt=this._min,ct=x[this._valueField]||1,yt=x.radius||this._cfgRadius||E;W[T]||(W[T]=[],j[T]=[]),W[T][G]?W[T][G]+=ct:(W[T][G]=ct,j[T][G]=yt);var mt=W[T][G];return mt>at?(C?this.setDataMax(mt):this._max=mt,!1):mt<rt?(C?this.setDataMin(mt):this._min=mt,!1):{x:T,y:G,value:ct,radius:yt,min:rt,max:at}},_unOrganizeData:function(){var x=[],C=this._data,T=this._radi;for(var G in C)for(var j in C[G])x.push({x:G,y:j,radius:T[G][j],value:C[G][j]});return{min:this._min,max:this._max,data:x}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var x=arguments[0],C=x.length;C--;)this.addData.call(this,x[C]);else{var T=this._organiseData(arguments[0],!0);T&&(this._data.length===0&&(this._min=this._max=T.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[T]}))}return this},setData:function(x){var C=x.data,T=C.length;this._data=[],this._radi=[];for(var G=0;G<T;G++)this._organiseData(C[G],!1);return this._max=x.max,this._min=x.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(x){return this._max=x,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(x){return this._min=x,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(x){this._coordinator=x},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},B}(),u=function(){var B=function(T){var G=T.gradient||T.defaultGradient,j=document.createElement("canvas"),W=j.getContext("2d");j.width=256,j.height=1;var at=W.createLinearGradient(0,0,256,1);for(var rt in G)at.addColorStop(rt,G[rt]);return W.fillStyle=at,W.fillRect(0,0,256,1),W.getImageData(0,0,256,1).data},E=function(T,G){var j=document.createElement("canvas"),W=j.getContext("2d"),at=T,rt=T;if(j.width=j.height=T*2,G==1)W.beginPath(),W.arc(at,rt,T,0,2*Math.PI,!1),W.fillStyle="rgba(0,0,0,1)",W.fill();else{var ct=W.createRadialGradient(at,rt,T*G,at,rt,T);ct.addColorStop(0,"rgba(0,0,0,1)"),ct.addColorStop(1,"rgba(0,0,0,0)"),W.fillStyle=ct,W.fillRect(0,0,2*T,2*T)}return j},x=function(rt){for(var G=[],j=rt.min,W=rt.max,at=rt.radi,rt=rt.data,ct=Object.keys(rt),yt=ct.length;yt--;)for(var mt=ct[yt],xt=Object.keys(rt[mt]),Dt=xt.length;Dt--;){var It=xt[Dt],zt=rt[mt][It],Yt=at[mt][It];G.push({x:mt,y:It,value:zt,radius:Yt})}return{min:j,max:W,data:G}};function C(T){var G=T.container,j=this.shadowCanvas=document.createElement("canvas"),W=this.canvas=T.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var at=getComputedStyle(T.container)||{};W.className="heatmap-canvas",this._width=W.width=j.width=T.width||+at.width.replace(/px/,""),this._height=W.height=j.height=T.height||+at.height.replace(/px/,""),this.shadowCtx=j.getContext("2d"),this.ctx=W.getContext("2d"),W.style.cssText=j.style.cssText="position:absolute;left:0;top:0;",G.style.position="relative",G.appendChild(W),this._palette=B(T),this._templates={},this._setStyles(T)}return C.prototype={renderPartial:function(T){T.data.length>0&&(this._drawAlpha(T),this._colorize())},renderAll:function(T){this._clear(),T.data.length>0&&(this._drawAlpha(x(T)),this._colorize())},_updateGradient:function(T){this._palette=B(T)},updateConfig:function(T){T.gradient&&this._updateGradient(T),this._setStyles(T)},setDimensions:function(T,G){this._width=T,this._height=G,this.canvas.width=this.shadowCanvas.width=T,this.canvas.height=this.shadowCanvas.height=G},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(T){this._blur=T.blur==0?0:T.blur||T.defaultBlur,T.backgroundColor&&(this.canvas.style.backgroundColor=T.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=T.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=T.height||this._height,this._opacity=(T.opacity||0)*255,this._maxOpacity=(T.maxOpacity||T.defaultMaxOpacity)*255,this._minOpacity=(T.minOpacity||T.defaultMinOpacity)*255,this._useGradientOpacity=!!T.useGradientOpacity},_drawAlpha:function(W){for(var G=this._min=W.min,j=this._max=W.max,W=W.data||[],at=W.length,rt=1-this._blur;at--;){var ct=W[at],yt=ct.x,mt=ct.y,xt=ct.radius,Dt=Math.min(ct.value,j),It=yt-xt,zt=mt-xt,Yt=this.shadowCtx,Et;this._templates[xt]?Et=this._templates[xt]:this._templates[xt]=Et=E(xt,rt);var jt=(Dt-G)/(j-G);Yt.globalAlpha=jt<.01?.01:jt,Yt.drawImage(Et,It,zt),It<this._renderBoundaries[0]&&(this._renderBoundaries[0]=It),zt<this._renderBoundaries[1]&&(this._renderBoundaries[1]=zt),It+2*xt>this._renderBoundaries[2]&&(this._renderBoundaries[2]=It+2*xt),zt+2*xt>this._renderBoundaries[3]&&(this._renderBoundaries[3]=zt+2*xt)}},_colorize:function(){var T=this._renderBoundaries[0],G=this._renderBoundaries[1],j=this._renderBoundaries[2]-T,W=this._renderBoundaries[3]-G,at=this._width,rt=this._height,ct=this._opacity,yt=this._maxOpacity,mt=this._minOpacity,xt=this._useGradientOpacity;T<0&&(T=0),G<0&&(G=0),T+j>at&&(j=at-T),G+W>rt&&(W=rt-G);for(var Dt=this.shadowCtx.getImageData(T,G,j,W),It=Dt.data,zt=It.length,Yt=this._palette,Et=3;Et<zt;Et+=4){var jt=It[Et],be=jt*4;if(be){var pe;ct>0?pe=ct:jt<yt?jt<mt?pe=mt:pe=jt:pe=yt,It[Et-3]=Yt[be],It[Et-2]=Yt[be+1],It[Et-1]=Yt[be+2],It[Et]=xt?Yt[be+3]:pe}}Dt.data=It,this.ctx.putImageData(Dt,T,G),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(T){var G,j=this.shadowCtx,W=j.getImageData(T.x,T.y,1,1),at=W.data[3],rt=this._max,ct=this._min;return G=Math.abs(rt-ct)*(at/255)>>0,G},getDataURL:function(){return this.canvas.toDataURL()}},C}(),d=function(){var B=!1;return n.defaultRenderer==="canvas2d"&&(B=u),B}(),f={merge:function(){for(var M={},B=arguments.length,E=0;E<B;E++){var x=arguments[E];for(var C in x)M[C]=x[C]}return M}},p=function(){var B=function(){function T(){this.cStore={}}return T.prototype={on:function(G,j,W){var at=this.cStore;at[G]||(at[G]=[]),at[G].push(function(rt){return j.call(W,rt)})},emit:function(G,j){var W=this.cStore;if(W[G])for(var at=W[G].length,rt=0;rt<at;rt++){var ct=W[G][rt];ct(j)}}},T}(),E=function(C){var T=C._renderer,G=C._coordinator,j=C._store;G.on("renderpartial",T.renderPartial,T),G.on("renderall",T.renderAll,T),G.on("extremachange",function(W){C._config.onExtremaChange&&C._config.onExtremaChange({min:W.min,max:W.max,gradient:C._config.gradient||C._config.defaultGradient})}),j.setCoordinator(G)};function x(){var C=this._config=f.merge(n,arguments[0]||{});if(this._coordinator=new B,C.plugin){var T=C.plugin;if(n.plugins[T]){var G=n.plugins[T];this._renderer=new G.renderer(C),this._store=new G.store(C)}else throw new Error("Plugin '"+T+"' not found. Maybe it was not registered.")}else this._renderer=new d(C),this._store=new r(C);E(this)}return x.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(C){return this._config=f.merge(this._config,C),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(C){return this._store.getValueAt?this._store.getValueAt(C):this._renderer.getValueAt?this._renderer.getValueAt(C):null}},x}(),g={create:function(M){return new p(M)},register:function(M,B){n.plugins[M]=B}};return g})})(il);var xf=il.exports;const Lf=yl(xf);var to=L.Layer.extend({initialize:function(t){this.cfg=t,this._el=L.DomUtil.create("div","leaflet-zoom-hide"),this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var n=t.getSize();this._map=t,this._width=n.x,this._height=n.y,this._el.style.width=n.x+"px",this._el.style.height=n.y+"px",this._el.style.position="absolute",this._resetOrigin(),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=Lf.create(this.cfg)),t.on("moveend",this._resetOrigin,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._resetOrigin,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane,n=t._leaflet_pos;this._el.style[to.CSS_TRANSFORM]="translate("+-Math.round(n.x)+"px,"+-Math.round(n.y)+"px)",this._update()}},_update:function(){var t,n,r,u={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),n=this._map.getZoom(),r=Math.pow(2,n),this._data.length==0){this._heatmap&&this._heatmap.setData(u);return}for(var d=[],f=this.cfg.scaleRadius?r:1,p=0,g=0,M=this.cfg.valueField,B=this._data.length;B--;){var E=this._data[B],x=E[M],C=E.latlng;if(t.contains(C)){p=Math.max(x,p),g=Math.min(x,g);var T=this._map.latLngToContainerPoint(C),G={x:Math.round(T.x),y:Math.round(T.y)};G[M]=x;var j;E.radius?j=E.radius*f:j=(this.cfg.radius||2)*f,G.radius=j,d.push(G)}}this.cfg.useLocalExtrema&&(u.max=p,u.min=g),u.data=d,this._heatmap.setData(u)},setData:function(d){this._max=d.max||this._max,this._min=d.min||this._min;for(var n=this.cfg.latField||"lat",r=this.cfg.lngField||"lng",u=this.cfg.valueField||"value",d=d.data,f=d.length,p=[];f--;){var g=d[f],M=new L.LatLng(g[n],g[r]),B={latlng:M};B[u]=g[u],g.radius&&(B.radius=g.radius),p.push(B)}this._data=p,this._draw()},addData:function(t){if(t.length>0)for(var n=t.length;n--;)this.addData(t[n]);else{var r=this.cfg.latField||"lat",u=this.cfg.lngField||"lng",d=this.cfg.valueField||"value",f=t,p=new L.LatLng(f[r],f[u]),g={latlng:p};g[d]=f[d],this._max=Math.max(this._max,g[d]),this._min=Math.min(this._min,g[d]),f.radius&&(g.radius=f.radius),this._data.push(g),this._draw()}},_resetOrigin:function(){this._origin=this._map.layerPointToLatLng(new L.Point(0,0));var t=this._map.getSize();(this._width!==t.x||this._height!==t.y)&&(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px"),this._draw()}});to.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),n=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],r=0;r<n.length;r++){var u=n[r];if(t.style[u]!==void 0)return u}return n[0]}();const bf=L.TileLayer.extend({defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"",format:"image/jpeg"},initialize:function(t,n){this._url=t;var r={},u=Object.keys(n);u.forEach(g=>{r[g.toLowerCase()]=n[g]});var d=L.extend({},this.defaultWmtsParams),f=r.tileSize||this.options.tileSize;r.detectRetina&&L.Browser.retina?d.width=d.height=f*2:d.width=d.height=f;for(var p in r)d.hasOwnProperty(p)&&p!="matrixIds"&&(d[p]=r[p]);this.wmtsParams=d,this.matrixIds=n.matrixIds||this.getDefaultMatrix(),L.setOptions(this,n)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,L.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this.options.tileSize,r=t.multiplyBy(n);r.x+=1,r.y-=1;var u=r.add(new L.Point(n,n)),d=this._tileZoom,f=this._crs.project(this._map.unproject(r,d)),p=this._crs.project(this._map.unproject(u,d));tilewidth=p.x-f.x;var g=this.matrixIds[d].identifier,M=this.wmtsParams.tilematrixset+":"+g,B=this.matrixIds[d].topLeftCorner.lng,E=this.matrixIds[d].topLeftCorner.lat,x=Math.floor((f.x-B)/tilewidth),C=-Math.floor((f.y-E)/tilewidth),T=L.Util.template(this._url,{s:this._getSubdomain(t)});return T+L.Util.getParamString(this.wmtsParams,T)+"&tilematrix="+M+"&tilerow="+C+"&tilecol="+x},setParams:function(t,n){return L.extend(this.wmtsParams,t),n||this.redraw(),this},getDefaultMatrix:function(){for(var t=new Array(22),n=0;n<22;n++)t[n]={identifier:""+n,topLeftCorner:new L.LatLng(200375083428e-4,-200375083428e-4)};return t}});var fe={};fe.Source=L.Layer.extend({options:{untiled:!0,identify:!0},initialize:function(t,n){L.setOptions(this,n),this.options.tiled&&(this.options.untiled=!1),this._url=t,this._subLayers={},this._overlay=this.createOverlay(this.options.untiled)},createOverlay:function(t){var n={};for(var r in this.options)r!="untiled"&&r!="identify"&&(n[r]=this.options[r]);return t?fe.overlay(this._url,n):fe.tileLayer(this._url,n)},onAdd:function(){this.refreshOverlay()},getEvents:function(){return this.options.identify?{click:this.identify}:{}},setOpacity:function(t){this.options.opacity=t,this._overlay&&this._overlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._overlay&&this._overlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._overlay&&this._overlay.bringToFront()},getLayer:function(t){return fe.layer(this,t)},addSubLayer:function(t){this._subLayers[t]=!0,this.refreshOverlay()},removeSubLayer:function(t){delete this._subLayers[t],this.refreshOverlay()},refreshOverlay:function(){var t=Object.keys(this._subLayers).join(",");this._map&&(t?(this._overlay.setParams({layers:t}),this._overlay.addTo(this._map)):this._overlay.remove())},identify:function(t){var n=this.getIdentifyLayers();n.length&&this.getFeatureInfo(t.containerPoint,t.latlng,n,this.showFeatureInfo)},getFeatureInfo:function(t,n,r,u){var d=this.getFeatureInfoParams(t,r),f=this._url+L.Util.getParamString(d,this._url);this.showWaiting(),this.ajax(f,p);function p(g){this.hideWaiting();var M=this.parseFeatureInfo(g,f);u.call(this,n,M)}},ajax:function(t,n){wf.call(this,t,n)},getIdentifyLayers:function(){return this.options.identifyLayers?this.options.identifyLayers:Object.keys(this._subLayers)},getFeatureInfoParams:function(t,n){var r,u;this.options.untiled?r=this._overlay.wmsParams:(u=this.createOverlay(!0),u.updateWmsParams(this._map),r=u.wmsParams,r.layers=n.join(","));var d={request:"GetFeatureInfo",query_layers:n.join(","),X:Math.round(t.x),Y:Math.round(t.y)};return L.extend({},r,d)},parseFeatureInfo:function(t,n){return t=="error"&&(t="<iframe src='"+n+"' style='border:none'>"),t},showFeatureInfo:function(t,n){this._map&&this._map.openPopup(n,t)},showWaiting:function(){this._map&&(this._map._container.style.cursor="progress")},hideWaiting:function(){this._map&&(this._map._container.style.cursor="default")}}),fe.source=function(t,n){return new fe.Source(t,n)},fe.Layer=L.Layer.extend({initialize:function(t,n,r){L.setOptions(this,r),t.addSubLayer||(t=fe.getSourceForUrl(t,r)),this._source=t,this._name=n},onAdd:function(){this._source._map||this._source.addTo(this._map),this._source.addSubLayer(this._name)},onRemove:function(){this._source.removeSubLayer(this._name)},setOpacity:function(t){this._source.setOpacity(t)},bringToBack:function(){this._source.bringToBack()},bringToFront:function(){this._source.bringToFront()}}),fe.layer=function(t,n){return new fe.Layer(t,n)};var eo={};fe.getSourceForUrl=function(t,n){return eo[t]||(eo[t]=fe.source(t,n)),eo[t]},fe.TileLayer=L.TileLayer.WMS,fe.tileLayer=L.tileLayer.wms,fe.Overlay=L.Layer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,maxZoom:18},initialize:function(t,n){this._url=t;var r={},u={};for(var d in n)d in this.options?u[d]=n[d]:r[d]=n[d];L.setOptions(this,u),this.wmsParams=L.extend({},this.defaultWmsParams,r)},setParams:function(t){L.extend(this.wmsParams,t),this.update()},getAttribution:function(){return this.options.attribution},onAdd:function(){this.update()},onRemove:function(t){this._currentOverlay&&(t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl},getEvents:function(){return{moveend:this.update}},update:function(){if(!this._map)return;this.updateWmsParams();var t=this.getImageUrl();if(this._currentUrl==t)return;this._currentUrl=t;var n=this._map.getBounds(),r=L.imageOverlay(t,n,{opacity:0});r.addTo(this._map),r.once("load",u,this);function u(){if(this._map){if(r._url!=this._currentUrl){this._map.removeLayer(r);return}else this._currentOverlay&&this._map.removeLayer(this._currentOverlay);this._currentOverlay=r,r.setOpacity(this.options.opacity?this.options.opacity:1),this.options.isBack===!0&&r.bringToBack(),this.options.isBack===!1&&r.bringToFront()}}(this._map.getZoom()<this.options.minZoom||this._map.getZoom()>this.options.maxZoom)&&this._map.removeLayer(r)},setOpacity:function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},updateWmsParams:function(t){t||(t=this._map);var n=t.getBounds(),r=t.getSize(),u=parseFloat(this.wmsParams.version),d=this.options.crs||t.options.crs,f=u>=1.3?"crs":"srs",p=d.project(n.getNorthWest()),g=d.project(n.getSouthEast()),M={width:r.x,height:r.y};M[f]=d.code,M.bbox=(u>=1.3&&d===L.CRS.EPSG4326?[g.y,p.x,p.y,g.x]:[p.x,g.y,g.x,p.y]).join(","),L.extend(this.wmsParams,M)},getImageUrl:function(){var t=this.options.uppercase||!1,n=L.Util.getParamString(this.wmsParams,this._url,t);return this._url+n}}),fe.overlay=function(t,n){return new fe.Overlay(t,n)};function wf(t,n){var r=this,u=new XMLHttpRequest;u.onreadystatechange=d,u.open("GET",t),u.send();function d(){u.readyState===4&&(u.status===200?n.call(r,u.responseText):n.call(r,"error"))}}const nl=U.Draggable.extend({initialize(t,n,r){U.Draggable.prototype.initialize.call(this,t,t),this._element=t,this._stepHeight=n??5.45,this._knobHeight=r??10,this.on("predrag",function(){this._newPos.x=0,this._newPos.y=this._adjust(this._newPos.y)},this)},_adjust(t){let n=Math.round(this._toValue(t));return n=Math.max(0,Math.min(this._maxValue,n)),this._toY(n)},_toY(t){return this._k*t+this._m},_toValue(t){return(t-this._m)/this._k},setSteps(t){this._maxValue=t-1,this._k=-this._stepHeight,this._m=0},setPosition(t){U.DomUtil.setPosition(this._element,L.point(0,this._adjust(t)))},setValue(t){this.setPosition(this._toY(t))},getValue(){return this._toValue(U.DomUtil.getPosition(this._element).y)}}),Ea=U.Handler.extend({options:{color:"#f00",weight:2,fillColor:"#ff0",fillOpacity:.7,radius:5,continue:!1,showCloseButton:!1,showMeasurements:!1},PointEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):(this.tooltip.setContent("点击开始绘制"),this.geometry=new U.CircleMarker(t.latlng,this.options).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},CircleEvents:{_mouseMove(t){if(this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)){const n=this.latlng?this._map.distance(t.latlng,this.latlng):0;this.geometry.setRadius(n),n!==0?this.tooltip.setContent(`半径:<b>${n.toFixed(2)}m</b><br/>继续点击完成绘制`):this.tooltip.setContent("点击开始绘制")}this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlng=t.latlng,this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry&&this.geometry.getRadius()!==0?(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null):this.geometry=new U.Circle(this.latlng,0,this.options).addTo(this._map)},_mouseDblClick(t){}},PolylineEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Polyline([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},RectangleEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setBounds([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("继续点击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Rectangle([t.latlng,t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setBounds(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry),this.latlngs.length===2&&(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null)},_mouseDblClick(t){}},PolygonEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Polygon([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},addHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.on("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.on("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.on("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},removeHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.off("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.off("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.off("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},setOptions(t){return U.Util.setOptions(this,t),this},enable(t,n={}){return U.Util.setOptions(this,n),this.onFinish=n.onFinish||new Function,this.onDrawing=n.onDrawing||new Function,this.onVertexAdd=n.onVertexAdd||new Function,this.drawType=$t.StringUtil.changeCase(t,1),this.latlngs=n.latlngs||[],this._map.setCursor("data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA="),this.tempPoint=new U.CircleMarker([0,0],{weight:1,radius:5,color:"#3388ff",fillColor:"#fff",fillOpacity:1}).addTo(this._map),this.tooltip=new U.Tooltip({offset:[10,-10]}).setContent("点击开始绘制"),U.Handler.prototype.enable.call(this),this},disable(){if(this._map.setCursor(),this.removeHooks(),this.tooltip&&this._map.closeTooltip(this.tooltip),this.tempPoint&&this._map.removeLayer(this.tempPoint),this.options.showCloseButton&&this.options.showMeasurements){const t=this.geometry._measurementLayer;let n;this.geometry instanceof U.Path?n=this.geometry._latlngs.flat().at(-1):n=this.geometry._latlng;const r=this.geometry._leaflet_id;new U.Marker(n,{icon:new U.Icon({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAFRJREFUKFOlklEKACAIQ7f7H9rQkJYFFUVfY49NiwBgcc+HABlmu/K7HQMge0SFVd8CCqU5tQlwUQ06UqYuwA7Siv/AU6U6YK3n1f7Wen7onvD6NRqqukP5oM7XCQAAAABJRU5ErkJggg==",iconSize:[12,12],iconAnchor:[6,6]})}).on("click",u=>{this._map.removeLayerById(r),t==null||t.clearLayers()}).addTo(t)}return U.Util.setOptions(this,Ea.prototype.options),U.Handler.prototype.disable.call(this),this}});U.Map.addInitHook("addHandler","drawHandler",Ea);const di=U.Handler.extend({_touchstart:U.Browser.msPointer?"MSPointerDown":U.Browser.pointer?"pointerdown":"touchstart",initialize(t){U.Handler.prototype.initialize.call(this,t),this._items=[],this._visible=!1,di.BASE_CLS=`${t.clsPrefix}-contextmenu`;const n=this._container=U.DomUtil.create("div",`${t.clsPrefix}-contextmenu`,t._container);n.style.zIndex=1e4,n.style.position="absolute",t.options.contextmenuWidth&&(n.style.width=t.options.contextmenuWidth+"px"),this._createItems(),U.DomEvent.on(n,"click",U.DomEvent.stop).on(n,"mousedown",U.DomEvent.stop).on(n,"dblclick",U.DomEvent.stop).on(n,"contextmenu",U.DomEvent.stop)},addHooks(){const t=this._map.getContainer();U.DomEvent.on(t,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),U.Browser.touch&&U.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},removeHooks(){const t=this._map.getContainer();U.DomEvent.off(t,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),U.Browser.touch&&U.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},showAt(t,n){t instanceof U.LatLng&&(t=this._map.latLngToContainerPoint(t)),this._showAtPoint(t,n)},hide(){this._hide()},addItem(t){return this.insertItem(t)},insertItem(t,n){n=n!==void 0?n:this._items.length;const r=this._createItem(this._container,t,n);return this._items.push(r),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:r.el,index:n}),r.el},removeItem(t){const n=this._container;return isNaN(t)||(t=n.children[t]),t?(this._removeItem(U.Util.stamp(t)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:t}),t):null},removeAllItems(){const t=this._container.children;let n;for(;t.length;)n=t[0],this._removeItem(U.Util.stamp(n));return t},hideAllItems(){let t,n,r;for(n=0,r=this._items.length;n<r;n++)t=this._items[n],t.el.style.display="none"},showAllItems(){let t,n,r;for(n=0,r=this._items.length;n<r;n++)t=this._items[n],t.el.style.display=""},setDisabled(t,n){const r=this._container,u=di.BASE_CLS+"-item";isNaN(t)||(t=r.children[t]),t&&U.DomUtil.hasClass(t,u)&&(n?(U.DomUtil.addClass(t,u+"-disabled"),this._map.fire("contextmenu.disableitem",{contextmenu:this,el:t})):(U.DomUtil.removeClass(t,u+"-disabled"),this._map.fire("contextmenu.enableitem",{contextmenu:this,el:t})))},isVisible(){return this._visible},_createItems(){const t=this._map.options.contextmenuItems;let n,r;for(n=0,r=t.length;n<r;n++)this._items.push(this._createItem(this._container,t[n]))},_createItem(t,n,r){if(n.separator||n==="-")return this._createSeparator(t,r);const u=di.BASE_CLS+"-item",d=n.disabled?u+" "+u+"-disabled":u,f=this._insertElementAt("a",d,t,r),p=this._createEventHandler(f,n.callback,n.context,n.hideOnSelect),g=this._getIcon(n),M=this._getIconCls(n);let B="";return g?B='<img class="'+di.BASE_CLS+'-icon" src="'+g+'"/>':M&&(B='<span class="'+di.BASE_CLS+"-icon "+M+'"></span>'),f.innerHTML=B+n.text,f.href="#",U.DomEvent.on(f,"mouseover",this._onItemMouseOver,this).on(f,"mouseout",this._onItemMouseOut,this).on(f,"mousedown",U.DomEvent.stopPropagation).on(f,"click",p),U.Browser.touch&&U.DomEvent.on(f,this._touchstart,U.DomEvent.stopPropagation),U.Browser.pointer||U.DomEvent.on(f,"click",this._onItemMouseOut,this),{id:U.Util.stamp(f),el:f,callback:p}},_removeItem(t){let n,r,u,d,f;for(u=0,d=this._items.length;u<d;u++)if(n=this._items[u],n.id===t)return r=n.el,f=n.callback,f&&(U.DomEvent.off(r,"mouseover",this._onItemMouseOver,this).off(r,"mouseover",this._onItemMouseOut,this).off(r,"mousedown",U.DomEvent.stopPropagation).off(r,"click",f),U.Browser.touch&&U.DomEvent.off(r,this._touchstart,U.DomEvent.stopPropagation),U.Browser.pointer||U.DomEvent.on(r,"click",this._onItemMouseOut,this)),this._container.removeChild(r),this._items.splice(u,1),n;return null},_createSeparator(t,n){const r=this._insertElementAt("div",di.BASE_CLS+"-separator",t,n);return{id:U.Util.stamp(r),el:r}},_createEventHandler(t,n,r,p){const d=this;this._map;const f=di.BASE_CLS+"-item-disabled";var p=p!==void 0?p:!0;return function(g){if(U.DomUtil.hasClass(t,f))return;const M=d._map,B=d._showLocation.containerPoint,E=M.containerPointToLayerPoint(B),x=M.layerPointToLatLng(E),C=d._showLocation.relatedTarget,T={containerPoint:B,layerPoint:E,latlng:x,relatedTarget:C};p&&d._hide(),n&&n.call(r||M,T),d._map.fire("contextmenu.select",{contextmenu:d,el:t})}},_insertElementAt(t,n,r,u){let d;const f=document.createElement(t);return f.className=n,u!==void 0&&(d=r.children[u]),d?r.insertBefore(f,d):r.appendChild(f),f},_show(t){this._showAtPoint(t.containerPoint,t)},_showAtPoint(t,n){if(this._items.length){this._map;const r=U.extend(n||{},{contextmenu:this});this._showLocation={containerPoint:t},n&&n.relatedTarget&&(this._showLocation.relatedTarget=n.relatedTarget),this._setPosition(t),this._visible||(this._container.style.display="block",this._visible=!0),this._map.fire("contextmenu.show",r)}},_hide(){this._visible&&(this._visible=!1,this._container.style.display="none",this._map.fire("contextmenu.hide",{contextmenu:this}))},_getIcon(t){return U.Browser.retina&&t.retinaIcon||t.icon},_getIconCls(t){return U.Browser.retina&&t.retinaIconCls||t.iconCls},_setPosition(t){const n=this._map.getSize(),r=this._container,u=this._getElementSize(r);let d;this._map.options.contextmenuAnchor&&(d=new U.Point(this._map.options.contextmenuAnchor),t=t.add(d)),r._leaflet_pos=t,t.x+u.x>n.x?(r.style.left="auto",r.style.right=Math.min(Math.max(n.x-t.x,0),n.x-u.x-1)+"px"):(r.style.left=Math.max(t.x,0)+"px",r.style.right="auto"),t.y+u.y>n.y?(r.style.top="auto",r.style.bottom=Math.min(Math.max(n.y-t.y,0),n.y-u.y-1)+"px"):(r.style.top=Math.max(t.y,0)+"px",r.style.bottom="auto")},_getElementSize(t){let n=this._size;const r=t.style.display;return(!n||this._sizeChanged)&&(n={},t.style.left="-999999px",t.style.right="auto",t.style.display="block",n.x=t.offsetWidth,n.y=t.offsetHeight,t.style.left="auto",t.style.display=r,this._sizeChanged=!1),n},_onKeyDown(t){t.keyCode===27&&this._hide()},_onItemMouseOver(t){U.DomUtil.addClass(t.target||t.srcElement,"over")},_onItemMouseOut(t){U.DomUtil.removeClass(t.target||t.srcElement,"over")}});U.Map.mergeOptions({contextmenuItems:[]}),U.Map.addInitHook("addHandler","contextmenu",di);const Cf={bindContextMenu(t){return L.setOptions(this,t),this._initContextMenu(),this},unbindContextMenu(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem(t){this.options.contextmenuItems.push(t)},removeContextMenuItemWithIndex(t){const n=[];for(let u=0;u<this.options.contextmenuItems.length;u++)this.options.contextmenuItems[u].index==t&&n.push(u);let r=n.pop();for(;r!==void 0;)this.options.contextmenuItems.splice(r,1),r=n.pop()},replaceContextMenuItem(t){this.removeContextMenuItemWithIndex(t.index),this.addContextMenuItem(t)},_initContextMenu(){this._items=[],this.on("contextmenu",this._showContextMenu,this)},_showContextMenu(t){let n,r,u,d,f;if(this._items=[],this._map.contextmenu){for(r=L.extend({relatedTarget:this},t),u=this._map.mouseEventToContainerPoint(t.originalEvent),this.options.contextmenuInheritItems||this._map.contextmenu.hideAllItems(),d=0,f=this.options.contextmenuItems.length;d<f;d++)n=this.options.contextmenuItems[d],this._items.push(this._map.contextmenu.insertItem(n,n.index));this._map.once("contextmenu.hide",this._hideContextMenu,this),this._map.contextmenu.showAt(u,r)}},_hideContextMenu(){let t,n;if(this._items){for(t=0,n=this._items.length;t<n;t++)this._map.contextmenu.removeItem(this._items[t]);this._items.length=0,this.options.contextmenuInheritItems||this._map.contextmenu.showAllItems()}}},sl=[U.Marker,U.Path],al={contextmenu:!1,contextmenuItems:[],contextmenuInheritItems:!1};for(let t=0,n=sl.length;t<n;t++){const r=sl[t];r.prototype.options?r.mergeOptions(al):r.prototype.options=al,r.addInitHook(function(){this.options.contextmenu&&this._initContextMenu()}),r.include(Cf)}const io=U.Handler.extend({options:{moveStep:10,zoomSnap:1,moveKeyCodeMap:{65:"left",68:"right",87:"top",83:"bottom"},zoomKeyCodeMap:{69:"add",81:"minus"}},enable(t){U.Util.setOptions(this,t),U.Handler.prototype.enable.call(this)},addHooks(){this._map.on("keydown",this._keyDownEvent,this)},removeHooks(){this._map.off("keydown",this._keyDownEvent,this)},_keyDownEvent(t){let n=this.options.moveKeyCodeMap[t.originalEvent.keyCode],r=this.options.zoomKeyCodeMap[t.originalEvent.keyCode];n&&this.moveByMeters(n,this.options.moveStep),r&&this.setZoom(r)},moveByMeters(t,n){let r=this._map.project(this._map.getCenter());switch(t){case"left":r.x-=n;break;case"right":r.x+=n;break;case"bottom":r.y+=n;break;case"top":r.y-=n;break}r=this._map.unproject(r),this._map.panTo(r)},setZoom(t){let n=this._map.getZoom();switch(t){case"add":n+=this.options.zoomSnap;break;case"minus":n-=this.options.zoomSnap;break}this._map.setZoom(n)}});U.Map.addInitHook("addHandler","keyboard",io);const rl=U.LayerGroup.extend({initialize(t){U.Util.setOptions(this,t),U.LayerGroup.prototype.initialize.call(this,t)},getRasterLayers(){const t={},n=r=>{if(r._layers&&r.getLayer)for(const u in r._layers){const d=r._layers[u];d._layers&&d.getLayer?n(d):t[d._leaflet_id]=d}else t[r._leaflet_id]=r};return n(this),t},removeRasterLayer(t){const n=function(r){if(r._layers&&r.getLayer&&r.getLayer(t)){const u=r.getLayer(t);r.removeLayer(u)}else if(r._layers)for(const u in r._layers){const d=r._layers[u];if(d._layers&&d.getLayer&&d.getLayer(t)){const f=d.getLayer(t);d.removeLayer(f)}else d._layers&&n(d)}};n(this)},getRasterTop(){const t=Object.values(this.getRasterLayers());return t.length?Math.max(...t.map(n=>n.options.zIndex))+1:null}}),Ef=L.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,n,r,u,d){const f=this.options,p=Math.PI/180;if(f.pixelSize<=1)return L.polyline([t.latLng,t.latLng],f.pathOptions);const g=r.project(t.latLng),M=-(t.heading-90)*p,B=L.point(g.x+f.pixelSize*Math.cos(M+Math.PI)/2,g.y+f.pixelSize*Math.sin(M)/2),E=g.add(g.subtract(B));return L.polyline([r.unproject(B),r.unproject(E)],f.pathOptions)}}),Pf=L.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,n,r,u,d){return this.options.polygon?L.polygon(this._buildArrowPath(t,r),this.options.pathOptions):L.polyline(this._buildArrowPath(t,r),this.options.pathOptions)},_buildArrowPath:function(t,n){const r=Math.PI/180,u=n.project(t.latLng),d=-(t.heading-90)*r,f=this.options.headAngle/2*r,p=d+f,g=d-f,M=L.point(u.x-this.options.pixelSize*Math.cos(p),u.y+this.options.pixelSize*Math.sin(p)),B=L.point(u.x-this.options.pixelSize*Math.cos(g),u.y+this.options.pixelSize*Math.sin(g));return[n.unproject(M),t.latLng,n.unproject(B)]}}),kf=L.Class.extend({options:{markerOptions:{},rotation:!1},initialize:function(t){L.Util.setOptions(this,t),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(t,n,r,u,d){return this.options.rotation&&(this.options.markerOptions.rotationAngle=t.heading+(this.options.angleCorrection||0)),L.marker(t.latLng,this.options.markerOptions)}}),Sf={Dash:Ef,ArrowHead:Pf,Marker:kf};function Bf(t,n){const r=n.x-t.x,u=n.y-t.y;return Math.sqrt(r*r+u*u)}const Tf=(t,n)=>(Math.atan2(n.y-t.y,n.x-t.x)*180/Math.PI+90+360)%360,no=({value:t,isInPixels:n},r)=>n?t/r:t;function so(t){if(typeof t=="string"&&t.indexOf("%")!==-1)return{value:parseFloat(t)/100,isInPixels:!1};const n=t?parseFloat(t):0;return{value:n,isInPixels:n>0}}const Df=(t,n)=>t.x===n.x&&t.y===n.y;function Of(t){return t.reduce((n,r,u,d)=>{if(u>0&&!Df(r,d[u-1])){const f=d[u-1],p=n.length>0?n[n.length-1].distB:0,g=Bf(f,r);n.push({a:f,b:r,distA:p,distB:p+g,heading:Tf(f,r)})}return n},[])}function If(t,n){const r=Of(t),u=r.length;if(u===0)return[];const d=r[u-1].distB,f=no(n.offset,d),p=no(n.endOffset,d),g=no(n.repeat,d),M=d*g,B=f>0?d*f:0,E=p>0?d*p:0,x=[];let C=B;do x.push(C),C+=M;while(M>0&&C<d-E);let T=0,G=r[0];return x.map(j=>{for(;j>G.distB&&T<u-1;)T++,G=r[T];const W=(j-G.distA)/(G.distB-G.distA);return{pt:Rf(G.a,G.b,W),heading:G.heading}})}function Rf(t,n,r){return n.x!==t.x?{x:t.x+r*(n.x-t.x),y:t.y+r*(n.y-t.y)}:{x:t.x,y:t.y+(n.y-t.y)*r}}const Ff=t=>t instanceof L.LatLng||Array.isArray(t)&&t.length===2&&typeof t[0]=="number",Gf=t=>Array.isArray(t)&&Ff(t[0]),zf=L.FeatureGroup.extend({options:{patterns:[]},initialize:function(t,n){L.FeatureGroup.prototype.initialize.call(this),L.Util.setOptions(this,n),this._map=null,this._paths=this._initPaths(t),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(t,n){return Gf(t)?[n?t.concat([t[0]]):t]:t instanceof L.Polyline?this._initPaths(t.getLatLngs(),t instanceof L.Polygon):Array.isArray(t)?t.reduce((r,u)=>r.concat(this._initPaths(u,n)),[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,n){return{symbolFactory:t.symbol,offset:so(t.offset),endOffset:so(t.endOffset),repeat:so(t.repeat)}},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(t){this._map.off("moveend",this.redraw,this),this._map=null,L.FeatureGroup.prototype.onRemove.call(this,t)},_initBounds:function(){const t=this._paths.reduce((n,r)=>n.concat(r),[]);return L.latLngBounds(t)},getBounds:function(){return this._bounds},_buildSymbols:function(t,n,r){return r.map((u,d)=>n.buildSymbol(u,t,this._map,d,r.length))},_getDirectionPoints:function(t,n){if(t.length<2)return[];const r=t.map(u=>this._map.project(u));return If(r,n).map(u=>({latLng:this._map.unproject(L.point(u.pt)),heading:u.heading}))},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(t){const n=this._map.getBounds().pad(.1);return this._paths.map(r=>{const u=this._getDirectionPoints(r,t).filter(d=>n.contains(d.latLng));return L.featureGroup(this._buildSymbols(r,t.symbolFactory,u))})},_draw:function(){this._patterns.map(t=>this._getPatternLayers(t)).forEach(t=>{this.addLayer(L.featureGroup(t))})}});function Nf(t){const n=document.createElement("style"),r=document.head||document.documentElement;n.innerHTML=`
10
+ .${t}-statusbar {
11
11
  display: flex;
12
12
  color: #fff;
13
13
  height: 26px;
@@ -21,10 +21,10 @@ northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10
21
21
  white-space: nowrap;
22
22
  overflow: hidden;
23
23
  }
24
- .${e}-statusbar-item + .${e}-statusbar-item {
24
+ .${t}-statusbar-item + .${t}-statusbar-item {
25
25
  margin-left: 10px
26
26
  }
27
- .${e}-eaglemap {
27
+ .${t}-eaglemap {
28
28
  border: solid rgba(13, 59, 54, 0.85) 1px;
29
29
  box-shadow: 0 1px 7px #999;
30
30
  background: rgba(13, 59, 54, 0.85);
@@ -34,7 +34,7 @@ northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10
34
34
  transition: all 0.5s;
35
35
  }
36
36
 
37
- .${e}-eaglemap a {
37
+ .${t}-eaglemap a {
38
38
  background-color: rgba(13, 59, 54, 0.85);
39
39
  background-position: -1px -1px;
40
40
  background-repeat: no-repeat;
@@ -44,61 +44,61 @@ northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10
44
44
  transition: all 0.2s;
45
45
  }
46
46
 
47
- .${e}-eaglemap a.minimized {
47
+ .${t}-eaglemap a.minimized {
48
48
  -webkit-transform: rotate(180deg);
49
49
  transform: rotate(180deg);
50
50
  }
51
51
 
52
- .${e}-eaglemap a.minimized-bottomright {
52
+ .${t}-eaglemap a.minimized-bottomright {
53
53
  -webkit-transform: rotate(180deg);
54
54
  transform: rotate(180deg);
55
55
  border-radius: 0px;
56
56
  }
57
57
 
58
- .${e}-eaglemap a.minimized-topleft {
58
+ .${t}-eaglemap a.minimized-topleft {
59
59
  -webkit-transform: rotate(0deg);
60
60
  transform: rotate(0deg);
61
61
  border-radius: 0px;
62
62
  }
63
- .${e}-eaglemap a.minimized-bottomleft {
63
+ .${t}-eaglemap a.minimized-bottomleft {
64
64
  -webkit-transform: rotate(270deg);
65
65
  transform: rotate(270deg);
66
66
  border-radius: 0px;
67
67
  }
68
- .${e}-eaglemap a.minimized-topright {
68
+ .${t}-eaglemap a.minimized-topright {
69
69
  -webkit-transform: rotate(90deg);
70
70
  transform: rotate(90deg);
71
71
  border-radius: 0px;
72
72
  }
73
- .${e}-eaglemap-toggle-display {
73
+ .${t}-eaglemap-toggle-display {
74
74
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAMdJREFUOE/V0zEOQVEQheH/hMQqVDahREMreonKApCgUYkE67ANOhWJxga0WoXqyEuehBeP+0Lj1iffzNzMiB89/cjhTyDbOSAv6Ro6+svRbLeALtCUdElitgvJImnQFigDO6Ah6XzHbJeAiaT2Y4E0aAYM4+AeqEeY7SKwBk6Sqh+hKGB7Cozj8BHoACsg6mgTDMXYAJi/+PBsUIxFo1QSWDbI9hLofdWR7QXQT9mjsI5s14DRm2U8SHoq8ie3FnpfQQuZFbsB4idCE9J/7MkAAAAASUVORK5CYII=');
75
75
  background-size: cover;
76
76
  position: absolute;
77
77
  border-radius: 3px 0px 0px 0px;
78
78
  }
79
- .${e}-eaglemap-toggle-display-bottomright {
79
+ .${t}-eaglemap-toggle-display-bottomright {
80
80
  bottom: 0;
81
81
  right: 0;
82
82
  }
83
- .${e}-eaglemap-toggle-display-topleft {
83
+ .${t}-eaglemap-toggle-display-topleft {
84
84
  top: 0;
85
85
  left: 0;
86
86
  -webkit-transform: rotate(180deg);
87
87
  transform: rotate(180deg);
88
88
  }
89
- .${e}-eaglemap-toggle-display-bottomleft {
89
+ .${t}-eaglemap-toggle-display-bottomleft {
90
90
  bottom: 0;
91
91
  left: 0;
92
92
  -webkit-transform: rotate(90deg);
93
93
  transform: rotate(90deg);
94
94
  }
95
- .${e}-eaglemap-toggle-display-topright {
95
+ .${t}-eaglemap-toggle-display-topright {
96
96
  top: 0;
97
97
  right: 0;
98
98
  -webkit-transform: rotate(270deg);
99
99
  transform: rotate(270deg);
100
100
  }
101
- .${e}-contextmenu {
101
+ .${t}-contextmenu {
102
102
  display: none;
103
103
  box-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);
104
104
  -webkit-border-radius: 4px;
@@ -110,7 +110,7 @@ northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10
110
110
  -moz-user-select: none;
111
111
  user-select: none;
112
112
  }
113
- .${e}-contextmenu a.${e}-contextmenu-item {
113
+ .${t}-contextmenu a.${t}-contextmenu-item {
114
114
  display: block;
115
115
  color: #222;
116
116
  font-size: 12px;
@@ -122,31 +122,31 @@ northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10
122
122
  cursor: default;
123
123
  outline: none;
124
124
  }
125
- .${e}-contextmenu a.${e}-contextmenu-item-disabled {
125
+ .${t}-contextmenu a.${t}-contextmenu-item-disabled {
126
126
  opacity: 0.5;
127
127
  }
128
- .${e}-contextmenu a.${e}-contextmenu-item.over {
128
+ .${t}-contextmenu a.${t}-contextmenu-item.over {
129
129
  background-color: #f4f4f4;
130
130
  border-top: 1px solid #f0f0f0;
131
131
  border-bottom: 1px solid #f0f0f0;
132
132
  }
133
- .${e}-contextmenu a.${e}-contextmenu-item-disabled.over {
133
+ .${t}-contextmenu a.${t}-contextmenu-item-disabled.over {
134
134
  background-color: inherit;
135
135
  border-top: 1px solid transparent;
136
136
  border-bottom: 1px solid transparent;
137
137
  }
138
- .${e}-contextmenu-icon {
138
+ .${t}-contextmenu-icon {
139
139
  margin: 2px 8px 0 0;
140
140
  width: 16px;
141
141
  height: 16px;
142
142
  float: left;
143
143
  border: 0;
144
144
  }
145
- .${e}-contextmenu-separator {
145
+ .${t}-contextmenu-separator {
146
146
  border-bottom: 1px solid #ccc;
147
147
  margin: 5px 0;
148
148
  }
149
- .${e}-pulse-icon {
149
+ .${t}-pulse-icon {
150
150
  display: inline-block;
151
151
  width: 100%;
152
152
  height: 100%;
@@ -154,7 +154,7 @@ northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10
154
154
  position: relative;
155
155
  box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1);
156
156
  }
157
- .${e}-dive-icon {
157
+ .${t}-dive-icon {
158
158
  content: '';
159
159
  border-radius: 100%;
160
160
  height: 200%;
@@ -181,4 +181,4 @@ northing meters`+e;var C=b/2,D=0,G=0,j,W,at,rt,ct;return C>0&&(j=1e5/Math.pow(10
181
181
  filter: alpha(opacity=0);
182
182
  }
183
183
  }
184
- `,r.appendChild(n)}(e=>{const n=Object.create(L)||{};return n.LANG=Cr,n.BaseMap=L.Map.extend({options:{doubleClickZoom:!1,closePopupOnClick:!1,zoomControl:!1,attributionControl:!1,scaleControl:{show:!0},minZoom:5,maxZoom:19,contextmenu:!0,center:[0,0],zoom:17},initialize(r,u={},d){var f;if(typeof r=="string"&&(r=document.getElementById(r)),!r instanceof HTMLElement||!r.clientWidth||!r.clientHeight)throw new Error("地图容器不存在或元素尺寸为0");this.lang=typeof u.lang=="string"?u.lang:"zh_CN",this.clsPrefix=typeof u.clsPrefix=="string"?u.clsPrefix:"gis2d",wf(this.clsPrefix),L.Util.setOptions(this,u),L.Layer.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.Zoom.mergeOptions({position:((f=this.options.zoomControl)==null?void 0:f.position)||"topleft",zoomInTitle:Cr[this.lang].zoomIn,zoomOutTitle:Cr[this.lang].zoomOut}),L.Control.Attribution.mergeOptions({prefix:`<a href="http://www.${this.clsPrefix}.com" target="_blank">Guo.Yan</a>`}),L.Map.prototype.initialize.call(this,r,this.options),L.DomEvent.on(this._container,"click",m=>{var M;const g=this._container.querySelector(".add");g&&(g.style.display="none"),(M=this.contextmenu)==null||M.hide()},this),u.debug?(document.onselectstart=()=>u.debug.allowSelect,r.oncontextmenu=()=>u.debug.allowContextmenu,document.onkeydown=function(m){if(m&&m.keyCode===123)return u.debug.allowDevtool}):process.env.NODE_ENV!=="development"&&(document.onkeydown=function(m){if(m&&m.keyCode===123)return!1},r.oncontextmenu=()=>!1),e[d||"$m"]=this},getCursor(){return this.getContainer().style.cursor||"default"},setCursor(r="default"){const u=this.getContainer();["auto","pointer","crosshair","move","text","wait","help","grab","default"].includes(r)?u.style.cursor=`${r}`:r==="draw"?u.style.cursor="url(data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA=), auto":u.style.cursor=`url(${r}), auto`},flyTo(r,u=0,d={animate:!1}){r instanceof L.Marker?(r=r._latlng,L.Map.prototype.flyTo.call(this,r,u||this.getZoom(),d)):r instanceof L.Path||r instanceof L.FeatureGroup?(r=r.getBounds(),L.Map.prototype.flyToBounds.call(this,r,d)):L.Map.prototype.flyTo.call(this,r,u||this.getZoom(),d)},getLayer(r){return this._layers[r]},getLayers(){return Object.values(this._layers)}}),n.StatusBar=Er,n.CRS.BaiDu=Jr,n.WebMercatorTiledLayer=yf,n.BlinkMarker=Jh,n.CanvasMarker=Qh,n.HeatLayer=Qr,n.WMTS=xf,n.WMS=fe,n.Knob=el,n.Draw=eo,n.ContextMenu=di,n.KeyBoard=io,n.EagleMap=Pr,n.LayerManager=sl,n.ImageOverlay.Rotated=Af,n.Text=Yh,n.VertexMarkers=kr,n.Measurement=os,n.FilterFeatureGroup=gf,e.L=n})(window);function no(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("未找到全局对象")}const so=function(e,n={}){so.installed||(no().Gis=_l)};no().Vue&&so(no().Vue);const Cf={install:so};Jt.BaiDuCRS=Jr,Jt.BlinkMarker=Jh,Jt.CanvasMarker=Qh,Jt.ContextMenu=di,Jt.Draw=eo,Jt.EagleMap=Pr,Jt.KeyBoard=io,Jt.Knob=el,Jt.LayerManager=sl,Jt.MeasureMent=os,Jt.StatusBar=Er,Jt.TextMarker=Yh,Jt.VertexMarker=kr,Jt.default=Cf,Object.defineProperties(Jt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
184
+ `,r.appendChild(n)}(t=>{const n=Object.create(L)||{};return n.LANG=Er,n.BaseMap=L.Map.extend({options:{doubleClickZoom:!1,closePopupOnClick:!1,zoomControl:!1,attributionControl:!1,scaleControl:{show:!0},minZoom:5,maxZoom:19,contextmenu:!0,center:[0,0],zoom:17},initialize(r,u={},d){var f;if(typeof r=="string"&&(r=document.getElementById(r)),!r instanceof HTMLElement||!r.clientWidth||!r.clientHeight)throw new Error("地图容器不存在或元素尺寸为0");this.lang=typeof u.lang=="string"?u.lang:"zh_CN",this.clsPrefix=typeof u.clsPrefix=="string"?u.clsPrefix:"gis2d",Nf(this.clsPrefix),L.Util.setOptions(this,u),L.Layer.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.Zoom.mergeOptions({position:((f=this.options.zoomControl)==null?void 0:f.position)||"topleft",zoomInTitle:Er[this.lang].zoomIn,zoomOutTitle:Er[this.lang].zoomOut}),L.Control.Attribution.mergeOptions({prefix:`<a href="http://www.${this.clsPrefix}.com" target="_blank">Guo.Yan</a>`}),L.Map.prototype.initialize.call(this,r,this.options),L.DomEvent.on(this._container,"click",p=>{var M;const g=this._container.querySelector(".add");g&&(g.style.display="none"),(M=this.contextmenu)==null||M.hide()},this),u.debug?(document.onselectstart=()=>u.debug.allowSelect,r.oncontextmenu=()=>u.debug.allowContextmenu,document.onkeydown=function(p){if(p&&p.keyCode===123)return u.debug.allowDevtool}):process.env.NODE_ENV!=="development"&&(document.onkeydown=function(p){if(p&&p.keyCode===123)return!1},r.oncontextmenu=()=>!1),t[d||"$m"]=this},getCursor(){return this.getContainer().style.cursor||"default"},setCursor(r="default"){const u=this.getContainer();["auto","pointer","crosshair","move","text","wait","help","grab","default"].includes(r)?u.style.cursor=`${r}`:r==="draw"?u.style.cursor="url(data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA=), auto":u.style.cursor=`url(${r}), auto`},flyTo(r,u=0,d={animate:!1}){r instanceof L.Marker?(r=r._latlng,L.Map.prototype.flyTo.call(this,r,u||this.getZoom(),d)):r instanceof L.Path||r instanceof L.FeatureGroup?(r=r.getBounds(),L.Map.prototype.flyToBounds.call(this,r,d)):L.Map.prototype.flyTo.call(this,r,u||this.getZoom(),d)},getLayer(r){return this._layers[r]},getLayers(){return Object.values(this._layers)}}),n.StatusBar=Pr,n.CRS.BaiDu=Qr,n.WebMercatorTiledLayer=vf,n.BlinkMarker=tl,n.CanvasMarker=el,n.HeatLayer=to,n.WMTS=bf,n.WMS=fe,n.Knob=nl,n.Draw=Ea,n.ContextMenu=di,n.KeyBoard=io,n.EagleMap=kr,n.LayerManager=rl,n.ImageOverlay.Rotated=Mf,n.Text=Qh,n.VertexMarkers=Sr,n.Measurement=os,n.FilterFeatureGroup=Af,n.Symbol=Sf,n.PolylineDecorator=zf,t.L=n})(window);function ao(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("未找到全局对象")}const ro=function(t,n={}){ro.installed||(ao().Gis=gl)};ao().Vue&&ro(ao().Vue);const Uf={install:ro};Jt.BaiDuCRS=Qr,Jt.BlinkMarker=tl,Jt.CanvasMarker=el,Jt.ContextMenu=di,Jt.Draw=Ea,Jt.EagleMap=kr,Jt.KeyBoard=io,Jt.Knob=nl,Jt.LayerManager=rl,Jt.MeasureMent=os,Jt.StatusBar=Pr,Jt.TextMarker=Qh,Jt.VertexMarker=Sr,Jt.default=Uf,Object.defineProperties(Jt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});