@ambuj.bhaskar/react-component-library 0.20.2-alpha → 0.20.3-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -718,4 +718,4 @@ https://sweetalert2.github.io/#ajax-request`),aHe(e),typeof e.title=="string"&&(
718
718
  `).join("<br />")),qEe(e)}let o9;var v6=new WeakMap;class P1{constructor(...t){if(HEe(this,v6,void 0),typeof window>"u")return;o9=this;const n=Object.freeze(this.constructor.argsToParams(t));this.params=n,this.isAwaitingPromise=!1,OEe(v6,this,this._main(o9.params))}_main(t,n={}){if(zI(Object.assign({},n,t)),kn.currentInstance){const i=f2.swalPromiseResolve.get(kn.currentInstance),{isAwaitingPromise:a}=kn.currentInstance;kn.currentInstance._destroy(),a||i({isDismissed:!0}),Am()&&xI()}kn.currentInstance=o9;const r=cHe(t,n);sHe(r),Object.freeze(r),kn.timeout&&(kn.timeout.stop(),delete kn.timeout),clearTimeout(kn.restoreFocusTimeout);const o=uHe(o9);return AI(o9,r),s1.innerParams.set(o9,r),lHe(o9,o,r)}then(t){return M_(v6,this).then(t)}finally(t){return M_(v6,this).finally(t)}}const lHe=(e,t,n)=>new Promise((r,o)=>{const i=a=>{e.close({isDismissed:!0,dismiss:a})};f2.swalPromiseResolve.set(e,r),f2.swalPromiseReject.set(e,o),t.confirmButton.onclick=()=>{uMe(e)},t.denyButton.onclick=()=>{dMe(e)},t.cancelButton.onclick=()=>{fMe(e,i)},t.closeButton.onclick=()=>{i(P2.close)},_Me(n,t,i),RSe(kn,n,i),tMe(e,n),tHe(n),dHe(kn,n,i),fHe(t,n),setTimeout(()=>{t.container.scrollTop=0})}),cHe=(e,t)=>{const n=ZMe(e),r=Object.assign({},W5,t,n,e);return r.showClass=Object.assign({},W5.showClass,r.showClass),r.hideClass=Object.assign({},W5.hideClass,r.hideClass),r.animation===!1&&(r.showClass={backdrop:"swal2-noanimation"},r.hideClass={}),r},uHe=e=>{const t={popup:Nr(),container:Vo(),actions:J4(),confirmButton:u9(),denyButton:o5(),cancelButton:R2(),loader:I2(),closeButton:mm(),validationMessage:Fu(),progressSteps:Cm()};return s1.domCache.set(e,t),t},dHe=(e,t,n)=>{const r=ju();Ho(r),t.timer&&(e.timeout=new KMe(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(eo(r),Si(r,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&bm(t.timer)})))},fHe=(e,t)=>{if(!t.toast){if(!ku(t.allowEnterKey)){oI("allowEnterKey"),CHe();return}hHe(e)||gHe(e,t)||cg(-1,1)}},hHe=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const n of t)if(n instanceof HTMLElement&&ri(n))return n.focus(),!0;return!1},gHe=(e,t)=>t.focusDeny&&ri(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ri(e.cancelButton)?(e.cancelButton.focus(),!0):t.focusConfirm&&ri(e.confirmButton)?(e.confirmButton.focus(),!0):!1,CHe=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const n=document.createElement("audio");n.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",n.loop=!0,document.body.appendChild(n),setTimeout(()=>{n.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${e}`)}P1.prototype.disableButtons=II;P1.prototype.enableButtons=RI;P1.prototype.getInput=OI;P1.prototype.disableInput=DI;P1.prototype.enableInput=PI;P1.prototype.hideLoading=M8;P1.prototype.disableLoading=M8;P1.prototype.showValidationMessage=NI;P1.prototype.resetValidationMessage=TI;P1.prototype.close=D0;P1.prototype.closePopup=D0;P1.prototype.closeModal=D0;P1.prototype.closeToast=D0;P1.prototype.rejectPromise=EI;P1.prototype.update=VI;P1.prototype._destroy=UI;Object.assign(P1,$Me);Object.keys(wMe).forEach(e=>{P1[e]=function(...t){return o9&&o9[e]?o9[e](...t):null}});P1.DismissReason=P2;P1.version="11.22.0";const g2=P1;g2.default=g2;typeof document<"u"&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch{n.innerText=t}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.1s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px $swal2-outline-color;--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}');var P5={},k_;function mHe(){if(k_)return P5;k_=1;var e=uo;if(process.env.NODE_ENV==="production")P5.createRoot=e.createRoot,P5.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;P5.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},P5.hydrateRoot=function(n,r,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,o)}finally{t.usingClientEntryPoint=!1}}}return P5}var pHe=mHe();const F_=[{key:"title",getter:e=>e.getTitle()},{key:"html",getter:e=>e.getHtmlContainer()},{key:"confirmButtonText",getter:e=>e.getConfirmButton()},{key:"denyButtonText",getter:e=>e.getDenyButton()},{key:"cancelButtonText",getter:e=>e.getCancelButton()},{key:"footer",getter:e=>e.getFooter()},{key:"closeButtonHtml",getter:e=>e.getCloseButton()},{key:"iconHtml",getter:e=>e.getIconContent()},{key:"loaderHtml",getter:e=>e.getLoader()}],ff=()=>{};function AHe(e){function t(o){const i={},a={},s=F_.map(l=>l.key);return Object.entries(o).forEach(l=>{let[u,d]=l;s.includes(u)&&I.isValidElement(d)?(i[u]=d,a[u]=" "):a[u]=d}),[i,a]}function n(o,i){Object.entries(i).forEach(a=>{let[s,l]=a;const d=F_.find(C=>C.key===s).getter(e),h=pHe.createRoot(d);h.render(l),o.__roots.push(h)})}function r(o){o.__roots.forEach(i=>{i.unmount()}),o.__roots=[]}return class extends e{static argsToParams(o){if(I.isValidElement(o[0])||I.isValidElement(o[1])){const i={};return["title","html","icon"].forEach((a,s)=>{o[s]!==void 0&&(i[a]=o[s])}),i}else return e.argsToParams(o)}_main(o,i){this.__roots=[],this.__params=Object.assign({},i,o);const[a,s]=t(this.__params),l=s.willOpen||ff,u=s.didOpen||ff,d=s.didDestroy||ff;return super._main(Object.assign({},s,{willOpen:h=>{n(this,a),l(h)},didOpen:h=>{setTimeout(()=>{u(h)})},didDestroy:h=>{d(h),r(this)}}))}update(o){Object.assign(this.__params,o),r(this);const[i,a]=t(this.__params);super.update(a),n(this,i)}}}const vHe="_custom_confirmation_11wic_1",bHe="_customConfirmationWrapper_11wic_5",yHe={custom_confirmation:vHe,customConfirmationWrapper:bHe},j_={LOGOUT:{title:"Logout",text:"Are you sure you want to logout?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},DELETE:{title:"Confirmation",text:"Are you sure you want to delete?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},DELETE_ANNOTATION:{title:"Annotation",text:"Are you sure you want to delete annotation?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},DELETE_ANNOTATIONS:{title:"Annotations",text:"Are you sure you want to delete all annotations?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},MARK_AS_NO_ANNOTATION:{title:"Image Object of Interest",text:"Are you sure you want to mark as no object of interest?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},REMOVE_ASSIGNED_USER:{title:"Removing User",text:"Are you sure you want to this user from request?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},REMOVE_POLYGON_POINT:{title:"Removing Point",text:"Are you sure you want to remove this point from polygon?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},ADD_DATA_TO_ATTRIBUTE_REQUEST:{title:"Attribute Request",text:"Are you sure you want to migrate data to attribute request?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},GENERATE_BILL:{title:"Generating Bill",text:"Are you sure you want to generate all the pending bills manually?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},SESSION_CLEAR:{title:"Clear Session",text:"Are you sure you want to close all the open and inactive sessions?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},ANNOTATION_ATTRIBUTE_RESET:{title:"Annotation Attributes Reset",text:"Are you sure you want to reset attributes? This will reset to default values",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},REQUEST_PRICING:{title:"Request Pricing",text:"Are you sure you want to create / update request pricing? this will apply to all the pending sessions and future sessions",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},USER_ACTIVE:{title:"User Active",text:"Are you sure you want to change user Active Status? after this user will be able to login and perform actions",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},USER_IN_ACTIVE:{title:"User In Active",text:"Are you sure you want to change user Active Status? users won't be able to login and perform any actions in system",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},CLOSE_SESSION:{title:"Session Close",text:"Are you sure you want to close this session? You will be redirected to sessions after the session is closed",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},NEXT_SESSION:{title:"Session Close",text:"Are you sure you want to close this session? You will be assigned a new sessions after the session is closed",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},UN_ASSIGN_IMAGES:{title:"Unassign Images",text:"Are you sure you want to unassign images from the request? Only images which are yet to be assigned to sessions will be removed.",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},DELETE_ANNOTATION_SELECTED:{title:"Annotation",text:"Are you sure you want to delete selected annotation (In green highlighted)?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"},APPROVE_SINGLE_ANNOTATION_FULL:{title:"Annotation",text:"Are you sure you want to approve this entire annotation (Outline and Attributes both will be approved)?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Approve Everything (Outline And Attributes Both)",cancelButtonText:"Cancel"},REJECT_SINGLE_ANNOTATION_FULL:{title:"Annotation",text:"Are you sure you want to reject this entire annotation (Outline and Attributes both will be rejected)?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Reject Everything (Outline And Attributes Both)",cancelButtonText:"Cancel",confirmButtonClass:"global-confirm-button-danger"},COMPLETE_REQUEST:{title:"Complete Request",text:"Are you sure you want to complete this request? this can not be undone",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},APPROVE_ALL_OUTLINES:{title:"Approve all outlines",text:"Are you sure you want to approve all the outlines, Kindly note : Attributes need to verify after this (If there is any attribute)",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Approve all outlines",cancelButtonText:"Cancel"},REJECT_ALL_ANNOTATIONS:{title:"Reject all annotations",text:"Are you sure you want to reject all the annotations (Outlines and Attributes both)",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Reject All Annotations (Outline And Attributes Both)",cancelButtonText:"Cancel",confirmButtonClass:"global-confirm-button-danger"},APPROVE_SINGLE_ANNOTATION_FULL_ATTRIBUTE_ONLY:{title:"Annotation",text:"Are you sure you want to approve this entire annotation attributes?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Approve All Attributes",cancelButtonText:"Cancel"},REJECT_SINGLE_ANNOTATION_FULL_ATTRIBUTE_ONLY:{title:"Annotation",text:"Are you sure you want to reject this entire annotation attributes?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Reject All Attributes",cancelButtonText:"Cancel",confirmButtonClass:"global-confirm-button-danger"},APPROVE_ALL_ANNOTATIONS_ONLY_ATTRIBUTES:{title:"Approve All Annotations",text:"Are you sure you want to approve all the annotations",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Approve all annotations",cancelButtonText:"Cancel"},REJECT_ALL_ANNOTATIONS_ONLY_ATTRIBUTES:{title:"Reject all annotations",text:"Are you sure you want to reject all the annotations",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, Reject All Annotations",cancelButtonText:"Cancel",confirmButtonClass:"global-confirm-button-danger"},ORGANIZATION_ACTIVE:{title:"Organisation Active",text:"Are you sure you want to change organisation active Status? after this organisation user will be able to login and perform actions",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"},ORGANIZATION_IN_ACTIVE:{title:"Organisation In Active",text:"Are you sure you want to change organisation Active Status? organisation users won't be able to login and perform any actions in system",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",confirmButtonClass:"global-confirm-button-danger"}},xHe=AHe(g2),YI=({callback:e,children:t,trigger:n="DELETE",cancelCallBack:r=null,fireOnMount:o=!1,title:i="",text:a=""})=>{const s=I.useRef(!1),l=async u=>{var m,A;u&&((m=u==null?void 0:u.stopPropagation)==null||m.call(u),(A=u==null?void 0:u.preventDefault)==null||A.call(u));const d=j_[n]||j_.DELETE,h=W.jsxs(N8,{isBackdrop:!1,children:[W.jsx(k8,{title:d.title}),W.jsx(T8,{className:"custom-confirmation-width",children:W.jsx("div",{className:"custom-trigger-text",children:(a==null?void 0:a.length)>0?a:d.text})}),W.jsx(F8,{rightButtons:[{label:d.cancelButtonText,onClick:async()=>{g2.close(),typeof r=="function"&&await r()},backgroundColor:"#fff",borderColor:"transparent",className:(d==null?void 0:d.cancelButtonClass)||"global-cancel-button"},{label:d.confirmButtonText,onClick:async()=>{g2.close(),e&&await e(u)},className:d==null?void 0:d.confirmButtonClass,borderColor:"transparent"}]})]}),C=await xHe.fire({showConfirmButton:!1,showCancelButton:!1,html:h});C.isConfirmed&&e&&await e(u),C.isDismissed&&typeof r=="function"&&await r()};return I.useEffect(()=>{o&&!s.current&&(s.current=!0,l(null))},[o]),W.jsx("div",{onClick:l,className:yHe.customConfirmationWrapper,title:i,children:t})},hf="/not_available.svg",wHe="/big_size_image.svg",gf="/user.png",GI={HARDCODED_FALL_BACK_IMAGE:hf,HARDCODED_FALL_BACK_BIG_IMAGE:wHe,DEFAULT_AVATAR_IMAGE:gf,generateImageUrl:(e,t=!1)=>e||hf,getImageKitUrl:(e,t=300,n=300,r=40)=>e||hf,getUserAvatar:e=>{var t;return!e||!((t=e.awi_personal_info)!=null&&t.awi_avatar)?gf:e.awi_personal_info.awi_avatar||gf}},_He=1e-5,EHe=.99999,SHe=.001,MHe=.005,L8=(e,t)=>e/(t||1),qI=(e,t,n,r)=>Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2)),dg=(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(n.x-e.x)*(t.y-e.y),HHe=e=>{let t=1/0,n=1/0,r=-1/0,o=-1/0;return e.forEach(({x:i,y:a})=>{t=Math.min(t,i),n=Math.min(n,a),r=Math.max(r,i),o=Math.max(o,a)}),{minX:t,minY:n,maxX:r,maxY:o}},fg=(e,t,n=0)=>{let r=0;for(let o=0;o<(t==null?void 0:t.length)-1;o++){const i=t[o],a=t[o+1];i.y<=e.y+n?a.y>e.y+n&&dg(i,a,e)>0&&r++:a.y<=e.y-n&&dg(i,a,e)<0&&r--}return r},Sm=e=>(e==null?void 0:e.length)<2?0:Math.sqrt(Math.pow(Math.abs(e[0].x-e[1].x),2)+Math.pow(Math.abs(e[0].y-e[1].y),2));function OHe(e,t,n=0){const r=Math.min(...t.map(u=>u.x)),o=Math.max(...t.map(u=>u.x)),i=Math.min(...t.map(u=>u.y)),a=Math.max(...t.map(u=>u.y)),{x:s,y:l}=e;return s>=r-n&&s<=o+n&&l>=i-n&&l<=a+n}const LHe=(e,t,n,r,o,i,a=1)=>{if(!(n!=null&&n.length))return!1;let s,l,u,d,h=!1;switch(i==null?void 0:i.awi_annotation_type){case"rectangle":h=OHe({x:e,y:t},n,r);break;case"polygon":h=fg({x:e,y:t},n,r)!==0;break;case"circle":s=Sm(n)/2,l=(n[0].x+r+(n[1].x-o))/2,u=(n[0].y+n[1].y)/2,d=(e-l)*(e-l)+(t-u)*(t-u),d<s*s?h=!0:h=!1;break;case"dot":s=L8(.015,a),l=(n[0].x+r+(n[0].x-o))/2,u=(n[0].y+n[0].y)/2,d=(e-l)*(e-l)+(t-u)*(t-u),d<s*s?h=!0:h=!1;break;default:h=fg({x:e,y:t},n,r)!==0}return h},BHe=e=>!(!e||e.x>1||e.x<0||e.y1>1||e.y<0),RHe=e=>{if((e==null?void 0:e.length)<3)return!1;for(let t=0;t<e.length;t++)if(!BHe(e[t]))return!1;return!0},IHe=(e,t,n=!1,r=1)=>{var a,s,l,u;const o=e==null?void 0:e.awi_annotation_type;let i=!1;switch(o){case"rectangle":const d=L8(SHe,r);(t==null?void 0:t.length)>3&&Math.abs(((a=t[0])==null?void 0:a.x)-((s=t[1])==null?void 0:s.x))>d&&Math.abs(((l=t[1])==null?void 0:l.y)-((u=t[3])==null?void 0:u.y))>d&&(i=!0);break;case"circle":const h=L8(MHe,r);Sm(t)>h&&(i=!0);break;case"polygon":i=RHe(t);break;case"dot":i=!0;break;default:n&&(i=!0);break}return i},XI=(e,t,n,r,o,i)=>{const a=e-n,s=t-r,l=o-n,u=i-r,d=a*l+s*u,h=l*l+u*u,C=h!==0?d/h:-1;let m,A;C<0?(m=n,A=r):C>1?(m=o,A=i):(m=n+C*l,A=r+C*u);const b=e-m,p=t-A;return Math.sqrt(b*b+p*p)},PHe=(e,t,n)=>{let r=1/0,o=-1;for(let i=0;i<(e==null?void 0:e.length);i++){const a=(i+1)%e.length,{x:s,y:l}=e[i],{x:u,y:d}=e[a],h=XI(t,n,s,l,u,d);h<r&&(r=h,o=a)}return{insertIndex:o,minDistance:r}},JI=(e,t)=>t===0?e:JI(t,e%t),DHe=(e,t,n,r)=>(e>0&&(e=0),Math.abs(e)>n&&(e=-1*n),Math.abs(t)>r&&(t=-1*r),t>0&&(t=0),{newXTransform:e,newYTransform:t}),NHe=function(e){console.log("getBoundingBox called");const t=Math.min(...e.map(i=>i.x)),n=Math.max(...e.map(i=>i.x)),r=Math.min(...e.map(i=>i.y)),o=Math.max(...e.map(i=>i.y));return[{x:t,y:r},{x:n,y:r},{x:n,y:o},{x:t,y:o}]};function THe(e,t,n){return Math.min(n,Math.max(t,e))}function kHe(e,t=.05,n=null){const r=Math.min(...e.map(h=>h.x)),o=Math.max(...e.map(h=>h.x)),i=Math.min(...e.map(h=>h.y)),a=Math.max(...e.map(h=>h.y)),s=o-r,l=a-i;let u,d;if(n&&(n==null?void 0:n.x)>=0&&(n==null?void 0:n.y)>=0){const h=n.x,C=n.y;u=Math.max(-r,Math.min(1-o,h-(r+s/2))),d=Math.max(-i,Math.min(1-a,C-(i+l/2)))}else u=Math.max(-r,Math.min(1-o,(Math.random()*2-1)*t)),d=Math.max(-i,Math.min(1-a,(Math.random()*2-1)*t));return e.map(h=>({x:h.x+u,y:h.y+d}))}function FHe(e){const t=Math.min(...e.map(s=>s.x)),n=Math.max(...e.map(s=>s.x)),r=Math.min(...e.map(s=>s.y)),o=Math.max(...e.map(s=>s.y));return eP([{x:t,y:r},{x:n,y:o}])}function jHe(e){const t=Math.min(...e.map(s=>s.x)),n=Math.max(...e.map(s=>s.x)),r=Math.min(...e.map(s=>s.y)),o=Math.max(...e.map(s=>s.y)),i=(t+n)/2,a=(r+o)/2;return[{x:i,y:a}]}const Cf=(e,t)=>(e.x-t.x)**2+(e.y-t.y)**2,zHe=(e,t,n)=>{const r=Cf(t,n);if(r===0)return Cf(e,t);let o=((e.x-t.x)*(n.x-t.x)+(e.y-t.y)*(n.y-t.y))/r;o=Math.max(0,Math.min(1,o));const i={x:t.x+o*(n.x-t.x),y:t.y+o*(n.y-t.y)};return Cf(e,i)},VHe=(e,t)=>{let n=1/0;for(let r=0;r<(t==null?void 0:t.length);r++){const o=t[r],i=t[(r+1)%t.length],a=zHe(e,o,i);n=Math.min(n,a)}return Math.sqrt(n)},UHe=(e,t)=>{let n=1/0,r=-1;for(let o=0;o<(t==null?void 0:t.length);o++){const i=t[o],a=qI(e.x,e.y,i.x,i.y);if(a<n){const s=o%t.length;n=a,r=s}}return{minDistance:n,insertIndex:r}},hg=(e=0)=>(e<=0?e=_He:e>=1&&(e=EHe),e),$He=e=>e.map(n=>({x:hg(n.x),y:hg(n.y)})),KHe=e=>{const t=new Set,n=[];for(let r=0;r<e.length;r++){const o=`${e[r].x},${e[r].y}`;t.has(o)||(t.add(o),n.push(e[r]))}return n.length>0&&n.push(n[0]),n},ZHe=e=>{let t=0;for(let n=0;n<e.length;n++)if(e[n].x<=0){t=t+1;continue}else if(e[n].y<=0){t=t+1;continue}else if(e[n].x>=1){t=t+1;continue}else if(e[n].y>=1){t=t+1;continue}return t};function QHe(e){const t=Math.min(...e.map(s=>s.x)),n=Math.min(...e.map(s=>s.y)),r=Math.max(...e.map(s=>s.x)),o=Math.max(...e.map(s=>s.y)),i=t<0?-t:r>1?1-r:0,a=n<0?-n:o>1?1-o:0;return e.map(({x:s,y:l})=>({x:s+i,y:l+a}))}const WHe=(e,t)=>{const n=(e.x+t.x)/2,r=(e.y+t.y)/2,o=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)/2,i=Math.min(n,1-n),a=Math.min(r,1-r),s=Math.min(o,i,a),l=Math.atan2(t.y-e.y,t.x-e.x),u={x:n-s*Math.cos(l),y:r-s*Math.sin(l)},d={x:n+s*Math.cos(l),y:r+s*Math.sin(l)};return[u,d]},YHe=(e,t)=>{const n=(e[0].x+e[1].x)/2,r=t,i=Math.sqrt(Math.pow(e[1].x-e[0].x,2))/2;let a=0;return n-i<0?a=i-n:n+i>1&&(a=1-(n+i)),e[0].x+=a,e[1].x+=a,e[0].y=r,e[1].y=r,e},eP=e=>{e=WHe(e[0],e[1]);const t=(e[0].x+e[1].x)/2,n=(e[0].y+e[1].y)/2,o=Math.sqrt(Math.pow(e[1].x-e[0].x,2)+Math.pow(e[1].y-e[0].y,2))/2;let i=0;t-o<0?i=o-t:t+o>1&&(i=1-(t+o));let a=0;return n-o<0?a=o-n:n+o>1&&(a=1-(n+o)),e[0].x+=i,e[0].y+=a,e[1].x+=i,e[1].y+=a,YHe(e,n)},GHe=(e,t,n)=>{let{x:r,y:o}=tP(e.current,t);const i=n;r=Math.min(r,1),o=Math.min(o,1);const a=r-i.x,s=o-i.y;let l=[];return a===0||s===0?l=[{x:i.x,y:i.y},{x:i.x,y:i.y},{x:i.x,y:i.y},{x:i.x,y:i.y}]:a>0&&s>0?l=[{x:i.x,y:i.y},{x:r,y:i.y},{x:r,y:o},{x:i.x,y:o}]:a>0&&s<0?l=[{x:i.x,y:o},{x:r,y:o},{x:r,y:i.y},{x:i.x,y:i.y}]:a<0&&s>0?l=[{x:r,y:i.y},{x:i.x,y:i.y},{x:i.x,y:o},{x:r,y:o}]:l=[{x:r,y:o},{x:i.x,y:o},{x:i.x,y:i.y},{x:r,y:i.y}],l},tP=(e,t)=>{if(!e)return{x:0,y:0};const n=e.getBoundingClientRect();return{x:(t.clientX-n.left)/(n.right-n.left),y:(t.clientY-n.top)/(n.bottom-n.top)}},qHe=(e,t)=>{if(!e)return{x:0,y:0};const n=e.getBoundingClientRect(),r={x:(t.clientX-n.left)/(n.right-n.left),y:(t.clientY-n.top)/(n.bottom-n.top)};return r.x<=0&&(r.x=1e-4),r.y<=0&&(r.y=1e-4),r.x>=1&&(r.x=1-1e-4),r.y>=1&&(r.y=1-1e-4),r},Ln={gcd:JI,getDistance:qI,isLeft:dg,windingNumber:fg,getDiameter:Sm,checkPointInsidePolygon:LHe,isAnnotationCoordinatesValid:IHe,distanceToSegment:XI,findClosestSegment:PHe,transformCoordinatesCheck:DHe,getBoundingBox:NHe,translateCoordinatesWithFixedWidth:kHe,clampValue:THe,calculateCircleFromCoordinates:FHe,calculateCentroid:jHe,minDistanceToPolygon:VHe,closestCoordinates:UHe,fineTuneCoordinates:$He,zoomLevelValue:L8,createPolygonLoop:KHe,breakPointCount:ZHe,getBoundingBoxValues:HHe,shiftPolygon:QHe,getPerfectPointValue:hg,adjustToCircle:eP,getMousePos:tP,getMousePosAbsolute:qHe,getUpdatedCoordinates:GHe},XHe=({imageUrl:e,showAnnotations:t=!1,createAnnotation:n,handleMultipleAnnotations:r,handleUpdateAnnotationCoordinates:o,content_id:i,request_id:a,className:s="",isEditing:l=!1,selectIndex:u="-1",handleSelectAnnotationIndex:d,handleSelectTool:h,showAnnotationType:C="all",loggedUser:m,isCarousel:A=!1,classColorMap:b=null,disableAnnotation:p=!1,SAMToggle:_,imageNumber:w=0,togglePagination:x,handleSAMToggle:E,unSelectedAnnotationIDsSet:S=new Set,setMousePosition:M,allowedToCopyPreview:H=!1,copyCallBackHandler:B,annotationSession:P,SAMToggleValue:D,selectedSAMTool:N,handleCopyAnnotations:T,setOpenRequestDetails:j,openRequestDetails:V,handleNextPage:z,handlePreviousPage:k,currentPage:K,handleUpdateImageIndex:$,requestId:X,showPagination:Z,isAnnotationCreating:U,contentInfo:Y,content_key:J,isAnnotationUpdating:G,isDeleteAnnotationMutationLoading:ee,showGuidelinesFirst:oe,currentImage:ue=0,selectedContent:se=null,switchToEditMode:ye,switchToCreateMode:be,goToNextImage:Ce,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handlePasteAnnotationsByControlV:ie,annotationsResponse:Ae,isAnnotationFetching:Me,fetchAnnotationsKey:He,request:de,parentReqData:Ye,clearAnnotationCache:Je,RequestInfoModal:Ee,getAnnotationFromSAM:Ie,getAnnotationsFromSAMPrompt:De,fetchAnnotations:We,pageCount:Ge=10,annotationViewType:ct="atom",AnnotationPagination:rt,REACT_APP_SAM_ENABLED:_t="no",ImageGenerationHelper:ut=GI,fallbackImageUrl:$e,activeColor:ke,Carousel:ot,showTool:Fe=!0})=>{var Ka,h0,f,v,O,F,q,re,Oe,Qe,Xe,Lt,nn,Bn,Yn,l1;const Ne=Cg().isCtrlPressedFunc,Ve=Cg().isAltPressedFunc,[dt,Ke]=I.useState(!1),[ft,Nt]=I.useState(!1),Qt=.007,an=.03,Pn=.01,Yt=.005,pn=.005,vn=.7,Wt=.005,Bt=.005,Ht=.003,xt=.01,Ut="#40ff00",hn="#fff",gt="#FFFF00",Ct="red",Ot="rgba(0, 255, 255, 1)",Ze="rgba(0, 255, 255, 0.5)",Vt="#FF3131",me=4,et=5,je={DEFAULT:1.5,SELECTED:4.5,CAROUSAL:2.5,CIRCLE:2},vt=I.useRef(""),Ue=I.useRef(null),Et=I.useRef(null),Rt=I.useRef(null),jt=eI(),[wn,mt]=I.useState(!1),[pt,Tt]=I.useState(!1),[qe,kt]=I.useState([]),[$t,Ar]=I.useState(),[Hr,or]=I.useState(),[Jn,Kn]=I.useState({x:-1,y:-1}),[vr,zr]=I.useState(-1),[Jt,Sn]=I.useState({x:0,y:0}),[Dt,cn]=I.useState(u),[zn,Pr]=I.useState("-1"),[nr,br]=I.useState([]),[gn,Kt]=I.useState(!1),[bn,Mn]=I.useState(null),[bt,Pt]=I.useState({width:0,height:0}),Ft=Rr.INITIAL_ZOOM_PROPERTIES,[tt,Cn]=I.useState(Ft),[Dn,Dr]=I.useState(!1),[sr,o1]=I.useState(!1),[un,yn]=I.useState(-1),[tn,zt]=I.useState(!1),Gt=Rr.INITIAL_ZOOM_LEVEL,Qn=12,Wn=bt.width*Gt,Sr=I.useRef(null),[An,go]=I.useState(Ae),[Tn,$1]=I.useState(),[mn,dn]=I.useState([]),[On,Or]=I.useState(null),n1=Rr.SAM_MODEL_NAME,Mr=Rr.SAM_MODEL_CONFIDENCE,Li=Rr.SAM_MODEL_MAX_RESULTS,[Oo,Fn]=I.useState(!1),[er,Ha]=I.useState(-1),[J0,o0]=I.useState(null),[Bi,i0]=I.useState(null),[es,ts]=I.useState(null),[fr,E1]=I.useState({modelName:"",modelConfidence:0,modelMaxResults:0,promptMessage:""}),[ro,Co]=I.useState(null),[Oa,a0]=I.useState(!1),[m1,i5]=I.useState({x:-1,y:-1}),[Uo,a5]=I.useState({left:0,right:0,top:0,bottom:0}),[Lo,s0]=I.useState(null),[$o,i1]=I.useState(""),s5={SELECT:2e3,NOT_SELECT:500},[h1,Ri]=I.useState(""),La=window.devicePixelRatio,[kr,Ba]=I.useState(window.innerWidth<768*La),[ns,Yr]=I.useState(window.innerWidth<1200*La),oo=I.useRef(null),Ra=I.useRef(null),[l5,Ia]=I.useState(!1);I.useEffect(()=>{const pe=()=>{Ba(window.innerWidth<768*La),Yr(window.innerWidth<1200*La)};return window.addEventListener("resize",pe),()=>window.removeEventListener("resize",pe)},[]),I.useEffect(()=>{l5&&_9()},[l5,tt,bt]),I.useEffect(()=>{if(!$o){Ra.current=null,Ia(!1);return}const pe=new window.Image;pe.onload=()=>{Ra.current=pe,Ia(!0)},pe.src=$o},[$o]),I.useEffect(()=>(st(qe),Ta(),()=>{Lo&&clearTimeout(Lo)}),[zn]),I.useEffect(()=>{A||document.fullscreenElement||U9.getItem("full_screen")=="yes"&&Zo(!1),window.addEventListener("resize",vo)},[]),I.useEffect(()=>{console.log("Change"),kt([]),m9(),setTimeout(()=>{st()},50)},[l]),I.useEffect(()=>{b&&st(qe)},[b]),I.useEffect(()=>{i&&(i==null?void 0:i.length)>0&&Jr()},[i]),I.useEffect(()=>{go(Ae||null)},[Ae,i]),I.useEffect(()=>{if(e){const pe=ut.generateImageUrl(ut.getImageKitUrl(e,-1,-1,-1));io(pe)}kt([])},[e]),I.useEffect(()=>{$o&&(vt.current=$o,Lr())},[$o]),I.useEffect(()=>{vt.current&&vo()},[vt.current,$o]),I.useEffect(()=>{_=="SAM"?Dr(!0):Dr(!1),c5()},[_]),I.useEffect(()=>{tt.scale==1&&(tt.x!=0||tt.y!=0)&&Jr()},[tt.scale]),I.useEffect(()=>{if(((An==null?void 0:An.result)||[]).length>=0){const{x:pe,y:he}=Ln.getMousePos(Ue.current,{clientX:$t==null?void 0:$t.x,clientY:$t==null?void 0:$t.y});Lr(qe,{x:pe,y:he})}},[bt,t,tt.scale,zn]),I.useEffect(()=>{m9(),((An==null?void 0:An.result)||[]).length>=0&&st()},[nr,Dt]),I.useEffect(()=>{if(de&&An&&(An!=null&&An.result)&&((An==null?void 0:An.result)||[]).length>=0){st(qe);const pe={},he={};for(let we=0;we<An.result.length;we++)pe[An.result[we].awi_id]={...An.result[we],index:we},(de==null?void 0:de.awi_annotation_type)=="polygon"&&(he[An.result[we].awi_id]=Ln.getBoundingBoxValues(An.result[we].awi_coords));i0(pe),(de==null?void 0:de.awi_annotation_type)=="polygon"&&Or(he),(de==null?void 0:de.awi_request_for)=="attributes"&&An.result.length>0&&u=="-1"&&typeof d=="function"&&setTimeout(()=>{d(An.result[0].awi_id)},100)}else i0(null),Or(null);os()},[de,An]),I.useEffect(()=>{os()},[S]),I.useEffect(()=>{console.log("Filter annotation change"),Lr(qe),setTimeout(()=>{Lr(qe)},100)},[mn]),I.useEffect(()=>{u!=="-1"?typeof h=="function"&&(de==null?void 0:de.awi_request_for)!=="outline"&&h("edit"):br([]),Dn&&typeof h=="function"&&cn("-1"),cn(u||"-1")},[u]),I.useEffect(()=>{A||w==0&&Dn!==void 0&&(Dn?Qr.success("Switched to Auto Annotation mode"):de!=null&&de.awi_annotation_type&&Qr.success(`Switched to ${de==null?void 0:de.awi_annotation_type} Annotation mode`))},[Dn]),I.useEffect(()=>{if(!M||typeof M!="function")return;ka();const pe=setTimeout(()=>{const{x:he,y:we}=Ln.getMousePosAbsolute(Ue.current,{clientX:$t==null?void 0:$t.x,clientY:$t==null?void 0:$t.y});M({x:he,y:we})},30);return()=>clearTimeout(pe)},[$t]),I.useEffect(()=>{sr?ka():za(-1,-1)},[sr]),I.useEffect(()=>{u!="-1"&&Bi&&$1(Bi[u])},[u,Bi]),I.useEffect(()=>{Na(),ka()},[tt,bt]);const N2=pe=>{const he=pe.message;Ri(he)};I.useEffect(()=>{let pe="";U?pe="Creating Annotation...":ee?pe="Deleting Annotation...":G?pe="Updating Annotation...":Me?pe="Fetching Annotations...":tn&&(pe="Generating AI Annotations..."),N2({message:pe})},[U,G,ee,Me,tn]),I.useEffect(()=>{vo()},[Z]);const Pa=Ie&&typeof Ie=="function"?S_(Ie):null,Da=De&&typeof De=="function"?S_(De):null,mo=()=>!!(dt||Ne()),K1=()=>!!(ft||Ve()),Na=()=>{const pe=bt.width*tt.scale,he=bt.height*tt.scale;a5({left:Math.abs(tt.x),right:Math.max(0,pe-bt.width+tt.x),top:Math.abs(tt.y),bottom:Math.max(0,he-bt.height+tt.y)})},C9=I.useMemo(()=>{const pe=(An==null?void 0:An.result)||[];if(pe.length>0&&Dt!=="-1"){let he=null,we=null;const Re=pe.reduce((Le,at)=>{const{awi_id:yt}=at;return yt===Dt?he=at:yt===zn?we=at:S.has(yt)||Le.push(at),Le},[]);return we&&Re.push(we),he&&Re.push(he),Re}else return mn},[Dt,zn,mn]),io=async pe=>{nE.checkImageValidity(pe,i1,i,ct,$e)},m9=()=>{zn!="-1"&&(Lo&&clearTimeout(Lo),Pr("-1"))},Ta=()=>{if(zn!=="-1")if(Dt=="-1"||Rr.HOVER_TO_SELECT_ON_ALREADY_SELECTED){const pe=Dt=="-1"?s5.NOT_SELECT:s5.SELECT;Lo&&clearTimeout(Lo);const he=setTimeout(()=>{l&&zn!="-1"&&Dt!=zn&&(Dt=="-1"&&gn?Ta():typeof d=="function"&&(d(zn),Qr.success("Annotation selected successfully",zn)))},pe);s0(he)}else Lo&&clearTimeout(Lo);else Lo&&clearTimeout(Lo)},ka=()=>{const pe=Et.current;if(!pe)return;const he=bt.width*tt.scale,we=bt.height*tt.scale;if(pe.width=he,pe.height=we,sr){const{x:Re,y:Le}=Ln.getMousePosAbsolute(Et.current,{clientX:$t==null?void 0:$t.x,clientY:$t==null?void 0:$t.y});za(Re,Le)}},po=()=>{kt([])},Fa=(pe=!1)=>{jt.invalidateQueries(He),pe&&kt([])},Ao=pe=>{var he;if(Bi&&Bi[pe])if(l){const we=Bi[pe].index,Re=An==null?void 0:An.result[we];return Re||((he=An==null?void 0:An.result)==null?void 0:he.find(Le=>Le.awi_id==pe))}else return Bi[pe];else return null},rs=pe=>es&&es[pe]?es[pe].index:-1,c5=()=>{qe.length>0&&(console.log("clearCoordinate"),kt([]),Lr([],{x:0,y:0},!0))},os=()=>{if(de&&((An==null?void 0:An.result)||[]).length>=0){let pe=[];(S==null?void 0:S.size)>0?pe=((An==null?void 0:An.result)||[]).filter(we=>!S.has(we.awi_id)):pe=(An==null?void 0:An.result)||[];const he={};for(let we=0;we<pe.length;we++)he[pe[we].awi_id]={...pe[we],index:we};ts(he),dn(pe)}else dn([])},tr=pe=>(kr&&(pe=pe*3),Ln.zoomLevelValue(pe,tt.scale)),Bo=new Map,p9=pe=>{try{if(!pe)return Promise.resolve(Rr.DEFAULT_CANVAS_RATION);if(Bo.has(pe))return Bo.get(pe);const he=new Promise((we,Re)=>{const Le=new Image;Le.onload=()=>{const yt={w:Le.width,h:Le.height};Bo.set(pe,Promise.resolve(yt)),we(yt)},Le.onerror=Re;const at=ut.getImageKitUrl(pe,-1,-1,1);at&&(Le.src=at)});return Bo.set(pe,he),he}catch(he){return console.error(he),Promise.resolve(Rr.DEFAULT_CANVAS_RATION)}},vo=async()=>{var pe,he,we,Re,Le;if(console.log("updateDimensions called"),((pe=vt.current)==null?void 0:pe.length)>0){console.log("Canvas true");let at=Rr.DEFAULT_CANVAS_RATION;a0(!0);try{at=await p9(vt.current)}catch(Zt){console.error("Error fetching image dimensions:",Zt,vt.current),at=Rr.DEFAULT_CANVAS_RATION}const yt=Ln.gcd(at.w,at.h),qt={w:at.w/yt,h:at.h/yt};let fn=0,lt=0;if(lt=((he=Rt.current)==null?void 0:he.offsetHeight)||0,fn=lt*qt.w/qt.h,fn>(((we=Rt.current)==null?void 0:we.offsetWidth)||0)&&(fn=((Re=Rt.current)==null?void 0:Re.offsetWidth)||0,lt=fn*qt.h/qt.w),(Ue==null?void 0:Ue.current)!=null&&(Ue.current.width=fn,Ue.current.height=lt,ro==null)){const Zt=(Le=Ue.current)==null?void 0:Le.getBoundingClientRect();Co({left:Zt==null?void 0:Zt.left,top:Zt==null?void 0:Zt.top})}Pt({width:fn,height:lt}),a0(!1),Lr(qe)}},Ii=I.useCallback((pe,he,we,Re,Le,at)=>Ln.checkPointInsidePolygon(pe,he,we,Re,Le,at,tt.scale),[]),si=(pe,he=!0)=>{const{x:we,y:Re}=Ln.getMousePos(Ue.current,pe);let Le="",at=1/0;if(l&&ja(we,Re))return[Dt];const yt=mn||[];if(!he&&(yt==null?void 0:yt.length)>Rr.MAX_ANNOTATIONS_TO_HOVER)return[];switch(de==null?void 0:de.awi_annotation_type){case"circle":{yt.forEach(({awi_coords:qt,awi_id:fn})=>{if(Ii(we,Re,qt,0,0,de)){const lt=Ln.minDistanceToPolygon({x:we,y:Re},qt);lt<at&&(Le=fn,at=lt)}});break}case"dot":{const qt=tr(pn);yt.forEach(({awi_coords:fn,awi_id:lt})=>{if(Ii(we,Re,fn,qt,qt,de)){const Zt=Ln.minDistanceToPolygon({x:we,y:Re},fn);Zt<at&&(Le=lt,at=Zt)}});break}case"rectangle":{const qt=tr(Wt)/2;for(let fn=0;fn<yt.length;fn++){const{awi_coords:lt,awi_id:Zt}=yt[fn];if(Ii(we,Re,lt,qt,0,de)){const wr=Ln.minDistanceToPolygon({x:we,y:Re},lt);wr<at&&(Le=Zt,at=wr)}}break}case"polygon":{for(let qt=0;qt<yt.length;qt++){const{awi_coords:fn,awi_id:lt}=yt[qt];if(On){const Zt=On[lt];if(Zt){const{minX:wr,minY:le,maxX:c1,maxY:S1}=Zt;if(we<wr||we>c1||Re<le||Re>S1)continue}}if(Ii(we,Re,fn,0,0,de)){const Zt=Ln.minDistanceToPolygon({x:we,y:Re},fn);Zt<at&&(Le=lt,at=Zt)}}break}default:console.warn(`Unknown annotation type: ${de==null?void 0:de.awi_annotation_type}`);break}return Le&&Le.length>0?(he&&cn(Le),[Le]):(he&&(console.log("setSelectAnnotationId "),typeof d=="function"&&u!="-1"&&d("-1",!1)),[])},T2=_4.throttle(si,50),ja=(pe,he)=>{const we=Ao(u);if(we){const Re=we.awi_coords;if((de==null?void 0:de.awi_annotation_type)=="polygon"){const Le=Ln.minDistanceToPolygon({x:pe,y:he},Re),at=tr(Bt);return Le<=at}else if((de==null?void 0:de.awi_annotation_type)=="rectangle"){const{insertIndex:Le,minDistance:at}=Ln.closestCoordinates({x:pe,y:he},Re),yt=tr(Bt);return console.log(Le),at<=yt}}else return!1},u5=(pe,he)=>{const{x:we,y:Re}=Ln.getMousePos(Ue.current,pe),Le=Ao(he);if(console.log("selectAnnotation",Le),Le){const{awi_coords:at}=Le;if(at.length===1){const lt=tr(Yt);Ii(we,Re,at,lt,lt,de)&&(Tt(!0),Kt(!0),or({x:we,y:Re}),kt(at));return}if(at.length===2){const{x:lt,y:Zt}=at[0],{x:wr,y:le}=at[1],c1=Ln.getDiameter([{x:lt,y:Zt},{x:wr,y:le}])/2,S1=(lt+wr)/2,Cr=(Zt+le)/2;Tt(!0),Kt(!0),or({x:we,y:Re}),Kn({x:we,y:Re}),kt(at);const rn=(we-S1)*(we-S1)+(Re-Cr)*(Re-Cr),y1=tr(vn);rn>y1*y1*c1*c1&&Kt(!1);return}const yt=mo()?0:tr(Qt),qt=Ii(we,Re,at,yt,0,de),fn=ja(we,Re);if(!qt&&!fn)Kn({x:-1,y:-1}),or({x:0,y:0}),Kt(!1);else{if(or({x:we,y:Re}),Tt(!0),(de==null?void 0:de.awi_annotation_type)=="polygon")if(mo())Kt(!0);else if(Ii(we,Re,at,yt,0,de)){const{minDistance:Zt}=Ln.findClosestSegment(at,we,Re),wr=tr(xt);Zt>=wr?Kt(!0):Kt(!1)}else Kt(!1);else Kt(!0);kt(at),Kn({x:-1,y:-1}),mo()||at.forEach((lt,Zt)=>{if(we<=lt.x+yt&&we>=lt.x&&Re<=lt.y+yt&&Re>=lt.y||we>=lt.x-yt&&we<=lt.x&&Re>=lt.y-yt&&Re<=lt.y||we<=lt.x+yt&&we>=lt.x&&Re>=lt.y-yt&&Re<=lt.y||we>=lt.x-yt&&we<=lt.x&&Re<=lt.y+yt&&Re>=lt.y){if((de==null?void 0:de.awi_annotation_type)==="polygon")l?(Kn({x:we,y:Re}),zr(Zt)):(zr(Zt),Kn(at[Zt])),console.log("setSelectCornerCoordinates");else if((de==null?void 0:de.awi_annotation_type)==="rectangle"&&!Dn){const wr=at[(Zt+2)%4];Kn(wr)}else if(l){const wr=at[(Zt+2)%4];Kn(wr)}else zr(Zt),Kn(at[Zt]);Kt(!1),kt([])}})}}},A9=(pe="all")=>{const he=window.devicePixelRatio;if(pe!="cross"&&Ue.current)if(tt.scale==1){const we=+getComputedStyle(Ue.current).getPropertyValue("height").slice(0,-2),Re=+getComputedStyle(Ue.current).getPropertyValue("width").slice(0,-2);Ue.current.setAttribute("height",(we*he).toString()),Ue.current.setAttribute("width",(Re*he).toString())}else{const we=bt.height*tt.scale,Re=bt.width*tt.scale;Ue.current.setAttribute("height",(we*he).toString()),Ue.current.setAttribute("width",(Re*he).toString())}if(Et.current)if(tt.scale==1){const we=+getComputedStyle(Et.current).getPropertyValue("height").slice(0,-2),Re=+getComputedStyle(Et.current).getPropertyValue("width").slice(0,-2);Et.current.setAttribute("height",(we*he).toString()),Et.current.setAttribute("width",(Re*he).toString())}else{const we=bt.height*tt.scale,Re=bt.width*tt.scale;Et.current.setAttribute("height",(we*he).toString()),Et.current.setAttribute("width",(Re*he).toString())}},na=(pe,he)=>{const we=Ln.getDistance(pe.x,pe.y,he.x,he.y),Re=tr(Qt),Le=tr(Pn);if(we<=Le){let at=!1;return we<=Re?at=!1:we<=Le&&(at=!0),{success:!0,distance:we,zoomClosePoint:Re,zoomPointAnnotationValue:Le,isExtraPointNeeded:at}}else return{success:!1,distance:we,zoomClosePoint:Re,zoomPointAnnotationValue:Le,isExtraPointNeeded:!1}},Pi=(pe=[],he={x:0,y:0},we=!1,Re=!1,Le)=>{if((pe||[]).length>0){Le.beginPath();const at=bo(pe);if((de==null?void 0:de.awi_annotation_type)==="rectangle")if(Dn){if(l){Le.moveTo(at[0].x,at[0].y);for(let yt=1;yt<at.length;yt++)Le.lineTo(at[yt].x,at[yt].y);Le.closePath()}else if(Dn){console.log("Sam function");const yt=bo(pe);Le.clearRect(0,0,Le.canvas.width,Le.canvas.height),Le.fillStyle="rgba(0, 0, 0, 0.35)",Le.strokeStyle=Ut,Le.lineWidth=je.DEFAULT,yt.forEach(qt=>{Le.beginPath(),Le.arc(qt.x,qt.y,et,0,Rr.TWO_PIE,!0),Le.fill(),Le.stroke()})}}else{Le.moveTo(at[0].x,at[0].y);for(let yt=1;yt<at.length;yt++)Le.lineTo(at[yt].x,at[yt].y);Le.closePath()}else if((de==null?void 0:de.awi_annotation_type)==="circle")if(Dn&&!l){const yt=bo(pe);console.log("coordinatesVal ",yt),Le.clearRect(0,0,Le.canvas.width,Le.canvas.height),Le.fillStyle="rgba(0, 0, 0, 0.35)",Le.strokeStyle=Ut,Le.lineWidth=je.DEFAULT,yt.forEach(qt=>{Le.beginPath(),Le.arc(qt.x,qt.y,et,0,Rr.TWO_PIE,!0),Le.fill(),Le.stroke()})}else{const yt=Ln.getDiameter(at);Le.arc((at[0].x+at[1].x)/2,(at[0].y+at[1].y)/2,Math.floor(yt/2),0,Rr.TWO_PIE)}Le.save(),Le.lineWidth=je.DEFAULT,Le.strokeStyle=Ut,Le.stroke()}if((de==null?void 0:de.awi_annotation_type)==="polygon"&&(qe||[]).length>0&&!we&&!l){if(!Dn){const at=bo(qe);if(Le.beginPath(),Le.lineWidth=je.DEFAULT,Le.strokeStyle=Ut,at.forEach((yt,qt)=>{if(qt>0){const fn=at[qt-1];Le.moveTo(fn.x,fn.y),Le.lineTo(yt.x,yt.y)}}),Le.stroke(),at.forEach((yt,qt)=>{Le.beginPath(),Le.arc(yt.x,yt.y,et,0,Rr.TWO_PIE,!0),Le.fillStyle=qt===0?gt:Ut,Le.fill()}),!K1()&&!Re&&he&&he.x>0&&he.y>0&&!(he.x>.998||he.y>.998||he.x<.002||he.y<.002)){const yt=bo([he]);Le.beginPath();const qt=na(qe[0],he);qt!=null&&qt.success&&(qe==null?void 0:qe.length)>2?qt.isExtraPointNeeded?(Le.beginPath(),Le.rect(yt[0].x-me*3,yt[0].y-me*3,me*6,me*6),Le.fillStyle=Ct,Le.fill(),Le.lineWidth=4,Le.strokeStyle=Ct,Le.stroke()):(Le.beginPath(),Le.rect(yt[0].x-me*3,yt[0].y-me*3,me*6,me*6),Le.fillStyle=gt,Le.fill(),Le.lineWidth=2,Le.strokeStyle=gt,Le.stroke()):Le.arc(yt[0].x,yt[0].y,me,0,Rr.TWO_PIE,!0),Le.fillStyle="rgba(0,0,0,0.35)",Le.fill(),Le.strokeStyle=Ut,Le.stroke();const fn=at[at.length-1];Le.beginPath(),Le.moveTo(fn.x,fn.y),Le.lineTo(yt[0].x,yt[0].y),Le.strokeStyle="#ff0000",Le.setLineDash([5,5]),Le.lineWidth=je.DEFAULT,Le.stroke(),Le.setLineDash([])}Le.closePath(),Le.lineWidth=je.DEFAULT,Le.stroke(),Le.save()}if(Dn){const at=bo(pe);Le.clearRect(0,0,Le.canvas.width,Le.canvas.height),Le.fillStyle="rgba(0, 0, 0, 0.35)",Le.strokeStyle=Ut,Le.lineWidth=je.DEFAULT,at.forEach(yt=>{Le.beginPath(),Le.arc(yt.x,yt.y,et,0,Rr.TWO_PIE,!0),Le.fill(),Le.stroke()})}}},za=(pe,he)=>{const we=Et.current;if(!we)return;const Re=we.getContext("2d");if(!Re||(Re.clearRect(0,0,we.width,we.height),pe==-1&&he==-1))return;A9("cross");const Le=bo([{x:pe,y:he}])[0],at=Le.x,yt=Le.y;Re.strokeStyle="#800080",Re.lineWidth=je.CAROUSAL,Re.setLineDash([3,3]),Re.beginPath(),Re.moveTo(at,0),Re.lineTo(at,we.height),Re.stroke(),Re.beginPath(),Re.moveTo(0,yt),Re.lineTo(we.width,yt),Re.stroke(),Re.setLineDash([])},Lr=(pe=[],he={x:0,y:0},we=!1,Re=!1,Le=0)=>{var at,yt,qt,fn;if(de&&!Oa){const lt=(at=Ue.current)==null?void 0:at.getContext("2d");if(A9(),lt!=null){lt.imageSmoothingEnabled=!1,lt.clearRect(0,0,bt.width,bt.height),!l&&(de==null?void 0:de.awi_request_for)!="attributes"&&Pi(pe,he,we,Re,lt);const Zt=C9||[];for(let wr=0;wr<Zt.length;wr++){const le=Zt[wr],{awi_coords:c1,awi_id:S1,awi_status:Cr}=le;if(c1.length===0)return;const rn=bo(c1);lt.beginPath(),lt.lineJoin="round";let y1=!1,W1="",Po="";if(C==="all"||Cr===C){le.awi_status==="pending"?W1=le.awi_outline_status==="approved"?"rgba(214, 204, 60, 0.3)":"rgba(0, 0, 0,0)":W1=Rr.STATUS_COLOR_MAP[le.awi_status]||"rgba(0, 0, 0,0)",Po=W1;let Fi=!1;if(S1===Dt?(lt.lineWidth=je.SELECTED,lt.strokeStyle=Ut,lt.fillStyle="rgba(0,0,0,0.40)",Fi=!0):S1===zn&&(lt.lineWidth=je.DEFAULT,lt.strokeStyle=Ot,lt.fillStyle=Ze,Fi=!0),!Fi)if(lt.fillStyle=W1,A?lt.lineWidth=je.CAROUSAL:lt.lineWidth=je.DEFAULT,b){const Y1=b[le.awi_classes[0].awi_id];Y1?(Po=Y1,lt.strokeStyle=Y1):(Po=le.awi_classes[0].awi_color,lt.strokeStyle=le.awi_classes[0].awi_color)}else Po=le.awi_classes[0].awi_color,lt.strokeStyle=le.awi_classes[0].awi_color;switch(de==null?void 0:de.awi_annotation_type){case"circle":{const Y1=(rn[0].x+rn[1].x)/2,Za=(rn[0].y+rn[1].y)/2,g5=Math.sqrt(Math.pow(rn[1].x-rn[0].x,2)+Math.pow(rn[1].y-rn[0].y,2));lt.beginPath(),lt.arc(Y1,Za,g5/2,0,Rr.TWO_PIE),lt.stroke(),lt.closePath(),y1=!0;break}case"dot":{lt.beginPath(),lt.moveTo(rn[0].x,rn[0].y),lt.arc(rn[0].x,rn[0].y,me,0,Rr.TWO_PIE,!0),lt.stroke(),lt.closePath(),y1=!0;break}case"rectangle":{lt.beginPath(),lt.moveTo((yt=rn[0])==null?void 0:yt.x,(qt=rn[0])==null?void 0:qt.y);for(let Y1=1;Y1<rn.length;Y1++)lt.lineTo(rn[Y1].x,rn[Y1].y);lt.closePath(),lt.stroke(),y1=!0;break}case"polygon":{y1=!0,lt.moveTo(rn[0].x,rn[0].y);const Y1=rn.length;for(let Za=0;Za<Y1;Za++)lt.lineTo(rn[Za].x,rn[Za].y);break}}if(lt.fill(),lt.save(),lt.stroke(),y1){lt.save();const Y1=S1===Dt,Za=S1===zn,g5=le.sam_status==="yes";rn.forEach((r3,F2)=>{lt.beginPath();let yo=me,ji="";Y1?rn.length==1&&(de==null?void 0:de.awi_annotation_type)=="dot"||Re&&F2%(rn.length-1)==Le?(yo=me*2,ji=Ut):(ji=Ut,yo=me):Za?(ji=Ot,yo=me):(ji=Po,yo=me),(de==null?void 0:de.awi_annotation_type)==="polygon"?F2%(rn.length-1)==0&&(g5?ji=Vt:ji=gt):F2==0&&rn.length>1&&g5&&(ji=Vt),lt.arc(r3.x,r3.y,yo,0,2*Math.PI,!0),lt.fillStyle=ji,lt.strokeStyle=ji,lt.fill(),lt.stroke(),lt.restore()})}else console.log("Error")}}}ka()}if(tt.scale==1&&(Ue!=null&&Ue.current)){const lt=(fn=Ue==null?void 0:Ue.current)==null?void 0:fn.getBoundingClientRect();Co({top:lt==null?void 0:lt.top,left:lt==null?void 0:lt.left})}},bo=pe=>pe.map(we=>({x:we.x*Ue.current.width,y:we.y*Ue.current.height})),Di=pe=>{const{x:he,y:we}=Ln.getMousePos(Ue.current,pe);kt(Re=>{const Le=[...Re];return Le[1].x=he,Le[1].y=we,Ln.adjustToCircle(Le)})},a1=pe=>{if(pe.length===0)return!1;const he=Ln.isAnnotationCoordinatesValid(de,pe,Dn,tt.scale);return he||Lr(),he},d5=(pe,he)=>(console.log("Has Moved checking"),Math.abs(pe.x-he.x)>0||Math.abs(pe.y-he.y)>0),ra=()=>{if((qe==null?void 0:qe.length)>1){const pe=qe[qe.length-1],he=[];let we=!1;for(let Re=0;Re<qe.length-1;Re++){const Le=qe[Re],at=tr(Yt);if(Math.abs(pe.x-Le.x)<=at&&Math.abs(pe.y-Le.y)<=at){we=!0;continue}else he.push({x:Le.x,y:Le.y})}return we||he.push(qe[qe.length-1]),kt(he),he}else return qe},f5=()=>{if(typeof n=="function")if(qe.length>3){const pe=na(qe[0],qe[qe.length-1]);let he=[];pe.success&&(pe.isExtraPointNeeded==!1?(qe[qe.length-1].x=qe[0].x,qe[qe.length-1].y=qe[0].y,he=qe):pe.isExtraPointNeeded&&(he=[...qe,{x:qe[0].x,y:qe[0].y}])),(he==null?void 0:he.length)>0?(kt([]),n(he,null,!1,()=>{po()})):Lr(qe)}else Lr(qe)},k1=(pe,he)=>{console.log("deletePolygonPoint"),console.log("selectIndex ",he);const we=[];for(let Re=0;Re<pe.length;Re++)Re!=he&&we.push(pe[Re]);he==0&&(we[we.length-1]=we[0]),kt(we),(we==null?void 0:we.length)>3?(Lr(we),typeof o=="function"&&a1(we)&&!p&&(Qr.success("Point deleted successfully"),o(we,u,()=>{po()}))):Qr.error("Point can not be deleted, as polygon need minimum of three points"),Ha(-1),o0(null)};function Z1(pe,he){console.log("handleAddAnnotationPoint");const we=pe.target;if(!(we!=null&&we.getBoundingClientRect))return;const Re=we.getBoundingClientRect(),Le=(pe.clientX-Re.left)/Re.width,at=(pe.clientY-Re.top)/Re.height,{insertIndex:yt,minDistance:qt}=Ln.closestCoordinates({x:Le,y:at},he),fn=tr(Qt);if(qt<fn){console.log("Very close point to insert"),console.log("minDistanceMin",qt);const le=tr(an);if(qt<le&&mo())console.log("We can remove this"),(he==null?void 0:he.length)>3&&(o0(he),Rr.POLYGON_POINT_REMOVE_CONFIRM_PROMPT?Ha(yt):k1(he,yt));else{if(qt<le)Qr.error("Press CTRL and then click to prompt for point deletion");else{const c1=(qt*100).toFixed(1);Qr.error("Very close point to draw "+c1+" it should be more than "+Qt*100)}Ha(-1),o0(null)}return}if(mo())return;Ha(-1),o0(null);const{insertIndex:lt,minDistance:Zt}=Ln.findClosestSegment(he,Le,at),wr=tr(xt);Zt>=wr||(he.splice(lt,0,{x:Le,y:at}),kt(he),Lr(he),typeof o=="function"&&a1(qe)&&!p&&o(qe,u,()=>{po()}))}const Va=pe=>{M&&typeof M<"u"&&typeof M=="function"&&(M({x:-1,y:-1}),za(-1,-1)),b9(pe,!0),zn!="-1"?m9():(de==null?void 0:de.awi_annotation_type)=="polygon"&&!l&&!A&&!Dn&&qe.length>0&&setTimeout(()=>{Lr(qe)},200)},v9=pe=>{if(!Dn){if((gn||pt&&Jn.x!==-1&&Jn.y!==-1)&&d5(Hr,Ln.getMousePos(Ue.current,pe))){const he=Ao(u);if(he){const we=a1(he.awi_coords);if(typeof o=="function"&&we)if(Jn.x!==-1&&Jn.y!==-1)if((de==null?void 0:de.awi_annotation_type)=="polygon")o(he.awi_coords,Dt);else{const Re=Ln.getUpdatedCoordinates(Ue,pe,Jn);o(Re,Dt)}else o(he.awi_coords,Dt);else we||((de==null?void 0:de.awi_annotation_type)=="polygon"&&Ro(he.awi_coords,pe),Fa(!0))}}wn?(mt(!1),typeof n=="function"&&a1(qe)&&((de==null?void 0:de.awi_annotation_type)==="polygon"?f5():n(qe,null,!1,()=>{po()}))):pt&&(Tt(!1),cn("-1"),br([]),typeof d=="function"&&d("-1"))}},l0=pe=>{if(!(Ue!=null&&Ue.current))return;const he=T2(pe,!1);(he==null?void 0:he.length)>0&&he[0]!=Dt?(Ta(),Pr(he[0]),Ue.current.style.cursor="pointer"):zn!="-1"&&(Pr("-1"),Dt=="-1"&&(Ue.current.style.cursor="default"))},is=(pe,he=!1)=>{if(he){st(qe);return}const{x:we,y:Re}=Ln.getMousePos(Ue.current,pe),Le=Ao(u);if(Le){const at=Le.awi_coords,{minDistance:yt,insertIndex:qt}=Ln.closestCoordinates({x:we,y:Re},at),fn=tr(Wt);if(yt<=fn&&Ue.current){const lt=Ue.current.getContext("2d");if(!lt||qt==un)return;Ue.current.style.cursor="pointer",yn(qt),Ue.current.title="Point "+(qt+1);const Zt=bo([at[qt]])[0];lt.fillStyle=hn,lt.beginPath(),lt.arc(Zt.x,Zt.y,me*2.5,0,Rr.TWO_PIE),lt.strokeStyle="black",lt.lineWidth=je.SELECTED,lt.stroke(),lt.fill()}else if(Ue.current){if(!Ue.current.getContext("2d"))return;const Zt=tr(Ht);un!==-1&&(st(),yn(-1)),(de==null?void 0:de.awi_annotation_type)=="polygon"&&Ln.findClosestSegment(at,we,Re).minDistance<=Zt?(Ue.current.style.cursor="pointer",Ue.current.title="Add point"):(Ue.current.style.cursor="default",Ue.current.title="")}}},b9=bi.useThrottle(is,100),Ua=bi.useThrottle(l0,100),Ro=(pe,he)=>{if(Ln.breakPointCount(pe)>0){console.log("================================BREAK================================"),Kt(!1),he&&he.stopPropagation&&(he==null||he.stopPropagation());const Re=Ln.shiftPolygon(pe);if(typeof o=="function"&&a1(Re)){const Le=u;o(Re,u,()=>{Dt!=Le&&cn(Le),po()})}}},Te=()=>mn.length>Rr.MAX_ANNOTATIONS_TO_RUN_FAST?st:Lr,st=bi.useThrottle((pe,he,we=!1,Re=!1,Le=-1)=>{Lr(pe,he,we,Re,Le)},50),nt=(pe="forward")=>{if((mn||[]).length!=0)if(pe=="last_update"){const he=mn==null?void 0:mn.reduce((we,Re)=>{const Le=new Date(we.awi_last_updation).getTime();return new Date(Re.awi_last_updation).getTime()>Le?Re:we});he&&(cn(he.awi_id),typeof d=="function"&&d(he.awi_id))}else if(u==="-1")(mn||[]).length>0&&(cn(mn[0].awi_id),typeof d=="function"&&d(mn[0].awi_id));else{const he=rs(u);pe=="backward"?he!==-1?he>0?(cn(mn[he-1].awi_id),typeof d=="function"&&d(mn[he-1].awi_id)):(cn(mn[mn.length-1].awi_id),typeof d=="function"&&d(mn[mn.length-1].awi_id)):(mn||[]).length>0&&(cn(mn[mn.length-1].awi_id),typeof d=="function"&&d(mn[mn.length-1].awi_id)):he!==-1?(mn||[]).length>he+1?(cn((mn||[])[he+1].awi_id),typeof d=="function"&&d((mn||[])[he+1].awi_id)):(cn((mn||[])[0].awi_id),typeof d=="function"&&d((mn||[])[0].awi_id)):(mn||[]).length>0&&(cn(mn[0].awi_id),typeof d=="function"&&d(mn[0].awi_id))}},sn=()=>{if(console.log("handleCompleteAnnotation"),!(!de||l))if(_==="SAM"){sa();return}else{if((de==null?void 0:de.awi_annotation_type)!="polygon")return;if(typeof n=="function"&&a1(qe))if((qe==null?void 0:qe.length)>2){const pe=[...qe,{x:qe[0].x,y:qe[0].y}];kt([]),n(pe,null,!1,()=>{po()})}else{Qr.error("Polygon requires minimum of three coordinates");return}else Qr.error("Invalid coordinates, please create valid coordinates")}},$n=pe=>{console.log("handle Complete Multiple Annotation SAM");const he=[];for(let we=0;we<(pe==null?void 0:pe.length);we++){const Re=pe[we].outline,Le=pe[we].classId;if(a1(Re)){const yt={coords:(de==null?void 0:de.awi_annotation_type)=="polygon"?Ln.createPolygonLoop(Re):Re,classId:Le,isSam:!0};he.push(yt)}}(he==null?void 0:he.length)>0&&typeof r=="function"&&(kt([]),r(he,()=>{(he==null?void 0:he.length)>0&&Fa()}))},hr=()=>{if(console.log("undoAnnotationPoint"),console.log("coordinates ------>",qe),u!="-1"){u0();return}if(qe.length>0&&(de==null?void 0:de.awi_annotation_type)==="polygon")qe.pop(),kt([...qe]),Lr(qe);else if(qe.length>0&&Dn)qe.pop(),kt([...qe]),Lr(qe);else return},Jr=()=>{Cn(Ft)},Br=(pe,he="zoom-in")=>{if(Ue.current&&Ue)if(he=="zoom-in"){const we=Gt,Re=tt.scale+we,Le=Ue.current.getBoundingClientRect(),at=pe.clientX-Le.left,yt=pe.clientY-Le.top,qt=Re/tt.scale,fn=tt.x-at*(qt-1),lt=tt.y-yt*(qt-1),Zt={scale:+Re.toFixed(2),x:fn,y:lt};Cn(Zt),i5({x:pe.clientX,y:pe.clientY})}else{const we=Gt,Re=tt.scale-we;if(Re==1)Jr();else{const Le=Ue.current.getBoundingClientRect();(m1.x==-1||m1.y==-1)&&console.log("zoomTimeMousePoint");const at=m1.x!=-1?m1.x:pe.clientX,yt=m1.y!=-1?m1.y:pe.clientY,qt=at-Le.left,fn=yt-Le.top,lt=Re/tt.scale,Zt=-Math.abs(tt.x+qt*(1-lt)),wr=-Math.abs(tt.y+fn*(1-lt)),le=bt.width*(tt.scale+Gt-1),c1=bt.height*(tt.scale+Gt-1),{newXTransform:S1,newYTransform:Cr}=Ln.transformCoordinatesCheck(Zt,wr,le,c1),rn={scale:+Re.toFixed(2),x:S1,y:Cr};Cn(rn)}}},oa=(pe=null)=>{if(tt.scale!==Qn&&Ue.current)if(!pe||!pe.clientX||!pe.clientY||pe.type=="click"){const he=bt.width*(tt.scale+Gt-1),we=bt.height*(tt.scale+Gt-1),Re=tt.x-bt.width*Gt/2,Le=tt.y-bt.height*Gt/2,{newXTransform:at,newYTransform:yt}=Ln.transformCoordinatesCheck(Re,Le,he,we),qt={scale:+(tt.scale+Gt).toFixed(2),x:at,y:yt};Cn(qt)}else Br(pe,"zoom-in")},Q1=(pe=null)=>{if(tt.scale!==1&&Ue.current)if(!pe||!pe.clientX||!pe.clientY||pe.type=="click"){const he=bt.width*(tt.scale-Gt-1),we=bt.height*(tt.scale-Gt-1),Re=tt.x+bt.width*Gt/2,Le=tt.y+bt.height*Gt/2,{newXTransform:at,newYTransform:yt}=Ln.transformCoordinatesCheck(Re,Le,he,we);Cn({scale:+(tt.scale-Gt).toFixed(2),x:at,y:yt})}else Br(pe,"zoom-out")},b1=pe=>{pe.deltaY<0?oa(pe):Q1(pe)},ia=()=>{const pe=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),we=tt.x+Wn,Re=tt.y,{newXTransform:Le,newYTransform:at}=Ln.transformCoordinatesCheck(we,Re,pe,he);Cn({...tt,x:Le,y:at})},aa=()=>{const pe=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),we=tt.x-Wn,Re=tt.y,{newXTransform:Le,newYTransform:at}=Ln.transformCoordinatesCheck(we,Re,pe,he);Cn({...tt,x:Le,y:at})},li=()=>{const pe=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),we=tt.x,Re=tt.y+Wn,{newXTransform:Le,newYTransform:at}=Ln.transformCoordinatesCheck(we,Re,pe,he);Cn({...tt,x:Le,y:at})},Ni=()=>{const pe=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),we=tt.x,Re=tt.y-Wn,{newXTransform:Le,newYTransform:at}=Ln.transformCoordinatesCheck(we,Re,pe,he);Cn({...tt,x:Le,y:at})};if(!e||!i)return null;const sa=()=>{if(tn){Qr.error("Request already in progress");return}if(!(qe!=null&&qe.length)){Qr.error("No points to send");return}const pe={};pe.image_url=e,pe.coords=qe,console.log("Sent to SAM",pe),y9(),typeof h=="function"&&h("annotate")},lr=()=>{if(Oo?Fn(!1):Oo||Fn(!0),tn){Qr.error("Request already in progress");return}typeof h=="function"&&h("annotate")},k2=pe=>{console.log("Submitted data from SAMModal:",pe),la(pe),typeof h=="function"&&h("annotate")},la=pe=>{if(!Da||!(Da!=null&&Da.mutate)){Qr.error("SAM Prompt is not available");return}console.log("getSAMAnnotationsPrompt");const he=pe.awi_annotation_prompt,we=pe.model_confidence,Re=pe.model_name,Le=pe.model_max_results;E1({modelName:Re,modelConfidence:we,modelMaxResults:Le,promptMessage:he});const at=ut.generateImageUrl(ut.getImageKitUrl(e,-1,-1,-1)),qt={requestId:a||0,contents:[{url:$o||at,contentKey:i,directPrompt:he||""}],confidence:we||Mr,modelName:Re||n1,modelMaxResults:Le||Li};zt(!0),Da.mutate(qt,{onSuccess:fn=>{var lt,Zt,wr,le,c1;if(zt(!1),!fn.success)Qr.error(fn.message);else{Fn(!1);const S1=((wr=(Zt=(lt=fn.data)==null?void 0:lt[0])==null?void 0:Zt.contours)==null?void 0:wr[0])??null;if(S1){const Cr=S1.coordinates;if((Cr==null?void 0:Cr.length)==0||!((c1=(le=Cr[0])==null?void 0:le.box)!=null&&c1.length))Qr.error("No auto annotation is possible to create");else{const rn=[];(de==null?void 0:de.awi_annotation_type)=="polygon"?(console.log("coordinates",Cr),Cr.forEach(y1=>{var W1;(W1=y1==null?void 0:y1.mask_polygon)==null||W1.forEach(Po=>{const Y1={outline:Po.outline,classId:Cr.classId};rn.push(Y1)})})):(de==null?void 0:de.awi_annotation_type)=="rectangle"?Cr.forEach(y1=>{const W1=Ln.getBoundingBox(y1.box);kt(W1);const Po={outline:W1,classId:Cr.classId};rn.push(Po)}):(de==null?void 0:de.awi_annotation_type)=="circle"?Cr.forEach(y1=>{const W1=Ln.calculateCircleFromCoordinates(Ln.getBoundingBox(y1.box));kt(W1);const Po={outline:W1,classId:Cr.classId};rn.push(Po)}):(de==null?void 0:de.awi_annotation_type)=="dot"&&Cr.forEach(y1=>{const W1=Ln.calculateCentroid(y1.box);kt(W1);const Po={outline:W1,classId:Cr.classId};rn.push(Po)}),$n(rn),typeof E=="function"&&E("Normal")}}else Qr.error("No Auto Annotation found")}},onError:fn=>{Qr.exception(fn),zt(!1)}})},y9=()=>{if(!Pa||!(Pa!=null&&Pa.mutate)){Qr.error("SAM is not available");return}const pe=ut.generateImageUrl(ut.getImageKitUrl(e,-1,-1,-1)),he=$o||pe,we=bi.chunkArray(qe),Re={img_url:he,coords:qe,coordinates:we};zt(!0),Pa.mutate(Re,{onSuccess:Le=>{var at;if(zt(!1),!Le.success)Qr.error(Le.message);else if(console.log("this is the SAM data",Le),((at=Le==null?void 0:Le.data)==null?void 0:at.length)>0){const yt=[];(de==null?void 0:de.awi_annotation_type)=="polygon"?Le.data.forEach(qt=>{qt.contours.forEach(fn=>{kt(fn.outline);const Zt={outline:fn.outline,classId:null};yt.push(Zt)})}):(de==null?void 0:de.awi_annotation_type)=="rectangle"?Le.data.forEach(qt=>{kt(qt.bbox),console.log("this si the bbox",qt.bbox);const lt={outline:qt.bbox,classId:null};yt.push(lt)}):(de==null?void 0:de.awi_annotation_type)=="circle"?Le.data.forEach(qt=>{const fn=Ln.calculateCircleFromCoordinates(qt.bbox);kt(fn);const lt={outline:fn,classId:null};yt.push(lt)}):(de==null?void 0:de.awi_annotation_type)=="dot"&&Le.data.forEach(qt=>{const fn=Ln.calculateCentroid(qt.bbox);kt(fn);const lt={outline:fn,classId:null};yt.push(lt)}),$n(yt)}else Qr.error("No annotations found from SAM")},onError:Le=>{Qr.exception(Le),zt(!1)}})},c0=async()=>{if(Je&&typeof Je=="function"){Qr.success("Loading Annotations...");const pe=await Je();console.log("cacheRemoveAnnotationResponse ",pe),pe!=null&&pe.success?(Qr.success((pe==null?void 0:pe.message)+" and now loading final annotations..."),Fa(!0)):Qr.error(pe==null?void 0:pe.message)}},u0=()=>{var he;console.log("Undo last state annotation");const pe=Ao(u);if(((he=pe.past_coords)==null?void 0:he.length)>0){const we=pe.past_coords[pe.past_coords.length-1];typeof o=="function"&&a1(we)&&!p&&o(we,u,()=>{po()})}},ci=pe=>{console.log("Control p"),Ue.current&&oa(pe)},x9=pe=>{console.log("Control m"),Q1(pe)},Io=()=>{const pe={clientX:($t==null?void 0:$t.x)||0,clientY:($t==null?void 0:$t.y)||0};ci(pe)},Ko=()=>{const pe={clientX:($t==null?void 0:$t.x)||0,clientY:($t==null?void 0:$t.y)||0};x9(pe)},h5=()=>{console.log("Copying annotations"),B&&typeof B=="function"&&B((An==null?void 0:An.result)||[])},Zo=(pe=!0)=>{try{document.fullscreenElement?(document.exitFullscreen().then(()=>{console.log("Fullscreen exited")}).catch(he=>{console.log(he)}),pe&&U9.setItem("full_screen","no")):(document.documentElement.requestFullscreen().then(()=>{console.log("Fullscreen entered")}).catch(he=>{console.log(he)}),pe&&U9.setItem("full_screen","yes"))}catch(he){console.log(he)}},ui=pe=>{var he;if(!(!A&&!["awi_annotator","awi_verifier","awi_developer"].includes(m.userObj.awi_level))){if((de==null?void 0:de.awi_request_for)=="attributes"){const we=si(pe)||[];console.log("This is the temp annotation",we),we.length>0&&(br(we),typeof d=="function"&&d(we[0]),Lr()),gn&&Kt(!1),Tt(!1);return}if(wn)if(mt(!1),Dn){if(qe&&(qe==null?void 0:qe.length)>0){let we=[];kr?mo()?we=ra():we=qe:we=ra(),Lr(we)}}else console.log("creating new annotation"),typeof n=="function"&&a1(qe)&&((de==null?void 0:de.awi_annotation_type)==="polygon"?f5():(kt([]),n(qe,null,!1,()=>{po()})));else if(l&&Dt!=="-1"||A){if((gn||Jn.x!==-1&&Jn.y!==-1)&&d5(Hr,Ln.getMousePos(Ue.current,pe))){const we=Ao(Dt);if(we){const Re=[...we.awi_coords],Le=a1(Re);typeof o=="function"&&Le&&!p?o(Re,u,()=>{po()}):Le||((de==null?void 0:de.awi_annotation_type)=="polygon"?Ro(Re,pe):Fa(!0))}}else{const we=si(pe)||[];if(we.length>0)if(we.every(Re=>nr.includes(Re))&&nr.every(Re=>we.includes(Re))){if(cn(Re=>(typeof d=="function"&&d(nr[(nr.indexOf(Re)+1)%nr.length]),st(),nr[(nr.indexOf(Re)+1)%nr.length]==="-1"&&(or({x:0,y:0}),Kn({x:-1,y:-1})),nr[(nr.indexOf(Re)+1)%nr.length])),(!gn||mo())&&(de==null?void 0:de.awi_annotation_type)=="polygon"){const Re=(he=Ao(u))==null?void 0:he.awi_coords;Z1(pe,Re)}}else console.log("Selecting first temp"),cn(we[0]),typeof d=="function"&&d(we[0]),Lr();else cn("-1"),Lr();br(we)}gn&&Kt(!1),Tt(!1)}else if(l){const we=si(pe)||[];console.log("This is the temp annotation",we),we.length>0&&(br(we),typeof d=="function"&&d(we[0]),Lr()),Tt(!1)}}},$a=pe=>{if(console.log("Handle Mouse Down"),pe.button==0&&!K1()){if(!["awi_annotator","awi_verifier","awi_developer"].includes(m.userObj.awi_level))return;if(!l&&!A){mt(!0),console.log("Mouse down");const{x:he,y:we}=Ln.getMousePosAbsolute(Ue.current,pe);Sn({x:he,y:we}),Dn?kr&&mo()||kt(Re=>[...Re||[],{x:he,y:we}]):(de==null?void 0:de.awi_annotation_type)==="rectangle"?kt([{x:he,y:we},{x:he,y:we},{x:he,y:we},{x:he,y:we}]):(de==null?void 0:de.awi_annotation_type)==="circle"?kt([{x:he,y:we},{x:he,y:we}]):(de==null?void 0:de.awi_annotation_type)==="dot"?kt([{x:he,y:we}]):(de==null?void 0:de.awi_annotation_type)==="polygon"&&kt(Re=>[...Re,{x:he,y:we}])}else A||(u5(pe,Dt),Tt(!0))}else if(pe.button===1||pe.button==0){const{clientX:he,clientY:we}=pe,{x:Re,y:Le}=tt,at=qt=>{console.log("PANNING!!!!!");const fn=qt.clientX-he,lt=qt.clientY-we,Zt=Re+fn,wr=Le+lt,le=Math.max(Math.min(Zt,0),bt.width-bt.width*tt.scale),c1=Math.max(Math.min(wr,0),bt.height-bt.height*tt.scale);Cn({scale:tt.scale,x:le,y:c1})},yt=()=>{window.removeEventListener("mousemove",at),window.removeEventListener("mouseup",yt),window.addEventListener("touchmove",at,{passive:!1}),window.addEventListener("touchend",yt)};tt.scale>1&&(window.addEventListener("mousemove",at),window.addEventListener("touchmove",at,{passive:!1})),window.addEventListener("mouseup",yt),window.addEventListener("touchend",yt)}},Ti=pe=>{if(Ue!=null&&Ue.current&&Ar({x:pe.clientX,y:pe.clientY}),l&&(Dt!="-1"&&(mn==null?void 0:mn.length)<=Rr.MAX_ANNOTATIONS_TO_HOVER&&b9(pe),!gn&&!pt?(mn==null?void 0:mn.length)<=Rr.MAX_ANNOTATIONS_TO_HOVER&&Ua(pe):zn!="-1"&&Pr("-1")),p)return;let he=[];if(wn){Dn?(he.length==0&&(he=[Jt]),kt(we=>we.length==0?[Jt]:we),Lr(qe)):(de==null?void 0:de.awi_annotation_type)==="rectangle"?(he=Ln.getUpdatedCoordinates(Ue,pe,Jt),kt(he),Lr(he)):(de==null?void 0:de.awi_annotation_type)==="circle"?(Di(pe),Lr(qe)):(de==null||de.awi_annotation_type,Lr(qe));return}else if(l&&Dt!=="-1"&&pt){if(console.log("isDrawingAnnotation",wn),gn){const{x:we,y:Re}=Ln.getMousePos(Ue.current,pe),Le=we-(Hr.x||0),at=Re-(Hr.y||0);if(u!=="-1"){he=[...qe].map(fn=>({x:fn.x+Le,y:fn.y+at}));const yt=Ao(u);if(yt)switch(yt.awi_coords=[...he],de==null?void 0:de.awi_annotation_type){case"dot":{he.length===1&&(he[0].x=Ln.getPerfectPointValue(he[0].x),he[0].y=Ln.getPerfectPointValue(he[0].y));break}case"circle":{he.length===2&&(he=[...Ln.adjustToCircle(he)],yt.awi_coords=[...he]);break}case"rectangle":{if(he.length===4){const fn=Math.abs(he[1].x-he[0].x),lt=Math.abs(he[3].y-he[1].y);for(let Zt=0;Zt<he.length;Zt++)he[Zt].x<0?(he[1].x=fn,he[2].x=fn,he[0].x=1e-4,he[3].x=1e-4):he[Zt].y<0?(he[2].y=lt,he[3].y=lt,he[0].y=1e-4,he[1].y=1e-4):he[Zt].x>1?(he[0].x=1-fn,he[3].x=1-fn,he[1].x=1-1e-4,he[2].x=1-1e-4):he[Zt].y>1&&(he[0].y=1-lt,he[1].y=1-lt,he[2].y=1-1e-4,he[3].y=1-1e-4)}break}case"polygon":{he.length>1&&Ro(he,pe);break}default:{console.log("Unknown request type");break}}Te()(he)}}else if(Jn.x!==-1&&Jn.y!==-1&&u!=="-1"){console.log("Corner coordinates");const we=Ao(u);if((de==null?void 0:de.awi_annotation_type)==="circle"){const Re=Ln.getMousePos(Ue.current,pe);if(we){he=we.awi_coords;const Le=(he[0].x+he[1].x)/2,at=(he[0].y+he[1].y)/2,yt=Ln.getDistance(Re.x,Re.y,Le,at);Le-yt<0?(he[0]={x:0,y:at},he[1]={x:2*yt,y:at}):Le+yt>1?(he[0]={x:1-2*yt,y:at},he[1]={x:1,y:at}):at-yt<0?(he[0]={x:Le,y:0},he[1]={x:Le,y:2*yt}):at+yt>1?(he[0]={x:Le,y:1-2*yt},he[1]={x:Le,y:1}):(he[0]={x:Le-yt,y:at},he[1]={x:Le+yt,y:at}),he=[...Ln.adjustToCircle(he)]}}else if((de==null?void 0:de.awi_annotation_type)==="polygon"&&!Dn){const Re=Ln.getMousePos(Ue.current,pe);we!=null&&we.awi_coords&&(he=[...we.awi_coords],vr>-1&&(vr===0||vr===he.length-1?(he[0]={x:Re.x,y:Re.y},he[he.length-1]={x:Re.x,y:Re.y}):he[vr]={x:Re.x,y:Re.y},Kn({x:Re.x,y:Re.y})))}else he=Ln.getUpdatedCoordinates(Ue,pe,Jn);if(a1(he)){kt([...he]);const Re=Ao(u);Re&&(Re.awi_coords=he,Lr(he))}}}else if((de==null?void 0:de.awi_annotation_type)==="polygon"&&!l&&(qe==null?void 0:qe.length)>1){const{x:we,y:Re}=Ln.getMousePos(Ue.current,pe);st(qe,{x:we,y:Re})}},d0=pe=>{if(pe.touches.length===1){const he=pe.touches[0];if(K1()){if(tt.scale==1)return;Sr.current||(Sr.current={x:he.clientX,y:he.clientY})}else{const we={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:pe.currentTarget,button:0};$a(we)}}},ki=pe=>{if(pe.preventDefault(),pe.touches.length>=2){const[he,we]=[pe.touches[0],pe.touches[1]],Re=we.clientX-he.clientX,Le=we.clientY-he.clientY,at=Math.hypot(Re,Le);if(bn!==null){const yt=at-bn,qt=(he.clientX+we.clientX)/2,fn=(he.clientY+we.clientY)/2;b1({deltaY:-yt,clientX:qt,clientY:fn,currentTarget:pe.currentTarget})}Mn(at)}if(pe.touches.length===1){const he=pe.touches[0];if(K1()){if(Sr.current){console.log("PANNING!!!!!");const we=he.clientX-Sr.current.x,Re=he.clientY-Sr.current.y,{x:Le,y:at}=tt,yt=Le+we,qt=at+Re,fn=Math.max(Math.min(yt,0),bt.width-bt.width*tt.scale),lt=Math.max(Math.min(qt,0),bt.height-bt.height*tt.scale);Cn({scale:tt.scale,x:fn,y:lt}),Sr.current={x:he.clientX,y:he.clientY}}}else{Sr.current&&(Sr.current=null);const we={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:pe.currentTarget};Ti(we)}}},Qo=pe=>{if(Sr.current&&(Sr.current=null),pe.touches.length<2&&Mn(null),K1()){pe.preventDefault();return}const he=pe.touches[0]||pe.changedTouches[0],we={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:pe.currentTarget};ui(we)},ca=pe=>{const he=pe.touches[0]||pe.changedTouches[0],we={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:pe.currentTarget};Va(we)},w9=(pe="")=>{switch(pe){case"left":ia();break;case"right":aa();break;case"top":li();break;case"bottom":Ni();break;default:console.warn(`Unknown pan direction: ${pe}`)}},f0=()=>{typeof x=="function"&&x(pe=>!pe)},as=()=>{if(!u||u=="-1"){Qr.error("Control copy will be work only when you have a selected annotation");return}else T&&typeof T=="function"&&T(An==null?void 0:An.result,!1)},_9=()=>{if(!oo.current||!Ra.current)return;const pe=oo.current,he=pe.getContext("2d");if(!he)return;const we=bt.width*tt.scale,Re=bt.height*tt.scale;!we||!Re||(pe.width=we,pe.height=Re,he.clearRect(0,0,we,Re),he.save(),he.setTransform(1,0,0,1,0,0),he.clearRect(0,0,we,Re),he.translate(tt.x,tt.y),he.scale(tt.scale,tt.scale),he.drawImage(Ra.current,0,0,bt.width,bt.height),he.restore())};return W.jsxs(W.Fragment,{children:[Oo&&W.jsx(DE,{closeSAMPromptModal:()=>Fn(!1),onSubmit:k2,directPrompt:fr,isLoading:tn,requestInfo:de}),A&&H&&(An==null?void 0:An.success)&&W.jsx(W.Fragment,{children:W.jsx("div",{style:{margin:"4px",display:"flex",justifyContent:"center"},children:W.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"max-content"},children:W.jsx("button",{className:"modalButton modalButton__purpleColor",onClick:h5,children:"Copy Annotations"})})})}),A&&W.jsx("div",{className:qn(_n.canvasContainer,{[s]:!!s}),ref:Rt,style:{minHeight:kr?"50vh":"unset",touchAction:"none !important",position:"relative"},children:Oa?se&&(se!=null&&se.file_size)?W.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px",padding:"12px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",width:"280px"},children:[W.jsx("div",{style:{fontSize:"16px",fontWeight:"bold",color:"#333"},children:"📷 Image Details"}),W.jsxs("div",{style:{fontSize:"14px",color:"#555"},children:[W.jsx("strong",{children:"Name:"})," ",se==null?void 0:se.awi_label]}),W.jsxs("div",{style:{fontSize:"14px",color:"#555"},children:[W.jsx("strong",{children:"Size:"})," ",bi.byteToSize(se.file_size)]}),W.jsxs("div",{style:{fontSize:"14px",color:"#007bff",fontWeight:"bold"},children:["🔄 Loading Image ",ue+1,"..."]})]}):W.jsxs("div",{children:["Image number ",ue+1," is loading..."]}):W.jsxs(W.Fragment,{children:[Fe&&W.jsx(Rc,{isEditing:l,handleSelectTool:h,annotator_name:((f=(h0=(Ka=P==null?void 0:P.result)==null?void 0:Ka.annotatorInfo)==null?void 0:h0.awi_personal_info)==null?void 0:f.awi_full_name)||"",handleSAMToggle:E,hasAnnotation:An,SAMToggleValue:D,currentSelectedSAMTool:N,handleCopyAnnotations:T,setOpenRequestDetails:j,openRequestDetails:V,show_guidelines_first:oe,handleZoomInClick:oa,zoomProperties:tt,handleReset:Jr,handleZoomOutClick:Q1,handleCompleteAnnotation:sn,toggleFullscreen:Zo,selectAnnotationId:Dt,selectedAnnotationInfo:Tn,undoLastStateAnnotation:u0,usingSamFunction:Dn,samAPIactive:tn,handleSendToSamFunction:sa,coordinates:qe,reLoadAndReDrawAnnotations:c0,showGuidelinesFirst:oe,handleSendToSamFunctionPrompt:lr,isMobile:kr,toggleSelectAnnotation:nt,handleLeftKeyDown:ia,handleRightKeyDown:aa,handleUpKeyDown:li,handleDownKeyDown:Ni,undoAnnotationPoint:hr,togglePagination:f0,switchToEditMode:ye,switchToCreateMode:be,goToNextImage:Ce,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handleCopyByCtrlC:as,handlePasteAnnotationsByControlV:ie,showPagination:Z,isControlViaToolPress:dt,setIsControlViaToolPress:Ke,isAltViaToolPress:ft,setIsAltViaToolPress:Nt,isCarousel:A,allowedToCopyPreview:H,classColorMapToSend:b,request:de,parentReqData:Ye,RequestInfoModal:Ee,setCrossHair:o1,isCrossHair:sr,annotationViewType:ct,REACT_APP_SAM_ENABLED:_t,loggedUser:m,controlMinusHotkey:Ko,controlPlusHotkey:Io,Carousel:ot},i),W.jsx(Ic,{canvasDimensions:bt,zoomProperties:tt,isEditing:l,canvasRef:Ue,bgCanvasRef:oo,overlayCanvasRef:Et,handleMouseDown:$a,handleMouseUp:ui,handleMouseMove:Ti,handleMouseMoveOut:v9,handleOnMouseLeave:Va,handleWheel:b1,handleTouchStart:d0,handleTouchMove:ki,handleTouchEnd:Qo,handleTouchCancel:ca})]})}),!A&&ct=="atom"&&W.jsxs("div",{style:{display:"flex",flexDirection:kr?"column":"row"},children:[W.jsx("div",{style:{height:kr?"unset":"100%",width:kr?"100%":"5.4%",border:"1px solid #E4E0E6",backgroundColor:"white"},children:["awi_annotator","awi_verifier","awi_developer"].includes(m.userObj.awi_level)&&W.jsx("div",{style:{width:"100%",gap:"10px",marginTop:"2px",height:"100% ",display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:kr?"row":"column"},children:Fe&&W.jsx(Rc,{isEditing:l,handleSelectTool:h,annotator_name:((F=(O=(v=P==null?void 0:P.result)==null?void 0:v.annotatorInfo)==null?void 0:O.awi_personal_info)==null?void 0:F.awi_full_name)||"",handleSAMToggle:E,hasAnnotation:An,SAMToggleValue:D,currentSelectedSAMTool:N,handleCopyAnnotations:T,setOpenRequestDetails:j,openRequestDetails:V,show_guidelines_first:oe,handleZoomInClick:oa,zoomProperties:tt,handleReset:Jr,handleZoomOutClick:Q1,handleCompleteAnnotation:sn,toggleFullscreen:Zo,selectAnnotationId:Dt,selectedAnnotationInfo:Tn,undoLastStateAnnotation:u0,usingSamFunction:Dn,samAPIactive:tn,handleSendToSamFunction:sa,coordinates:qe,reLoadAndReDrawAnnotations:c0,showGuidelinesFirst:oe,handleSendToSamFunctionPrompt:lr,isMobile:kr,toggleSelectAnnotation:nt,handleLeftKeyDown:ia,handleRightKeyDown:aa,handleUpKeyDown:li,handleDownKeyDown:Ni,undoAnnotationPoint:hr,togglePagination:f0,switchToEditMode:ye,switchToCreateMode:be,goToNextImage:Ce,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handleCopyByCtrlC:as,handlePasteAnnotationsByControlV:ie,showPagination:Z,isControlViaToolPress:dt,setIsControlViaToolPress:Ke,isAltViaToolPress:ft,setIsAltViaToolPress:Nt,isCarousel:A,allowedToCopyPreview:H,classColorMapToSend:b,request:de,parentReqData:Ye,RequestInfoModal:Ee,setCrossHair:o1,isCrossHair:sr,annotationViewType:ct,REACT_APP_SAM_ENABLED:_t,loggedUser:m,controlMinusHotkey:Ko,controlPlusHotkey:Io,Carousel:ot},i)})}),W.jsxs("div",{style:kr?{height:"100%",width:"100%"}:{width:"94.6%"},children:[!kr&&W.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",height:kr?"8%":"3%",border:"1px solid #E4E0E6",background:"white",justifyContent:"space-between"},children:[W.jsxs("div",{style:{display:"flex",flexDirection:"row",height:"100%",alignItems:"center"},children:[W.jsxs("div",{className:"color-black",style:{width:"4.8rem",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:[W.jsx("span",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"50%",backgroundColor:" rgba(111, 41, 169, 0.20)",height:"100%"},children:ue+1}),W.jsx("span",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"50%",backgroundColor:ke||"rgba(111, 41, 169, 0.1)",height:"100%"},children:(((q=P==null?void 0:P.result)==null?void 0:q.awi_contents)||[]).length})]}),W.jsxs("p",{className:"color-black",style:{marginLeft:"1rem"},title:((re=Y==null?void 0:Y.awi_label)==null?void 0:re.length)>20?Y.awi_label:J.length>20?J:"",children:["Image -"," ",((Oe=Y==null?void 0:Y.awi_label)==null?void 0:Oe.length)>0?Y.awi_label.length>20?Y.awi_label.substring(0,20)+"...":Y.awi_label:J.length>20?J.substring(0,20)+"...":J]}),W.jsx("p",{className:"color-black",style:{marginLeft:"1rem"},children:((Ae==null?void 0:Ae.result)||[]).length>0&&`Annotations - ${((Ae==null?void 0:Ae.result)||[]).length} (Recent First) ${S.size?`Selected - ${((Ae==null?void 0:Ae.result)||[]).length-S.size}`:""}`})]}),W.jsx("div",{children:W.jsxs("div",{style:{fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},className:"color-black",children:[W.jsx("div",{children:h1}),(h1==null?void 0:h1.length)>0&&W.jsx(_g,{color:"#000"})]})})]}),W.jsx("div",{children:Z&&kr&&rt&&W.jsx("div",{style:{border:"1px solid #E4E0E6"},children:W.jsx(rt,{handleNextPage:z,handlePreviousPage:k,currentPage:K,images:(Qe=P==null?void 0:P.result)==null?void 0:Qe.awi_contents,handleIndexUpdate:$,currentIndex:ue,request_id:X,requestFor:(Xe=P==null?void 0:P.result)==null?void 0:Xe.awi_request_for,imagePagination:Z,showImages:!0,fetchAnnotations:We,pageCount:Ge})})}),W.jsx("div",{style:{height:kr||ns?"25px":"3%",border:"1px solid #E4E0E6",justifyContent:"space-between",paddingLeft:"10px",paddingRight:"10px",backgroundColor:"#fff"},children:kr&&(h1==null?void 0:h1.length)>0?W.jsx(W.Fragment,{children:W.jsx("div",{className:qn(_n.zoom__container,"color-black"),style:{height:"25px",justifyContent:"center",alignItems:"center",fontWeight:"bold"},children:h1})}):W.jsx(W.Fragment,{children:tt.scale>1?W.jsx(W.Fragment,{children:W.jsxs("div",{className:qn(_n.zoom__container,"color-black"),style:{height:"25px",justifyContent:"space-between",alignItems:"center"},children:[W.jsx("button",{className:"modalButton modalButton__tertiaryChoice pan_small",onClick:()=>w9("left"),children:"Left"}),W.jsx("progress",{value:Uo.left,max:bt.width,title:Uo.left==0?"You can not move left more":"Showing how much you can move left more"}),W.jsx("button",{className:"modalButton modalButton__tertiaryChoice pan_small",onClick:()=>w9("right"),children:"Right"}),W.jsx("progress",{value:Uo.right,max:bt.width,title:Uo.right==0?"You can not move right more":"Showing how much you can move right more"}),W.jsx("button",{className:"modalButton modalButton__tertiaryChoice pan_small",onClick:()=>w9("top"),children:"Top"}),W.jsx("progress",{value:Uo.top,max:bt.height,title:Uo.top==0?"You can not move top more":"Showing how much you can move top more"}),W.jsx("button",{className:"modalButton modalButton__tertiaryChoice pan_small",onClick:()=>w9("bottom"),children:"Bottom"}),W.jsx("progress",{value:Uo.bottom,max:bt.height,title:Uo.bottom==0?"You can not move bottom more":"Showing how much you can move bottom more"})]})}):W.jsx("div",{className:qn(_n.zoom__container,"color-black"),style:{height:"25px",justifyContent:"center",alignItems:"center"},children:"Zoom in to see image pan progress"})})}),W.jsx("div",{className:qn(_n.canvasContainer,{[s]:!!s}),ref:Rt,style:{height:Z?"80%":"90%",width:"100%",touchAction:"none !important",minHeight:kr?"50vh":"unset",position:"relative"},children:Oa?se&&(se!=null&&se.file_size)?W.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px",padding:"12px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",width:"280px"},children:[W.jsx("div",{style:{fontSize:"16px",fontWeight:"bold",color:"#333"},children:"📷 Image Details"}),W.jsxs("div",{style:{fontSize:"14px",color:"#555"},children:[W.jsx("strong",{children:"Name:"})," ",se==null?void 0:se.awi_label]}),W.jsxs("div",{style:{fontSize:"14px",color:"#555"},children:[W.jsx("strong",{children:"Size:"})," ",bi.byteToSize(se.file_size)]}),W.jsxs("div",{style:{fontSize:"14px",color:"#007bff",fontWeight:"bold"},children:["🔄 Loading Image ",ue+1,"..."]})]}):W.jsxs("div",{children:["Image number ",ue+1," is loading..."]}):W.jsx(Ic,{canvasDimensions:bt,zoomProperties:tt,isEditing:l,canvasRef:Ue,bgCanvasRef:oo,overlayCanvasRef:Et,handleMouseDown:$a,handleMouseUp:ui,handleMouseMove:Ti,handleMouseMoveOut:v9,handleOnMouseLeave:Va,handleWheel:b1,handleTouchStart:d0,handleTouchMove:ki,handleTouchEnd:Qo,handleTouchCancel:ca})}),Z&&!kr&&rt&&W.jsx("div",{children:Z&&W.jsx("div",{style:{border:"1px solid #E4E0E6"},children:W.jsx(rt,{handleNextPage:z,handlePreviousPage:k,currentPage:K,images:(Lt=P==null?void 0:P.result)==null?void 0:Lt.awi_contents,handleIndexUpdate:$,currentIndex:ue,request_id:X,requestFor:(nn=P==null?void 0:P.result)==null?void 0:nn.awi_request_for,imagePagination:Z,showImages:!0,fetchAnnotations:We,pageCount:Ge})})})]})]}),!A&&ct=="library"&&W.jsxs(W.Fragment,{children:[Fe&&W.jsx(Rc,{isEditing:l,handleSelectTool:h,annotator_name:((l1=(Yn=(Bn=P==null?void 0:P.result)==null?void 0:Bn.annotatorInfo)==null?void 0:Yn.awi_personal_info)==null?void 0:l1.awi_full_name)||"",handleSAMToggle:E,hasAnnotation:An,SAMToggleValue:D,currentSelectedSAMTool:N,handleCopyAnnotations:T,setOpenRequestDetails:j,openRequestDetails:V,show_guidelines_first:oe,handleZoomInClick:oa,zoomProperties:tt,handleReset:Jr,handleZoomOutClick:Q1,handleCompleteAnnotation:sn,toggleFullscreen:Zo,selectAnnotationId:Dt,selectedAnnotationInfo:Tn,undoLastStateAnnotation:u0,usingSamFunction:Dn,samAPIactive:tn,handleSendToSamFunction:sa,coordinates:qe,reLoadAndReDrawAnnotations:c0,showGuidelinesFirst:oe,handleSendToSamFunctionPrompt:lr,isMobile:!0,toggleSelectAnnotation:nt,handleLeftKeyDown:ia,handleRightKeyDown:aa,handleUpKeyDown:li,handleDownKeyDown:Ni,undoAnnotationPoint:hr,togglePagination:f0,switchToEditMode:ye,switchToCreateMode:be,goToNextImage:Ce,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handleCopyByCtrlC:as,handlePasteAnnotationsByControlV:ie,showPagination:Z,isControlViaToolPress:dt,setIsControlViaToolPress:Ke,isAltViaToolPress:ft,setIsAltViaToolPress:Nt,isCarousel:A,allowedToCopyPreview:H,classColorMapToSend:b,request:de,parentReqData:Ye,RequestInfoModal:Ee,setCrossHair:o1,isCrossHair:sr,annotationViewType:ct,REACT_APP_SAM_ENABLED:_t,loggedUser:m,controlMinusHotkey:Ko,controlPlusHotkey:Io,Carousel:ot},i),W.jsx("div",{className:qn(_n.canvasContainer,{[s]:!!s}),ref:Rt,style:{height:Z?"80%":"90%",width:"100%",touchAction:"none !important",minHeight:kr?"50vh":"unset",position:"relative"},children:Oa?se&&(se!=null&&se.file_size)?W.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px",padding:"12px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",width:"280px"},children:[W.jsx("div",{style:{fontSize:"16px",fontWeight:"bold",color:"#333"},children:"📷 Image Details"}),W.jsxs("div",{style:{fontSize:"14px",color:"#555"},children:[W.jsx("strong",{children:"Name:"})," ",se==null?void 0:se.awi_label]}),W.jsxs("div",{style:{fontSize:"14px",color:"#555"},children:[W.jsx("strong",{children:"Size:"})," ",bi.byteToSize(se.file_size)]}),W.jsxs("div",{style:{fontSize:"14px",color:"#007bff",fontWeight:"bold"},children:["🔄 Loading Image ",ue+1,"..."]})]}):W.jsxs("div",{children:["Image number ",ue+1," is loading..."]}):W.jsx(Ic,{canvasDimensions:bt,zoomProperties:tt,isEditing:l,canvasRef:Ue,bgCanvasRef:oo,overlayCanvasRef:Et,handleMouseDown:$a,handleMouseUp:ui,handleMouseMove:Ti,handleMouseMoveOut:v9,handleOnMouseLeave:Va,handleWheel:b1,handleTouchStart:d0,handleTouchMove:ki,handleTouchEnd:Qo,handleTouchCancel:ca})})]}),er!=-1&&J0&&W.jsx(YI,{callback:()=>k1(J0,er),cancelCallBack:()=>{Ha(-1)},trigger:"REMOVE_POLYGON_POINT",fireOnMount:!0,children:W.jsx(W.Fragment,{})})]})},JHe="_tableBar_103oy_1",eOe="_buttonGroup_103oy_13",tOe="_btnIcon_103oy_34",nOe="_searchBar_103oy_41",rOe="_searchInput_103oy_53",oOe="_searchIcon_103oy_58",iOe="_removeBorder_103oy_63",aOe="_button_103oy_13",sOe="_isSelected_103oy_74",lOe="_isDisabled_103oy_80",cOe="_isActive_103oy_85",uOe="_isText_103oy_92",Jo={tableBar:JHe,buttonGroup:eOe,btnIcon:tOe,searchBar:nOe,searchInput:rOe,searchIcon:oOe,removeBorder:iOe,button:aOe,isSelected:sOe,isDisabled:lOe,isActive:cOe,isText:uOe},dOe=({showSearch:e=!1,leftButtons:t=[],rightButtons:n=[],searchFunction:r,searchDelay:o=300,onSearchClick:i,searchPlaceHolder:a="Search...",showSearchEye:s=!0,borderRequired:l=!0,borderColor:u})=>{const d=I.useCallback(_4.debounce((A,b)=>{typeof b=="function"&&b(A)},o),[o]),h=A=>{const b=A.currentTarget.value.trim();d(b,r)},C=()=>{typeof i=="function"&&i()};if(!t.length&&!n.length&&!e)return null;const m=(A,b)=>{const p=A.type==="text";return W.jsxs("button",{onClick:!p&&!A.isDisabled?A.onClick:void 0,title:A.title||"",disabled:A.isDisabled,className:qn(Jo.button,{[Jo.isText]:p,[Jo.isSelected]:A.isSelected,[Jo.isDisabled]:A.isDisabled,[Jo.isActive]:A.isActive&&!A.isSelected}),children:[A.icon&&W.jsx("img",{src:A.icon,alt:A.name,className:Jo.btnIcon}),W.jsx("div",{children:A.name})]},b)};return W.jsxs("div",{className:qn(Jo.tableBar,!l&&Jo.removeBorder),style:{borderColor:l?u||"#909090":void 0},children:[W.jsxs("div",{className:Jo.buttonGroup,children:[t.map(m)," "]}),W.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"10px"},children:[W.jsx("div",{className:Jo.buttonGroup,children:n.map(m)}),e&&W.jsx("div",{className:Jo.searchBar,title:a,children:W.jsxs("form",{autoComplete:"off",style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%",position:"relative"},children:[W.jsx("input",{type:"text",name:"userSearchInput",autoComplete:"off",placeholder:a,className:Jo.searchInput,onKeyUp:h}),s&&W.jsx("img",{src:Nn.searchUrl.IconComponent,alt:a,className:qn(Jo.btnIcon,"cursor-pointer",Jo.searchIcon),onClick:C})]})})]})]})};function nP(e,t){const n=I.useRef(t);I.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const fOe=1;function hOe(e){return Object.freeze({__version:fOe,map:e})}function gOe(e,t){return Object.freeze({...e,...t})}const rP=I.createContext(null),oP=rP.Provider;function Uu(){const e=I.useContext(rP);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function COe(e){function t(n,r){const{instance:o,context:i}=e(n).current;return I.useImperativeHandle(r,()=>o),n.children==null?null:I.createElement(oP,{value:i},n.children)}return I.forwardRef(t)}function mOe(e){function t(n,r){const[o,i]=I.useState(!1),{instance:a}=e(n,i).current;I.useImperativeHandle(r,()=>a),I.useEffect(function(){o&&a.update()},[a,o,n.children]);const s=a._contentNode;return s?uo.createPortal(n.children,s):null}return I.forwardRef(t)}function iP(e){function t(n,r){const{instance:o}=e(n).current;return I.useImperativeHandle(r,()=>o),null}return I.forwardRef(t)}function pOe(e){return function(n){const r=Uu(),o=e(n,r),{instance:i}=o.current,a=I.useRef(n.position),{position:s}=n;return I.useEffect(function(){return i.addTo(r.map),function(){i.remove()}},[r.map,i]),I.useEffect(function(){s!=null&&s!==a.current&&(i.setPosition(s),a.current=s)},[i,s]),o}}function aP(e,t){const n=I.useRef();I.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function Mm(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function AOe(e,t){return function(r,o){const i=Uu(),a=e(Mm(r,i),i);return nP(i.map,r.attribution),aP(a.current,r.eventHandlers),t(a.current,i,r,o),a}}var Rl={exports:{}};/* @preserve
719
719
  * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
720
720
  * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
721
- */var vOe=Rl.exports,z_;function bOe(){return z_||(z_=1,function(e,t){(function(n,r){r(t)})(vOe,function(n){var r="1.9.4";function o(f){var v,O,F,q;for(O=1,F=arguments.length;O<F;O++){q=arguments[O];for(v in q)f[v]=q[v]}return f}var i=Object.create||function(){function f(){}return function(v){return f.prototype=v,new f}}();function a(f,v){var O=Array.prototype.slice;if(f.bind)return f.bind.apply(f,O.call(arguments,1));var F=O.call(arguments,2);return function(){return f.apply(v,F.length?F.concat(O.call(arguments)):arguments)}}var s=0;function l(f){return"_leaflet_id"in f||(f._leaflet_id=++s),f._leaflet_id}function u(f,v,O){var F,q,re,Oe;return Oe=function(){F=!1,q&&(re.apply(O,q),q=!1)},re=function(){F?q=arguments:(f.apply(O,arguments),setTimeout(Oe,v),F=!0)},re}function d(f,v,O){var F=v[1],q=v[0],re=F-q;return f===F&&O?f:((f-q)%re+re)%re+q}function h(){return!1}function C(f,v){if(v===!1)return f;var O=Math.pow(10,v===void 0?6:v);return Math.round(f*O)/O}function m(f){return f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")}function A(f){return m(f).split(/\s+/)}function b(f,v){Object.prototype.hasOwnProperty.call(f,"options")||(f.options=f.options?i(f.options):{});for(var O in v)f.options[O]=v[O];return f.options}function p(f,v,O){var F=[];for(var q in f)F.push(encodeURIComponent(O?q.toUpperCase():q)+"="+encodeURIComponent(f[q]));return(!v||v.indexOf("?")===-1?"?":"&")+F.join("&")}var _=/\{ *([\w_ -]+) *\}/g;function w(f,v){return f.replace(_,function(O,F){var q=v[F];if(q===void 0)throw new Error("No value provided for variable "+O);return typeof q=="function"&&(q=q(v)),q})}var x=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"};function E(f,v){for(var O=0;O<f.length;O++)if(f[O]===v)return O;return-1}var S="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function M(f){return window["webkit"+f]||window["moz"+f]||window["ms"+f]}var H=0;function B(f){var v=+new Date,O=Math.max(0,16-(v-H));return H=v+O,window.setTimeout(f,O)}var P=window.requestAnimationFrame||M("RequestAnimationFrame")||B,D=window.cancelAnimationFrame||M("CancelAnimationFrame")||M("CancelRequestAnimationFrame")||function(f){window.clearTimeout(f)};function N(f,v,O){if(O&&P===B)f.call(v);else return P.call(window,a(f,v))}function T(f){f&&D.call(window,f)}var j={__proto__:null,extend:o,create:i,bind:a,get lastId(){return s},stamp:l,throttle:u,wrapNum:d,falseFn:h,formatNum:C,trim:m,splitWords:A,setOptions:b,getParamString:p,template:w,isArray:x,indexOf:E,emptyImageUrl:S,requestFn:P,cancelFn:D,requestAnimFrame:N,cancelAnimFrame:T};function V(){}V.extend=function(f){var v=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},O=v.__super__=this.prototype,F=i(O);F.constructor=v,v.prototype=F;for(var q in this)Object.prototype.hasOwnProperty.call(this,q)&&q!=="prototype"&&q!=="__super__"&&(v[q]=this[q]);return f.statics&&o(v,f.statics),f.includes&&(z(f.includes),o.apply(null,[F].concat(f.includes))),o(F,f),delete F.statics,delete F.includes,F.options&&(F.options=O.options?i(O.options):{},o(F.options,f.options)),F._initHooks=[],F.callInitHooks=function(){if(!this._initHooksCalled){O.callInitHooks&&O.callInitHooks.call(this),this._initHooksCalled=!0;for(var re=0,Oe=F._initHooks.length;re<Oe;re++)F._initHooks[re].call(this)}},v},V.include=function(f){var v=this.prototype.options;return o(this.prototype,f),f.options&&(this.prototype.options=v,this.mergeOptions(f.options)),this},V.mergeOptions=function(f){return o(this.prototype.options,f),this},V.addInitHook=function(f){var v=Array.prototype.slice.call(arguments,1),O=typeof f=="function"?f:function(){this[f].apply(this,v)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(O),this};function z(f){if(!(typeof L>"u"||!L||!L.Mixin)){f=x(f)?f:[f];for(var v=0;v<f.length;v++)f[v]===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 k={on:function(f,v,O){if(typeof f=="object")for(var F in f)this._on(F,f[F],v);else{f=A(f);for(var q=0,re=f.length;q<re;q++)this._on(f[q],v,O)}return this},off:function(f,v,O){if(!arguments.length)delete this._events;else if(typeof f=="object")for(var F in f)this._off(F,f[F],v);else{f=A(f);for(var q=arguments.length===1,re=0,Oe=f.length;re<Oe;re++)q?this._off(f[re]):this._off(f[re],v,O)}return this},_on:function(f,v,O,F){if(typeof v!="function"){console.warn("wrong listener type: "+typeof v);return}if(this._listens(f,v,O)===!1){O===this&&(O=void 0);var q={fn:v,ctx:O};F&&(q.once=!0),this._events=this._events||{},this._events[f]=this._events[f]||[],this._events[f].push(q)}},_off:function(f,v,O){var F,q,re;if(this._events&&(F=this._events[f],!!F)){if(arguments.length===1){if(this._firingCount)for(q=0,re=F.length;q<re;q++)F[q].fn=h;delete this._events[f];return}if(typeof v!="function"){console.warn("wrong listener type: "+typeof v);return}var Oe=this._listens(f,v,O);if(Oe!==!1){var Qe=F[Oe];this._firingCount&&(Qe.fn=h,this._events[f]=F=F.slice()),F.splice(Oe,1)}}},fire:function(f,v,O){if(!this.listens(f,O))return this;var F=o({},v,{type:f,target:this,sourceTarget:v&&v.sourceTarget||this});if(this._events){var q=this._events[f];if(q){this._firingCount=this._firingCount+1||1;for(var re=0,Oe=q.length;re<Oe;re++){var Qe=q[re],Xe=Qe.fn;Qe.once&&this.off(f,Xe,Qe.ctx),Xe.call(Qe.ctx||this,F)}this._firingCount--}}return O&&this._propagateEvent(F),this},listens:function(f,v,O,F){typeof f!="string"&&console.warn('"string" type argument expected');var q=v;typeof v!="function"&&(F=!!v,q=void 0,O=void 0);var re=this._events&&this._events[f];if(re&&re.length&&this._listens(f,q,O)!==!1)return!0;if(F){for(var Oe in this._eventParents)if(this._eventParents[Oe].listens(f,v,O,F))return!0}return!1},_listens:function(f,v,O){if(!this._events)return!1;var F=this._events[f]||[];if(!v)return!!F.length;O===this&&(O=void 0);for(var q=0,re=F.length;q<re;q++)if(F[q].fn===v&&F[q].ctx===O)return q;return!1},once:function(f,v,O){if(typeof f=="object")for(var F in f)this._on(F,f[F],v,!0);else{f=A(f);for(var q=0,re=f.length;q<re;q++)this._on(f[q],v,O,!0)}return this},addEventParent:function(f){return this._eventParents=this._eventParents||{},this._eventParents[l(f)]=f,this},removeEventParent:function(f){return this._eventParents&&delete this._eventParents[l(f)],this},_propagateEvent:function(f){for(var v in this._eventParents)this._eventParents[v].fire(f.type,o({layer:f.target,propagatedFrom:f.target},f),!0)}};k.addEventListener=k.on,k.removeEventListener=k.clearAllEventListeners=k.off,k.addOneTimeEventListener=k.once,k.fireEvent=k.fire,k.hasEventListeners=k.listens;var K=V.extend(k);function $(f,v,O){this.x=O?Math.round(f):f,this.y=O?Math.round(v):v}var X=Math.trunc||function(f){return f>0?Math.floor(f):Math.ceil(f)};$.prototype={clone:function(){return new $(this.x,this.y)},add:function(f){return this.clone()._add(Z(f))},_add:function(f){return this.x+=f.x,this.y+=f.y,this},subtract:function(f){return this.clone()._subtract(Z(f))},_subtract:function(f){return this.x-=f.x,this.y-=f.y,this},divideBy:function(f){return this.clone()._divideBy(f)},_divideBy:function(f){return this.x/=f,this.y/=f,this},multiplyBy:function(f){return this.clone()._multiplyBy(f)},_multiplyBy:function(f){return this.x*=f,this.y*=f,this},scaleBy:function(f){return new $(this.x*f.x,this.y*f.y)},unscaleBy:function(f){return new $(this.x/f.x,this.y/f.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=X(this.x),this.y=X(this.y),this},distanceTo:function(f){f=Z(f);var v=f.x-this.x,O=f.y-this.y;return Math.sqrt(v*v+O*O)},equals:function(f){return f=Z(f),f.x===this.x&&f.y===this.y},contains:function(f){return f=Z(f),Math.abs(f.x)<=Math.abs(this.x)&&Math.abs(f.y)<=Math.abs(this.y)},toString:function(){return"Point("+C(this.x)+", "+C(this.y)+")"}};function Z(f,v,O){return f instanceof $?f:x(f)?new $(f[0],f[1]):f==null?f:typeof f=="object"&&"x"in f&&"y"in f?new $(f.x,f.y):new $(f,v,O)}function U(f,v){if(f)for(var O=v?[f,v]:f,F=0,q=O.length;F<q;F++)this.extend(O[F])}U.prototype={extend:function(f){var v,O;if(!f)return this;if(f instanceof $||typeof f[0]=="number"||"x"in f)v=O=Z(f);else if(f=Y(f),v=f.min,O=f.max,!v||!O)return this;return!this.min&&!this.max?(this.min=v.clone(),this.max=O.clone()):(this.min.x=Math.min(v.x,this.min.x),this.max.x=Math.max(O.x,this.max.x),this.min.y=Math.min(v.y,this.min.y),this.max.y=Math.max(O.y,this.max.y)),this},getCenter:function(f){return Z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,f)},getBottomLeft:function(){return Z(this.min.x,this.max.y)},getTopRight:function(){return Z(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(f){var v,O;return typeof f[0]=="number"||f instanceof $?f=Z(f):f=Y(f),f instanceof U?(v=f.min,O=f.max):v=O=f,v.x>=this.min.x&&O.x<=this.max.x&&v.y>=this.min.y&&O.y<=this.max.y},intersects:function(f){f=Y(f);var v=this.min,O=this.max,F=f.min,q=f.max,re=q.x>=v.x&&F.x<=O.x,Oe=q.y>=v.y&&F.y<=O.y;return re&&Oe},overlaps:function(f){f=Y(f);var v=this.min,O=this.max,F=f.min,q=f.max,re=q.x>v.x&&F.x<O.x,Oe=q.y>v.y&&F.y<O.y;return re&&Oe},isValid:function(){return!!(this.min&&this.max)},pad:function(f){var v=this.min,O=this.max,F=Math.abs(v.x-O.x)*f,q=Math.abs(v.y-O.y)*f;return Y(Z(v.x-F,v.y-q),Z(O.x+F,O.y+q))},equals:function(f){return f?(f=Y(f),this.min.equals(f.getTopLeft())&&this.max.equals(f.getBottomRight())):!1}};function Y(f,v){return!f||f instanceof U?f:new U(f,v)}function J(f,v){if(f)for(var O=v?[f,v]:f,F=0,q=O.length;F<q;F++)this.extend(O[F])}J.prototype={extend:function(f){var v=this._southWest,O=this._northEast,F,q;if(f instanceof ee)F=f,q=f;else if(f instanceof J){if(F=f._southWest,q=f._northEast,!F||!q)return this}else return f?this.extend(oe(f)||G(f)):this;return!v&&!O?(this._southWest=new ee(F.lat,F.lng),this._northEast=new ee(q.lat,q.lng)):(v.lat=Math.min(F.lat,v.lat),v.lng=Math.min(F.lng,v.lng),O.lat=Math.max(q.lat,O.lat),O.lng=Math.max(q.lng,O.lng)),this},pad:function(f){var v=this._southWest,O=this._northEast,F=Math.abs(v.lat-O.lat)*f,q=Math.abs(v.lng-O.lng)*f;return new J(new ee(v.lat-F,v.lng-q),new ee(O.lat+F,O.lng+q))},getCenter:function(){return new ee((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 ee(this.getNorth(),this.getWest())},getSouthEast:function(){return new ee(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(f){typeof f[0]=="number"||f instanceof ee||"lat"in f?f=oe(f):f=G(f);var v=this._southWest,O=this._northEast,F,q;return f instanceof J?(F=f.getSouthWest(),q=f.getNorthEast()):F=q=f,F.lat>=v.lat&&q.lat<=O.lat&&F.lng>=v.lng&&q.lng<=O.lng},intersects:function(f){f=G(f);var v=this._southWest,O=this._northEast,F=f.getSouthWest(),q=f.getNorthEast(),re=q.lat>=v.lat&&F.lat<=O.lat,Oe=q.lng>=v.lng&&F.lng<=O.lng;return re&&Oe},overlaps:function(f){f=G(f);var v=this._southWest,O=this._northEast,F=f.getSouthWest(),q=f.getNorthEast(),re=q.lat>v.lat&&F.lat<O.lat,Oe=q.lng>v.lng&&F.lng<O.lng;return re&&Oe},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(f,v){return f?(f=G(f),this._southWest.equals(f.getSouthWest(),v)&&this._northEast.equals(f.getNorthEast(),v)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function G(f,v){return f instanceof J?f:new J(f,v)}function ee(f,v,O){if(isNaN(f)||isNaN(v))throw new Error("Invalid LatLng object: ("+f+", "+v+")");this.lat=+f,this.lng=+v,O!==void 0&&(this.alt=+O)}ee.prototype={equals:function(f,v){if(!f)return!1;f=oe(f);var O=Math.max(Math.abs(this.lat-f.lat),Math.abs(this.lng-f.lng));return O<=(v===void 0?1e-9:v)},toString:function(f){return"LatLng("+C(this.lat,f)+", "+C(this.lng,f)+")"},distanceTo:function(f){return se.distance(this,oe(f))},wrap:function(){return se.wrapLatLng(this)},toBounds:function(f){var v=180*f/40075017,O=v/Math.cos(Math.PI/180*this.lat);return G([this.lat-v,this.lng-O],[this.lat+v,this.lng+O])},clone:function(){return new ee(this.lat,this.lng,this.alt)}};function oe(f,v,O){return f instanceof ee?f:x(f)&&typeof f[0]!="object"?f.length===3?new ee(f[0],f[1],f[2]):f.length===2?new ee(f[0],f[1]):null:f==null?f:typeof f=="object"&&"lat"in f?new ee(f.lat,"lng"in f?f.lng:f.lon,f.alt):v===void 0?null:new ee(f,v,O)}var ue={latLngToPoint:function(f,v){var O=this.projection.project(f),F=this.scale(v);return this.transformation._transform(O,F)},pointToLatLng:function(f,v){var O=this.scale(v),F=this.transformation.untransform(f,O);return this.projection.unproject(F)},project:function(f){return this.projection.project(f)},unproject:function(f){return this.projection.unproject(f)},scale:function(f){return 256*Math.pow(2,f)},zoom:function(f){return Math.log(f/256)/Math.LN2},getProjectedBounds:function(f){if(this.infinite)return null;var v=this.projection.bounds,O=this.scale(f),F=this.transformation.transform(v.min,O),q=this.transformation.transform(v.max,O);return new U(F,q)},infinite:!1,wrapLatLng:function(f){var v=this.wrapLng?d(f.lng,this.wrapLng,!0):f.lng,O=this.wrapLat?d(f.lat,this.wrapLat,!0):f.lat,F=f.alt;return new ee(O,v,F)},wrapLatLngBounds:function(f){var v=f.getCenter(),O=this.wrapLatLng(v),F=v.lat-O.lat,q=v.lng-O.lng;if(F===0&&q===0)return f;var re=f.getSouthWest(),Oe=f.getNorthEast(),Qe=new ee(re.lat-F,re.lng-q),Xe=new ee(Oe.lat-F,Oe.lng-q);return new J(Qe,Xe)}},se=o({},ue,{wrapLng:[-180,180],R:6371e3,distance:function(f,v){var O=Math.PI/180,F=f.lat*O,q=v.lat*O,re=Math.sin((v.lat-f.lat)*O/2),Oe=Math.sin((v.lng-f.lng)*O/2),Qe=re*re+Math.cos(F)*Math.cos(q)*Oe*Oe,Xe=2*Math.atan2(Math.sqrt(Qe),Math.sqrt(1-Qe));return this.R*Xe}}),ye=6378137,be={R:ye,MAX_LATITUDE:85.0511287798,project:function(f){var v=Math.PI/180,O=this.MAX_LATITUDE,F=Math.max(Math.min(O,f.lat),-O),q=Math.sin(F*v);return new $(this.R*f.lng*v,this.R*Math.log((1+q)/(1-q))/2)},unproject:function(f){var v=180/Math.PI;return new ee((2*Math.atan(Math.exp(f.y/this.R))-Math.PI/2)*v,f.x*v/this.R)},bounds:function(){var f=ye*Math.PI;return new U([-f,-f],[f,f])}()};function Ce(f,v,O,F){if(x(f)){this._a=f[0],this._b=f[1],this._c=f[2],this._d=f[3];return}this._a=f,this._b=v,this._c=O,this._d=F}Ce.prototype={transform:function(f,v){return this._transform(f.clone(),v)},_transform:function(f,v){return v=v||1,f.x=v*(this._a*f.x+this._b),f.y=v*(this._c*f.y+this._d),f},untransform:function(f,v){return v=v||1,new $((f.x/v-this._b)/this._a,(f.y/v-this._d)/this._c)}};function fe(f,v,O,F){return new Ce(f,v,O,F)}var ae=o({},se,{code:"EPSG:3857",projection:be,transformation:function(){var f=.5/(Math.PI*be.R);return fe(f,.5,-f,.5)}()}),ie=o({},ae,{code:"EPSG:900913"});function Ae(f){return document.createElementNS("http://www.w3.org/2000/svg",f)}function Me(f,v){var O="",F,q,re,Oe,Qe,Xe;for(F=0,re=f.length;F<re;F++){for(Qe=f[F],q=0,Oe=Qe.length;q<Oe;q++)Xe=Qe[q],O+=(q?"L":"M")+Xe.x+" "+Xe.y;O+=v?Ze.svg?"z":"x":""}return O||"M0 0"}var He=document.documentElement.style,de="ActiveXObject"in window,Ye=de&&!document.addEventListener,Je="msLaunchUri"in navigator&&!("documentMode"in document),Ee=Ot("webkit"),Ie=Ot("android"),De=Ot("android 2")||Ot("android 3"),We=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ge=Ie&&Ot("Google")&&We<537&&!("AudioNode"in window),ct=!!window.opera,rt=!Je&&Ot("chrome"),_t=Ot("gecko")&&!Ee&&!ct&&!de,ut=!rt&&Ot("safari"),$e=Ot("phantom"),ke="OTransition"in He,ot=navigator.platform.indexOf("Win")===0,Fe=de&&"transition"in He,Ne="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!De,Ve="MozPerspective"in He,dt=!window.L_DISABLE_3D&&(Fe||Ne||Ve)&&!ke&&!$e,Ke=typeof orientation<"u"||Ot("mobile"),ft=Ke&&Ee,Nt=Ke&&Ne,Qt=!window.PointerEvent&&window.MSPointerEvent,an=!!(window.PointerEvent||Qt),Pn="ontouchstart"in window||!!window.TouchEvent,Yt=!window.L_NO_TOUCH&&(Pn||an),pn=Ke&&ct,vn=Ke&&_t,Wt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Bt=function(){var f=!1;try{var v=Object.defineProperty({},"passive",{get:function(){f=!0}});window.addEventListener("testPassiveEventSupport",h,v),window.removeEventListener("testPassiveEventSupport",h,v)}catch{}return f}(),Ht=function(){return!!document.createElement("canvas").getContext}(),xt=!!(document.createElementNS&&Ae("svg").createSVGRect),Ut=!!xt&&function(){var f=document.createElement("div");return f.innerHTML="<svg/>",(f.firstChild&&f.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),hn=!xt&&function(){try{var f=document.createElement("div");f.innerHTML='<v:shape adj="1"/>';var v=f.firstChild;return v.style.behavior="url(#default#VML)",v&&typeof v.adj=="object"}catch{return!1}}(),gt=navigator.platform.indexOf("Mac")===0,Ct=navigator.platform.indexOf("Linux")===0;function Ot(f){return navigator.userAgent.toLowerCase().indexOf(f)>=0}var Ze={ie:de,ielt9:Ye,edge:Je,webkit:Ee,android:Ie,android23:De,androidStock:Ge,opera:ct,chrome:rt,gecko:_t,safari:ut,phantom:$e,opera12:ke,win:ot,ie3d:Fe,webkit3d:Ne,gecko3d:Ve,any3d:dt,mobile:Ke,mobileWebkit:ft,mobileWebkit3d:Nt,msPointer:Qt,pointer:an,touch:Yt,touchNative:Pn,mobileOpera:pn,mobileGecko:vn,retina:Wt,passiveEvents:Bt,canvas:Ht,svg:xt,vml:hn,inlineSvg:Ut,mac:gt,linux:Ct},Vt=Ze.msPointer?"MSPointerDown":"pointerdown",me=Ze.msPointer?"MSPointerMove":"pointermove",et=Ze.msPointer?"MSPointerUp":"pointerup",je=Ze.msPointer?"MSPointerCancel":"pointercancel",vt={touchstart:Vt,touchmove:me,touchend:et,touchcancel:je},Ue={touchstart:$t,touchmove:kt,touchend:kt,touchcancel:kt},Et={},Rt=!1;function jt(f,v,O){return v==="touchstart"&&qe(),Ue[v]?(O=Ue[v].bind(this,O),f.addEventListener(vt[v],O,!1),O):(console.warn("wrong event specified:",v),h)}function wn(f,v,O){if(!vt[v]){console.warn("wrong event specified:",v);return}f.removeEventListener(vt[v],O,!1)}function mt(f){Et[f.pointerId]=f}function pt(f){Et[f.pointerId]&&(Et[f.pointerId]=f)}function Tt(f){delete Et[f.pointerId]}function qe(){Rt||(document.addEventListener(Vt,mt,!0),document.addEventListener(me,pt,!0),document.addEventListener(et,Tt,!0),document.addEventListener(je,Tt,!0),Rt=!0)}function kt(f,v){if(v.pointerType!==(v.MSPOINTER_TYPE_MOUSE||"mouse")){v.touches=[];for(var O in Et)v.touches.push(Et[O]);v.changedTouches=[v],f(v)}}function $t(f,v){v.MSPOINTER_TYPE_TOUCH&&v.pointerType===v.MSPOINTER_TYPE_TOUCH&&Fn(v),kt(f,v)}function Ar(f){var v={},O,F;for(F in f)O=f[F],v[F]=O&&O.bind?O.bind(f):O;return f=v,v.type="dblclick",v.detail=2,v.isTrusted=!1,v._simulated=!0,v}var Hr=200;function or(f,v){f.addEventListener("dblclick",v);var O=0,F;function q(re){if(re.detail!==1){F=re.detail;return}if(!(re.pointerType==="mouse"||re.sourceCapabilities&&!re.sourceCapabilities.firesTouchEvents)){var Oe=Ha(re);if(!(Oe.some(function(Xe){return Xe instanceof HTMLLabelElement&&Xe.attributes.for})&&!Oe.some(function(Xe){return Xe instanceof HTMLInputElement||Xe instanceof HTMLSelectElement}))){var Qe=Date.now();Qe-O<=Hr?(F++,F===2&&v(Ar(re))):F=1,O=Qe}}}return f.addEventListener("click",q),{dblclick:v,simDblclick:q}}function Jn(f,v){f.removeEventListener("dblclick",v.dblclick),f.removeEventListener("click",v.simDblclick)}var Kn=Ft(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),vr=Ft(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),zr=vr==="webkitTransition"||vr==="OTransition"?vr+"End":"transitionend";function Jt(f){return typeof f=="string"?document.getElementById(f):f}function Sn(f,v){var O=f.style[v]||f.currentStyle&&f.currentStyle[v];if((!O||O==="auto")&&document.defaultView){var F=document.defaultView.getComputedStyle(f,null);O=F?F[v]:null}return O==="auto"?null:O}function Dt(f,v,O){var F=document.createElement(f);return F.className=v||"",O&&O.appendChild(F),F}function cn(f){var v=f.parentNode;v&&v.removeChild(f)}function zn(f){for(;f.firstChild;)f.removeChild(f.firstChild)}function Pr(f){var v=f.parentNode;v&&v.lastChild!==f&&v.appendChild(f)}function nr(f){var v=f.parentNode;v&&v.firstChild!==f&&v.insertBefore(f,v.firstChild)}function br(f,v){if(f.classList!==void 0)return f.classList.contains(v);var O=Mn(f);return O.length>0&&new RegExp("(^|\\s)"+v+"(\\s|$)").test(O)}function gn(f,v){if(f.classList!==void 0)for(var O=A(v),F=0,q=O.length;F<q;F++)f.classList.add(O[F]);else if(!br(f,v)){var re=Mn(f);bn(f,(re?re+" ":"")+v)}}function Kt(f,v){f.classList!==void 0?f.classList.remove(v):bn(f,m((" "+Mn(f)+" ").replace(" "+v+" "," ")))}function bn(f,v){f.className.baseVal===void 0?f.className=v:f.className.baseVal=v}function Mn(f){return f.correspondingElement&&(f=f.correspondingElement),f.className.baseVal===void 0?f.className:f.className.baseVal}function bt(f,v){"opacity"in f.style?f.style.opacity=v:"filter"in f.style&&Pt(f,v)}function Pt(f,v){var O=!1,F="DXImageTransform.Microsoft.Alpha";try{O=f.filters.item(F)}catch{if(v===1)return}v=Math.round(v*100),O?(O.Enabled=v!==100,O.Opacity=v):f.style.filter+=" progid:"+F+"(opacity="+v+")"}function Ft(f){for(var v=document.documentElement.style,O=0;O<f.length;O++)if(f[O]in v)return f[O];return!1}function tt(f,v,O){var F=v||new $(0,0);f.style[Kn]=(Ze.ie3d?"translate("+F.x+"px,"+F.y+"px)":"translate3d("+F.x+"px,"+F.y+"px,0)")+(O?" scale("+O+")":"")}function Cn(f,v){f._leaflet_pos=v,Ze.any3d?tt(f,v):(f.style.left=v.x+"px",f.style.top=v.y+"px")}function Dn(f){return f._leaflet_pos||new $(0,0)}var Dr,sr,o1;if("onselectstart"in document)Dr=function(){Tn(window,"selectstart",Fn)},sr=function(){mn(window,"selectstart",Fn)};else{var un=Ft(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Dr=function(){if(un){var f=document.documentElement.style;o1=f[un],f[un]="none"}},sr=function(){un&&(document.documentElement.style[un]=o1,o1=void 0)}}function yn(){Tn(window,"dragstart",Fn)}function tn(){mn(window,"dragstart",Fn)}var zt,Gt;function Qn(f){for(;f.tabIndex===-1;)f=f.parentNode;f.style&&(Wn(),zt=f,Gt=f.style.outlineStyle,f.style.outlineStyle="none",Tn(window,"keydown",Wn))}function Wn(){zt&&(zt.style.outlineStyle=Gt,zt=void 0,Gt=void 0,mn(window,"keydown",Wn))}function Sr(f){do f=f.parentNode;while((!f.offsetWidth||!f.offsetHeight)&&f!==document.body);return f}function An(f){var v=f.getBoundingClientRect();return{x:v.width/f.offsetWidth||1,y:v.height/f.offsetHeight||1,boundingClientRect:v}}var go={__proto__:null,TRANSFORM:Kn,TRANSITION:vr,TRANSITION_END:zr,get:Jt,getStyle:Sn,create:Dt,remove:cn,empty:zn,toFront:Pr,toBack:nr,hasClass:br,addClass:gn,removeClass:Kt,setClass:bn,getClass:Mn,setOpacity:bt,testProp:Ft,setTransform:tt,setPosition:Cn,getPosition:Dn,get disableTextSelection(){return Dr},get enableTextSelection(){return sr},disableImageDrag:yn,enableImageDrag:tn,preventOutline:Qn,restoreOutline:Wn,getSizedParentNode:Sr,getScale:An};function Tn(f,v,O,F){if(v&&typeof v=="object")for(var q in v)Or(f,q,v[q],O);else{v=A(v);for(var re=0,Oe=v.length;re<Oe;re++)Or(f,v[re],O,F)}return this}var $1="_leaflet_events";function mn(f,v,O,F){if(arguments.length===1)dn(f),delete f[$1];else if(v&&typeof v=="object")for(var q in v)n1(f,q,v[q],O);else if(v=A(v),arguments.length===2)dn(f,function(Qe){return E(v,Qe)!==-1});else for(var re=0,Oe=v.length;re<Oe;re++)n1(f,v[re],O,F);return this}function dn(f,v){for(var O in f[$1]){var F=O.split(/\d/)[0];(!v||v(F))&&n1(f,F,null,null,O)}}var On={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Or(f,v,O,F){var q=v+l(O)+(F?"_"+l(F):"");if(f[$1]&&f[$1][q])return this;var re=function(Qe){return O.call(F||f,Qe||window.event)},Oe=re;!Ze.touchNative&&Ze.pointer&&v.indexOf("touch")===0?re=jt(f,v,re):Ze.touch&&v==="dblclick"?re=or(f,re):"addEventListener"in f?v==="touchstart"||v==="touchmove"||v==="wheel"||v==="mousewheel"?f.addEventListener(On[v]||v,re,Ze.passiveEvents?{passive:!1}:!1):v==="mouseenter"||v==="mouseleave"?(re=function(Qe){Qe=Qe||window.event,i0(f,Qe)&&Oe(Qe)},f.addEventListener(On[v],re,!1)):f.addEventListener(v,Oe,!1):f.attachEvent("on"+v,re),f[$1]=f[$1]||{},f[$1][q]=re}function n1(f,v,O,F,q){q=q||v+l(O)+(F?"_"+l(F):"");var re=f[$1]&&f[$1][q];if(!re)return this;!Ze.touchNative&&Ze.pointer&&v.indexOf("touch")===0?wn(f,v,re):Ze.touch&&v==="dblclick"?Jn(f,re):"removeEventListener"in f?f.removeEventListener(On[v]||v,re,!1):f.detachEvent("on"+v,re),f[$1][q]=null}function Mr(f){return f.stopPropagation?f.stopPropagation():f.originalEvent?f.originalEvent._stopped=!0:f.cancelBubble=!0,this}function Li(f){return Or(f,"wheel",Mr),this}function Oo(f){return Tn(f,"mousedown touchstart dblclick contextmenu",Mr),f._leaflet_disable_click=!0,this}function Fn(f){return f.preventDefault?f.preventDefault():f.returnValue=!1,this}function er(f){return Fn(f),Mr(f),this}function Ha(f){if(f.composedPath)return f.composedPath();for(var v=[],O=f.target;O;)v.push(O),O=O.parentNode;return v}function J0(f,v){if(!v)return new $(f.clientX,f.clientY);var O=An(v),F=O.boundingClientRect;return new $((f.clientX-F.left)/O.x-v.clientLeft,(f.clientY-F.top)/O.y-v.clientTop)}var o0=Ze.linux&&Ze.chrome?window.devicePixelRatio:Ze.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Bi(f){return Ze.edge?f.wheelDeltaY/2:f.deltaY&&f.deltaMode===0?-f.deltaY/o0:f.deltaY&&f.deltaMode===1?-f.deltaY*20:f.deltaY&&f.deltaMode===2?-f.deltaY*60:f.deltaX||f.deltaZ?0:f.wheelDelta?(f.wheelDeltaY||f.wheelDelta)/2:f.detail&&Math.abs(f.detail)<32765?-f.detail*20:f.detail?f.detail/-32765*60:0}function i0(f,v){var O=v.relatedTarget;if(!O)return!0;try{for(;O&&O!==f;)O=O.parentNode}catch{return!1}return O!==f}var es={__proto__:null,on:Tn,off:mn,stopPropagation:Mr,disableScrollPropagation:Li,disableClickPropagation:Oo,preventDefault:Fn,stop:er,getPropagationPath:Ha,getMousePosition:J0,getWheelDelta:Bi,isExternalTarget:i0,addListener:Tn,removeListener:mn},ts=K.extend({run:function(f,v,O,F){this.stop(),this._el=f,this._inProgress=!0,this._duration=O||.25,this._easeOutPower=1/Math.max(F||.5,.2),this._startPos=Dn(f),this._offset=v.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=N(this._animate,this),this._step()},_step:function(f){var v=+new Date-this._startTime,O=this._duration*1e3;v<O?this._runFrame(this._easeOut(v/O),f):(this._runFrame(1),this._complete())},_runFrame:function(f,v){var O=this._startPos.add(this._offset.multiplyBy(f));v&&O._round(),Cn(this._el,O),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(f){return 1-Math.pow(1-f,this._easeOutPower)}}),fr=K.extend({options:{crs:ae,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(f,v){v=b(this,v),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(f),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),v.maxBounds&&this.setMaxBounds(v.maxBounds),v.zoom!==void 0&&(this._zoom=this._limitZoom(v.zoom)),v.center&&v.zoom!==void 0&&this.setView(oe(v.center),v.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=vr&&Ze.any3d&&!Ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Tn(this._proxy,zr,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(f,v,O){if(v=v===void 0?this._zoom:this._limitZoom(v),f=this._limitCenter(oe(f),v,this.options.maxBounds),O=O||{},this._stop(),this._loaded&&!O.reset&&O!==!0){O.animate!==void 0&&(O.zoom=o({animate:O.animate},O.zoom),O.pan=o({animate:O.animate,duration:O.duration},O.pan));var F=this._zoom!==v?this._tryAnimatedZoom&&this._tryAnimatedZoom(f,v,O.zoom):this._tryAnimatedPan(f,O.pan);if(F)return clearTimeout(this._sizeTimer),this}return this._resetView(f,v,O.pan&&O.pan.noMoveStart),this},setZoom:function(f,v){return this._loaded?this.setView(this.getCenter(),f,{zoom:v}):(this._zoom=f,this)},zoomIn:function(f,v){return f=f||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+f,v)},zoomOut:function(f,v){return f=f||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-f,v)},setZoomAround:function(f,v,O){var F=this.getZoomScale(v),q=this.getSize().divideBy(2),re=f instanceof $?f:this.latLngToContainerPoint(f),Oe=re.subtract(q).multiplyBy(1-1/F),Qe=this.containerPointToLatLng(q.add(Oe));return this.setView(Qe,v,{zoom:O})},_getBoundsCenterZoom:function(f,v){v=v||{},f=f.getBounds?f.getBounds():G(f);var O=Z(v.paddingTopLeft||v.padding||[0,0]),F=Z(v.paddingBottomRight||v.padding||[0,0]),q=this.getBoundsZoom(f,!1,O.add(F));if(q=typeof v.maxZoom=="number"?Math.min(v.maxZoom,q):q,q===1/0)return{center:f.getCenter(),zoom:q};var re=F.subtract(O).divideBy(2),Oe=this.project(f.getSouthWest(),q),Qe=this.project(f.getNorthEast(),q),Xe=this.unproject(Oe.add(Qe).divideBy(2).add(re),q);return{center:Xe,zoom:q}},fitBounds:function(f,v){if(f=G(f),!f.isValid())throw new Error("Bounds are not valid.");var O=this._getBoundsCenterZoom(f,v);return this.setView(O.center,O.zoom,v)},fitWorld:function(f){return this.fitBounds([[-90,-180],[90,180]],f)},panTo:function(f,v){return this.setView(f,this._zoom,{pan:v})},panBy:function(f,v){if(f=Z(f).round(),v=v||{},!f.x&&!f.y)return this.fire("moveend");if(v.animate!==!0&&!this.getSize().contains(f))return this._resetView(this.unproject(this.project(this.getCenter()).add(f)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ts,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),v.noMoveStart||this.fire("movestart"),v.animate!==!1){gn(this._mapPane,"leaflet-pan-anim");var O=this._getMapPanePos().subtract(f).round();this._panAnim.run(this._mapPane,O,v.duration||.25,v.easeLinearity)}else this._rawPanBy(f),this.fire("move").fire("moveend");return this},flyTo:function(f,v,O){if(O=O||{},O.animate===!1||!Ze.any3d)return this.setView(f,v,O);this._stop();var F=this.project(this.getCenter()),q=this.project(f),re=this.getSize(),Oe=this._zoom;f=oe(f),v=v===void 0?Oe:v;var Qe=Math.max(re.x,re.y),Xe=Qe*this.getZoomScale(Oe,v),Lt=q.distanceTo(F)||1,nn=1.42,Bn=nn*nn;function Yn(Zt){var wr=Zt?-1:1,le=Zt?Xe:Qe,c1=Xe*Xe-Qe*Qe+wr*Bn*Bn*Lt*Lt,S1=2*le*Bn*Lt,Cr=c1/S1,rn=Math.sqrt(Cr*Cr+1)-Cr,y1=rn<1e-9?-18:Math.log(rn);return y1}function l1(Zt){return(Math.exp(Zt)-Math.exp(-Zt))/2}function pe(Zt){return(Math.exp(Zt)+Math.exp(-Zt))/2}function he(Zt){return l1(Zt)/pe(Zt)}var we=Yn(0);function Re(Zt){return Qe*(pe(we)/pe(we+nn*Zt))}function Le(Zt){return Qe*(pe(we)*he(we+nn*Zt)-l1(we))/Bn}function at(Zt){return 1-Math.pow(1-Zt,1.5)}var yt=Date.now(),qt=(Yn(1)-we)/nn,fn=O.duration?1e3*O.duration:1e3*qt*.8;function lt(){var Zt=(Date.now()-yt)/fn,wr=at(Zt)*qt;Zt<=1?(this._flyToFrame=N(lt,this),this._move(this.unproject(F.add(q.subtract(F).multiplyBy(Le(wr)/Lt)),Oe),this.getScaleZoom(Qe/Re(wr),Oe),{flyTo:!0})):this._move(f,v)._moveEnd(!0)}return this._moveStart(!0,O.noMoveStart),lt.call(this),this},flyToBounds:function(f,v){var O=this._getBoundsCenterZoom(f,v);return this.flyTo(O.center,O.zoom,v)},setMaxBounds:function(f){return f=G(f),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),f.isValid()?(this.options.maxBounds=f,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(f){var v=this.options.minZoom;return this.options.minZoom=f,this._loaded&&v!==f&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(f):this},setMaxZoom:function(f){var v=this.options.maxZoom;return this.options.maxZoom=f,this._loaded&&v!==f&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(f):this},panInsideBounds:function(f,v){this._enforcingBounds=!0;var O=this.getCenter(),F=this._limitCenter(O,this._zoom,G(f));return O.equals(F)||this.panTo(F,v),this._enforcingBounds=!1,this},panInside:function(f,v){v=v||{};var O=Z(v.paddingTopLeft||v.padding||[0,0]),F=Z(v.paddingBottomRight||v.padding||[0,0]),q=this.project(this.getCenter()),re=this.project(f),Oe=this.getPixelBounds(),Qe=Y([Oe.min.add(O),Oe.max.subtract(F)]),Xe=Qe.getSize();if(!Qe.contains(re)){this._enforcingBounds=!0;var Lt=re.subtract(Qe.getCenter()),nn=Qe.extend(re).getSize().subtract(Xe);q.x+=Lt.x<0?-nn.x:nn.x,q.y+=Lt.y<0?-nn.y:nn.y,this.panTo(this.unproject(q),v),this._enforcingBounds=!1}return this},invalidateSize:function(f){if(!this._loaded)return this;f=o({animate:!1,pan:!0},f===!0?{animate:!0}:f);var v=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var O=this.getSize(),F=v.divideBy(2).round(),q=O.divideBy(2).round(),re=F.subtract(q);return!re.x&&!re.y?this:(f.animate&&f.pan?this.panBy(re):(f.pan&&this._rawPanBy(re),this.fire("move"),f.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:v,newSize:O}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(f){if(f=this._locateOptions=o({timeout:1e4,watch:!1},f),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var v=a(this._handleGeolocationResponse,this),O=a(this._handleGeolocationError,this);return f.watch?this._locationWatchId=navigator.geolocation.watchPosition(v,O,f):navigator.geolocation.getCurrentPosition(v,O,f),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(f){if(this._container._leaflet_id){var v=f.code,O=f.message||(v===1?"permission denied":v===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:v,message:"Geolocation error: "+O+"."})}},_handleGeolocationResponse:function(f){if(this._container._leaflet_id){var v=f.coords.latitude,O=f.coords.longitude,F=new ee(v,O),q=F.toBounds(f.coords.accuracy*2),re=this._locateOptions;if(re.setView){var Oe=this.getBoundsZoom(q);this.setView(F,re.maxZoom?Math.min(Oe,re.maxZoom):Oe)}var Qe={latlng:F,bounds:q,timestamp:f.timestamp};for(var Xe in f.coords)typeof f.coords[Xe]=="number"&&(Qe[Xe]=f.coords[Xe]);this.fire("locationfound",Qe)}},addHandler:function(f,v){if(!v)return this;var O=this[f]=new v(this);return this._handlers.push(O),this.options[f]&&O.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(),cn(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var f;for(f in this._layers)this._layers[f].remove();for(f in this._panes)cn(this._panes[f]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(f,v){var O="leaflet-pane"+(f?" leaflet-"+f.replace("Pane","")+"-pane":""),F=Dt("div",O,v||this._mapPane);return f&&(this._panes[f]=F),F},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var f=this.getPixelBounds(),v=this.unproject(f.getBottomLeft()),O=this.unproject(f.getTopRight());return new J(v,O)},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(f,v,O){f=G(f),O=Z(O||[0,0]);var F=this.getZoom()||0,q=this.getMinZoom(),re=this.getMaxZoom(),Oe=f.getNorthWest(),Qe=f.getSouthEast(),Xe=this.getSize().subtract(O),Lt=Y(this.project(Qe,F),this.project(Oe,F)).getSize(),nn=Ze.any3d?this.options.zoomSnap:1,Bn=Xe.x/Lt.x,Yn=Xe.y/Lt.y,l1=v?Math.max(Bn,Yn):Math.min(Bn,Yn);return F=this.getScaleZoom(l1,F),nn&&(F=Math.round(F/(nn/100))*(nn/100),F=v?Math.ceil(F/nn)*nn:Math.floor(F/nn)*nn),Math.max(q,Math.min(re,F))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new $(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(f,v){var O=this._getTopLeftPoint(f,v);return new U(O,O.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(f){return this.options.crs.getProjectedBounds(f===void 0?this.getZoom():f)},getPane:function(f){return typeof f=="string"?this._panes[f]:f},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(f,v){var O=this.options.crs;return v=v===void 0?this._zoom:v,O.scale(f)/O.scale(v)},getScaleZoom:function(f,v){var O=this.options.crs;v=v===void 0?this._zoom:v;var F=O.zoom(f*O.scale(v));return isNaN(F)?1/0:F},project:function(f,v){return v=v===void 0?this._zoom:v,this.options.crs.latLngToPoint(oe(f),v)},unproject:function(f,v){return v=v===void 0?this._zoom:v,this.options.crs.pointToLatLng(Z(f),v)},layerPointToLatLng:function(f){var v=Z(f).add(this.getPixelOrigin());return this.unproject(v)},latLngToLayerPoint:function(f){var v=this.project(oe(f))._round();return v._subtract(this.getPixelOrigin())},wrapLatLng:function(f){return this.options.crs.wrapLatLng(oe(f))},wrapLatLngBounds:function(f){return this.options.crs.wrapLatLngBounds(G(f))},distance:function(f,v){return this.options.crs.distance(oe(f),oe(v))},containerPointToLayerPoint:function(f){return Z(f).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(f){return Z(f).add(this._getMapPanePos())},containerPointToLatLng:function(f){var v=this.containerPointToLayerPoint(Z(f));return this.layerPointToLatLng(v)},latLngToContainerPoint:function(f){return this.layerPointToContainerPoint(this.latLngToLayerPoint(oe(f)))},mouseEventToContainerPoint:function(f){return J0(f,this._container)},mouseEventToLayerPoint:function(f){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(f))},mouseEventToLatLng:function(f){return this.layerPointToLatLng(this.mouseEventToLayerPoint(f))},_initContainer:function(f){var v=this._container=Jt(f);if(v){if(v._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Tn(v,"scroll",this._onScroll,this),this._containerId=l(v)},_initLayout:function(){var f=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ze.any3d,gn(f,"leaflet-container"+(Ze.touch?" leaflet-touch":"")+(Ze.retina?" leaflet-retina":"")+(Ze.ielt9?" leaflet-oldie":"")+(Ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var v=Sn(f,"position");v!=="absolute"&&v!=="relative"&&v!=="fixed"&&v!=="sticky"&&(f.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var f=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Cn(this._mapPane,new $(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(gn(f.markerPane,"leaflet-zoom-hide"),gn(f.shadowPane,"leaflet-zoom-hide"))},_resetView:function(f,v,O){Cn(this._mapPane,new $(0,0));var F=!this._loaded;this._loaded=!0,v=this._limitZoom(v),this.fire("viewprereset");var q=this._zoom!==v;this._moveStart(q,O)._move(f,v)._moveEnd(q),this.fire("viewreset"),F&&this.fire("load")},_moveStart:function(f,v){return f&&this.fire("zoomstart"),v||this.fire("movestart"),this},_move:function(f,v,O,F){v===void 0&&(v=this._zoom);var q=this._zoom!==v;return this._zoom=v,this._lastCenter=f,this._pixelOrigin=this._getNewPixelOrigin(f),F?O&&O.pinch&&this.fire("zoom",O):((q||O&&O.pinch)&&this.fire("zoom",O),this.fire("move",O)),this},_moveEnd:function(f){return f&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(f){Cn(this._mapPane,this._getMapPanePos().subtract(f))},_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(f){this._targets={},this._targets[l(this._container)]=this;var v=f?mn:Tn;v(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&v(window,"resize",this._onResize,this),Ze.any3d&&this.options.transform3DLimit&&(f?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var f=this._getMapPanePos();Math.max(Math.abs(f.x),Math.abs(f.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(f,v){for(var O=[],F,q=v==="mouseout"||v==="mouseover",re=f.target||f.srcElement,Oe=!1;re;){if(F=this._targets[l(re)],F&&(v==="click"||v==="preclick")&&this._draggableMoved(F)){Oe=!0;break}if(F&&F.listens(v,!0)&&(q&&!i0(re,f)||(O.push(F),q))||re===this._container)break;re=re.parentNode}return!O.length&&!Oe&&!q&&this.listens(v,!0)&&(O=[this]),O},_isClickDisabled:function(f){for(;f&&f!==this._container;){if(f._leaflet_disable_click)return!0;f=f.parentNode}},_handleDOMEvent:function(f){var v=f.target||f.srcElement;if(!(!this._loaded||v._leaflet_disable_events||f.type==="click"&&this._isClickDisabled(v))){var O=f.type;O==="mousedown"&&Qn(v),this._fireDOMEvent(f,O)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(f,v,O){if(f.type==="click"){var F=o({},f);F.type="preclick",this._fireDOMEvent(F,F.type,O)}var q=this._findEventTargets(f,v);if(O){for(var re=[],Oe=0;Oe<O.length;Oe++)O[Oe].listens(v,!0)&&re.push(O[Oe]);q=re.concat(q)}if(q.length){v==="contextmenu"&&Fn(f);var Qe=q[0],Xe={originalEvent:f};if(f.type!=="keypress"&&f.type!=="keydown"&&f.type!=="keyup"){var Lt=Qe.getLatLng&&(!Qe._radius||Qe._radius<=10);Xe.containerPoint=Lt?this.latLngToContainerPoint(Qe.getLatLng()):this.mouseEventToContainerPoint(f),Xe.layerPoint=this.containerPointToLayerPoint(Xe.containerPoint),Xe.latlng=Lt?Qe.getLatLng():this.layerPointToLatLng(Xe.layerPoint)}for(Oe=0;Oe<q.length;Oe++)if(q[Oe].fire(v,Xe,!0),Xe.originalEvent._stopped||q[Oe].options.bubblingMouseEvents===!1&&E(this._mouseEvents,v)!==-1)return}},_draggableMoved:function(f){return f=f.dragging&&f.dragging.enabled()?f:this,f.dragging&&f.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var f=0,v=this._handlers.length;f<v;f++)this._handlers[f].disable()},whenReady:function(f,v){return this._loaded?f.call(v||this,{target:this}):this.on("load",f,v),this},_getMapPanePos:function(){return Dn(this._mapPane)||new $(0,0)},_moved:function(){var f=this._getMapPanePos();return f&&!f.equals([0,0])},_getTopLeftPoint:function(f,v){var O=f&&v!==void 0?this._getNewPixelOrigin(f,v):this.getPixelOrigin();return O.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(f,v){var O=this.getSize()._divideBy(2);return this.project(f,v)._subtract(O)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(f,v,O){var F=this._getNewPixelOrigin(O,v);return this.project(f,v)._subtract(F)},_latLngBoundsToNewLayerBounds:function(f,v,O){var F=this._getNewPixelOrigin(O,v);return Y([this.project(f.getSouthWest(),v)._subtract(F),this.project(f.getNorthWest(),v)._subtract(F),this.project(f.getSouthEast(),v)._subtract(F),this.project(f.getNorthEast(),v)._subtract(F)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(f){return this.latLngToLayerPoint(f).subtract(this._getCenterLayerPoint())},_limitCenter:function(f,v,O){if(!O)return f;var F=this.project(f,v),q=this.getSize().divideBy(2),re=new U(F.subtract(q),F.add(q)),Oe=this._getBoundsOffset(re,O,v);return Math.abs(Oe.x)<=1&&Math.abs(Oe.y)<=1?f:this.unproject(F.add(Oe),v)},_limitOffset:function(f,v){if(!v)return f;var O=this.getPixelBounds(),F=new U(O.min.add(f),O.max.add(f));return f.add(this._getBoundsOffset(F,v))},_getBoundsOffset:function(f,v,O){var F=Y(this.project(v.getNorthEast(),O),this.project(v.getSouthWest(),O)),q=F.min.subtract(f.min),re=F.max.subtract(f.max),Oe=this._rebound(q.x,-re.x),Qe=this._rebound(q.y,-re.y);return new $(Oe,Qe)},_rebound:function(f,v){return f+v>0?Math.round(f-v)/2:Math.max(0,Math.ceil(f))-Math.max(0,Math.floor(v))},_limitZoom:function(f){var v=this.getMinZoom(),O=this.getMaxZoom(),F=Ze.any3d?this.options.zoomSnap:1;return F&&(f=Math.round(f/F)*F),Math.max(v,Math.min(O,f))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Kt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(f,v){var O=this._getCenterOffset(f)._trunc();return(v&&v.animate)!==!0&&!this.getSize().contains(O)?!1:(this.panBy(O,v),!0)},_createAnimProxy:function(){var f=this._proxy=Dt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(f),this.on("zoomanim",function(v){var O=Kn,F=this._proxy.style[O];tt(this._proxy,this.project(v.center,v.zoom),this.getZoomScale(v.zoom,1)),F===this._proxy.style[O]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){cn(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var f=this.getCenter(),v=this.getZoom();tt(this._proxy,this.project(f,v),this.getZoomScale(v,1))},_catchTransitionEnd:function(f){this._animatingZoom&&f.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(f,v,O){if(this._animatingZoom)return!0;if(O=O||{},!this._zoomAnimated||O.animate===!1||this._nothingToAnimate()||Math.abs(v-this._zoom)>this.options.zoomAnimationThreshold)return!1;var F=this.getZoomScale(v),q=this._getCenterOffset(f)._divideBy(1-1/F);return O.animate!==!0&&!this.getSize().contains(q)?!1:(N(function(){this._moveStart(!0,O.noMoveStart||!1)._animateZoom(f,v,!0)},this),!0)},_animateZoom:function(f,v,O,F){this._mapPane&&(O&&(this._animatingZoom=!0,this._animateToCenter=f,this._animateToZoom=v,gn(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:f,zoom:v,noUpdate:F}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Kt(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 E1(f,v){return new fr(f,v)}var ro=V.extend({options:{position:"topright"},initialize:function(f){b(this,f)},getPosition:function(){return this.options.position},setPosition:function(f){var v=this._map;return v&&v.removeControl(this),this.options.position=f,v&&v.addControl(this),this},getContainer:function(){return this._container},addTo:function(f){this.remove(),this._map=f;var v=this._container=this.onAdd(f),O=this.getPosition(),F=f._controlCorners[O];return gn(v,"leaflet-control"),O.indexOf("bottom")!==-1?F.insertBefore(v,F.firstChild):F.appendChild(v),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(cn(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(f){this._map&&f&&f.screenX>0&&f.screenY>0&&this._map.getContainer().focus()}}),Co=function(f){return new ro(f)};fr.include({addControl:function(f){return f.addTo(this),this},removeControl:function(f){return f.remove(),this},_initControlPos:function(){var f=this._controlCorners={},v="leaflet-",O=this._controlContainer=Dt("div",v+"control-container",this._container);function F(q,re){var Oe=v+q+" "+v+re;f[q+re]=Dt("div",Oe,O)}F("top","left"),F("top","right"),F("bottom","left"),F("bottom","right")},_clearControlPos:function(){for(var f in this._controlCorners)cn(this._controlCorners[f]);cn(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Oa=ro.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(f,v,O,F){return O<F?-1:F<O?1:0}},initialize:function(f,v,O){b(this,O),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var F in f)this._addLayer(f[F],F);for(F in v)this._addLayer(v[F],F,!0)},onAdd:function(f){this._initLayout(),this._update(),this._map=f,f.on("zoomend",this._checkDisabledLayers,this);for(var v=0;v<this._layers.length;v++)this._layers[v].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(f){return ro.prototype.addTo.call(this,f),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var f=0;f<this._layers.length;f++)this._layers[f].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(f,v){return this._addLayer(f,v),this._map?this._update():this},addOverlay:function(f,v){return this._addLayer(f,v,!0),this._map?this._update():this},removeLayer:function(f){f.off("add remove",this._onLayerChange,this);var v=this._getLayer(l(f));return v&&this._layers.splice(this._layers.indexOf(v),1),this._map?this._update():this},expand:function(){gn(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var f=this._map.getSize().y-(this._container.offsetTop+50);return f<this._section.clientHeight?(gn(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=f+"px"):Kt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Kt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var f="leaflet-control-layers",v=this._container=Dt("div",f),O=this.options.collapsed;v.setAttribute("aria-haspopup",!0),Oo(v),Li(v);var F=this._section=Dt("section",f+"-list");O&&(this._map.on("click",this.collapse,this),Tn(v,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var q=this._layersLink=Dt("a",f+"-toggle",v);q.href="#",q.title="Layers",q.setAttribute("role","button"),Tn(q,{keydown:function(re){re.keyCode===13&&this._expandSafely()},click:function(re){Fn(re),this._expandSafely()}},this),O||this.expand(),this._baseLayersList=Dt("div",f+"-base",F),this._separator=Dt("div",f+"-separator",F),this._overlaysList=Dt("div",f+"-overlays",F),v.appendChild(F)},_getLayer:function(f){for(var v=0;v<this._layers.length;v++)if(this._layers[v]&&l(this._layers[v].layer)===f)return this._layers[v]},_addLayer:function(f,v,O){this._map&&f.on("add remove",this._onLayerChange,this),this._layers.push({layer:f,name:v,overlay:O}),this.options.sortLayers&&this._layers.sort(a(function(F,q){return this.options.sortFunction(F.layer,q.layer,F.name,q.name)},this)),this.options.autoZIndex&&f.setZIndex&&(this._lastZIndex++,f.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;zn(this._baseLayersList),zn(this._overlaysList),this._layerControlInputs=[];var f,v,O,F,q=0;for(O=0;O<this._layers.length;O++)F=this._layers[O],this._addItem(F),v=v||F.overlay,f=f||!F.overlay,q+=F.overlay?0:1;return this.options.hideSingleBase&&(f=f&&q>1,this._baseLayersList.style.display=f?"":"none"),this._separator.style.display=v&&f?"":"none",this},_onLayerChange:function(f){this._handlingClick||this._update();var v=this._getLayer(l(f.target)),O=v.overlay?f.type==="add"?"overlayadd":"overlayremove":f.type==="add"?"baselayerchange":null;O&&this._map.fire(O,v)},_createRadioElement:function(f,v){var O='<input type="radio" class="leaflet-control-layers-selector" name="'+f+'"'+(v?' checked="checked"':"")+"/>",F=document.createElement("div");return F.innerHTML=O,F.firstChild},_addItem:function(f){var v=document.createElement("label"),O=this._map.hasLayer(f.layer),F;f.overlay?(F=document.createElement("input"),F.type="checkbox",F.className="leaflet-control-layers-selector",F.defaultChecked=O):F=this._createRadioElement("leaflet-base-layers_"+l(this),O),this._layerControlInputs.push(F),F.layerId=l(f.layer),Tn(F,"click",this._onInputClick,this);var q=document.createElement("span");q.innerHTML=" "+f.name;var re=document.createElement("span");v.appendChild(re),re.appendChild(F),re.appendChild(q);var Oe=f.overlay?this._overlaysList:this._baseLayersList;return Oe.appendChild(v),this._checkDisabledLayers(),v},_onInputClick:function(){if(!this._preventClick){var f=this._layerControlInputs,v,O,F=[],q=[];this._handlingClick=!0;for(var re=f.length-1;re>=0;re--)v=f[re],O=this._getLayer(v.layerId).layer,v.checked?F.push(O):v.checked||q.push(O);for(re=0;re<q.length;re++)this._map.hasLayer(q[re])&&this._map.removeLayer(q[re]);for(re=0;re<F.length;re++)this._map.hasLayer(F[re])||this._map.addLayer(F[re]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var f=this._layerControlInputs,v,O,F=this._map.getZoom(),q=f.length-1;q>=0;q--)v=f[q],O=this._getLayer(v.layerId).layer,v.disabled=O.options.minZoom!==void 0&&F<O.options.minZoom||O.options.maxZoom!==void 0&&F>O.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var f=this._section;this._preventClick=!0,Tn(f,"click",Fn),this.expand();var v=this;setTimeout(function(){mn(f,"click",Fn),v._preventClick=!1})}}),a0=function(f,v,O){return new Oa(f,v,O)},m1=ro.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(f){var v="leaflet-control-zoom",O=Dt("div",v+" leaflet-bar"),F=this.options;return this._zoomInButton=this._createButton(F.zoomInText,F.zoomInTitle,v+"-in",O,this._zoomIn),this._zoomOutButton=this._createButton(F.zoomOutText,F.zoomOutTitle,v+"-out",O,this._zoomOut),this._updateDisabled(),f.on("zoomend zoomlevelschange",this._updateDisabled,this),O},onRemove:function(f){f.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(f){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(f.shiftKey?3:1))},_zoomOut:function(f){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(f.shiftKey?3:1))},_createButton:function(f,v,O,F,q){var re=Dt("a",O,F);return re.innerHTML=f,re.href="#",re.title=v,re.setAttribute("role","button"),re.setAttribute("aria-label",v),Oo(re),Tn(re,"click",er),Tn(re,"click",q,this),Tn(re,"click",this._refocusOnMap,this),re},_updateDisabled:function(){var f=this._map,v="leaflet-disabled";Kt(this._zoomInButton,v),Kt(this._zoomOutButton,v),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||f._zoom===f.getMinZoom())&&(gn(this._zoomOutButton,v),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||f._zoom===f.getMaxZoom())&&(gn(this._zoomInButton,v),this._zoomInButton.setAttribute("aria-disabled","true"))}});fr.mergeOptions({zoomControl:!0}),fr.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new m1,this.addControl(this.zoomControl))});var i5=function(f){return new m1(f)},Uo=ro.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(f){var v="leaflet-control-scale",O=Dt("div",v),F=this.options;return this._addScales(F,v+"-line",O),f.on(F.updateWhenIdle?"moveend":"move",this._update,this),f.whenReady(this._update,this),O},onRemove:function(f){f.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(f,v,O){f.metric&&(this._mScale=Dt("div",v,O)),f.imperial&&(this._iScale=Dt("div",v,O))},_update:function(){var f=this._map,v=f.getSize().y/2,O=f.distance(f.containerPointToLatLng([0,v]),f.containerPointToLatLng([this.options.maxWidth,v]));this._updateScales(O)},_updateScales:function(f){this.options.metric&&f&&this._updateMetric(f),this.options.imperial&&f&&this._updateImperial(f)},_updateMetric:function(f){var v=this._getRoundNum(f),O=v<1e3?v+" m":v/1e3+" km";this._updateScale(this._mScale,O,v/f)},_updateImperial:function(f){var v=f*3.2808399,O,F,q;v>5280?(O=v/5280,F=this._getRoundNum(O),this._updateScale(this._iScale,F+" mi",F/O)):(q=this._getRoundNum(v),this._updateScale(this._iScale,q+" ft",q/v))},_updateScale:function(f,v,O){f.style.width=Math.round(this.options.maxWidth*O)+"px",f.innerHTML=v},_getRoundNum:function(f){var v=Math.pow(10,(Math.floor(f)+"").length-1),O=f/v;return O=O>=10?10:O>=5?5:O>=3?3:O>=2?2:1,v*O}}),a5=function(f){return new Uo(f)},Lo='<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>',s0=ro.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ze.inlineSvg?Lo+" ":"")+"Leaflet</a>"},initialize:function(f){b(this,f),this._attributions={}},onAdd:function(f){f.attributionControl=this,this._container=Dt("div","leaflet-control-attribution"),Oo(this._container);for(var v in f._layers)f._layers[v].getAttribution&&this.addAttribution(f._layers[v].getAttribution());return this._update(),f.on("layeradd",this._addAttribution,this),this._container},onRemove:function(f){f.off("layeradd",this._addAttribution,this)},_addAttribution:function(f){f.layer.getAttribution&&(this.addAttribution(f.layer.getAttribution()),f.layer.once("remove",function(){this.removeAttribution(f.layer.getAttribution())},this))},setPrefix:function(f){return this.options.prefix=f,this._update(),this},addAttribution:function(f){return f?(this._attributions[f]||(this._attributions[f]=0),this._attributions[f]++,this._update(),this):this},removeAttribution:function(f){return f?(this._attributions[f]&&(this._attributions[f]--,this._update()),this):this},_update:function(){if(this._map){var f=[];for(var v in this._attributions)this._attributions[v]&&f.push(v);var O=[];this.options.prefix&&O.push(this.options.prefix),f.length&&O.push(f.join(", ")),this._container.innerHTML=O.join(' <span aria-hidden="true">|</span> ')}}});fr.mergeOptions({attributionControl:!0}),fr.addInitHook(function(){this.options.attributionControl&&new s0().addTo(this)});var $o=function(f){return new s0(f)};ro.Layers=Oa,ro.Zoom=m1,ro.Scale=Uo,ro.Attribution=s0,Co.layers=a0,Co.zoom=i5,Co.scale=a5,Co.attribution=$o;var i1=V.extend({initialize:function(f){this._map=f},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}});i1.addTo=function(f,v){return f.addHandler(v,this),this};var s5={Events:k},h1=Ze.touch?"touchstart mousedown":"mousedown",Ri=K.extend({options:{clickTolerance:3},initialize:function(f,v,O,F){b(this,F),this._element=f,this._dragStartTarget=v||f,this._preventOutline=O},enable:function(){this._enabled||(Tn(this._dragStartTarget,h1,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ri._dragging===this&&this.finishDrag(!0),mn(this._dragStartTarget,h1,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(f){if(this._enabled&&(this._moved=!1,!br(this._element,"leaflet-zoom-anim"))){if(f.touches&&f.touches.length!==1){Ri._dragging===this&&this.finishDrag();return}if(!(Ri._dragging||f.shiftKey||f.which!==1&&f.button!==1&&!f.touches)&&(Ri._dragging=this,this._preventOutline&&Qn(this._element),yn(),Dr(),!this._moving)){this.fire("down");var v=f.touches?f.touches[0]:f,O=Sr(this._element);this._startPoint=new $(v.clientX,v.clientY),this._startPos=Dn(this._element),this._parentScale=An(O);var F=f.type==="mousedown";Tn(document,F?"mousemove":"touchmove",this._onMove,this),Tn(document,F?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(f){if(this._enabled){if(f.touches&&f.touches.length>1){this._moved=!0;return}var v=f.touches&&f.touches.length===1?f.touches[0]:f,O=new $(v.clientX,v.clientY)._subtract(this._startPoint);!O.x&&!O.y||Math.abs(O.x)+Math.abs(O.y)<this.options.clickTolerance||(O.x/=this._parentScale.x,O.y/=this._parentScale.y,Fn(f),this._moved||(this.fire("dragstart"),this._moved=!0,gn(document.body,"leaflet-dragging"),this._lastTarget=f.target||f.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),gn(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(O),this._moving=!0,this._lastEvent=f,this._updatePosition())}},_updatePosition:function(){var f={originalEvent:this._lastEvent};this.fire("predrag",f),Cn(this._element,this._newPos),this.fire("drag",f)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(f){Kt(document.body,"leaflet-dragging"),this._lastTarget&&(Kt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),mn(document,"mousemove touchmove",this._onMove,this),mn(document,"mouseup touchend touchcancel",this._onUp,this),tn(),sr();var v=this._moved&&this._moving;this._moving=!1,Ri._dragging=!1,v&&this.fire("dragend",{noInertia:f,distance:this._newPos.distanceTo(this._startPos)})}});function La(f,v,O){var F,q=[1,4,2,8],re,Oe,Qe,Xe,Lt,nn,Bn,Yn;for(re=0,nn=f.length;re<nn;re++)f[re]._code=K1(f[re],v);for(Qe=0;Qe<4;Qe++){for(Bn=q[Qe],F=[],re=0,nn=f.length,Oe=nn-1;re<nn;Oe=re++)Xe=f[re],Lt=f[Oe],Xe._code&Bn?Lt._code&Bn||(Yn=mo(Lt,Xe,Bn,v,O),Yn._code=K1(Yn,v),F.push(Yn)):(Lt._code&Bn&&(Yn=mo(Lt,Xe,Bn,v,O),Yn._code=K1(Yn,v),F.push(Yn)),F.push(Xe));f=F}return f}function kr(f,v){var O,F,q,re,Oe,Qe,Xe,Lt,nn;if(!f||f.length===0)throw new Error("latlngs not passed");io(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var Bn=oe([0,0]),Yn=G(f),l1=Yn.getNorthWest().distanceTo(Yn.getSouthWest())*Yn.getNorthEast().distanceTo(Yn.getNorthWest());l1<1700&&(Bn=Ba(f));var pe=f.length,he=[];for(O=0;O<pe;O++){var we=oe(f[O]);he.push(v.project(oe([we.lat-Bn.lat,we.lng-Bn.lng])))}for(Qe=Xe=Lt=0,O=0,F=pe-1;O<pe;F=O++)q=he[O],re=he[F],Oe=q.y*re.x-re.y*q.x,Xe+=(q.x+re.x)*Oe,Lt+=(q.y+re.y)*Oe,Qe+=Oe*3;Qe===0?nn=he[0]:nn=[Xe/Qe,Lt/Qe];var Re=v.unproject(Z(nn));return oe([Re.lat+Bn.lat,Re.lng+Bn.lng])}function Ba(f){for(var v=0,O=0,F=0,q=0;q<f.length;q++){var re=oe(f[q]);v+=re.lat,O+=re.lng,F++}return oe([v/F,O/F])}var ns={__proto__:null,clipPolygon:La,polygonCenter:kr,centroid:Ba};function Yr(f,v){if(!v||!f.length)return f.slice();var O=v*v;return f=N2(f,O),f=l5(f,O),f}function oo(f,v,O){return Math.sqrt(C9(f,v,O,!0))}function Ra(f,v,O){return C9(f,v,O)}function l5(f,v){var O=f.length,F=typeof Uint8Array<"u"?Uint8Array:Array,q=new F(O);q[0]=q[O-1]=1,Ia(f,q,v,0,O-1);var re,Oe=[];for(re=0;re<O;re++)q[re]&&Oe.push(f[re]);return Oe}function Ia(f,v,O,F,q){var re=0,Oe,Qe,Xe;for(Qe=F+1;Qe<=q-1;Qe++)Xe=C9(f[Qe],f[F],f[q],!0),Xe>re&&(Oe=Qe,re=Xe);re>O&&(v[Oe]=1,Ia(f,v,O,F,Oe),Ia(f,v,O,Oe,q))}function N2(f,v){for(var O=[f[0]],F=1,q=0,re=f.length;F<re;F++)Na(f[F],f[q])>v&&(O.push(f[F]),q=F);return q<re-1&&O.push(f[re-1]),O}var Pa;function Da(f,v,O,F,q){var re=F?Pa:K1(f,O),Oe=K1(v,O),Qe,Xe,Lt;for(Pa=Oe;;){if(!(re|Oe))return[f,v];if(re&Oe)return!1;Qe=re||Oe,Xe=mo(f,v,Qe,O,q),Lt=K1(Xe,O),Qe===re?(f=Xe,re=Lt):(v=Xe,Oe=Lt)}}function mo(f,v,O,F,q){var re=v.x-f.x,Oe=v.y-f.y,Qe=F.min,Xe=F.max,Lt,nn;return O&8?(Lt=f.x+re*(Xe.y-f.y)/Oe,nn=Xe.y):O&4?(Lt=f.x+re*(Qe.y-f.y)/Oe,nn=Qe.y):O&2?(Lt=Xe.x,nn=f.y+Oe*(Xe.x-f.x)/re):O&1&&(Lt=Qe.x,nn=f.y+Oe*(Qe.x-f.x)/re),new $(Lt,nn,q)}function K1(f,v){var O=0;return f.x<v.min.x?O|=1:f.x>v.max.x&&(O|=2),f.y<v.min.y?O|=4:f.y>v.max.y&&(O|=8),O}function Na(f,v){var O=v.x-f.x,F=v.y-f.y;return O*O+F*F}function C9(f,v,O,F){var q=v.x,re=v.y,Oe=O.x-q,Qe=O.y-re,Xe=Oe*Oe+Qe*Qe,Lt;return Xe>0&&(Lt=((f.x-q)*Oe+(f.y-re)*Qe)/Xe,Lt>1?(q=O.x,re=O.y):Lt>0&&(q+=Oe*Lt,re+=Qe*Lt)),Oe=f.x-q,Qe=f.y-re,F?Oe*Oe+Qe*Qe:new $(q,re)}function io(f){return!x(f[0])||typeof f[0][0]!="object"&&typeof f[0][0]<"u"}function m9(f){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),io(f)}function Ta(f,v){var O,F,q,re,Oe,Qe,Xe,Lt;if(!f||f.length===0)throw new Error("latlngs not passed");io(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var nn=oe([0,0]),Bn=G(f),Yn=Bn.getNorthWest().distanceTo(Bn.getSouthWest())*Bn.getNorthEast().distanceTo(Bn.getNorthWest());Yn<1700&&(nn=Ba(f));var l1=f.length,pe=[];for(O=0;O<l1;O++){var he=oe(f[O]);pe.push(v.project(oe([he.lat-nn.lat,he.lng-nn.lng])))}for(O=0,F=0;O<l1-1;O++)F+=pe[O].distanceTo(pe[O+1])/2;if(F===0)Lt=pe[0];else for(O=0,re=0;O<l1-1;O++)if(Oe=pe[O],Qe=pe[O+1],q=Oe.distanceTo(Qe),re+=q,re>F){Xe=(re-F)/q,Lt=[Qe.x-Xe*(Qe.x-Oe.x),Qe.y-Xe*(Qe.y-Oe.y)];break}var we=v.unproject(Z(Lt));return oe([we.lat+nn.lat,we.lng+nn.lng])}var ka={__proto__:null,simplify:Yr,pointToSegmentDistance:oo,closestPointOnSegment:Ra,clipSegment:Da,_getEdgeIntersection:mo,_getBitCode:K1,_sqClosestPointOnSegment:C9,isFlat:io,_flat:m9,polylineCenter:Ta},po={project:function(f){return new $(f.lng,f.lat)},unproject:function(f){return new ee(f.y,f.x)},bounds:new U([-180,-90],[180,90])},Fa={R:6378137,R_MINOR:6356752314245179e-9,bounds:new U([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(f){var v=Math.PI/180,O=this.R,F=f.lat*v,q=this.R_MINOR/O,re=Math.sqrt(1-q*q),Oe=re*Math.sin(F),Qe=Math.tan(Math.PI/4-F/2)/Math.pow((1-Oe)/(1+Oe),re/2);return F=-O*Math.log(Math.max(Qe,1e-10)),new $(f.lng*v*O,F)},unproject:function(f){for(var v=180/Math.PI,O=this.R,F=this.R_MINOR/O,q=Math.sqrt(1-F*F),re=Math.exp(-f.y/O),Oe=Math.PI/2-2*Math.atan(re),Qe=0,Xe=.1,Lt;Qe<15&&Math.abs(Xe)>1e-7;Qe++)Lt=q*Math.sin(Oe),Lt=Math.pow((1-Lt)/(1+Lt),q/2),Xe=Math.PI/2-2*Math.atan(re*Lt)-Oe,Oe+=Xe;return new ee(Oe*v,f.x*v/O)}},Ao={__proto__:null,LonLat:po,Mercator:Fa,SphericalMercator:be},rs=o({},se,{code:"EPSG:3395",projection:Fa,transformation:function(){var f=.5/(Math.PI*Fa.R);return fe(f,.5,-f,.5)}()}),c5=o({},se,{code:"EPSG:4326",projection:po,transformation:fe(1/180,1,-1/180,.5)}),os=o({},ue,{projection:po,transformation:fe(1,0,-1,0),scale:function(f){return Math.pow(2,f)},zoom:function(f){return Math.log(f)/Math.LN2},distance:function(f,v){var O=v.lng-f.lng,F=v.lat-f.lat;return Math.sqrt(O*O+F*F)},infinite:!0});ue.Earth=se,ue.EPSG3395=rs,ue.EPSG3857=ae,ue.EPSG900913=ie,ue.EPSG4326=c5,ue.Simple=os;var tr=K.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(f){return f.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(f){return f&&f.removeLayer(this),this},getPane:function(f){return this._map.getPane(f?this.options[f]||f:this.options.pane)},addInteractiveTarget:function(f){return this._map._targets[l(f)]=this,this},removeInteractiveTarget:function(f){return delete this._map._targets[l(f)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(f){var v=f.target;if(v.hasLayer(this)){if(this._map=v,this._zoomAnimated=v._zoomAnimated,this.getEvents){var O=this.getEvents();v.on(O,this),this.once("remove",function(){v.off(O,this)},this)}this.onAdd(v),this.fire("add"),v.fire("layeradd",{layer:this})}}});fr.include({addLayer:function(f){if(!f._layerAdd)throw new Error("The provided object is not a Layer.");var v=l(f);return this._layers[v]?this:(this._layers[v]=f,f._mapToAdd=this,f.beforeAdd&&f.beforeAdd(this),this.whenReady(f._layerAdd,f),this)},removeLayer:function(f){var v=l(f);return this._layers[v]?(this._loaded&&f.onRemove(this),delete this._layers[v],this._loaded&&(this.fire("layerremove",{layer:f}),f.fire("remove")),f._map=f._mapToAdd=null,this):this},hasLayer:function(f){return l(f)in this._layers},eachLayer:function(f,v){for(var O in this._layers)f.call(v,this._layers[O]);return this},_addLayers:function(f){f=f?x(f)?f:[f]:[];for(var v=0,O=f.length;v<O;v++)this.addLayer(f[v])},_addZoomLimit:function(f){(!isNaN(f.options.maxZoom)||!isNaN(f.options.minZoom))&&(this._zoomBoundLayers[l(f)]=f,this._updateZoomLevels())},_removeZoomLimit:function(f){var v=l(f);this._zoomBoundLayers[v]&&(delete this._zoomBoundLayers[v],this._updateZoomLevels())},_updateZoomLevels:function(){var f=1/0,v=-1/0,O=this._getZoomSpan();for(var F in this._zoomBoundLayers){var q=this._zoomBoundLayers[F].options;f=q.minZoom===void 0?f:Math.min(f,q.minZoom),v=q.maxZoom===void 0?v:Math.max(v,q.maxZoom)}this._layersMaxZoom=v===-1/0?void 0:v,this._layersMinZoom=f===1/0?void 0:f,O!==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 Bo=tr.extend({initialize:function(f,v){b(this,v),this._layers={};var O,F;if(f)for(O=0,F=f.length;O<F;O++)this.addLayer(f[O])},addLayer:function(f){var v=this.getLayerId(f);return this._layers[v]=f,this._map&&this._map.addLayer(f),this},removeLayer:function(f){var v=f in this._layers?f:this.getLayerId(f);return this._map&&this._layers[v]&&this._map.removeLayer(this._layers[v]),delete this._layers[v],this},hasLayer:function(f){var v=typeof f=="number"?f:this.getLayerId(f);return v in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(f){var v=Array.prototype.slice.call(arguments,1),O,F;for(O in this._layers)F=this._layers[O],F[f]&&F[f].apply(F,v);return this},onAdd:function(f){this.eachLayer(f.addLayer,f)},onRemove:function(f){this.eachLayer(f.removeLayer,f)},eachLayer:function(f,v){for(var O in this._layers)f.call(v,this._layers[O]);return this},getLayer:function(f){return this._layers[f]},getLayers:function(){var f=[];return this.eachLayer(f.push,f),f},setZIndex:function(f){return this.invoke("setZIndex",f)},getLayerId:function(f){return l(f)}}),p9=function(f,v){return new Bo(f,v)},vo=Bo.extend({addLayer:function(f){return this.hasLayer(f)?this:(f.addEventParent(this),Bo.prototype.addLayer.call(this,f),this.fire("layeradd",{layer:f}))},removeLayer:function(f){return this.hasLayer(f)?(f in this._layers&&(f=this._layers[f]),f.removeEventParent(this),Bo.prototype.removeLayer.call(this,f),this.fire("layerremove",{layer:f})):this},setStyle:function(f){return this.invoke("setStyle",f)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var f=new J;for(var v in this._layers){var O=this._layers[v];f.extend(O.getBounds?O.getBounds():O.getLatLng())}return f}}),Ii=function(f,v){return new vo(f,v)},si=V.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(f){b(this,f)},createIcon:function(f){return this._createIcon("icon",f)},createShadow:function(f){return this._createIcon("shadow",f)},_createIcon:function(f,v){var O=this._getIconUrl(f);if(!O){if(f==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var F=this._createImg(O,v&&v.tagName==="IMG"?v:null);return this._setIconStyles(F,f),(this.options.crossOrigin||this.options.crossOrigin==="")&&(F.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),F},_setIconStyles:function(f,v){var O=this.options,F=O[v+"Size"];typeof F=="number"&&(F=[F,F]);var q=Z(F),re=Z(v==="shadow"&&O.shadowAnchor||O.iconAnchor||q&&q.divideBy(2,!0));f.className="leaflet-marker-"+v+" "+(O.className||""),re&&(f.style.marginLeft=-re.x+"px",f.style.marginTop=-re.y+"px"),q&&(f.style.width=q.x+"px",f.style.height=q.y+"px")},_createImg:function(f,v){return v=v||document.createElement("img"),v.src=f,v},_getIconUrl:function(f){return Ze.retina&&this.options[f+"RetinaUrl"]||this.options[f+"Url"]}});function T2(f){return new si(f)}var ja=si.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(f){return typeof ja.imagePath!="string"&&(ja.imagePath=this._detectIconPath()),(this.options.imagePath||ja.imagePath)+si.prototype._getIconUrl.call(this,f)},_stripUrl:function(f){var v=function(O,F,q){var re=F.exec(O);return re&&re[q]};return f=v(f,/^url\((['"])?(.+)\1\)$/,2),f&&v(f,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var f=Dt("div","leaflet-default-icon-path",document.body),v=Sn(f,"background-image")||Sn(f,"backgroundImage");if(document.body.removeChild(f),v=this._stripUrl(v),v)return v;var O=document.querySelector('link[href$="leaflet.css"]');return O?O.href.substring(0,O.href.length-11-1):""}}),u5=i1.extend({initialize:function(f){this._marker=f},addHooks:function(){var f=this._marker._icon;this._draggable||(this._draggable=new Ri(f,f,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),gn(f,"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&&Kt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(f){var v=this._marker,O=v._map,F=this._marker.options.autoPanSpeed,q=this._marker.options.autoPanPadding,re=Dn(v._icon),Oe=O.getPixelBounds(),Qe=O.getPixelOrigin(),Xe=Y(Oe.min._subtract(Qe).add(q),Oe.max._subtract(Qe).subtract(q));if(!Xe.contains(re)){var Lt=Z((Math.max(Xe.max.x,re.x)-Xe.max.x)/(Oe.max.x-Xe.max.x)-(Math.min(Xe.min.x,re.x)-Xe.min.x)/(Oe.min.x-Xe.min.x),(Math.max(Xe.max.y,re.y)-Xe.max.y)/(Oe.max.y-Xe.max.y)-(Math.min(Xe.min.y,re.y)-Xe.min.y)/(Oe.min.y-Xe.min.y)).multiplyBy(F);O.panBy(Lt,{animate:!1}),this._draggable._newPos._add(Lt),this._draggable._startPos._add(Lt),Cn(v._icon,this._draggable._newPos),this._onDrag(f),this._panRequest=N(this._adjustPan.bind(this,f))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(f){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=N(this._adjustPan.bind(this,f)))},_onDrag:function(f){var v=this._marker,O=v._shadow,F=Dn(v._icon),q=v._map.layerPointToLatLng(F);O&&Cn(O,F),v._latlng=q,f.latlng=q,f.oldLatLng=this._oldLatLng,v.fire("move",f).fire("drag",f)},_onDragEnd:function(f){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",f)}}),A9=tr.extend({options:{icon:new ja,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(f,v){b(this,v),this._latlng=oe(f)},onAdd:function(f){this._zoomAnimated=this._zoomAnimated&&f.options.markerZoomAnimation,this._zoomAnimated&&f.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(f){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&f.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(f){var v=this._latlng;return this._latlng=oe(f),this.update(),this.fire("move",{oldLatLng:v,latlng:this._latlng})},setZIndexOffset:function(f){return this.options.zIndexOffset=f,this.update()},getIcon:function(){return this.options.icon},setIcon:function(f){return this.options.icon=f,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 f=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(f)}return this},_initIcon:function(){var f=this.options,v="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),O=f.icon.createIcon(this._icon),F=!1;O!==this._icon&&(this._icon&&this._removeIcon(),F=!0,f.title&&(O.title=f.title),O.tagName==="IMG"&&(O.alt=f.alt||"")),gn(O,v),f.keyboard&&(O.tabIndex="0",O.setAttribute("role","button")),this._icon=O,f.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Tn(O,"focus",this._panOnFocus,this);var q=f.icon.createShadow(this._shadow),re=!1;q!==this._shadow&&(this._removeShadow(),re=!0),q&&(gn(q,v),q.alt=""),this._shadow=q,f.opacity<1&&this._updateOpacity(),F&&this.getPane().appendChild(this._icon),this._initInteraction(),q&&re&&this.getPane(f.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&mn(this._icon,"focus",this._panOnFocus,this),cn(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&cn(this._shadow),this._shadow=null},_setPos:function(f){this._icon&&Cn(this._icon,f),this._shadow&&Cn(this._shadow,f),this._zIndex=f.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(f){this._icon&&(this._icon.style.zIndex=this._zIndex+f)},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center).round();this._setPos(v)},_initInteraction:function(){if(this.options.interactive&&(gn(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),u5)){var f=this.options.draggable;this.dragging&&(f=this.dragging.enabled(),this.dragging.disable()),this.dragging=new u5(this),f&&this.dragging.enable()}},setOpacity:function(f){return this.options.opacity=f,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var f=this.options.opacity;this._icon&&bt(this._icon,f),this._shadow&&bt(this._shadow,f)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var f=this._map;if(f){var v=this.options.icon.options,O=v.iconSize?Z(v.iconSize):Z(0,0),F=v.iconAnchor?Z(v.iconAnchor):Z(0,0);f.panInside(this._latlng,{paddingTopLeft:F,paddingBottomRight:O.subtract(F)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function na(f,v){return new A9(f,v)}var Pi=tr.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(f){this._renderer=f.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(f){return b(this,f),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&f&&Object.prototype.hasOwnProperty.call(f,"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)}}),za=Pi.extend({options:{fill:!0,radius:10},initialize:function(f,v){b(this,v),this._latlng=oe(f),this._radius=this.options.radius},setLatLng:function(f){var v=this._latlng;return this._latlng=oe(f),this.redraw(),this.fire("move",{oldLatLng:v,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(f){return this.options.radius=this._radius=f,this.redraw()},getRadius:function(){return this._radius},setStyle:function(f){var v=f&&f.radius||this._radius;return Pi.prototype.setStyle.call(this,f),this.setRadius(v),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var f=this._radius,v=this._radiusY||f,O=this._clickTolerance(),F=[f+O,v+O];this._pxBounds=new U(this._point.subtract(F),this._point.add(F))},_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(f){return f.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Lr(f,v){return new za(f,v)}var bo=za.extend({initialize:function(f,v,O){if(typeof v=="number"&&(v=o({},O,{radius:v})),b(this,v),this._latlng=oe(f),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(f){return this._mRadius=f,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var f=[this._radius,this._radiusY||this._radius];return new J(this._map.layerPointToLatLng(this._point.subtract(f)),this._map.layerPointToLatLng(this._point.add(f)))},setStyle:Pi.prototype.setStyle,_project:function(){var f=this._latlng.lng,v=this._latlng.lat,O=this._map,F=O.options.crs;if(F.distance===se.distance){var q=Math.PI/180,re=this._mRadius/se.R/q,Oe=O.project([v+re,f]),Qe=O.project([v-re,f]),Xe=Oe.add(Qe).divideBy(2),Lt=O.unproject(Xe).lat,nn=Math.acos((Math.cos(re*q)-Math.sin(v*q)*Math.sin(Lt*q))/(Math.cos(v*q)*Math.cos(Lt*q)))/q;(isNaN(nn)||nn===0)&&(nn=re/Math.cos(Math.PI/180*v)),this._point=Xe.subtract(O.getPixelOrigin()),this._radius=isNaN(nn)?0:Xe.x-O.project([Lt,f-nn]).x,this._radiusY=Xe.y-Oe.y}else{var Bn=F.unproject(F.project(this._latlng).subtract([this._mRadius,0]));this._point=O.latLngToLayerPoint(this._latlng),this._radius=this._point.x-O.latLngToLayerPoint(Bn).x}this._updateBounds()}});function Di(f,v,O){return new bo(f,v,O)}var a1=Pi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(f,v){b(this,v),this._setLatLngs(f)},getLatLngs:function(){return this._latlngs},setLatLngs:function(f){return this._setLatLngs(f),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(f){for(var v=1/0,O=null,F=C9,q,re,Oe=0,Qe=this._parts.length;Oe<Qe;Oe++)for(var Xe=this._parts[Oe],Lt=1,nn=Xe.length;Lt<nn;Lt++){q=Xe[Lt-1],re=Xe[Lt];var Bn=F(f,q,re,!0);Bn<v&&(v=Bn,O=F(f,q,re))}return O&&(O.distance=Math.sqrt(v)),O},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ta(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(f,v){return v=v||this._defaultShape(),f=oe(f),v.push(f),this._bounds.extend(f),this.redraw()},_setLatLngs:function(f){this._bounds=new J,this._latlngs=this._convertLatLngs(f)},_defaultShape:function(){return io(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(f){for(var v=[],O=io(f),F=0,q=f.length;F<q;F++)O?(v[F]=oe(f[F]),this._bounds.extend(v[F])):v[F]=this._convertLatLngs(f[F]);return v},_project:function(){var f=new U;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,f),this._bounds.isValid()&&f.isValid()&&(this._rawPxBounds=f,this._updateBounds())},_updateBounds:function(){var f=this._clickTolerance(),v=new $(f,f);this._rawPxBounds&&(this._pxBounds=new U([this._rawPxBounds.min.subtract(v),this._rawPxBounds.max.add(v)]))},_projectLatlngs:function(f,v,O){var F=f[0]instanceof ee,q=f.length,re,Oe;if(F){for(Oe=[],re=0;re<q;re++)Oe[re]=this._map.latLngToLayerPoint(f[re]),O.extend(Oe[re]);v.push(Oe)}else for(re=0;re<q;re++)this._projectLatlngs(f[re],v,O)},_clipPoints:function(){var f=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(f))){if(this.options.noClip){this._parts=this._rings;return}var v=this._parts,O,F,q,re,Oe,Qe,Xe;for(O=0,q=0,re=this._rings.length;O<re;O++)for(Xe=this._rings[O],F=0,Oe=Xe.length;F<Oe-1;F++)Qe=Da(Xe[F],Xe[F+1],f,F,!0),Qe&&(v[q]=v[q]||[],v[q].push(Qe[0]),(Qe[1]!==Xe[F+1]||F===Oe-2)&&(v[q].push(Qe[1]),q++))}},_simplifyPoints:function(){for(var f=this._parts,v=this.options.smoothFactor,O=0,F=f.length;O<F;O++)f[O]=Yr(f[O],v)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(f,v){var O,F,q,re,Oe,Qe,Xe=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(f))return!1;for(O=0,re=this._parts.length;O<re;O++)for(Qe=this._parts[O],F=0,Oe=Qe.length,q=Oe-1;F<Oe;q=F++)if(!(!v&&F===0)&&oo(f,Qe[q],Qe[F])<=Xe)return!0;return!1}});function d5(f,v){return new a1(f,v)}a1._flat=m9;var ra=a1.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 kr(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(f){var v=a1.prototype._convertLatLngs.call(this,f),O=v.length;return O>=2&&v[0]instanceof ee&&v[0].equals(v[O-1])&&v.pop(),v},_setLatLngs:function(f){a1.prototype._setLatLngs.call(this,f),io(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return io(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var f=this._renderer._bounds,v=this.options.weight,O=new $(v,v);if(f=new U(f.min.subtract(O),f.max.add(O)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(f))){if(this.options.noClip){this._parts=this._rings;return}for(var F=0,q=this._rings.length,re;F<q;F++)re=La(this._rings[F],f,!0),re.length&&this._parts.push(re)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(f){var v=!1,O,F,q,re,Oe,Qe,Xe,Lt;if(!this._pxBounds||!this._pxBounds.contains(f))return!1;for(re=0,Xe=this._parts.length;re<Xe;re++)for(O=this._parts[re],Oe=0,Lt=O.length,Qe=Lt-1;Oe<Lt;Qe=Oe++)F=O[Oe],q=O[Qe],F.y>f.y!=q.y>f.y&&f.x<(q.x-F.x)*(f.y-F.y)/(q.y-F.y)+F.x&&(v=!v);return v||a1.prototype._containsPoint.call(this,f,!0)}});function f5(f,v){return new ra(f,v)}var k1=vo.extend({initialize:function(f,v){b(this,v),this._layers={},f&&this.addData(f)},addData:function(f){var v=x(f)?f:f.features,O,F,q;if(v){for(O=0,F=v.length;O<F;O++)q=v[O],(q.geometries||q.geometry||q.features||q.coordinates)&&this.addData(q);return this}var re=this.options;if(re.filter&&!re.filter(f))return this;var Oe=Z1(f,re);return Oe?(Oe.feature=Ro(f),Oe.defaultOptions=Oe.options,this.resetStyle(Oe),re.onEachFeature&&re.onEachFeature(f,Oe),this.addLayer(Oe)):this},resetStyle:function(f){return f===void 0?this.eachLayer(this.resetStyle,this):(f.options=o({},f.defaultOptions),this._setLayerStyle(f,this.options.style),this)},setStyle:function(f){return this.eachLayer(function(v){this._setLayerStyle(v,f)},this)},_setLayerStyle:function(f,v){f.setStyle&&(typeof v=="function"&&(v=v(f.feature)),f.setStyle(v))}});function Z1(f,v){var O=f.type==="Feature"?f.geometry:f,F=O?O.coordinates:null,q=[],re=v&&v.pointToLayer,Oe=v&&v.coordsToLatLng||v9,Qe,Xe,Lt,nn;if(!F&&!O)return null;switch(O.type){case"Point":return Qe=Oe(F),Va(re,f,Qe,v);case"MultiPoint":for(Lt=0,nn=F.length;Lt<nn;Lt++)Qe=Oe(F[Lt]),q.push(Va(re,f,Qe,v));return new vo(q);case"LineString":case"MultiLineString":return Xe=l0(F,O.type==="LineString"?0:1,Oe),new a1(Xe,v);case"Polygon":case"MultiPolygon":return Xe=l0(F,O.type==="Polygon"?1:2,Oe),new ra(Xe,v);case"GeometryCollection":for(Lt=0,nn=O.geometries.length;Lt<nn;Lt++){var Bn=Z1({geometry:O.geometries[Lt],type:"Feature",properties:f.properties},v);Bn&&q.push(Bn)}return new vo(q);case"FeatureCollection":for(Lt=0,nn=O.features.length;Lt<nn;Lt++){var Yn=Z1(O.features[Lt],v);Yn&&q.push(Yn)}return new vo(q);default:throw new Error("Invalid GeoJSON object.")}}function Va(f,v,O,F){return f?f(v,O):new A9(O,F&&F.markersInheritOptions&&F)}function v9(f){return new ee(f[1],f[0],f[2])}function l0(f,v,O){for(var F=[],q=0,re=f.length,Oe;q<re;q++)Oe=v?l0(f[q],v-1,O):(O||v9)(f[q]),F.push(Oe);return F}function is(f,v){return f=oe(f),f.alt!==void 0?[C(f.lng,v),C(f.lat,v),C(f.alt,v)]:[C(f.lng,v),C(f.lat,v)]}function b9(f,v,O,F){for(var q=[],re=0,Oe=f.length;re<Oe;re++)q.push(v?b9(f[re],io(f[re])?0:v-1,O,F):is(f[re],F));return!v&&O&&q.length>0&&q.push(q[0].slice()),q}function Ua(f,v){return f.feature?o({},f.feature,{geometry:v}):Ro(v)}function Ro(f){return f.type==="Feature"||f.type==="FeatureCollection"?f:{type:"Feature",properties:{},geometry:f}}var Te={toGeoJSON:function(f){return Ua(this,{type:"Point",coordinates:is(this.getLatLng(),f)})}};A9.include(Te),bo.include(Te),za.include(Te),a1.include({toGeoJSON:function(f){var v=!io(this._latlngs),O=b9(this._latlngs,v?1:0,!1,f);return Ua(this,{type:(v?"Multi":"")+"LineString",coordinates:O})}}),ra.include({toGeoJSON:function(f){var v=!io(this._latlngs),O=v&&!io(this._latlngs[0]),F=b9(this._latlngs,O?2:v?1:0,!0,f);return v||(F=[F]),Ua(this,{type:(O?"Multi":"")+"Polygon",coordinates:F})}}),Bo.include({toMultiPoint:function(f){var v=[];return this.eachLayer(function(O){v.push(O.toGeoJSON(f).geometry.coordinates)}),Ua(this,{type:"MultiPoint",coordinates:v})},toGeoJSON:function(f){var v=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(v==="MultiPoint")return this.toMultiPoint(f);var O=v==="GeometryCollection",F=[];return this.eachLayer(function(q){if(q.toGeoJSON){var re=q.toGeoJSON(f);if(O)F.push(re.geometry);else{var Oe=Ro(re);Oe.type==="FeatureCollection"?F.push.apply(F,Oe.features):F.push(Oe)}}}),O?Ua(this,{geometries:F,type:"GeometryCollection"}):{type:"FeatureCollection",features:F}}});function st(f,v){return new k1(f,v)}var nt=st,sn=tr.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(f,v,O){this._url=f,this._bounds=G(v),b(this,O)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(gn(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){cn(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(f){return this.options.opacity=f,this._image&&this._updateOpacity(),this},setStyle:function(f){return f.opacity&&this.setOpacity(f.opacity),this},bringToFront:function(){return this._map&&Pr(this._image),this},bringToBack:function(){return this._map&&nr(this._image),this},setUrl:function(f){return this._url=f,this._image&&(this._image.src=f),this},setBounds:function(f){return this._bounds=G(f),this._map&&this._reset(),this},getEvents:function(){var f={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(f.zoomanim=this._animateZoom),f},setZIndex:function(f){return this.options.zIndex=f,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var f=this._url.tagName==="IMG",v=this._image=f?this._url:Dt("img");if(gn(v,"leaflet-image-layer"),this._zoomAnimated&&gn(v,"leaflet-zoom-animated"),this.options.className&&gn(v,this.options.className),v.onselectstart=h,v.onmousemove=h,v.onload=a(this.fire,this,"load"),v.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(v.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),f){this._url=v.src;return}v.src=this._url,v.alt=this.options.alt},_animateZoom:function(f){var v=this._map.getZoomScale(f.zoom),O=this._map._latLngBoundsToNewLayerBounds(this._bounds,f.zoom,f.center).min;tt(this._image,O,v)},_reset:function(){var f=this._image,v=new U(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),O=v.getSize();Cn(f,v.min),f.style.width=O.x+"px",f.style.height=O.y+"px"},_updateOpacity:function(){bt(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 f=this.options.errorOverlayUrl;f&&this._url!==f&&(this._url=f,this._image.src=f)},getCenter:function(){return this._bounds.getCenter()}}),$n=function(f,v,O){return new sn(f,v,O)},hr=sn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var f=this._url.tagName==="VIDEO",v=this._image=f?this._url:Dt("video");if(gn(v,"leaflet-image-layer"),this._zoomAnimated&&gn(v,"leaflet-zoom-animated"),this.options.className&&gn(v,this.options.className),v.onselectstart=h,v.onmousemove=h,v.onloadeddata=a(this.fire,this,"load"),f){for(var O=v.getElementsByTagName("source"),F=[],q=0;q<O.length;q++)F.push(O[q].src);this._url=O.length>0?F:[v.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(v.style,"objectFit")&&(v.style.objectFit="fill"),v.autoplay=!!this.options.autoplay,v.loop=!!this.options.loop,v.muted=!!this.options.muted,v.playsInline=!!this.options.playsInline;for(var re=0;re<this._url.length;re++){var Oe=Dt("source");Oe.src=this._url[re],v.appendChild(Oe)}}});function Jr(f,v,O){return new hr(f,v,O)}var Br=sn.extend({_initImage:function(){var f=this._image=this._url;gn(f,"leaflet-image-layer"),this._zoomAnimated&&gn(f,"leaflet-zoom-animated"),this.options.className&&gn(f,this.options.className),f.onselectstart=h,f.onmousemove=h}});function oa(f,v,O){return new Br(f,v,O)}var Q1=tr.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(f,v){f&&(f instanceof ee||x(f))?(this._latlng=oe(f),b(this,v)):(b(this,f),this._source=v),this.options.content&&(this._content=this.options.content)},openOn:function(f){return f=arguments.length?f:this._source._map,f.hasLayer(this)||f.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(f){return this._map?this.close():(arguments.length?this._source=f:f=this._source,this._prepareOpen(),this.openOn(f._map)),this},onAdd:function(f){this._zoomAnimated=f._zoomAnimated,this._container||this._initLayout(),f._fadeAnimated&&bt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),f._fadeAnimated&&bt(this._container,1),this.bringToFront(),this.options.interactive&&(gn(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(f){f._fadeAnimated?(bt(this._container,0),this._removeTimeout=setTimeout(a(cn,void 0,this._container),200)):cn(this._container),this.options.interactive&&(Kt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(f){return this._latlng=oe(f),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(f){return this._content=f,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 f={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(f.zoomanim=this._animateZoom),f},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Pr(this._container),this},bringToBack:function(){return this._map&&nr(this._container),this},_prepareOpen:function(f){var v=this._source;if(!v._map)return!1;if(v instanceof vo){v=null;var O=this._source._layers;for(var F in O)if(O[F]._map){v=O[F];break}if(!v)return!1;this._source=v}if(!f)if(v.getCenter)f=v.getCenter();else if(v.getLatLng)f=v.getLatLng();else if(v.getBounds)f=v.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(f),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var f=this._contentNode,v=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof v=="string")f.innerHTML=v;else{for(;f.hasChildNodes();)f.removeChild(f.firstChild);f.appendChild(v)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var f=this._map.latLngToLayerPoint(this._latlng),v=Z(this.options.offset),O=this._getAnchor();this._zoomAnimated?Cn(this._container,f.add(O)):v=v.add(f).add(O);var F=this._containerBottom=-v.y,q=this._containerLeft=-Math.round(this._containerWidth/2)+v.x;this._container.style.bottom=F+"px",this._container.style.left=q+"px"}},_getAnchor:function(){return[0,0]}});fr.include({_initOverlay:function(f,v,O,F){var q=v;return q instanceof f||(q=new f(F).setContent(v)),O&&q.setLatLng(O),q}}),tr.include({_initOverlay:function(f,v,O,F){var q=O;return q instanceof f?(b(q,F),q._source=this):(q=v&&!F?v:new f(F,this),q.setContent(O)),q}});var b1=Q1.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(f){return f=arguments.length?f:this._source._map,!f.hasLayer(this)&&f._popup&&f._popup.options.autoClose&&f.removeLayer(f._popup),f._popup=this,Q1.prototype.openOn.call(this,f)},onAdd:function(f){Q1.prototype.onAdd.call(this,f),f.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Pi||this._source.on("preclick",Mr))},onRemove:function(f){Q1.prototype.onRemove.call(this,f),f.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Pi||this._source.off("preclick",Mr))},getEvents:function(){var f=Q1.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(f.preclick=this.close),this.options.keepInView&&(f.moveend=this._adjustPan),f},_initLayout:function(){var f="leaflet-popup",v=this._container=Dt("div",f+" "+(this.options.className||"")+" leaflet-zoom-animated"),O=this._wrapper=Dt("div",f+"-content-wrapper",v);if(this._contentNode=Dt("div",f+"-content",O),Oo(v),Li(this._contentNode),Tn(v,"contextmenu",Mr),this._tipContainer=Dt("div",f+"-tip-container",v),this._tip=Dt("div",f+"-tip",this._tipContainer),this.options.closeButton){var F=this._closeButton=Dt("a",f+"-close-button",v);F.setAttribute("role","button"),F.setAttribute("aria-label","Close popup"),F.href="#close",F.innerHTML='<span aria-hidden="true">&#215;</span>',Tn(F,"click",function(q){Fn(q),this.close()},this)}},_updateLayout:function(){var f=this._contentNode,v=f.style;v.width="",v.whiteSpace="nowrap";var O=f.offsetWidth;O=Math.min(O,this.options.maxWidth),O=Math.max(O,this.options.minWidth),v.width=O+1+"px",v.whiteSpace="",v.height="";var F=f.offsetHeight,q=this.options.maxHeight,re="leaflet-popup-scrolled";q&&F>q?(v.height=q+"px",gn(f,re)):Kt(f,re),this._containerWidth=this._container.offsetWidth},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center),O=this._getAnchor();Cn(this._container,v.add(O))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var f=this._map,v=parseInt(Sn(this._container,"marginBottom"),10)||0,O=this._container.offsetHeight+v,F=this._containerWidth,q=new $(this._containerLeft,-O-this._containerBottom);q._add(Dn(this._container));var re=f.layerPointToContainerPoint(q),Oe=Z(this.options.autoPanPadding),Qe=Z(this.options.autoPanPaddingTopLeft||Oe),Xe=Z(this.options.autoPanPaddingBottomRight||Oe),Lt=f.getSize(),nn=0,Bn=0;re.x+F+Xe.x>Lt.x&&(nn=re.x+F-Lt.x+Xe.x),re.x-nn-Qe.x<0&&(nn=re.x-Qe.x),re.y+O+Xe.y>Lt.y&&(Bn=re.y+O-Lt.y+Xe.y),re.y-Bn-Qe.y<0&&(Bn=re.y-Qe.y),(nn||Bn)&&(this.options.keepInView&&(this._autopanning=!0),f.fire("autopanstart").panBy([nn,Bn]))}},_getAnchor:function(){return Z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ia=function(f,v){return new b1(f,v)};fr.mergeOptions({closePopupOnClick:!0}),fr.include({openPopup:function(f,v,O){return this._initOverlay(b1,f,v,O).openOn(this),this},closePopup:function(f){return f=arguments.length?f:this._popup,f&&f.close(),this}}),tr.include({bindPopup:function(f,v){return this._popup=this._initOverlay(b1,this._popup,f,v),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(f){return this._popup&&(this instanceof vo||(this._popup._source=this),this._popup._prepareOpen(f||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(f){return this._popup&&this._popup.setContent(f),this},getPopup:function(){return this._popup},_openPopup:function(f){if(!(!this._popup||!this._map)){er(f);var v=f.layer||f.target;if(this._popup._source===v&&!(v instanceof Pi)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(f.latlng);return}this._popup._source=v,this.openPopup(f.latlng)}},_movePopup:function(f){this._popup.setLatLng(f.latlng)},_onKeyPress:function(f){f.originalEvent.keyCode===13&&this._openPopup(f)}});var aa=Q1.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(f){Q1.prototype.onAdd.call(this,f),this.setOpacity(this.options.opacity),f.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(f){Q1.prototype.onRemove.call(this,f),f.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var f=Q1.prototype.getEvents.call(this);return this.options.permanent||(f.preclick=this.close),f},_initLayout:function(){var f="leaflet-tooltip",v=f+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Dt("div",v),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(f){var v,O,F=this._map,q=this._container,re=F.latLngToContainerPoint(F.getCenter()),Oe=F.layerPointToContainerPoint(f),Qe=this.options.direction,Xe=q.offsetWidth,Lt=q.offsetHeight,nn=Z(this.options.offset),Bn=this._getAnchor();Qe==="top"?(v=Xe/2,O=Lt):Qe==="bottom"?(v=Xe/2,O=0):Qe==="center"?(v=Xe/2,O=Lt/2):Qe==="right"?(v=0,O=Lt/2):Qe==="left"?(v=Xe,O=Lt/2):Oe.x<re.x?(Qe="right",v=0,O=Lt/2):(Qe="left",v=Xe+(nn.x+Bn.x)*2,O=Lt/2),f=f.subtract(Z(v,O,!0)).add(nn).add(Bn),Kt(q,"leaflet-tooltip-right"),Kt(q,"leaflet-tooltip-left"),Kt(q,"leaflet-tooltip-top"),Kt(q,"leaflet-tooltip-bottom"),gn(q,"leaflet-tooltip-"+Qe),Cn(q,f)},_updatePosition:function(){var f=this._map.latLngToLayerPoint(this._latlng);this._setPosition(f)},setOpacity:function(f){this.options.opacity=f,this._container&&bt(this._container,f)},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center);this._setPosition(v)},_getAnchor:function(){return Z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),li=function(f,v){return new aa(f,v)};fr.include({openTooltip:function(f,v,O){return this._initOverlay(aa,f,v,O).openOn(this),this},closeTooltip:function(f){return f.close(),this}}),tr.include({bindTooltip:function(f,v){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(aa,this._tooltip,f,v),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(f){if(!(!f&&this._tooltipHandlersAdded)){var v=f?"off":"on",O={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?O.add=this._openTooltip:(O.mouseover=this._openTooltip,O.mouseout=this.closeTooltip,O.click=this._openTooltip,this._map?this._addFocusListeners():O.add=this._addFocusListeners),this._tooltip.options.sticky&&(O.mousemove=this._moveTooltip),this[v](O),this._tooltipHandlersAdded=!f}},openTooltip:function(f){return this._tooltip&&(this instanceof vo||(this._tooltip._source=this),this._tooltip._prepareOpen(f)&&(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(f){return this._tooltip&&this._tooltip.setContent(f),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(f){var v=typeof f.getElement=="function"&&f.getElement();v&&(Tn(v,"focus",function(){this._tooltip._source=f,this.openTooltip()},this),Tn(v,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(f){var v=typeof f.getElement=="function"&&f.getElement();v&&v.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(f){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var v=this;this._map.once("moveend",function(){v._openOnceFlag=!1,v._openTooltip(f)});return}this._tooltip._source=f.layer||f.target,this.openTooltip(this._tooltip.options.sticky?f.latlng:void 0)}},_moveTooltip:function(f){var v=f.latlng,O,F;this._tooltip.options.sticky&&f.originalEvent&&(O=this._map.mouseEventToContainerPoint(f.originalEvent),F=this._map.containerPointToLayerPoint(O),v=this._map.layerPointToLatLng(F)),this._tooltip.setLatLng(v)}});var Ni=si.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(f){var v=f&&f.tagName==="DIV"?f:document.createElement("div"),O=this.options;if(O.html instanceof Element?(zn(v),v.appendChild(O.html)):v.innerHTML=O.html!==!1?O.html:"",O.bgPos){var F=Z(O.bgPos);v.style.backgroundPosition=-F.x+"px "+-F.y+"px"}return this._setIconStyles(v,"icon"),v},createShadow:function(){return null}});function sa(f){return new Ni(f)}si.Default=ja;var lr=tr.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ze.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(f){b(this,f)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(f){f._addZoomLimit(this)},onRemove:function(f){this._removeAllTiles(),cn(this._container),f._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Pr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(nr(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(f){return this.options.opacity=f,this._updateOpacity(),this},setZIndex:function(f){return this.options.zIndex=f,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var f=this._clampZoom(this._map.getZoom());f!==this._tileZoom&&(this._tileZoom=f,this._updateLevels()),this._update()}return this},getEvents:function(){var f={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=u(this._onMoveEnd,this.options.updateInterval,this)),f.move=this._onMove),this._zoomAnimated&&(f.zoomanim=this._animateZoom),f},createTile:function(){return document.createElement("div")},getTileSize:function(){var f=this.options.tileSize;return f instanceof $?f:new $(f,f)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(f){for(var v=this.getPane().children,O=-f(-1/0,1/0),F=0,q=v.length,re;F<q;F++)re=v[F].style.zIndex,v[F]!==this._container&&re&&(O=f(O,+re));isFinite(O)&&(this.options.zIndex=O+f(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ze.ielt9){bt(this._container,this.options.opacity);var f=+new Date,v=!1,O=!1;for(var F in this._tiles){var q=this._tiles[F];if(!(!q.current||!q.loaded)){var re=Math.min(1,(f-q.loaded)/200);bt(q.el,re),re<1?v=!0:(q.active?O=!0:this._onOpaqueTile(q),q.active=!0)}}O&&!this._noPrune&&this._pruneTiles(),v&&(T(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=Dt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var f=this._tileZoom,v=this.options.maxZoom;if(f!==void 0){for(var O in this._levels)O=Number(O),this._levels[O].el.children.length||O===f?(this._levels[O].el.style.zIndex=v-Math.abs(f-O),this._onUpdateLevel(O)):(cn(this._levels[O].el),this._removeTilesAtZoom(O),this._onRemoveLevel(O),delete this._levels[O]);var F=this._levels[f],q=this._map;return F||(F=this._levels[f]={},F.el=Dt("div","leaflet-tile-container leaflet-zoom-animated",this._container),F.el.style.zIndex=v,F.origin=q.project(q.unproject(q.getPixelOrigin()),f).round(),F.zoom=f,this._setZoomTransform(F,q.getCenter(),q.getZoom()),h(F.el.offsetWidth),this._onCreateLevel(F)),this._level=F,F}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var f,v,O=this._map.getZoom();if(O>this.options.maxZoom||O<this.options.minZoom){this._removeAllTiles();return}for(f in this._tiles)v=this._tiles[f],v.retain=v.current;for(f in this._tiles)if(v=this._tiles[f],v.current&&!v.active){var F=v.coords;this._retainParent(F.x,F.y,F.z,F.z-5)||this._retainChildren(F.x,F.y,F.z,F.z+2)}for(f in this._tiles)this._tiles[f].retain||this._removeTile(f)}},_removeTilesAtZoom:function(f){for(var v in this._tiles)this._tiles[v].coords.z===f&&this._removeTile(v)},_removeAllTiles:function(){for(var f in this._tiles)this._removeTile(f)},_invalidateAll:function(){for(var f in this._levels)cn(this._levels[f].el),this._onRemoveLevel(Number(f)),delete this._levels[f];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(f,v,O,F){var q=Math.floor(f/2),re=Math.floor(v/2),Oe=O-1,Qe=new $(+q,+re);Qe.z=+Oe;var Xe=this._tileCoordsToKey(Qe),Lt=this._tiles[Xe];return Lt&&Lt.active?(Lt.retain=!0,!0):(Lt&&Lt.loaded&&(Lt.retain=!0),Oe>F?this._retainParent(q,re,Oe,F):!1)},_retainChildren:function(f,v,O,F){for(var q=2*f;q<2*f+2;q++)for(var re=2*v;re<2*v+2;re++){var Oe=new $(q,re);Oe.z=O+1;var Qe=this._tileCoordsToKey(Oe),Xe=this._tiles[Qe];if(Xe&&Xe.active){Xe.retain=!0;continue}else Xe&&Xe.loaded&&(Xe.retain=!0);O+1<F&&this._retainChildren(q,re,O+1,F)}},_resetView:function(f){var v=f&&(f.pinch||f.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),v,v)},_animateZoom:function(f){this._setView(f.center,f.zoom,!0,f.noUpdate)},_clampZoom:function(f){var v=this.options;return v.minNativeZoom!==void 0&&f<v.minNativeZoom?v.minNativeZoom:v.maxNativeZoom!==void 0&&v.maxNativeZoom<f?v.maxNativeZoom:f},_setView:function(f,v,O,F){var q=Math.round(v);this.options.maxZoom!==void 0&&q>this.options.maxZoom||this.options.minZoom!==void 0&&q<this.options.minZoom?q=void 0:q=this._clampZoom(q);var re=this.options.updateWhenZooming&&q!==this._tileZoom;(!F||re)&&(this._tileZoom=q,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),q!==void 0&&this._update(f),O||this._pruneTiles(),this._noPrune=!!O),this._setZoomTransforms(f,v)},_setZoomTransforms:function(f,v){for(var O in this._levels)this._setZoomTransform(this._levels[O],f,v)},_setZoomTransform:function(f,v,O){var F=this._map.getZoomScale(O,f.zoom),q=f.origin.multiplyBy(F).subtract(this._map._getNewPixelOrigin(v,O)).round();Ze.any3d?tt(f.el,q,F):Cn(f.el,q)},_resetGrid:function(){var f=this._map,v=f.options.crs,O=this._tileSize=this.getTileSize(),F=this._tileZoom,q=this._map.getPixelWorldBounds(this._tileZoom);q&&(this._globalTileRange=this._pxBoundsToTileRange(q)),this._wrapX=v.wrapLng&&!this.options.noWrap&&[Math.floor(f.project([0,v.wrapLng[0]],F).x/O.x),Math.ceil(f.project([0,v.wrapLng[1]],F).x/O.y)],this._wrapY=v.wrapLat&&!this.options.noWrap&&[Math.floor(f.project([v.wrapLat[0],0],F).y/O.x),Math.ceil(f.project([v.wrapLat[1],0],F).y/O.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(f){var v=this._map,O=v._animatingZoom?Math.max(v._animateToZoom,v.getZoom()):v.getZoom(),F=v.getZoomScale(O,this._tileZoom),q=v.project(f,this._tileZoom).floor(),re=v.getSize().divideBy(F*2);return new U(q.subtract(re),q.add(re))},_update:function(f){var v=this._map;if(v){var O=this._clampZoom(v.getZoom());if(f===void 0&&(f=v.getCenter()),this._tileZoom!==void 0){var F=this._getTiledPixelBounds(f),q=this._pxBoundsToTileRange(F),re=q.getCenter(),Oe=[],Qe=this.options.keepBuffer,Xe=new U(q.getBottomLeft().subtract([Qe,-Qe]),q.getTopRight().add([Qe,-Qe]));if(!(isFinite(q.min.x)&&isFinite(q.min.y)&&isFinite(q.max.x)&&isFinite(q.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Lt in this._tiles){var nn=this._tiles[Lt].coords;(nn.z!==this._tileZoom||!Xe.contains(new $(nn.x,nn.y)))&&(this._tiles[Lt].current=!1)}if(Math.abs(O-this._tileZoom)>1){this._setView(f,O);return}for(var Bn=q.min.y;Bn<=q.max.y;Bn++)for(var Yn=q.min.x;Yn<=q.max.x;Yn++){var l1=new $(Yn,Bn);if(l1.z=this._tileZoom,!!this._isValidTile(l1)){var pe=this._tiles[this._tileCoordsToKey(l1)];pe?pe.current=!0:Oe.push(l1)}}if(Oe.sort(function(we,Re){return we.distanceTo(re)-Re.distanceTo(re)}),Oe.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var he=document.createDocumentFragment();for(Yn=0;Yn<Oe.length;Yn++)this._addTile(Oe[Yn],he);this._level.el.appendChild(he)}}}},_isValidTile:function(f){var v=this._map.options.crs;if(!v.infinite){var O=this._globalTileRange;if(!v.wrapLng&&(f.x<O.min.x||f.x>O.max.x)||!v.wrapLat&&(f.y<O.min.y||f.y>O.max.y))return!1}if(!this.options.bounds)return!0;var F=this._tileCoordsToBounds(f);return G(this.options.bounds).overlaps(F)},_keyToBounds:function(f){return this._tileCoordsToBounds(this._keyToTileCoords(f))},_tileCoordsToNwSe:function(f){var v=this._map,O=this.getTileSize(),F=f.scaleBy(O),q=F.add(O),re=v.unproject(F,f.z),Oe=v.unproject(q,f.z);return[re,Oe]},_tileCoordsToBounds:function(f){var v=this._tileCoordsToNwSe(f),O=new J(v[0],v[1]);return this.options.noWrap||(O=this._map.wrapLatLngBounds(O)),O},_tileCoordsToKey:function(f){return f.x+":"+f.y+":"+f.z},_keyToTileCoords:function(f){var v=f.split(":"),O=new $(+v[0],+v[1]);return O.z=+v[2],O},_removeTile:function(f){var v=this._tiles[f];v&&(cn(v.el),delete this._tiles[f],this.fire("tileunload",{tile:v.el,coords:this._keyToTileCoords(f)}))},_initTile:function(f){gn(f,"leaflet-tile");var v=this.getTileSize();f.style.width=v.x+"px",f.style.height=v.y+"px",f.onselectstart=h,f.onmousemove=h,Ze.ielt9&&this.options.opacity<1&&bt(f,this.options.opacity)},_addTile:function(f,v){var O=this._getTilePos(f),F=this._tileCoordsToKey(f),q=this.createTile(this._wrapCoords(f),a(this._tileReady,this,f));this._initTile(q),this.createTile.length<2&&N(a(this._tileReady,this,f,null,q)),Cn(q,O),this._tiles[F]={el:q,coords:f,current:!0},v.appendChild(q),this.fire("tileloadstart",{tile:q,coords:f})},_tileReady:function(f,v,O){v&&this.fire("tileerror",{error:v,tile:O,coords:f});var F=this._tileCoordsToKey(f);O=this._tiles[F],O&&(O.loaded=+new Date,this._map._fadeAnimated?(bt(O.el,0),T(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(O.active=!0,this._pruneTiles()),v||(gn(O.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:O.el,coords:f})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ze.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(f){return f.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(f){var v=new $(this._wrapX?d(f.x,this._wrapX):f.x,this._wrapY?d(f.y,this._wrapY):f.y);return v.z=f.z,v},_pxBoundsToTileRange:function(f){var v=this.getTileSize();return new U(f.min.unscaleBy(v).floor(),f.max.unscaleBy(v).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var f in this._tiles)if(!this._tiles[f].loaded)return!1;return!0}});function k2(f){return new lr(f)}var la=lr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(f,v){this._url=f,v=b(this,v),v.detectRetina&&Ze.retina&&v.maxZoom>0?(v.tileSize=Math.floor(v.tileSize/2),v.zoomReverse?(v.zoomOffset--,v.minZoom=Math.min(v.maxZoom,v.minZoom+1)):(v.zoomOffset++,v.maxZoom=Math.max(v.minZoom,v.maxZoom-1)),v.minZoom=Math.max(0,v.minZoom)):v.zoomReverse?v.minZoom=Math.min(v.maxZoom,v.minZoom):v.maxZoom=Math.max(v.minZoom,v.maxZoom),typeof v.subdomains=="string"&&(v.subdomains=v.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(f,v){return this._url===f&&v===void 0&&(v=!0),this._url=f,v||this.redraw(),this},createTile:function(f,v){var O=document.createElement("img");return Tn(O,"load",a(this._tileOnLoad,this,v,O)),Tn(O,"error",a(this._tileOnError,this,v,O)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(O.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(O.referrerPolicy=this.options.referrerPolicy),O.alt="",O.src=this.getTileUrl(f),O},getTileUrl:function(f){var v={r:Ze.retina?"@2x":"",s:this._getSubdomain(f),x:f.x,y:f.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var O=this._globalTileRange.max.y-f.y;this.options.tms&&(v.y=O),v["-y"]=O}return w(this._url,o(v,this.options))},_tileOnLoad:function(f,v){Ze.ielt9?setTimeout(a(f,this,null,v),0):f(null,v)},_tileOnError:function(f,v,O){var F=this.options.errorTileUrl;F&&v.getAttribute("src")!==F&&(v.src=F),f(O,v)},_onTileRemove:function(f){f.tile.onload=null},_getZoomForUrl:function(){var f=this._tileZoom,v=this.options.maxZoom,O=this.options.zoomReverse,F=this.options.zoomOffset;return O&&(f=v-f),f+F},_getSubdomain:function(f){var v=Math.abs(f.x+f.y)%this.options.subdomains.length;return this.options.subdomains[v]},_abortLoading:function(){var f,v;for(f in this._tiles)if(this._tiles[f].coords.z!==this._tileZoom&&(v=this._tiles[f].el,v.onload=h,v.onerror=h,!v.complete)){v.src=S;var O=this._tiles[f].coords;cn(v),delete this._tiles[f],this.fire("tileabort",{tile:v,coords:O})}},_removeTile:function(f){var v=this._tiles[f];if(v)return v.el.setAttribute("src",S),lr.prototype._removeTile.call(this,f)},_tileReady:function(f,v,O){if(!(!this._map||O&&O.getAttribute("src")===S))return lr.prototype._tileReady.call(this,f,v,O)}});function y9(f,v){return new la(f,v)}var c0=la.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(f,v){this._url=f;var O=o({},this.defaultWmsParams);for(var F in v)F in this.options||(O[F]=v[F]);v=b(this,v);var q=v.detectRetina&&Ze.retina?2:1,re=this.getTileSize();O.width=re.x*q,O.height=re.y*q,this.wmsParams=O},onAdd:function(f){this._crs=this.options.crs||f.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var v=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[v]=this._crs.code,la.prototype.onAdd.call(this,f)},getTileUrl:function(f){var v=this._tileCoordsToNwSe(f),O=this._crs,F=Y(O.project(v[0]),O.project(v[1])),q=F.min,re=F.max,Oe=(this._wmsVersion>=1.3&&this._crs===c5?[q.y,q.x,re.y,re.x]:[q.x,q.y,re.x,re.y]).join(","),Qe=la.prototype.getTileUrl.call(this,f);return Qe+p(this.wmsParams,Qe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Oe},setParams:function(f,v){return o(this.wmsParams,f),v||this.redraw(),this}});function u0(f,v){return new c0(f,v)}la.WMS=c0,y9.wms=u0;var ci=tr.extend({options:{padding:.1},initialize:function(f){b(this,f),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),gn(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 f={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(f.zoomanim=this._onAnimZoom),f},_onAnimZoom:function(f){this._updateTransform(f.center,f.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(f,v){var O=this._map.getZoomScale(v,this._zoom),F=this._map.getSize().multiplyBy(.5+this.options.padding),q=this._map.project(this._center,v),re=F.multiplyBy(-O).add(q).subtract(this._map._getNewPixelOrigin(f,v));Ze.any3d?tt(this._container,re,O):Cn(this._container,re)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var f in this._layers)this._layers[f]._reset()},_onZoomEnd:function(){for(var f in this._layers)this._layers[f]._project()},_updatePaths:function(){for(var f in this._layers)this._layers[f]._update()},_update:function(){var f=this.options.padding,v=this._map.getSize(),O=this._map.containerPointToLayerPoint(v.multiplyBy(-f)).round();this._bounds=new U(O,O.add(v.multiplyBy(1+f*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),x9=ci.extend({options:{tolerance:0},getEvents:function(){var f=ci.prototype.getEvents.call(this);return f.viewprereset=this._onViewPreReset,f},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ci.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var f=this._container=document.createElement("canvas");Tn(f,"mousemove",this._onMouseMove,this),Tn(f,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Tn(f,"mouseout",this._handleMouseOut,this),f._leaflet_disable_events=!0,this._ctx=f.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,cn(this._container),mn(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var f;this._redrawBounds=null;for(var v in this._layers)f=this._layers[v],f._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ci.prototype._update.call(this);var f=this._bounds,v=this._container,O=f.getSize(),F=Ze.retina?2:1;Cn(v,f.min),v.width=F*O.x,v.height=F*O.y,v.style.width=O.x+"px",v.style.height=O.y+"px",Ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-f.min.x,-f.min.y),this.fire("update")}},_reset:function(){ci.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(f){this._updateDashArray(f),this._layers[l(f)]=f;var v=f._order={layer:f,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=v),this._drawLast=v,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(f){this._requestRedraw(f)},_removePath:function(f){var v=f._order,O=v.next,F=v.prev;O?O.prev=F:this._drawLast=F,F?F.next=O:this._drawFirst=O,delete f._order,delete this._layers[l(f)],this._requestRedraw(f)},_updatePath:function(f){this._extendRedrawBounds(f),f._project(),f._update(),this._requestRedraw(f)},_updateStyle:function(f){this._updateDashArray(f),this._requestRedraw(f)},_updateDashArray:function(f){if(typeof f.options.dashArray=="string"){var v=f.options.dashArray.split(/[, ]+/),O=[],F,q;for(q=0;q<v.length;q++){if(F=Number(v[q]),isNaN(F))return;O.push(F)}f.options._dashArray=O}else f.options._dashArray=f.options.dashArray},_requestRedraw:function(f){this._map&&(this._extendRedrawBounds(f),this._redrawRequest=this._redrawRequest||N(this._redraw,this))},_extendRedrawBounds:function(f){if(f._pxBounds){var v=(f.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new U,this._redrawBounds.extend(f._pxBounds.min.subtract([v,v])),this._redrawBounds.extend(f._pxBounds.max.add([v,v]))}},_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 f=this._redrawBounds;if(f){var v=f.getSize();this._ctx.clearRect(f.min.x,f.min.y,v.x,v.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 f,v=this._redrawBounds;if(this._ctx.save(),v){var O=v.getSize();this._ctx.beginPath(),this._ctx.rect(v.min.x,v.min.y,O.x,O.y),this._ctx.clip()}this._drawing=!0;for(var F=this._drawFirst;F;F=F.next)f=F.layer,(!v||f._pxBounds&&f._pxBounds.intersects(v))&&f._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(f,v){if(this._drawing){var O,F,q,re,Oe=f._parts,Qe=Oe.length,Xe=this._ctx;if(Qe){for(Xe.beginPath(),O=0;O<Qe;O++){for(F=0,q=Oe[O].length;F<q;F++)re=Oe[O][F],Xe[F?"lineTo":"moveTo"](re.x,re.y);v&&Xe.closePath()}this._fillStroke(Xe,f)}}},_updateCircle:function(f){if(!(!this._drawing||f._empty())){var v=f._point,O=this._ctx,F=Math.max(Math.round(f._radius),1),q=(Math.max(Math.round(f._radiusY),1)||F)/F;q!==1&&(O.save(),O.scale(1,q)),O.beginPath(),O.arc(v.x,v.y/q,F,0,Math.PI*2,!1),q!==1&&O.restore(),this._fillStroke(O,f)}},_fillStroke:function(f,v){var O=v.options;O.fill&&(f.globalAlpha=O.fillOpacity,f.fillStyle=O.fillColor||O.color,f.fill(O.fillRule||"evenodd")),O.stroke&&O.weight!==0&&(f.setLineDash&&f.setLineDash(v.options&&v.options._dashArray||[]),f.globalAlpha=O.opacity,f.lineWidth=O.weight,f.strokeStyle=O.color,f.lineCap=O.lineCap,f.lineJoin=O.lineJoin,f.stroke())},_onClick:function(f){for(var v=this._map.mouseEventToLayerPoint(f),O,F,q=this._drawFirst;q;q=q.next)O=q.layer,O.options.interactive&&O._containsPoint(v)&&(!(f.type==="click"||f.type==="preclick")||!this._map._draggableMoved(O))&&(F=O);this._fireEvent(F?[F]:!1,f)},_onMouseMove:function(f){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var v=this._map.mouseEventToLayerPoint(f);this._handleMouseHover(f,v)}},_handleMouseOut:function(f){var v=this._hoveredLayer;v&&(Kt(this._container,"leaflet-interactive"),this._fireEvent([v],f,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(f,v){if(!this._mouseHoverThrottled){for(var O,F,q=this._drawFirst;q;q=q.next)O=q.layer,O.options.interactive&&O._containsPoint(v)&&(F=O);F!==this._hoveredLayer&&(this._handleMouseOut(f),F&&(gn(this._container,"leaflet-interactive"),this._fireEvent([F],f,"mouseover"),this._hoveredLayer=F)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,f),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(f,v,O){this._map._fireDOMEvent(v,O||v.type,f)},_bringToFront:function(f){var v=f._order;if(v){var O=v.next,F=v.prev;if(O)O.prev=F;else return;F?F.next=O:O&&(this._drawFirst=O),v.prev=this._drawLast,this._drawLast.next=v,v.next=null,this._drawLast=v,this._requestRedraw(f)}},_bringToBack:function(f){var v=f._order;if(v){var O=v.next,F=v.prev;if(F)F.next=O;else return;O?O.prev=F:F&&(this._drawLast=F),v.prev=null,v.next=this._drawFirst,this._drawFirst.prev=v,this._drawFirst=v,this._requestRedraw(f)}}});function Io(f){return Ze.canvas?new x9(f):null}var Ko=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(f){return document.createElement("<lvml:"+f+' class="lvml">')}}catch{}return function(f){return document.createElement("<"+f+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),h5={_initContainer:function(){this._container=Dt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ci.prototype._update.call(this),this.fire("update"))},_initPath:function(f){var v=f._container=Ko("shape");gn(v,"leaflet-vml-shape "+(this.options.className||"")),v.coordsize="1 1",f._path=Ko("path"),v.appendChild(f._path),this._updateStyle(f),this._layers[l(f)]=f},_addPath:function(f){var v=f._container;this._container.appendChild(v),f.options.interactive&&f.addInteractiveTarget(v)},_removePath:function(f){var v=f._container;cn(v),f.removeInteractiveTarget(v),delete this._layers[l(f)]},_updateStyle:function(f){var v=f._stroke,O=f._fill,F=f.options,q=f._container;q.stroked=!!F.stroke,q.filled=!!F.fill,F.stroke?(v||(v=f._stroke=Ko("stroke")),q.appendChild(v),v.weight=F.weight+"px",v.color=F.color,v.opacity=F.opacity,F.dashArray?v.dashStyle=x(F.dashArray)?F.dashArray.join(" "):F.dashArray.replace(/( *, *)/g," "):v.dashStyle="",v.endcap=F.lineCap.replace("butt","flat"),v.joinstyle=F.lineJoin):v&&(q.removeChild(v),f._stroke=null),F.fill?(O||(O=f._fill=Ko("fill")),q.appendChild(O),O.color=F.fillColor||F.color,O.opacity=F.fillOpacity):O&&(q.removeChild(O),f._fill=null)},_updateCircle:function(f){var v=f._point.round(),O=Math.round(f._radius),F=Math.round(f._radiusY||O);this._setPath(f,f._empty()?"M0 0":"AL "+v.x+","+v.y+" "+O+","+F+" 0,"+65535*360)},_setPath:function(f,v){f._path.v=v},_bringToFront:function(f){Pr(f._container)},_bringToBack:function(f){nr(f._container)}},Zo=Ze.vml?Ko:Ae,ui=ci.extend({_initContainer:function(){this._container=Zo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){cn(this._container),mn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ci.prototype._update.call(this);var f=this._bounds,v=f.getSize(),O=this._container;(!this._svgSize||!this._svgSize.equals(v))&&(this._svgSize=v,O.setAttribute("width",v.x),O.setAttribute("height",v.y)),Cn(O,f.min),O.setAttribute("viewBox",[f.min.x,f.min.y,v.x,v.y].join(" ")),this.fire("update")}},_initPath:function(f){var v=f._path=Zo("path");f.options.className&&gn(v,f.options.className),f.options.interactive&&gn(v,"leaflet-interactive"),this._updateStyle(f),this._layers[l(f)]=f},_addPath:function(f){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(f._path),f.addInteractiveTarget(f._path)},_removePath:function(f){cn(f._path),f.removeInteractiveTarget(f._path),delete this._layers[l(f)]},_updatePath:function(f){f._project(),f._update()},_updateStyle:function(f){var v=f._path,O=f.options;v&&(O.stroke?(v.setAttribute("stroke",O.color),v.setAttribute("stroke-opacity",O.opacity),v.setAttribute("stroke-width",O.weight),v.setAttribute("stroke-linecap",O.lineCap),v.setAttribute("stroke-linejoin",O.lineJoin),O.dashArray?v.setAttribute("stroke-dasharray",O.dashArray):v.removeAttribute("stroke-dasharray"),O.dashOffset?v.setAttribute("stroke-dashoffset",O.dashOffset):v.removeAttribute("stroke-dashoffset")):v.setAttribute("stroke","none"),O.fill?(v.setAttribute("fill",O.fillColor||O.color),v.setAttribute("fill-opacity",O.fillOpacity),v.setAttribute("fill-rule",O.fillRule||"evenodd")):v.setAttribute("fill","none"))},_updatePoly:function(f,v){this._setPath(f,Me(f._parts,v))},_updateCircle:function(f){var v=f._point,O=Math.max(Math.round(f._radius),1),F=Math.max(Math.round(f._radiusY),1)||O,q="a"+O+","+F+" 0 1,0 ",re=f._empty()?"M0 0":"M"+(v.x-O)+","+v.y+q+O*2+",0 "+q+-O*2+",0 ";this._setPath(f,re)},_setPath:function(f,v){f._path.setAttribute("d",v)},_bringToFront:function(f){Pr(f._path)},_bringToBack:function(f){nr(f._path)}});Ze.vml&&ui.include(h5);function $a(f){return Ze.svg||Ze.vml?new ui(f):null}fr.include({getRenderer:function(f){var v=f.options.renderer||this._getPaneRenderer(f.options.pane)||this.options.renderer||this._renderer;return v||(v=this._renderer=this._createRenderer()),this.hasLayer(v)||this.addLayer(v),v},_getPaneRenderer:function(f){if(f==="overlayPane"||f===void 0)return!1;var v=this._paneRenderers[f];return v===void 0&&(v=this._createRenderer({pane:f}),this._paneRenderers[f]=v),v},_createRenderer:function(f){return this.options.preferCanvas&&Io(f)||$a(f)}});var Ti=ra.extend({initialize:function(f,v){ra.prototype.initialize.call(this,this._boundsToLatLngs(f),v)},setBounds:function(f){return this.setLatLngs(this._boundsToLatLngs(f))},_boundsToLatLngs:function(f){return f=G(f),[f.getSouthWest(),f.getNorthWest(),f.getNorthEast(),f.getSouthEast()]}});function d0(f,v){return new Ti(f,v)}ui.create=Zo,ui.pointsToPath=Me,k1.geometryToLayer=Z1,k1.coordsToLatLng=v9,k1.coordsToLatLngs=l0,k1.latLngToCoords=is,k1.latLngsToCoords=b9,k1.getFeature=Ua,k1.asFeature=Ro,fr.mergeOptions({boxZoom:!0});var ki=i1.extend({initialize:function(f){this._map=f,this._container=f._container,this._pane=f._panes.overlayPane,this._resetStateTimeout=0,f.on("unload",this._destroy,this)},addHooks:function(){Tn(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){mn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){cn(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(f){if(!f.shiftKey||f.which!==1&&f.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Dr(),yn(),this._startPoint=this._map.mouseEventToContainerPoint(f),Tn(document,{contextmenu:er,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(f){this._moved||(this._moved=!0,this._box=Dt("div","leaflet-zoom-box",this._container),gn(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(f);var v=new U(this._point,this._startPoint),O=v.getSize();Cn(this._box,v.min),this._box.style.width=O.x+"px",this._box.style.height=O.y+"px"},_finish:function(){this._moved&&(cn(this._box),Kt(this._container,"leaflet-crosshair")),sr(),tn(),mn(document,{contextmenu:er,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(f){if(!(f.which!==1&&f.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var v=new J(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(v).fire("boxzoomend",{boxZoomBounds:v})}},_onKeyDown:function(f){f.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});fr.addInitHook("addHandler","boxZoom",ki),fr.mergeOptions({doubleClickZoom:!0});var Qo=i1.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(f){var v=this._map,O=v.getZoom(),F=v.options.zoomDelta,q=f.originalEvent.shiftKey?O-F:O+F;v.options.doubleClickZoom==="center"?v.setZoom(q):v.setZoomAround(f.containerPoint,q)}});fr.addInitHook("addHandler","doubleClickZoom",Qo),fr.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ca=i1.extend({addHooks:function(){if(!this._draggable){var f=this._map;this._draggable=new Ri(f._mapPane,f._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),f.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),f.on("zoomend",this._onZoomEnd,this),f.whenReady(this._onZoomEnd,this))}gn(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Kt(this._map._container,"leaflet-grab"),Kt(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 f=this._map;if(f._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var v=G(this._map.options.maxBounds);this._offsetLimit=Y(this._map.latLngToContainerPoint(v.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(v.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;f.fire("movestart").fire("dragstart"),f.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(f){if(this._map.options.inertia){var v=this._lastTime=+new Date,O=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(O),this._times.push(v),this._prunePositions(v)}this._map.fire("move",f).fire("drag",f)},_prunePositions:function(f){for(;this._positions.length>1&&f-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var f=this._map.getSize().divideBy(2),v=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=v.subtract(f).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(f,v){return f-(f-v)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var f=this._draggable._newPos.subtract(this._draggable._startPos),v=this._offsetLimit;f.x<v.min.x&&(f.x=this._viscousLimit(f.x,v.min.x)),f.y<v.min.y&&(f.y=this._viscousLimit(f.y,v.min.y)),f.x>v.max.x&&(f.x=this._viscousLimit(f.x,v.max.x)),f.y>v.max.y&&(f.y=this._viscousLimit(f.y,v.max.y)),this._draggable._newPos=this._draggable._startPos.add(f)}},_onPreDragWrap:function(){var f=this._worldWidth,v=Math.round(f/2),O=this._initialWorldOffset,F=this._draggable._newPos.x,q=(F-v+O)%f+v-O,re=(F+v+O)%f-v-O,Oe=Math.abs(q+O)<Math.abs(re+O)?q:re;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Oe},_onDragEnd:function(f){var v=this._map,O=v.options,F=!O.inertia||f.noInertia||this._times.length<2;if(v.fire("dragend",f),F)v.fire("moveend");else{this._prunePositions(+new Date);var q=this._lastPos.subtract(this._positions[0]),re=(this._lastTime-this._times[0])/1e3,Oe=O.easeLinearity,Qe=q.multiplyBy(Oe/re),Xe=Qe.distanceTo([0,0]),Lt=Math.min(O.inertiaMaxSpeed,Xe),nn=Qe.multiplyBy(Lt/Xe),Bn=Lt/(O.inertiaDeceleration*Oe),Yn=nn.multiplyBy(-Bn/2).round();!Yn.x&&!Yn.y?v.fire("moveend"):(Yn=v._limitOffset(Yn,v.options.maxBounds),N(function(){v.panBy(Yn,{duration:Bn,easeLinearity:Oe,noMoveStart:!0,animate:!0})}))}}});fr.addInitHook("addHandler","dragging",ca),fr.mergeOptions({keyboard:!0,keyboardPanDelta:80});var w9=i1.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(f){this._map=f,this._setPanDelta(f.options.keyboardPanDelta),this._setZoomDelta(f.options.zoomDelta)},addHooks:function(){var f=this._map._container;f.tabIndex<=0&&(f.tabIndex="0"),Tn(f,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),mn(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 f=document.body,v=document.documentElement,O=f.scrollTop||v.scrollTop,F=f.scrollLeft||v.scrollLeft;this._map._container.focus(),window.scrollTo(F,O)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(f){var v=this._panKeys={},O=this.keyCodes,F,q;for(F=0,q=O.left.length;F<q;F++)v[O.left[F]]=[-1*f,0];for(F=0,q=O.right.length;F<q;F++)v[O.right[F]]=[f,0];for(F=0,q=O.down.length;F<q;F++)v[O.down[F]]=[0,f];for(F=0,q=O.up.length;F<q;F++)v[O.up[F]]=[0,-1*f]},_setZoomDelta:function(f){var v=this._zoomKeys={},O=this.keyCodes,F,q;for(F=0,q=O.zoomIn.length;F<q;F++)v[O.zoomIn[F]]=f;for(F=0,q=O.zoomOut.length;F<q;F++)v[O.zoomOut[F]]=-f},_addHooks:function(){Tn(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){mn(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(f){if(!(f.altKey||f.ctrlKey||f.metaKey)){var v=f.keyCode,O=this._map,F;if(v in this._panKeys){if(!O._panAnim||!O._panAnim._inProgress)if(F=this._panKeys[v],f.shiftKey&&(F=Z(F).multiplyBy(3)),O.options.maxBounds&&(F=O._limitOffset(Z(F),O.options.maxBounds)),O.options.worldCopyJump){var q=O.wrapLatLng(O.unproject(O.project(O.getCenter()).add(F)));O.panTo(q)}else O.panBy(F)}else if(v in this._zoomKeys)O.setZoom(O.getZoom()+(f.shiftKey?3:1)*this._zoomKeys[v]);else if(v===27&&O._popup&&O._popup.options.closeOnEscapeKey)O.closePopup();else return;er(f)}}});fr.addInitHook("addHandler","keyboard",w9),fr.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var f0=i1.extend({addHooks:function(){Tn(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){mn(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(f){var v=Bi(f),O=this._map.options.wheelDebounceTime;this._delta+=v,this._lastMousePos=this._map.mouseEventToContainerPoint(f),this._startTime||(this._startTime=+new Date);var F=Math.max(O-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),F),er(f)},_performZoom:function(){var f=this._map,v=f.getZoom(),O=this._map.options.zoomSnap||0;f._stop();var F=this._delta/(this._map.options.wheelPxPerZoomLevel*4),q=4*Math.log(2/(1+Math.exp(-Math.abs(F))))/Math.LN2,re=O?Math.ceil(q/O)*O:q,Oe=f._limitZoom(v+(this._delta>0?re:-re))-v;this._delta=0,this._startTime=null,Oe&&(f.options.scrollWheelZoom==="center"?f.setZoom(v+Oe):f.setZoomAround(this._lastMousePos,v+Oe))}});fr.addInitHook("addHandler","scrollWheelZoom",f0);var as=600;fr.mergeOptions({tapHold:Ze.touchNative&&Ze.safari&&Ze.mobile,tapTolerance:15});var _9=i1.extend({addHooks:function(){Tn(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){mn(this._map._container,"touchstart",this._onDown,this)},_onDown:function(f){if(clearTimeout(this._holdTimeout),f.touches.length===1){var v=f.touches[0];this._startPos=this._newPos=new $(v.clientX,v.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Tn(document,"touchend",Fn),Tn(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",v))},this),as),Tn(document,"touchend touchcancel contextmenu",this._cancel,this),Tn(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function f(){mn(document,"touchend",Fn),mn(document,"touchend touchcancel",f)},_cancel:function(){clearTimeout(this._holdTimeout),mn(document,"touchend touchcancel contextmenu",this._cancel,this),mn(document,"touchmove",this._onMove,this)},_onMove:function(f){var v=f.touches[0];this._newPos=new $(v.clientX,v.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(f,v){var O=new MouseEvent(f,{bubbles:!0,cancelable:!0,view:window,screenX:v.screenX,screenY:v.screenY,clientX:v.clientX,clientY:v.clientY});O._simulated=!0,v.target.dispatchEvent(O)}});fr.addInitHook("addHandler","tapHold",_9),fr.mergeOptions({touchZoom:Ze.touch,bounceAtZoomLimits:!0});var Ka=i1.extend({addHooks:function(){gn(this._map._container,"leaflet-touch-zoom"),Tn(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Kt(this._map._container,"leaflet-touch-zoom"),mn(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(f){var v=this._map;if(!(!f.touches||f.touches.length!==2||v._animatingZoom||this._zooming)){var O=v.mouseEventToContainerPoint(f.touches[0]),F=v.mouseEventToContainerPoint(f.touches[1]);this._centerPoint=v.getSize()._divideBy(2),this._startLatLng=v.containerPointToLatLng(this._centerPoint),v.options.touchZoom!=="center"&&(this._pinchStartLatLng=v.containerPointToLatLng(O.add(F)._divideBy(2))),this._startDist=O.distanceTo(F),this._startZoom=v.getZoom(),this._moved=!1,this._zooming=!0,v._stop(),Tn(document,"touchmove",this._onTouchMove,this),Tn(document,"touchend touchcancel",this._onTouchEnd,this),Fn(f)}},_onTouchMove:function(f){if(!(!f.touches||f.touches.length!==2||!this._zooming)){var v=this._map,O=v.mouseEventToContainerPoint(f.touches[0]),F=v.mouseEventToContainerPoint(f.touches[1]),q=O.distanceTo(F)/this._startDist;if(this._zoom=v.getScaleZoom(q,this._startZoom),!v.options.bounceAtZoomLimits&&(this._zoom<v.getMinZoom()&&q<1||this._zoom>v.getMaxZoom()&&q>1)&&(this._zoom=v._limitZoom(this._zoom)),v.options.touchZoom==="center"){if(this._center=this._startLatLng,q===1)return}else{var re=O._add(F)._divideBy(2)._subtract(this._centerPoint);if(q===1&&re.x===0&&re.y===0)return;this._center=v.unproject(v.project(this._pinchStartLatLng,this._zoom).subtract(re),this._zoom)}this._moved||(v._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var Oe=a(v._move,v,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(Oe,this,!0),Fn(f)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,T(this._animRequest),mn(document,"touchmove",this._onTouchMove,this),mn(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))}});fr.addInitHook("addHandler","touchZoom",Ka),fr.BoxZoom=ki,fr.DoubleClickZoom=Qo,fr.Drag=ca,fr.Keyboard=w9,fr.ScrollWheelZoom=f0,fr.TapHold=_9,fr.TouchZoom=Ka,n.Bounds=U,n.Browser=Ze,n.CRS=ue,n.Canvas=x9,n.Circle=bo,n.CircleMarker=za,n.Class=V,n.Control=ro,n.DivIcon=Ni,n.DivOverlay=Q1,n.DomEvent=es,n.DomUtil=go,n.Draggable=Ri,n.Evented=K,n.FeatureGroup=vo,n.GeoJSON=k1,n.GridLayer=lr,n.Handler=i1,n.Icon=si,n.ImageOverlay=sn,n.LatLng=ee,n.LatLngBounds=J,n.Layer=tr,n.LayerGroup=Bo,n.LineUtil=ka,n.Map=fr,n.Marker=A9,n.Mixin=s5,n.Path=Pi,n.Point=$,n.PolyUtil=ns,n.Polygon=ra,n.Polyline=a1,n.Popup=b1,n.PosAnimation=ts,n.Projection=Ao,n.Rectangle=Ti,n.Renderer=ci,n.SVG=ui,n.SVGOverlay=Br,n.TileLayer=la,n.Tooltip=aa,n.Transformation=Ce,n.Util=j,n.VideoOverlay=hr,n.bind=a,n.bounds=Y,n.canvas=Io,n.circle=Di,n.circleMarker=Lr,n.control=Co,n.divIcon=sa,n.extend=o,n.featureGroup=Ii,n.geoJSON=st,n.geoJson=nt,n.gridLayer=k2,n.icon=T2,n.imageOverlay=$n,n.latLng=oe,n.latLngBounds=G,n.layerGroup=p9,n.map=E1,n.marker=na,n.point=Z,n.polygon=f5,n.polyline=d5,n.popup=ia,n.rectangle=d0,n.setOptions=b,n.stamp=l,n.svg=$a,n.svgOverlay=oa,n.tileLayer=y9,n.tooltip=li,n.transformation=fe,n.version=r,n.videoOverlay=Jr;var h0=window.L;n.noConflict=function(){return window.L=h0,this},window.L=n})}(Rl,Rl.exports)),Rl.exports}var D2=bOe();const Nc=Ji(D2);function $u(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function Ku(e,t){return t==null?function(r,o){const i=I.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=I.useRef();i.current||(i.current=e(r,o));const a=I.useRef(r),{instance:s}=i.current;return I.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,o]),i}}function yOe(e,t){I.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var i;(i=t.layerContainer)==null||i.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function sP(e){return function(n){const r=Uu(),o=e(Mm(n,r),r);return nP(r.map,n.attribution),aP(o.current,n.eventHandlers),yOe(o.current,r),o}}function xOe(e){function t(o,i){return $u(e(o),i)}const n=Ku(t),r=pOe(n);return iP(r)}function wOe(e,t){const n=Ku(e,t),r=sP(n);return COe(r)}function _Oe(e,t){const n=Ku(e),r=AOe(n,t);return mOe(r)}function EOe(e,t){const n=Ku(e,t),r=sP(n);return iP(r)}function SOe(e,t,n){const{opacity:r,zIndex:o}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),o!=null&&o!==n.zIndex&&e.setZIndex(o)}function lP(){return Uu().map}function gg(){return gg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gg.apply(this,arguments)}function MOe({bounds:e,boundsOptions:t,center:n,children:r,className:o,id:i,placeholder:a,style:s,whenReady:l,zoom:u,...d},h){const[C]=I.useState({className:o,id:i,style:s}),[m,A]=I.useState(null);I.useImperativeHandle(h,()=>(m==null?void 0:m.map)??null,[m]);const b=I.useCallback(_=>{if(_!==null&&m===null){const w=new D2.Map(_,d);n!=null&&u!=null?w.setView(n,u):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),A(hOe(w))}},[]);I.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const p=m?I.createElement(oP,{value:m},r):a??null;return I.createElement("div",gg({},C,{ref:b}),p)}const HOe=I.forwardRef(MOe),OOe=wOe(function({position:t,...n},r){const o=new D2.Marker(t,n);return $u(o,gOe(r,{overlayContainer:o}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),LOe=_Oe(function(t,n){const r=new D2.Popup(t,n.overlayContainer);return $u(r,n)},function(t,n,{position:r},o){I.useEffect(function(){const{instance:a}=t;function s(u){u.popup===a&&(a.update(),o(!0))}function l(u){u.popup===a&&o(!1)}return n.map.on({popupopen:s,popupclose:l}),n.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(n.map)):n.overlayContainer.bindPopup(a),function(){var d;n.map.off({popupopen:s,popupclose:l}),(d=n.overlayContainer)==null||d.unbindPopup(),n.map.removeLayer(a)}},[t,n,o,r])}),BOe=EOe(function({url:t,...n},r){const o=new D2.TileLayer(t,Mm(n,r));return $u(o,r)},function(t,n,r){SOe(t,n,r);const{url:o}=n;o!=null&&o!==r.url&&t.setUrl(o)}),ROe=xOe(function(t){return new D2.Control.Zoom(t)}),IOe={lat:20.5937,lng:78.9629},POe=5,DOe={osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'}},mf={defaultZoom:POe,defaultCenter:IOe,defaultMapProvider:DOe.osm},NOe="../../src/assets/images/map_pin.svg",TOe=new Nc.Icon({iconUrl:NOe,iconSize:new Nc.Point(32,32),iconAnchor:new Nc.Point(16,32),className:"leaflet-div-icon",attribution:'<a href="https://www.flaticon.com/free-icons/location" title="location icons">@adrianadam - Flaticon</a>'}),V_=I.forwardRef(({position:e,children:t,...n},r)=>W.jsx(OOe,{position:e,icon:TOe,draggable:!1,ref:r,...n,children:t})),kOe=({items:e})=>{const t=lP();return I.useEffect(()=>{if(!(e!=null&&e.length))return;const n=Nc.latLngBounds(e==null?void 0:e.map(r=>r==null?void 0:r.position));t.fitBounds(n,{padding:[50,50]})},[e,t]),null},FOe=({mapRef:e})=>{const t=lP();return I.useEffect(()=>{e.current=t},[t]),null},jOe=({items:e,width:t="500px",height:n="500px",showCardPopup:r=!0,showNavigation:o=!0,navClassName:i,navButtonColor:a,className:s})=>{const[l,u]=I.useState(!1),[d,h]=I.useState(0);I.useEffect(()=>{u(!0)},[]);const C=()=>{h(w=>(w-1+(e==null?void 0:e.length))%(e==null?void 0:e.length))},m=()=>{h(w=>(w+1)%(e==null?void 0:e.length))},A=I.useMemo(()=>e==null?void 0:e[d],[e,d]),b=I.useRef(null);I.useEffect(()=>{if(!l)return;const w=requestAnimationFrame(()=>{var x;(x=b==null?void 0:b.current)==null||x.openPopup()});return()=>cancelAnimationFrame(w)},[d,l]);const p=a||"var(--awi-color-common-highlight, #ffcc00)",_=I.useRef(null);return I.useEffect(()=>{const w=_.current;w&&(A!=null&&A.position)&&w.setView(A.position,w.getZoom(),{animate:!0})},[A,l]),typeof window>"u"||!l||!(e!=null&&e.length)?null:W.jsxs("div",{className:`map_view_container ${s}`,style:{width:t,height:n},children:[W.jsxs(HOe,{center:A==null?void 0:A.position,zoom:mf.defaultZoom,className:"static_map",zoomControl:!1,style:{width:"100%",height:"100%"},children:[W.jsx(BOe,{url:mf.defaultMapProvider.url,attribution:mf.defaultMapProvider.attribution}),W.jsx(FOe,{mapRef:_}),W.jsx(kOe,{items:e}),W.jsx(ROe,{position:"bottomright"}),e==null?void 0:e.map((w,x)=>x===d?W.jsx(V_,{position:w==null?void 0:w.position,ref:b,children:r?W.jsx(LOe,{closeButton:!1,autoPan:!1,children:w==null?void 0:w.element}):W.jsx(W.Fragment,{})},x):W.jsx(V_,{position:w==null?void 0:w.position},x))]}),o?W.jsxs("div",{className:`map_view_nav_container ${i||""}`,children:[W.jsx(oi,{variant:"primary",onClick:C,size:"s",icon:"leftArrow",backgroundColor:p,borderColor:p,title:"Previous"}),W.jsx(oi,{variant:"primary",onClick:m,size:"s",icon:"rightArrow",iconPosition:"after",backgroundColor:p,borderColor:p,title:"Next"})]}):W.jsx(W.Fragment,{})]})},Cg=()=>{const e=I.useRef(!1),t=I.useRef(!1);return I.useEffect(()=>{const o=l=>{l.key==="Control"&&(e.current=!0,Qr.success("Control pressed, Handling control press events")),l.key==="Alt"&&(t.current=!0,Qr.success("Alt pressed, Handling alt press events")),l.key==="Command"&&(e.current=!0,Qr.success("Command pressed, Handling command press events"))},i=l=>{l.key==="Control"&&(e.current=!1),l.key==="Alt"&&(t.current=!1),l.key==="Command"&&(e.current=!1)},a=()=>{document.hidden&&(e.current=!1,t.current=!1)},s=()=>{e.current=!1,t.current=!1};return window.addEventListener("keydown",o),window.addEventListener("keyup",i),document.addEventListener("visibilitychange",a),window.addEventListener("blur",s),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",i),document.removeEventListener("visibilitychange",a),window.removeEventListener("blur",s)}},[]),{isCtrlPressedFunc:()=>e.current,isAltPressedFunc:()=>t.current}};function zOe(e=1,t=1){const[n,r]=I.useState(e),[o,i]=I.useState(t),a=I.useCallback(u=>{u>=1&&u<=o?r(u):console.error(`Invalid page number: ${u}`)},[o]),s=I.useCallback(()=>{a(n+1)},[n,a]),l=I.useCallback(()=>{a(n-1)},[n,a]);return{currentPage:n,setPage:a,nextPage:s,prevPage:l,totalPages:o,setTotalPages:i}}const cP=(e,t="",n)=>{!n||!e||s9.forEach(e,(r,o)=>{const i=`--${t}${o}`;s9.isObject(r)&&!s9.isArray(r)?cP(r,`${t}${o}-`,n):typeof r=="string"&&n.style.setProperty(i,r)})},uP=(e,t="",n)=>{!n||!e||s9.forEach(e,(r,o)=>{const i=`--${t}${o}`;s9.isObject(r)&&!s9.isArray(r)?uP(r,`${t}${o}-`,n):n.style.removeProperty(i)})},VOe=(e,t="")=>{const n={},r=(o,i)=>{s9.forEach(o,(a,s)=>{const l=`--${t}${i}${s}`;s9.isObject(a)&&!s9.isArray(a)?r(a,`${i}${s}-`):typeof a=="string"&&(n[`${i}${s}`.toUpperCase().replace(/-/g,"_")]=`var(${l})`)})};return r(e,""),n},dP=I.createContext({}),UOe="awi-color-",$Oe="awi-size-",KOe="awi-weight-",pf=(e,t,n)=>(I.useEffect(()=>{if(s9.isEqual(n.current,e))return;const r=document.documentElement;return cP(e,t,r),()=>uP(e,t,r)},[e,n,t]),e?VOe(e,t):{}),ZOe=({theme:e=Q_,log:t=!0,children:n})=>{const r=I.useRef(null),o=I.useRef(null),i=I.useRef(null),a=pf(e.colors,UOe,r),s=pf(e.sizes,$Oe,o),l=pf(e.weights,KOe,i),u=new yEe;return t&&(console.group("Theme Variables"),console.table(a),console.table(s),console.table(l),console.groupEnd()),W.jsx(EEe,{client:u,children:W.jsxs(dP.Provider,{value:{...a,...s,...l},children:[W.jsx(TE,{}),n]})})},QOe=()=>{const e=I.useContext(dP);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},WOe=()=>({success:(e,t)=>p6("success",e,t),error:(e,t)=>p6("error",e,t),info:(e,t)=>p6("info",e,t),warning:(e,t)=>p6("warning",e,t)});exports.AWI_ALL_GLOBALS=Rr;exports.AWI_IMAGE_VALIDITY_HELPER=nE;exports.AnnotationComponentLibrary=XHe;exports.AwiAnnotationHotkeys=yf;exports.AwiAnnotationTools=Rc;exports.AwiCanvasContainer=Ic;exports.AwiCustomConfirmation=YI;exports.AwiEmptyState=Qq;exports.AwiGenerateHeader=HE;exports.AwiHelperMethods=bi;exports.AwiInput=IE;exports.AwiLoadMoreButton=lee;exports.AwiMessageScreen=oc;exports.AwiModal=N8;exports.AwiModalBody=T8;exports.AwiModalFooter=F8;exports.AwiModalHeader=k8;exports.AwiModalRow=bl;exports.AwiPagination=NE;exports.AwiSafeLocalStorage=U9;exports.AwiSamModal=DE;exports.AwiScrollableTableCellList=cee;exports.AwiSlider=PE;exports.AwiTableBar=dOe;exports.AwiTableBody=EE;exports.AwiTableCell=vl;exports.AwiTableHeader=SE;exports.AwiTableHeaders=ME;exports.AwiTableInfinite=_E;exports.AwiTableRow=xg;exports.AwiToastMessage=Qr;exports.AwiUseKeyChecker=Cg;exports.Backdrop=OE;exports.Badge=uee;exports.Button=oi;exports.ButtonGroup=dee;exports.Chart=noe;exports.CompactEventCard=PS;exports.ContactInput=awe;exports.DEFAULT_THEME=Q_;exports.DateRangePicker=dwe;exports.DetectionCarousel=FR;exports.EventPreview=fwe;exports.Heatmap=Fwe;exports.Icon=T0;exports.Input=r4;exports.MapView=jOe;exports.MathAnnotationHelper=Ln;exports.MockImageGenerationHelper=GI;exports.Modal=zwe;exports.Multiselect=Vwe;exports.Pagination=Uwe;exports.Select=TR;exports.Sidebar=$we;exports.Spinner=_g;exports.Switch=Kwe;exports.Table=Zwe;exports.ThemeProvider=ZOe;exports.Toast=VR;exports.ToastProvider=TE;exports.usePagination=zOe;exports.useTheme=QOe;exports.useToast=WOe;
721
+ */var vOe=Rl.exports,z_;function bOe(){return z_||(z_=1,function(e,t){(function(n,r){r(t)})(vOe,function(n){var r="1.9.4";function o(f){var v,O,F,q;for(O=1,F=arguments.length;O<F;O++){q=arguments[O];for(v in q)f[v]=q[v]}return f}var i=Object.create||function(){function f(){}return function(v){return f.prototype=v,new f}}();function a(f,v){var O=Array.prototype.slice;if(f.bind)return f.bind.apply(f,O.call(arguments,1));var F=O.call(arguments,2);return function(){return f.apply(v,F.length?F.concat(O.call(arguments)):arguments)}}var s=0;function l(f){return"_leaflet_id"in f||(f._leaflet_id=++s),f._leaflet_id}function u(f,v,O){var F,q,re,Oe;return Oe=function(){F=!1,q&&(re.apply(O,q),q=!1)},re=function(){F?q=arguments:(f.apply(O,arguments),setTimeout(Oe,v),F=!0)},re}function d(f,v,O){var F=v[1],q=v[0],re=F-q;return f===F&&O?f:((f-q)%re+re)%re+q}function h(){return!1}function C(f,v){if(v===!1)return f;var O=Math.pow(10,v===void 0?6:v);return Math.round(f*O)/O}function m(f){return f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")}function A(f){return m(f).split(/\s+/)}function b(f,v){Object.prototype.hasOwnProperty.call(f,"options")||(f.options=f.options?i(f.options):{});for(var O in v)f.options[O]=v[O];return f.options}function p(f,v,O){var F=[];for(var q in f)F.push(encodeURIComponent(O?q.toUpperCase():q)+"="+encodeURIComponent(f[q]));return(!v||v.indexOf("?")===-1?"?":"&")+F.join("&")}var _=/\{ *([\w_ -]+) *\}/g;function w(f,v){return f.replace(_,function(O,F){var q=v[F];if(q===void 0)throw new Error("No value provided for variable "+O);return typeof q=="function"&&(q=q(v)),q})}var x=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"};function E(f,v){for(var O=0;O<f.length;O++)if(f[O]===v)return O;return-1}var S="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function M(f){return window["webkit"+f]||window["moz"+f]||window["ms"+f]}var H=0;function B(f){var v=+new Date,O=Math.max(0,16-(v-H));return H=v+O,window.setTimeout(f,O)}var P=window.requestAnimationFrame||M("RequestAnimationFrame")||B,D=window.cancelAnimationFrame||M("CancelAnimationFrame")||M("CancelRequestAnimationFrame")||function(f){window.clearTimeout(f)};function N(f,v,O){if(O&&P===B)f.call(v);else return P.call(window,a(f,v))}function T(f){f&&D.call(window,f)}var j={__proto__:null,extend:o,create:i,bind:a,get lastId(){return s},stamp:l,throttle:u,wrapNum:d,falseFn:h,formatNum:C,trim:m,splitWords:A,setOptions:b,getParamString:p,template:w,isArray:x,indexOf:E,emptyImageUrl:S,requestFn:P,cancelFn:D,requestAnimFrame:N,cancelAnimFrame:T};function V(){}V.extend=function(f){var v=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},O=v.__super__=this.prototype,F=i(O);F.constructor=v,v.prototype=F;for(var q in this)Object.prototype.hasOwnProperty.call(this,q)&&q!=="prototype"&&q!=="__super__"&&(v[q]=this[q]);return f.statics&&o(v,f.statics),f.includes&&(z(f.includes),o.apply(null,[F].concat(f.includes))),o(F,f),delete F.statics,delete F.includes,F.options&&(F.options=O.options?i(O.options):{},o(F.options,f.options)),F._initHooks=[],F.callInitHooks=function(){if(!this._initHooksCalled){O.callInitHooks&&O.callInitHooks.call(this),this._initHooksCalled=!0;for(var re=0,Oe=F._initHooks.length;re<Oe;re++)F._initHooks[re].call(this)}},v},V.include=function(f){var v=this.prototype.options;return o(this.prototype,f),f.options&&(this.prototype.options=v,this.mergeOptions(f.options)),this},V.mergeOptions=function(f){return o(this.prototype.options,f),this},V.addInitHook=function(f){var v=Array.prototype.slice.call(arguments,1),O=typeof f=="function"?f:function(){this[f].apply(this,v)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(O),this};function z(f){if(!(typeof L>"u"||!L||!L.Mixin)){f=x(f)?f:[f];for(var v=0;v<f.length;v++)f[v]===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 k={on:function(f,v,O){if(typeof f=="object")for(var F in f)this._on(F,f[F],v);else{f=A(f);for(var q=0,re=f.length;q<re;q++)this._on(f[q],v,O)}return this},off:function(f,v,O){if(!arguments.length)delete this._events;else if(typeof f=="object")for(var F in f)this._off(F,f[F],v);else{f=A(f);for(var q=arguments.length===1,re=0,Oe=f.length;re<Oe;re++)q?this._off(f[re]):this._off(f[re],v,O)}return this},_on:function(f,v,O,F){if(typeof v!="function"){console.warn("wrong listener type: "+typeof v);return}if(this._listens(f,v,O)===!1){O===this&&(O=void 0);var q={fn:v,ctx:O};F&&(q.once=!0),this._events=this._events||{},this._events[f]=this._events[f]||[],this._events[f].push(q)}},_off:function(f,v,O){var F,q,re;if(this._events&&(F=this._events[f],!!F)){if(arguments.length===1){if(this._firingCount)for(q=0,re=F.length;q<re;q++)F[q].fn=h;delete this._events[f];return}if(typeof v!="function"){console.warn("wrong listener type: "+typeof v);return}var Oe=this._listens(f,v,O);if(Oe!==!1){var Qe=F[Oe];this._firingCount&&(Qe.fn=h,this._events[f]=F=F.slice()),F.splice(Oe,1)}}},fire:function(f,v,O){if(!this.listens(f,O))return this;var F=o({},v,{type:f,target:this,sourceTarget:v&&v.sourceTarget||this});if(this._events){var q=this._events[f];if(q){this._firingCount=this._firingCount+1||1;for(var re=0,Oe=q.length;re<Oe;re++){var Qe=q[re],Xe=Qe.fn;Qe.once&&this.off(f,Xe,Qe.ctx),Xe.call(Qe.ctx||this,F)}this._firingCount--}}return O&&this._propagateEvent(F),this},listens:function(f,v,O,F){typeof f!="string"&&console.warn('"string" type argument expected');var q=v;typeof v!="function"&&(F=!!v,q=void 0,O=void 0);var re=this._events&&this._events[f];if(re&&re.length&&this._listens(f,q,O)!==!1)return!0;if(F){for(var Oe in this._eventParents)if(this._eventParents[Oe].listens(f,v,O,F))return!0}return!1},_listens:function(f,v,O){if(!this._events)return!1;var F=this._events[f]||[];if(!v)return!!F.length;O===this&&(O=void 0);for(var q=0,re=F.length;q<re;q++)if(F[q].fn===v&&F[q].ctx===O)return q;return!1},once:function(f,v,O){if(typeof f=="object")for(var F in f)this._on(F,f[F],v,!0);else{f=A(f);for(var q=0,re=f.length;q<re;q++)this._on(f[q],v,O,!0)}return this},addEventParent:function(f){return this._eventParents=this._eventParents||{},this._eventParents[l(f)]=f,this},removeEventParent:function(f){return this._eventParents&&delete this._eventParents[l(f)],this},_propagateEvent:function(f){for(var v in this._eventParents)this._eventParents[v].fire(f.type,o({layer:f.target,propagatedFrom:f.target},f),!0)}};k.addEventListener=k.on,k.removeEventListener=k.clearAllEventListeners=k.off,k.addOneTimeEventListener=k.once,k.fireEvent=k.fire,k.hasEventListeners=k.listens;var K=V.extend(k);function $(f,v,O){this.x=O?Math.round(f):f,this.y=O?Math.round(v):v}var X=Math.trunc||function(f){return f>0?Math.floor(f):Math.ceil(f)};$.prototype={clone:function(){return new $(this.x,this.y)},add:function(f){return this.clone()._add(Z(f))},_add:function(f){return this.x+=f.x,this.y+=f.y,this},subtract:function(f){return this.clone()._subtract(Z(f))},_subtract:function(f){return this.x-=f.x,this.y-=f.y,this},divideBy:function(f){return this.clone()._divideBy(f)},_divideBy:function(f){return this.x/=f,this.y/=f,this},multiplyBy:function(f){return this.clone()._multiplyBy(f)},_multiplyBy:function(f){return this.x*=f,this.y*=f,this},scaleBy:function(f){return new $(this.x*f.x,this.y*f.y)},unscaleBy:function(f){return new $(this.x/f.x,this.y/f.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=X(this.x),this.y=X(this.y),this},distanceTo:function(f){f=Z(f);var v=f.x-this.x,O=f.y-this.y;return Math.sqrt(v*v+O*O)},equals:function(f){return f=Z(f),f.x===this.x&&f.y===this.y},contains:function(f){return f=Z(f),Math.abs(f.x)<=Math.abs(this.x)&&Math.abs(f.y)<=Math.abs(this.y)},toString:function(){return"Point("+C(this.x)+", "+C(this.y)+")"}};function Z(f,v,O){return f instanceof $?f:x(f)?new $(f[0],f[1]):f==null?f:typeof f=="object"&&"x"in f&&"y"in f?new $(f.x,f.y):new $(f,v,O)}function U(f,v){if(f)for(var O=v?[f,v]:f,F=0,q=O.length;F<q;F++)this.extend(O[F])}U.prototype={extend:function(f){var v,O;if(!f)return this;if(f instanceof $||typeof f[0]=="number"||"x"in f)v=O=Z(f);else if(f=Y(f),v=f.min,O=f.max,!v||!O)return this;return!this.min&&!this.max?(this.min=v.clone(),this.max=O.clone()):(this.min.x=Math.min(v.x,this.min.x),this.max.x=Math.max(O.x,this.max.x),this.min.y=Math.min(v.y,this.min.y),this.max.y=Math.max(O.y,this.max.y)),this},getCenter:function(f){return Z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,f)},getBottomLeft:function(){return Z(this.min.x,this.max.y)},getTopRight:function(){return Z(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(f){var v,O;return typeof f[0]=="number"||f instanceof $?f=Z(f):f=Y(f),f instanceof U?(v=f.min,O=f.max):v=O=f,v.x>=this.min.x&&O.x<=this.max.x&&v.y>=this.min.y&&O.y<=this.max.y},intersects:function(f){f=Y(f);var v=this.min,O=this.max,F=f.min,q=f.max,re=q.x>=v.x&&F.x<=O.x,Oe=q.y>=v.y&&F.y<=O.y;return re&&Oe},overlaps:function(f){f=Y(f);var v=this.min,O=this.max,F=f.min,q=f.max,re=q.x>v.x&&F.x<O.x,Oe=q.y>v.y&&F.y<O.y;return re&&Oe},isValid:function(){return!!(this.min&&this.max)},pad:function(f){var v=this.min,O=this.max,F=Math.abs(v.x-O.x)*f,q=Math.abs(v.y-O.y)*f;return Y(Z(v.x-F,v.y-q),Z(O.x+F,O.y+q))},equals:function(f){return f?(f=Y(f),this.min.equals(f.getTopLeft())&&this.max.equals(f.getBottomRight())):!1}};function Y(f,v){return!f||f instanceof U?f:new U(f,v)}function J(f,v){if(f)for(var O=v?[f,v]:f,F=0,q=O.length;F<q;F++)this.extend(O[F])}J.prototype={extend:function(f){var v=this._southWest,O=this._northEast,F,q;if(f instanceof ee)F=f,q=f;else if(f instanceof J){if(F=f._southWest,q=f._northEast,!F||!q)return this}else return f?this.extend(oe(f)||G(f)):this;return!v&&!O?(this._southWest=new ee(F.lat,F.lng),this._northEast=new ee(q.lat,q.lng)):(v.lat=Math.min(F.lat,v.lat),v.lng=Math.min(F.lng,v.lng),O.lat=Math.max(q.lat,O.lat),O.lng=Math.max(q.lng,O.lng)),this},pad:function(f){var v=this._southWest,O=this._northEast,F=Math.abs(v.lat-O.lat)*f,q=Math.abs(v.lng-O.lng)*f;return new J(new ee(v.lat-F,v.lng-q),new ee(O.lat+F,O.lng+q))},getCenter:function(){return new ee((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 ee(this.getNorth(),this.getWest())},getSouthEast:function(){return new ee(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(f){typeof f[0]=="number"||f instanceof ee||"lat"in f?f=oe(f):f=G(f);var v=this._southWest,O=this._northEast,F,q;return f instanceof J?(F=f.getSouthWest(),q=f.getNorthEast()):F=q=f,F.lat>=v.lat&&q.lat<=O.lat&&F.lng>=v.lng&&q.lng<=O.lng},intersects:function(f){f=G(f);var v=this._southWest,O=this._northEast,F=f.getSouthWest(),q=f.getNorthEast(),re=q.lat>=v.lat&&F.lat<=O.lat,Oe=q.lng>=v.lng&&F.lng<=O.lng;return re&&Oe},overlaps:function(f){f=G(f);var v=this._southWest,O=this._northEast,F=f.getSouthWest(),q=f.getNorthEast(),re=q.lat>v.lat&&F.lat<O.lat,Oe=q.lng>v.lng&&F.lng<O.lng;return re&&Oe},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(f,v){return f?(f=G(f),this._southWest.equals(f.getSouthWest(),v)&&this._northEast.equals(f.getNorthEast(),v)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function G(f,v){return f instanceof J?f:new J(f,v)}function ee(f,v,O){if(isNaN(f)||isNaN(v))throw new Error("Invalid LatLng object: ("+f+", "+v+")");this.lat=+f,this.lng=+v,O!==void 0&&(this.alt=+O)}ee.prototype={equals:function(f,v){if(!f)return!1;f=oe(f);var O=Math.max(Math.abs(this.lat-f.lat),Math.abs(this.lng-f.lng));return O<=(v===void 0?1e-9:v)},toString:function(f){return"LatLng("+C(this.lat,f)+", "+C(this.lng,f)+")"},distanceTo:function(f){return se.distance(this,oe(f))},wrap:function(){return se.wrapLatLng(this)},toBounds:function(f){var v=180*f/40075017,O=v/Math.cos(Math.PI/180*this.lat);return G([this.lat-v,this.lng-O],[this.lat+v,this.lng+O])},clone:function(){return new ee(this.lat,this.lng,this.alt)}};function oe(f,v,O){return f instanceof ee?f:x(f)&&typeof f[0]!="object"?f.length===3?new ee(f[0],f[1],f[2]):f.length===2?new ee(f[0],f[1]):null:f==null?f:typeof f=="object"&&"lat"in f?new ee(f.lat,"lng"in f?f.lng:f.lon,f.alt):v===void 0?null:new ee(f,v,O)}var ue={latLngToPoint:function(f,v){var O=this.projection.project(f),F=this.scale(v);return this.transformation._transform(O,F)},pointToLatLng:function(f,v){var O=this.scale(v),F=this.transformation.untransform(f,O);return this.projection.unproject(F)},project:function(f){return this.projection.project(f)},unproject:function(f){return this.projection.unproject(f)},scale:function(f){return 256*Math.pow(2,f)},zoom:function(f){return Math.log(f/256)/Math.LN2},getProjectedBounds:function(f){if(this.infinite)return null;var v=this.projection.bounds,O=this.scale(f),F=this.transformation.transform(v.min,O),q=this.transformation.transform(v.max,O);return new U(F,q)},infinite:!1,wrapLatLng:function(f){var v=this.wrapLng?d(f.lng,this.wrapLng,!0):f.lng,O=this.wrapLat?d(f.lat,this.wrapLat,!0):f.lat,F=f.alt;return new ee(O,v,F)},wrapLatLngBounds:function(f){var v=f.getCenter(),O=this.wrapLatLng(v),F=v.lat-O.lat,q=v.lng-O.lng;if(F===0&&q===0)return f;var re=f.getSouthWest(),Oe=f.getNorthEast(),Qe=new ee(re.lat-F,re.lng-q),Xe=new ee(Oe.lat-F,Oe.lng-q);return new J(Qe,Xe)}},se=o({},ue,{wrapLng:[-180,180],R:6371e3,distance:function(f,v){var O=Math.PI/180,F=f.lat*O,q=v.lat*O,re=Math.sin((v.lat-f.lat)*O/2),Oe=Math.sin((v.lng-f.lng)*O/2),Qe=re*re+Math.cos(F)*Math.cos(q)*Oe*Oe,Xe=2*Math.atan2(Math.sqrt(Qe),Math.sqrt(1-Qe));return this.R*Xe}}),ye=6378137,be={R:ye,MAX_LATITUDE:85.0511287798,project:function(f){var v=Math.PI/180,O=this.MAX_LATITUDE,F=Math.max(Math.min(O,f.lat),-O),q=Math.sin(F*v);return new $(this.R*f.lng*v,this.R*Math.log((1+q)/(1-q))/2)},unproject:function(f){var v=180/Math.PI;return new ee((2*Math.atan(Math.exp(f.y/this.R))-Math.PI/2)*v,f.x*v/this.R)},bounds:function(){var f=ye*Math.PI;return new U([-f,-f],[f,f])}()};function Ce(f,v,O,F){if(x(f)){this._a=f[0],this._b=f[1],this._c=f[2],this._d=f[3];return}this._a=f,this._b=v,this._c=O,this._d=F}Ce.prototype={transform:function(f,v){return this._transform(f.clone(),v)},_transform:function(f,v){return v=v||1,f.x=v*(this._a*f.x+this._b),f.y=v*(this._c*f.y+this._d),f},untransform:function(f,v){return v=v||1,new $((f.x/v-this._b)/this._a,(f.y/v-this._d)/this._c)}};function fe(f,v,O,F){return new Ce(f,v,O,F)}var ae=o({},se,{code:"EPSG:3857",projection:be,transformation:function(){var f=.5/(Math.PI*be.R);return fe(f,.5,-f,.5)}()}),ie=o({},ae,{code:"EPSG:900913"});function Ae(f){return document.createElementNS("http://www.w3.org/2000/svg",f)}function Me(f,v){var O="",F,q,re,Oe,Qe,Xe;for(F=0,re=f.length;F<re;F++){for(Qe=f[F],q=0,Oe=Qe.length;q<Oe;q++)Xe=Qe[q],O+=(q?"L":"M")+Xe.x+" "+Xe.y;O+=v?Ze.svg?"z":"x":""}return O||"M0 0"}var He=document.documentElement.style,de="ActiveXObject"in window,Ye=de&&!document.addEventListener,Je="msLaunchUri"in navigator&&!("documentMode"in document),Ee=Ot("webkit"),Ie=Ot("android"),De=Ot("android 2")||Ot("android 3"),We=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ge=Ie&&Ot("Google")&&We<537&&!("AudioNode"in window),ct=!!window.opera,rt=!Je&&Ot("chrome"),_t=Ot("gecko")&&!Ee&&!ct&&!de,ut=!rt&&Ot("safari"),$e=Ot("phantom"),ke="OTransition"in He,ot=navigator.platform.indexOf("Win")===0,Fe=de&&"transition"in He,Ne="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!De,Ve="MozPerspective"in He,dt=!window.L_DISABLE_3D&&(Fe||Ne||Ve)&&!ke&&!$e,Ke=typeof orientation<"u"||Ot("mobile"),ft=Ke&&Ee,Nt=Ke&&Ne,Qt=!window.PointerEvent&&window.MSPointerEvent,an=!!(window.PointerEvent||Qt),Pn="ontouchstart"in window||!!window.TouchEvent,Yt=!window.L_NO_TOUCH&&(Pn||an),pn=Ke&&ct,vn=Ke&&_t,Wt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Bt=function(){var f=!1;try{var v=Object.defineProperty({},"passive",{get:function(){f=!0}});window.addEventListener("testPassiveEventSupport",h,v),window.removeEventListener("testPassiveEventSupport",h,v)}catch{}return f}(),Ht=function(){return!!document.createElement("canvas").getContext}(),xt=!!(document.createElementNS&&Ae("svg").createSVGRect),Ut=!!xt&&function(){var f=document.createElement("div");return f.innerHTML="<svg/>",(f.firstChild&&f.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),hn=!xt&&function(){try{var f=document.createElement("div");f.innerHTML='<v:shape adj="1"/>';var v=f.firstChild;return v.style.behavior="url(#default#VML)",v&&typeof v.adj=="object"}catch{return!1}}(),gt=navigator.platform.indexOf("Mac")===0,Ct=navigator.platform.indexOf("Linux")===0;function Ot(f){return navigator.userAgent.toLowerCase().indexOf(f)>=0}var Ze={ie:de,ielt9:Ye,edge:Je,webkit:Ee,android:Ie,android23:De,androidStock:Ge,opera:ct,chrome:rt,gecko:_t,safari:ut,phantom:$e,opera12:ke,win:ot,ie3d:Fe,webkit3d:Ne,gecko3d:Ve,any3d:dt,mobile:Ke,mobileWebkit:ft,mobileWebkit3d:Nt,msPointer:Qt,pointer:an,touch:Yt,touchNative:Pn,mobileOpera:pn,mobileGecko:vn,retina:Wt,passiveEvents:Bt,canvas:Ht,svg:xt,vml:hn,inlineSvg:Ut,mac:gt,linux:Ct},Vt=Ze.msPointer?"MSPointerDown":"pointerdown",me=Ze.msPointer?"MSPointerMove":"pointermove",et=Ze.msPointer?"MSPointerUp":"pointerup",je=Ze.msPointer?"MSPointerCancel":"pointercancel",vt={touchstart:Vt,touchmove:me,touchend:et,touchcancel:je},Ue={touchstart:$t,touchmove:kt,touchend:kt,touchcancel:kt},Et={},Rt=!1;function jt(f,v,O){return v==="touchstart"&&qe(),Ue[v]?(O=Ue[v].bind(this,O),f.addEventListener(vt[v],O,!1),O):(console.warn("wrong event specified:",v),h)}function wn(f,v,O){if(!vt[v]){console.warn("wrong event specified:",v);return}f.removeEventListener(vt[v],O,!1)}function mt(f){Et[f.pointerId]=f}function pt(f){Et[f.pointerId]&&(Et[f.pointerId]=f)}function Tt(f){delete Et[f.pointerId]}function qe(){Rt||(document.addEventListener(Vt,mt,!0),document.addEventListener(me,pt,!0),document.addEventListener(et,Tt,!0),document.addEventListener(je,Tt,!0),Rt=!0)}function kt(f,v){if(v.pointerType!==(v.MSPOINTER_TYPE_MOUSE||"mouse")){v.touches=[];for(var O in Et)v.touches.push(Et[O]);v.changedTouches=[v],f(v)}}function $t(f,v){v.MSPOINTER_TYPE_TOUCH&&v.pointerType===v.MSPOINTER_TYPE_TOUCH&&Fn(v),kt(f,v)}function Ar(f){var v={},O,F;for(F in f)O=f[F],v[F]=O&&O.bind?O.bind(f):O;return f=v,v.type="dblclick",v.detail=2,v.isTrusted=!1,v._simulated=!0,v}var Hr=200;function or(f,v){f.addEventListener("dblclick",v);var O=0,F;function q(re){if(re.detail!==1){F=re.detail;return}if(!(re.pointerType==="mouse"||re.sourceCapabilities&&!re.sourceCapabilities.firesTouchEvents)){var Oe=Ha(re);if(!(Oe.some(function(Xe){return Xe instanceof HTMLLabelElement&&Xe.attributes.for})&&!Oe.some(function(Xe){return Xe instanceof HTMLInputElement||Xe instanceof HTMLSelectElement}))){var Qe=Date.now();Qe-O<=Hr?(F++,F===2&&v(Ar(re))):F=1,O=Qe}}}return f.addEventListener("click",q),{dblclick:v,simDblclick:q}}function Jn(f,v){f.removeEventListener("dblclick",v.dblclick),f.removeEventListener("click",v.simDblclick)}var Kn=Ft(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),vr=Ft(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),zr=vr==="webkitTransition"||vr==="OTransition"?vr+"End":"transitionend";function Jt(f){return typeof f=="string"?document.getElementById(f):f}function Sn(f,v){var O=f.style[v]||f.currentStyle&&f.currentStyle[v];if((!O||O==="auto")&&document.defaultView){var F=document.defaultView.getComputedStyle(f,null);O=F?F[v]:null}return O==="auto"?null:O}function Dt(f,v,O){var F=document.createElement(f);return F.className=v||"",O&&O.appendChild(F),F}function cn(f){var v=f.parentNode;v&&v.removeChild(f)}function zn(f){for(;f.firstChild;)f.removeChild(f.firstChild)}function Pr(f){var v=f.parentNode;v&&v.lastChild!==f&&v.appendChild(f)}function nr(f){var v=f.parentNode;v&&v.firstChild!==f&&v.insertBefore(f,v.firstChild)}function br(f,v){if(f.classList!==void 0)return f.classList.contains(v);var O=Mn(f);return O.length>0&&new RegExp("(^|\\s)"+v+"(\\s|$)").test(O)}function gn(f,v){if(f.classList!==void 0)for(var O=A(v),F=0,q=O.length;F<q;F++)f.classList.add(O[F]);else if(!br(f,v)){var re=Mn(f);bn(f,(re?re+" ":"")+v)}}function Kt(f,v){f.classList!==void 0?f.classList.remove(v):bn(f,m((" "+Mn(f)+" ").replace(" "+v+" "," ")))}function bn(f,v){f.className.baseVal===void 0?f.className=v:f.className.baseVal=v}function Mn(f){return f.correspondingElement&&(f=f.correspondingElement),f.className.baseVal===void 0?f.className:f.className.baseVal}function bt(f,v){"opacity"in f.style?f.style.opacity=v:"filter"in f.style&&Pt(f,v)}function Pt(f,v){var O=!1,F="DXImageTransform.Microsoft.Alpha";try{O=f.filters.item(F)}catch{if(v===1)return}v=Math.round(v*100),O?(O.Enabled=v!==100,O.Opacity=v):f.style.filter+=" progid:"+F+"(opacity="+v+")"}function Ft(f){for(var v=document.documentElement.style,O=0;O<f.length;O++)if(f[O]in v)return f[O];return!1}function tt(f,v,O){var F=v||new $(0,0);f.style[Kn]=(Ze.ie3d?"translate("+F.x+"px,"+F.y+"px)":"translate3d("+F.x+"px,"+F.y+"px,0)")+(O?" scale("+O+")":"")}function Cn(f,v){f._leaflet_pos=v,Ze.any3d?tt(f,v):(f.style.left=v.x+"px",f.style.top=v.y+"px")}function Dn(f){return f._leaflet_pos||new $(0,0)}var Dr,sr,o1;if("onselectstart"in document)Dr=function(){Tn(window,"selectstart",Fn)},sr=function(){mn(window,"selectstart",Fn)};else{var un=Ft(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Dr=function(){if(un){var f=document.documentElement.style;o1=f[un],f[un]="none"}},sr=function(){un&&(document.documentElement.style[un]=o1,o1=void 0)}}function yn(){Tn(window,"dragstart",Fn)}function tn(){mn(window,"dragstart",Fn)}var zt,Gt;function Qn(f){for(;f.tabIndex===-1;)f=f.parentNode;f.style&&(Wn(),zt=f,Gt=f.style.outlineStyle,f.style.outlineStyle="none",Tn(window,"keydown",Wn))}function Wn(){zt&&(zt.style.outlineStyle=Gt,zt=void 0,Gt=void 0,mn(window,"keydown",Wn))}function Sr(f){do f=f.parentNode;while((!f.offsetWidth||!f.offsetHeight)&&f!==document.body);return f}function An(f){var v=f.getBoundingClientRect();return{x:v.width/f.offsetWidth||1,y:v.height/f.offsetHeight||1,boundingClientRect:v}}var go={__proto__:null,TRANSFORM:Kn,TRANSITION:vr,TRANSITION_END:zr,get:Jt,getStyle:Sn,create:Dt,remove:cn,empty:zn,toFront:Pr,toBack:nr,hasClass:br,addClass:gn,removeClass:Kt,setClass:bn,getClass:Mn,setOpacity:bt,testProp:Ft,setTransform:tt,setPosition:Cn,getPosition:Dn,get disableTextSelection(){return Dr},get enableTextSelection(){return sr},disableImageDrag:yn,enableImageDrag:tn,preventOutline:Qn,restoreOutline:Wn,getSizedParentNode:Sr,getScale:An};function Tn(f,v,O,F){if(v&&typeof v=="object")for(var q in v)Or(f,q,v[q],O);else{v=A(v);for(var re=0,Oe=v.length;re<Oe;re++)Or(f,v[re],O,F)}return this}var $1="_leaflet_events";function mn(f,v,O,F){if(arguments.length===1)dn(f),delete f[$1];else if(v&&typeof v=="object")for(var q in v)n1(f,q,v[q],O);else if(v=A(v),arguments.length===2)dn(f,function(Qe){return E(v,Qe)!==-1});else for(var re=0,Oe=v.length;re<Oe;re++)n1(f,v[re],O,F);return this}function dn(f,v){for(var O in f[$1]){var F=O.split(/\d/)[0];(!v||v(F))&&n1(f,F,null,null,O)}}var On={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Or(f,v,O,F){var q=v+l(O)+(F?"_"+l(F):"");if(f[$1]&&f[$1][q])return this;var re=function(Qe){return O.call(F||f,Qe||window.event)},Oe=re;!Ze.touchNative&&Ze.pointer&&v.indexOf("touch")===0?re=jt(f,v,re):Ze.touch&&v==="dblclick"?re=or(f,re):"addEventListener"in f?v==="touchstart"||v==="touchmove"||v==="wheel"||v==="mousewheel"?f.addEventListener(On[v]||v,re,Ze.passiveEvents?{passive:!1}:!1):v==="mouseenter"||v==="mouseleave"?(re=function(Qe){Qe=Qe||window.event,i0(f,Qe)&&Oe(Qe)},f.addEventListener(On[v],re,!1)):f.addEventListener(v,Oe,!1):f.attachEvent("on"+v,re),f[$1]=f[$1]||{},f[$1][q]=re}function n1(f,v,O,F,q){q=q||v+l(O)+(F?"_"+l(F):"");var re=f[$1]&&f[$1][q];if(!re)return this;!Ze.touchNative&&Ze.pointer&&v.indexOf("touch")===0?wn(f,v,re):Ze.touch&&v==="dblclick"?Jn(f,re):"removeEventListener"in f?f.removeEventListener(On[v]||v,re,!1):f.detachEvent("on"+v,re),f[$1][q]=null}function Mr(f){return f.stopPropagation?f.stopPropagation():f.originalEvent?f.originalEvent._stopped=!0:f.cancelBubble=!0,this}function Li(f){return Or(f,"wheel",Mr),this}function Oo(f){return Tn(f,"mousedown touchstart dblclick contextmenu",Mr),f._leaflet_disable_click=!0,this}function Fn(f){return f.preventDefault?f.preventDefault():f.returnValue=!1,this}function er(f){return Fn(f),Mr(f),this}function Ha(f){if(f.composedPath)return f.composedPath();for(var v=[],O=f.target;O;)v.push(O),O=O.parentNode;return v}function J0(f,v){if(!v)return new $(f.clientX,f.clientY);var O=An(v),F=O.boundingClientRect;return new $((f.clientX-F.left)/O.x-v.clientLeft,(f.clientY-F.top)/O.y-v.clientTop)}var o0=Ze.linux&&Ze.chrome?window.devicePixelRatio:Ze.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Bi(f){return Ze.edge?f.wheelDeltaY/2:f.deltaY&&f.deltaMode===0?-f.deltaY/o0:f.deltaY&&f.deltaMode===1?-f.deltaY*20:f.deltaY&&f.deltaMode===2?-f.deltaY*60:f.deltaX||f.deltaZ?0:f.wheelDelta?(f.wheelDeltaY||f.wheelDelta)/2:f.detail&&Math.abs(f.detail)<32765?-f.detail*20:f.detail?f.detail/-32765*60:0}function i0(f,v){var O=v.relatedTarget;if(!O)return!0;try{for(;O&&O!==f;)O=O.parentNode}catch{return!1}return O!==f}var es={__proto__:null,on:Tn,off:mn,stopPropagation:Mr,disableScrollPropagation:Li,disableClickPropagation:Oo,preventDefault:Fn,stop:er,getPropagationPath:Ha,getMousePosition:J0,getWheelDelta:Bi,isExternalTarget:i0,addListener:Tn,removeListener:mn},ts=K.extend({run:function(f,v,O,F){this.stop(),this._el=f,this._inProgress=!0,this._duration=O||.25,this._easeOutPower=1/Math.max(F||.5,.2),this._startPos=Dn(f),this._offset=v.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=N(this._animate,this),this._step()},_step:function(f){var v=+new Date-this._startTime,O=this._duration*1e3;v<O?this._runFrame(this._easeOut(v/O),f):(this._runFrame(1),this._complete())},_runFrame:function(f,v){var O=this._startPos.add(this._offset.multiplyBy(f));v&&O._round(),Cn(this._el,O),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(f){return 1-Math.pow(1-f,this._easeOutPower)}}),fr=K.extend({options:{crs:ae,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(f,v){v=b(this,v),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(f),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),v.maxBounds&&this.setMaxBounds(v.maxBounds),v.zoom!==void 0&&(this._zoom=this._limitZoom(v.zoom)),v.center&&v.zoom!==void 0&&this.setView(oe(v.center),v.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=vr&&Ze.any3d&&!Ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Tn(this._proxy,zr,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(f,v,O){if(v=v===void 0?this._zoom:this._limitZoom(v),f=this._limitCenter(oe(f),v,this.options.maxBounds),O=O||{},this._stop(),this._loaded&&!O.reset&&O!==!0){O.animate!==void 0&&(O.zoom=o({animate:O.animate},O.zoom),O.pan=o({animate:O.animate,duration:O.duration},O.pan));var F=this._zoom!==v?this._tryAnimatedZoom&&this._tryAnimatedZoom(f,v,O.zoom):this._tryAnimatedPan(f,O.pan);if(F)return clearTimeout(this._sizeTimer),this}return this._resetView(f,v,O.pan&&O.pan.noMoveStart),this},setZoom:function(f,v){return this._loaded?this.setView(this.getCenter(),f,{zoom:v}):(this._zoom=f,this)},zoomIn:function(f,v){return f=f||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+f,v)},zoomOut:function(f,v){return f=f||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-f,v)},setZoomAround:function(f,v,O){var F=this.getZoomScale(v),q=this.getSize().divideBy(2),re=f instanceof $?f:this.latLngToContainerPoint(f),Oe=re.subtract(q).multiplyBy(1-1/F),Qe=this.containerPointToLatLng(q.add(Oe));return this.setView(Qe,v,{zoom:O})},_getBoundsCenterZoom:function(f,v){v=v||{},f=f.getBounds?f.getBounds():G(f);var O=Z(v.paddingTopLeft||v.padding||[0,0]),F=Z(v.paddingBottomRight||v.padding||[0,0]),q=this.getBoundsZoom(f,!1,O.add(F));if(q=typeof v.maxZoom=="number"?Math.min(v.maxZoom,q):q,q===1/0)return{center:f.getCenter(),zoom:q};var re=F.subtract(O).divideBy(2),Oe=this.project(f.getSouthWest(),q),Qe=this.project(f.getNorthEast(),q),Xe=this.unproject(Oe.add(Qe).divideBy(2).add(re),q);return{center:Xe,zoom:q}},fitBounds:function(f,v){if(f=G(f),!f.isValid())throw new Error("Bounds are not valid.");var O=this._getBoundsCenterZoom(f,v);return this.setView(O.center,O.zoom,v)},fitWorld:function(f){return this.fitBounds([[-90,-180],[90,180]],f)},panTo:function(f,v){return this.setView(f,this._zoom,{pan:v})},panBy:function(f,v){if(f=Z(f).round(),v=v||{},!f.x&&!f.y)return this.fire("moveend");if(v.animate!==!0&&!this.getSize().contains(f))return this._resetView(this.unproject(this.project(this.getCenter()).add(f)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ts,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),v.noMoveStart||this.fire("movestart"),v.animate!==!1){gn(this._mapPane,"leaflet-pan-anim");var O=this._getMapPanePos().subtract(f).round();this._panAnim.run(this._mapPane,O,v.duration||.25,v.easeLinearity)}else this._rawPanBy(f),this.fire("move").fire("moveend");return this},flyTo:function(f,v,O){if(O=O||{},O.animate===!1||!Ze.any3d)return this.setView(f,v,O);this._stop();var F=this.project(this.getCenter()),q=this.project(f),re=this.getSize(),Oe=this._zoom;f=oe(f),v=v===void 0?Oe:v;var Qe=Math.max(re.x,re.y),Xe=Qe*this.getZoomScale(Oe,v),Lt=q.distanceTo(F)||1,nn=1.42,Bn=nn*nn;function Yn(Zt){var wr=Zt?-1:1,le=Zt?Xe:Qe,c1=Xe*Xe-Qe*Qe+wr*Bn*Bn*Lt*Lt,S1=2*le*Bn*Lt,Cr=c1/S1,rn=Math.sqrt(Cr*Cr+1)-Cr,y1=rn<1e-9?-18:Math.log(rn);return y1}function l1(Zt){return(Math.exp(Zt)-Math.exp(-Zt))/2}function pe(Zt){return(Math.exp(Zt)+Math.exp(-Zt))/2}function he(Zt){return l1(Zt)/pe(Zt)}var we=Yn(0);function Re(Zt){return Qe*(pe(we)/pe(we+nn*Zt))}function Le(Zt){return Qe*(pe(we)*he(we+nn*Zt)-l1(we))/Bn}function at(Zt){return 1-Math.pow(1-Zt,1.5)}var yt=Date.now(),qt=(Yn(1)-we)/nn,fn=O.duration?1e3*O.duration:1e3*qt*.8;function lt(){var Zt=(Date.now()-yt)/fn,wr=at(Zt)*qt;Zt<=1?(this._flyToFrame=N(lt,this),this._move(this.unproject(F.add(q.subtract(F).multiplyBy(Le(wr)/Lt)),Oe),this.getScaleZoom(Qe/Re(wr),Oe),{flyTo:!0})):this._move(f,v)._moveEnd(!0)}return this._moveStart(!0,O.noMoveStart),lt.call(this),this},flyToBounds:function(f,v){var O=this._getBoundsCenterZoom(f,v);return this.flyTo(O.center,O.zoom,v)},setMaxBounds:function(f){return f=G(f),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),f.isValid()?(this.options.maxBounds=f,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(f){var v=this.options.minZoom;return this.options.minZoom=f,this._loaded&&v!==f&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(f):this},setMaxZoom:function(f){var v=this.options.maxZoom;return this.options.maxZoom=f,this._loaded&&v!==f&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(f):this},panInsideBounds:function(f,v){this._enforcingBounds=!0;var O=this.getCenter(),F=this._limitCenter(O,this._zoom,G(f));return O.equals(F)||this.panTo(F,v),this._enforcingBounds=!1,this},panInside:function(f,v){v=v||{};var O=Z(v.paddingTopLeft||v.padding||[0,0]),F=Z(v.paddingBottomRight||v.padding||[0,0]),q=this.project(this.getCenter()),re=this.project(f),Oe=this.getPixelBounds(),Qe=Y([Oe.min.add(O),Oe.max.subtract(F)]),Xe=Qe.getSize();if(!Qe.contains(re)){this._enforcingBounds=!0;var Lt=re.subtract(Qe.getCenter()),nn=Qe.extend(re).getSize().subtract(Xe);q.x+=Lt.x<0?-nn.x:nn.x,q.y+=Lt.y<0?-nn.y:nn.y,this.panTo(this.unproject(q),v),this._enforcingBounds=!1}return this},invalidateSize:function(f){if(!this._loaded)return this;f=o({animate:!1,pan:!0},f===!0?{animate:!0}:f);var v=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var O=this.getSize(),F=v.divideBy(2).round(),q=O.divideBy(2).round(),re=F.subtract(q);return!re.x&&!re.y?this:(f.animate&&f.pan?this.panBy(re):(f.pan&&this._rawPanBy(re),this.fire("move"),f.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:v,newSize:O}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(f){if(f=this._locateOptions=o({timeout:1e4,watch:!1},f),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var v=a(this._handleGeolocationResponse,this),O=a(this._handleGeolocationError,this);return f.watch?this._locationWatchId=navigator.geolocation.watchPosition(v,O,f):navigator.geolocation.getCurrentPosition(v,O,f),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(f){if(this._container._leaflet_id){var v=f.code,O=f.message||(v===1?"permission denied":v===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:v,message:"Geolocation error: "+O+"."})}},_handleGeolocationResponse:function(f){if(this._container._leaflet_id){var v=f.coords.latitude,O=f.coords.longitude,F=new ee(v,O),q=F.toBounds(f.coords.accuracy*2),re=this._locateOptions;if(re.setView){var Oe=this.getBoundsZoom(q);this.setView(F,re.maxZoom?Math.min(Oe,re.maxZoom):Oe)}var Qe={latlng:F,bounds:q,timestamp:f.timestamp};for(var Xe in f.coords)typeof f.coords[Xe]=="number"&&(Qe[Xe]=f.coords[Xe]);this.fire("locationfound",Qe)}},addHandler:function(f,v){if(!v)return this;var O=this[f]=new v(this);return this._handlers.push(O),this.options[f]&&O.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(),cn(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var f;for(f in this._layers)this._layers[f].remove();for(f in this._panes)cn(this._panes[f]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(f,v){var O="leaflet-pane"+(f?" leaflet-"+f.replace("Pane","")+"-pane":""),F=Dt("div",O,v||this._mapPane);return f&&(this._panes[f]=F),F},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var f=this.getPixelBounds(),v=this.unproject(f.getBottomLeft()),O=this.unproject(f.getTopRight());return new J(v,O)},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(f,v,O){f=G(f),O=Z(O||[0,0]);var F=this.getZoom()||0,q=this.getMinZoom(),re=this.getMaxZoom(),Oe=f.getNorthWest(),Qe=f.getSouthEast(),Xe=this.getSize().subtract(O),Lt=Y(this.project(Qe,F),this.project(Oe,F)).getSize(),nn=Ze.any3d?this.options.zoomSnap:1,Bn=Xe.x/Lt.x,Yn=Xe.y/Lt.y,l1=v?Math.max(Bn,Yn):Math.min(Bn,Yn);return F=this.getScaleZoom(l1,F),nn&&(F=Math.round(F/(nn/100))*(nn/100),F=v?Math.ceil(F/nn)*nn:Math.floor(F/nn)*nn),Math.max(q,Math.min(re,F))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new $(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(f,v){var O=this._getTopLeftPoint(f,v);return new U(O,O.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(f){return this.options.crs.getProjectedBounds(f===void 0?this.getZoom():f)},getPane:function(f){return typeof f=="string"?this._panes[f]:f},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(f,v){var O=this.options.crs;return v=v===void 0?this._zoom:v,O.scale(f)/O.scale(v)},getScaleZoom:function(f,v){var O=this.options.crs;v=v===void 0?this._zoom:v;var F=O.zoom(f*O.scale(v));return isNaN(F)?1/0:F},project:function(f,v){return v=v===void 0?this._zoom:v,this.options.crs.latLngToPoint(oe(f),v)},unproject:function(f,v){return v=v===void 0?this._zoom:v,this.options.crs.pointToLatLng(Z(f),v)},layerPointToLatLng:function(f){var v=Z(f).add(this.getPixelOrigin());return this.unproject(v)},latLngToLayerPoint:function(f){var v=this.project(oe(f))._round();return v._subtract(this.getPixelOrigin())},wrapLatLng:function(f){return this.options.crs.wrapLatLng(oe(f))},wrapLatLngBounds:function(f){return this.options.crs.wrapLatLngBounds(G(f))},distance:function(f,v){return this.options.crs.distance(oe(f),oe(v))},containerPointToLayerPoint:function(f){return Z(f).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(f){return Z(f).add(this._getMapPanePos())},containerPointToLatLng:function(f){var v=this.containerPointToLayerPoint(Z(f));return this.layerPointToLatLng(v)},latLngToContainerPoint:function(f){return this.layerPointToContainerPoint(this.latLngToLayerPoint(oe(f)))},mouseEventToContainerPoint:function(f){return J0(f,this._container)},mouseEventToLayerPoint:function(f){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(f))},mouseEventToLatLng:function(f){return this.layerPointToLatLng(this.mouseEventToLayerPoint(f))},_initContainer:function(f){var v=this._container=Jt(f);if(v){if(v._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Tn(v,"scroll",this._onScroll,this),this._containerId=l(v)},_initLayout:function(){var f=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ze.any3d,gn(f,"leaflet-container"+(Ze.touch?" leaflet-touch":"")+(Ze.retina?" leaflet-retina":"")+(Ze.ielt9?" leaflet-oldie":"")+(Ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var v=Sn(f,"position");v!=="absolute"&&v!=="relative"&&v!=="fixed"&&v!=="sticky"&&(f.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var f=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Cn(this._mapPane,new $(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(gn(f.markerPane,"leaflet-zoom-hide"),gn(f.shadowPane,"leaflet-zoom-hide"))},_resetView:function(f,v,O){Cn(this._mapPane,new $(0,0));var F=!this._loaded;this._loaded=!0,v=this._limitZoom(v),this.fire("viewprereset");var q=this._zoom!==v;this._moveStart(q,O)._move(f,v)._moveEnd(q),this.fire("viewreset"),F&&this.fire("load")},_moveStart:function(f,v){return f&&this.fire("zoomstart"),v||this.fire("movestart"),this},_move:function(f,v,O,F){v===void 0&&(v=this._zoom);var q=this._zoom!==v;return this._zoom=v,this._lastCenter=f,this._pixelOrigin=this._getNewPixelOrigin(f),F?O&&O.pinch&&this.fire("zoom",O):((q||O&&O.pinch)&&this.fire("zoom",O),this.fire("move",O)),this},_moveEnd:function(f){return f&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(f){Cn(this._mapPane,this._getMapPanePos().subtract(f))},_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(f){this._targets={},this._targets[l(this._container)]=this;var v=f?mn:Tn;v(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&v(window,"resize",this._onResize,this),Ze.any3d&&this.options.transform3DLimit&&(f?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var f=this._getMapPanePos();Math.max(Math.abs(f.x),Math.abs(f.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(f,v){for(var O=[],F,q=v==="mouseout"||v==="mouseover",re=f.target||f.srcElement,Oe=!1;re;){if(F=this._targets[l(re)],F&&(v==="click"||v==="preclick")&&this._draggableMoved(F)){Oe=!0;break}if(F&&F.listens(v,!0)&&(q&&!i0(re,f)||(O.push(F),q))||re===this._container)break;re=re.parentNode}return!O.length&&!Oe&&!q&&this.listens(v,!0)&&(O=[this]),O},_isClickDisabled:function(f){for(;f&&f!==this._container;){if(f._leaflet_disable_click)return!0;f=f.parentNode}},_handleDOMEvent:function(f){var v=f.target||f.srcElement;if(!(!this._loaded||v._leaflet_disable_events||f.type==="click"&&this._isClickDisabled(v))){var O=f.type;O==="mousedown"&&Qn(v),this._fireDOMEvent(f,O)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(f,v,O){if(f.type==="click"){var F=o({},f);F.type="preclick",this._fireDOMEvent(F,F.type,O)}var q=this._findEventTargets(f,v);if(O){for(var re=[],Oe=0;Oe<O.length;Oe++)O[Oe].listens(v,!0)&&re.push(O[Oe]);q=re.concat(q)}if(q.length){v==="contextmenu"&&Fn(f);var Qe=q[0],Xe={originalEvent:f};if(f.type!=="keypress"&&f.type!=="keydown"&&f.type!=="keyup"){var Lt=Qe.getLatLng&&(!Qe._radius||Qe._radius<=10);Xe.containerPoint=Lt?this.latLngToContainerPoint(Qe.getLatLng()):this.mouseEventToContainerPoint(f),Xe.layerPoint=this.containerPointToLayerPoint(Xe.containerPoint),Xe.latlng=Lt?Qe.getLatLng():this.layerPointToLatLng(Xe.layerPoint)}for(Oe=0;Oe<q.length;Oe++)if(q[Oe].fire(v,Xe,!0),Xe.originalEvent._stopped||q[Oe].options.bubblingMouseEvents===!1&&E(this._mouseEvents,v)!==-1)return}},_draggableMoved:function(f){return f=f.dragging&&f.dragging.enabled()?f:this,f.dragging&&f.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var f=0,v=this._handlers.length;f<v;f++)this._handlers[f].disable()},whenReady:function(f,v){return this._loaded?f.call(v||this,{target:this}):this.on("load",f,v),this},_getMapPanePos:function(){return Dn(this._mapPane)||new $(0,0)},_moved:function(){var f=this._getMapPanePos();return f&&!f.equals([0,0])},_getTopLeftPoint:function(f,v){var O=f&&v!==void 0?this._getNewPixelOrigin(f,v):this.getPixelOrigin();return O.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(f,v){var O=this.getSize()._divideBy(2);return this.project(f,v)._subtract(O)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(f,v,O){var F=this._getNewPixelOrigin(O,v);return this.project(f,v)._subtract(F)},_latLngBoundsToNewLayerBounds:function(f,v,O){var F=this._getNewPixelOrigin(O,v);return Y([this.project(f.getSouthWest(),v)._subtract(F),this.project(f.getNorthWest(),v)._subtract(F),this.project(f.getSouthEast(),v)._subtract(F),this.project(f.getNorthEast(),v)._subtract(F)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(f){return this.latLngToLayerPoint(f).subtract(this._getCenterLayerPoint())},_limitCenter:function(f,v,O){if(!O)return f;var F=this.project(f,v),q=this.getSize().divideBy(2),re=new U(F.subtract(q),F.add(q)),Oe=this._getBoundsOffset(re,O,v);return Math.abs(Oe.x)<=1&&Math.abs(Oe.y)<=1?f:this.unproject(F.add(Oe),v)},_limitOffset:function(f,v){if(!v)return f;var O=this.getPixelBounds(),F=new U(O.min.add(f),O.max.add(f));return f.add(this._getBoundsOffset(F,v))},_getBoundsOffset:function(f,v,O){var F=Y(this.project(v.getNorthEast(),O),this.project(v.getSouthWest(),O)),q=F.min.subtract(f.min),re=F.max.subtract(f.max),Oe=this._rebound(q.x,-re.x),Qe=this._rebound(q.y,-re.y);return new $(Oe,Qe)},_rebound:function(f,v){return f+v>0?Math.round(f-v)/2:Math.max(0,Math.ceil(f))-Math.max(0,Math.floor(v))},_limitZoom:function(f){var v=this.getMinZoom(),O=this.getMaxZoom(),F=Ze.any3d?this.options.zoomSnap:1;return F&&(f=Math.round(f/F)*F),Math.max(v,Math.min(O,f))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Kt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(f,v){var O=this._getCenterOffset(f)._trunc();return(v&&v.animate)!==!0&&!this.getSize().contains(O)?!1:(this.panBy(O,v),!0)},_createAnimProxy:function(){var f=this._proxy=Dt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(f),this.on("zoomanim",function(v){var O=Kn,F=this._proxy.style[O];tt(this._proxy,this.project(v.center,v.zoom),this.getZoomScale(v.zoom,1)),F===this._proxy.style[O]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){cn(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var f=this.getCenter(),v=this.getZoom();tt(this._proxy,this.project(f,v),this.getZoomScale(v,1))},_catchTransitionEnd:function(f){this._animatingZoom&&f.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(f,v,O){if(this._animatingZoom)return!0;if(O=O||{},!this._zoomAnimated||O.animate===!1||this._nothingToAnimate()||Math.abs(v-this._zoom)>this.options.zoomAnimationThreshold)return!1;var F=this.getZoomScale(v),q=this._getCenterOffset(f)._divideBy(1-1/F);return O.animate!==!0&&!this.getSize().contains(q)?!1:(N(function(){this._moveStart(!0,O.noMoveStart||!1)._animateZoom(f,v,!0)},this),!0)},_animateZoom:function(f,v,O,F){this._mapPane&&(O&&(this._animatingZoom=!0,this._animateToCenter=f,this._animateToZoom=v,gn(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:f,zoom:v,noUpdate:F}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Kt(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 E1(f,v){return new fr(f,v)}var ro=V.extend({options:{position:"topright"},initialize:function(f){b(this,f)},getPosition:function(){return this.options.position},setPosition:function(f){var v=this._map;return v&&v.removeControl(this),this.options.position=f,v&&v.addControl(this),this},getContainer:function(){return this._container},addTo:function(f){this.remove(),this._map=f;var v=this._container=this.onAdd(f),O=this.getPosition(),F=f._controlCorners[O];return gn(v,"leaflet-control"),O.indexOf("bottom")!==-1?F.insertBefore(v,F.firstChild):F.appendChild(v),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(cn(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(f){this._map&&f&&f.screenX>0&&f.screenY>0&&this._map.getContainer().focus()}}),Co=function(f){return new ro(f)};fr.include({addControl:function(f){return f.addTo(this),this},removeControl:function(f){return f.remove(),this},_initControlPos:function(){var f=this._controlCorners={},v="leaflet-",O=this._controlContainer=Dt("div",v+"control-container",this._container);function F(q,re){var Oe=v+q+" "+v+re;f[q+re]=Dt("div",Oe,O)}F("top","left"),F("top","right"),F("bottom","left"),F("bottom","right")},_clearControlPos:function(){for(var f in this._controlCorners)cn(this._controlCorners[f]);cn(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Oa=ro.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(f,v,O,F){return O<F?-1:F<O?1:0}},initialize:function(f,v,O){b(this,O),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var F in f)this._addLayer(f[F],F);for(F in v)this._addLayer(v[F],F,!0)},onAdd:function(f){this._initLayout(),this._update(),this._map=f,f.on("zoomend",this._checkDisabledLayers,this);for(var v=0;v<this._layers.length;v++)this._layers[v].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(f){return ro.prototype.addTo.call(this,f),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var f=0;f<this._layers.length;f++)this._layers[f].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(f,v){return this._addLayer(f,v),this._map?this._update():this},addOverlay:function(f,v){return this._addLayer(f,v,!0),this._map?this._update():this},removeLayer:function(f){f.off("add remove",this._onLayerChange,this);var v=this._getLayer(l(f));return v&&this._layers.splice(this._layers.indexOf(v),1),this._map?this._update():this},expand:function(){gn(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var f=this._map.getSize().y-(this._container.offsetTop+50);return f<this._section.clientHeight?(gn(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=f+"px"):Kt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Kt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var f="leaflet-control-layers",v=this._container=Dt("div",f),O=this.options.collapsed;v.setAttribute("aria-haspopup",!0),Oo(v),Li(v);var F=this._section=Dt("section",f+"-list");O&&(this._map.on("click",this.collapse,this),Tn(v,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var q=this._layersLink=Dt("a",f+"-toggle",v);q.href="#",q.title="Layers",q.setAttribute("role","button"),Tn(q,{keydown:function(re){re.keyCode===13&&this._expandSafely()},click:function(re){Fn(re),this._expandSafely()}},this),O||this.expand(),this._baseLayersList=Dt("div",f+"-base",F),this._separator=Dt("div",f+"-separator",F),this._overlaysList=Dt("div",f+"-overlays",F),v.appendChild(F)},_getLayer:function(f){for(var v=0;v<this._layers.length;v++)if(this._layers[v]&&l(this._layers[v].layer)===f)return this._layers[v]},_addLayer:function(f,v,O){this._map&&f.on("add remove",this._onLayerChange,this),this._layers.push({layer:f,name:v,overlay:O}),this.options.sortLayers&&this._layers.sort(a(function(F,q){return this.options.sortFunction(F.layer,q.layer,F.name,q.name)},this)),this.options.autoZIndex&&f.setZIndex&&(this._lastZIndex++,f.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;zn(this._baseLayersList),zn(this._overlaysList),this._layerControlInputs=[];var f,v,O,F,q=0;for(O=0;O<this._layers.length;O++)F=this._layers[O],this._addItem(F),v=v||F.overlay,f=f||!F.overlay,q+=F.overlay?0:1;return this.options.hideSingleBase&&(f=f&&q>1,this._baseLayersList.style.display=f?"":"none"),this._separator.style.display=v&&f?"":"none",this},_onLayerChange:function(f){this._handlingClick||this._update();var v=this._getLayer(l(f.target)),O=v.overlay?f.type==="add"?"overlayadd":"overlayremove":f.type==="add"?"baselayerchange":null;O&&this._map.fire(O,v)},_createRadioElement:function(f,v){var O='<input type="radio" class="leaflet-control-layers-selector" name="'+f+'"'+(v?' checked="checked"':"")+"/>",F=document.createElement("div");return F.innerHTML=O,F.firstChild},_addItem:function(f){var v=document.createElement("label"),O=this._map.hasLayer(f.layer),F;f.overlay?(F=document.createElement("input"),F.type="checkbox",F.className="leaflet-control-layers-selector",F.defaultChecked=O):F=this._createRadioElement("leaflet-base-layers_"+l(this),O),this._layerControlInputs.push(F),F.layerId=l(f.layer),Tn(F,"click",this._onInputClick,this);var q=document.createElement("span");q.innerHTML=" "+f.name;var re=document.createElement("span");v.appendChild(re),re.appendChild(F),re.appendChild(q);var Oe=f.overlay?this._overlaysList:this._baseLayersList;return Oe.appendChild(v),this._checkDisabledLayers(),v},_onInputClick:function(){if(!this._preventClick){var f=this._layerControlInputs,v,O,F=[],q=[];this._handlingClick=!0;for(var re=f.length-1;re>=0;re--)v=f[re],O=this._getLayer(v.layerId).layer,v.checked?F.push(O):v.checked||q.push(O);for(re=0;re<q.length;re++)this._map.hasLayer(q[re])&&this._map.removeLayer(q[re]);for(re=0;re<F.length;re++)this._map.hasLayer(F[re])||this._map.addLayer(F[re]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var f=this._layerControlInputs,v,O,F=this._map.getZoom(),q=f.length-1;q>=0;q--)v=f[q],O=this._getLayer(v.layerId).layer,v.disabled=O.options.minZoom!==void 0&&F<O.options.minZoom||O.options.maxZoom!==void 0&&F>O.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var f=this._section;this._preventClick=!0,Tn(f,"click",Fn),this.expand();var v=this;setTimeout(function(){mn(f,"click",Fn),v._preventClick=!1})}}),a0=function(f,v,O){return new Oa(f,v,O)},m1=ro.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(f){var v="leaflet-control-zoom",O=Dt("div",v+" leaflet-bar"),F=this.options;return this._zoomInButton=this._createButton(F.zoomInText,F.zoomInTitle,v+"-in",O,this._zoomIn),this._zoomOutButton=this._createButton(F.zoomOutText,F.zoomOutTitle,v+"-out",O,this._zoomOut),this._updateDisabled(),f.on("zoomend zoomlevelschange",this._updateDisabled,this),O},onRemove:function(f){f.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(f){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(f.shiftKey?3:1))},_zoomOut:function(f){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(f.shiftKey?3:1))},_createButton:function(f,v,O,F,q){var re=Dt("a",O,F);return re.innerHTML=f,re.href="#",re.title=v,re.setAttribute("role","button"),re.setAttribute("aria-label",v),Oo(re),Tn(re,"click",er),Tn(re,"click",q,this),Tn(re,"click",this._refocusOnMap,this),re},_updateDisabled:function(){var f=this._map,v="leaflet-disabled";Kt(this._zoomInButton,v),Kt(this._zoomOutButton,v),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||f._zoom===f.getMinZoom())&&(gn(this._zoomOutButton,v),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||f._zoom===f.getMaxZoom())&&(gn(this._zoomInButton,v),this._zoomInButton.setAttribute("aria-disabled","true"))}});fr.mergeOptions({zoomControl:!0}),fr.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new m1,this.addControl(this.zoomControl))});var i5=function(f){return new m1(f)},Uo=ro.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(f){var v="leaflet-control-scale",O=Dt("div",v),F=this.options;return this._addScales(F,v+"-line",O),f.on(F.updateWhenIdle?"moveend":"move",this._update,this),f.whenReady(this._update,this),O},onRemove:function(f){f.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(f,v,O){f.metric&&(this._mScale=Dt("div",v,O)),f.imperial&&(this._iScale=Dt("div",v,O))},_update:function(){var f=this._map,v=f.getSize().y/2,O=f.distance(f.containerPointToLatLng([0,v]),f.containerPointToLatLng([this.options.maxWidth,v]));this._updateScales(O)},_updateScales:function(f){this.options.metric&&f&&this._updateMetric(f),this.options.imperial&&f&&this._updateImperial(f)},_updateMetric:function(f){var v=this._getRoundNum(f),O=v<1e3?v+" m":v/1e3+" km";this._updateScale(this._mScale,O,v/f)},_updateImperial:function(f){var v=f*3.2808399,O,F,q;v>5280?(O=v/5280,F=this._getRoundNum(O),this._updateScale(this._iScale,F+" mi",F/O)):(q=this._getRoundNum(v),this._updateScale(this._iScale,q+" ft",q/v))},_updateScale:function(f,v,O){f.style.width=Math.round(this.options.maxWidth*O)+"px",f.innerHTML=v},_getRoundNum:function(f){var v=Math.pow(10,(Math.floor(f)+"").length-1),O=f/v;return O=O>=10?10:O>=5?5:O>=3?3:O>=2?2:1,v*O}}),a5=function(f){return new Uo(f)},Lo='<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>',s0=ro.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ze.inlineSvg?Lo+" ":"")+"Leaflet</a>"},initialize:function(f){b(this,f),this._attributions={}},onAdd:function(f){f.attributionControl=this,this._container=Dt("div","leaflet-control-attribution"),Oo(this._container);for(var v in f._layers)f._layers[v].getAttribution&&this.addAttribution(f._layers[v].getAttribution());return this._update(),f.on("layeradd",this._addAttribution,this),this._container},onRemove:function(f){f.off("layeradd",this._addAttribution,this)},_addAttribution:function(f){f.layer.getAttribution&&(this.addAttribution(f.layer.getAttribution()),f.layer.once("remove",function(){this.removeAttribution(f.layer.getAttribution())},this))},setPrefix:function(f){return this.options.prefix=f,this._update(),this},addAttribution:function(f){return f?(this._attributions[f]||(this._attributions[f]=0),this._attributions[f]++,this._update(),this):this},removeAttribution:function(f){return f?(this._attributions[f]&&(this._attributions[f]--,this._update()),this):this},_update:function(){if(this._map){var f=[];for(var v in this._attributions)this._attributions[v]&&f.push(v);var O=[];this.options.prefix&&O.push(this.options.prefix),f.length&&O.push(f.join(", ")),this._container.innerHTML=O.join(' <span aria-hidden="true">|</span> ')}}});fr.mergeOptions({attributionControl:!0}),fr.addInitHook(function(){this.options.attributionControl&&new s0().addTo(this)});var $o=function(f){return new s0(f)};ro.Layers=Oa,ro.Zoom=m1,ro.Scale=Uo,ro.Attribution=s0,Co.layers=a0,Co.zoom=i5,Co.scale=a5,Co.attribution=$o;var i1=V.extend({initialize:function(f){this._map=f},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}});i1.addTo=function(f,v){return f.addHandler(v,this),this};var s5={Events:k},h1=Ze.touch?"touchstart mousedown":"mousedown",Ri=K.extend({options:{clickTolerance:3},initialize:function(f,v,O,F){b(this,F),this._element=f,this._dragStartTarget=v||f,this._preventOutline=O},enable:function(){this._enabled||(Tn(this._dragStartTarget,h1,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ri._dragging===this&&this.finishDrag(!0),mn(this._dragStartTarget,h1,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(f){if(this._enabled&&(this._moved=!1,!br(this._element,"leaflet-zoom-anim"))){if(f.touches&&f.touches.length!==1){Ri._dragging===this&&this.finishDrag();return}if(!(Ri._dragging||f.shiftKey||f.which!==1&&f.button!==1&&!f.touches)&&(Ri._dragging=this,this._preventOutline&&Qn(this._element),yn(),Dr(),!this._moving)){this.fire("down");var v=f.touches?f.touches[0]:f,O=Sr(this._element);this._startPoint=new $(v.clientX,v.clientY),this._startPos=Dn(this._element),this._parentScale=An(O);var F=f.type==="mousedown";Tn(document,F?"mousemove":"touchmove",this._onMove,this),Tn(document,F?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(f){if(this._enabled){if(f.touches&&f.touches.length>1){this._moved=!0;return}var v=f.touches&&f.touches.length===1?f.touches[0]:f,O=new $(v.clientX,v.clientY)._subtract(this._startPoint);!O.x&&!O.y||Math.abs(O.x)+Math.abs(O.y)<this.options.clickTolerance||(O.x/=this._parentScale.x,O.y/=this._parentScale.y,Fn(f),this._moved||(this.fire("dragstart"),this._moved=!0,gn(document.body,"leaflet-dragging"),this._lastTarget=f.target||f.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),gn(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(O),this._moving=!0,this._lastEvent=f,this._updatePosition())}},_updatePosition:function(){var f={originalEvent:this._lastEvent};this.fire("predrag",f),Cn(this._element,this._newPos),this.fire("drag",f)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(f){Kt(document.body,"leaflet-dragging"),this._lastTarget&&(Kt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),mn(document,"mousemove touchmove",this._onMove,this),mn(document,"mouseup touchend touchcancel",this._onUp,this),tn(),sr();var v=this._moved&&this._moving;this._moving=!1,Ri._dragging=!1,v&&this.fire("dragend",{noInertia:f,distance:this._newPos.distanceTo(this._startPos)})}});function La(f,v,O){var F,q=[1,4,2,8],re,Oe,Qe,Xe,Lt,nn,Bn,Yn;for(re=0,nn=f.length;re<nn;re++)f[re]._code=K1(f[re],v);for(Qe=0;Qe<4;Qe++){for(Bn=q[Qe],F=[],re=0,nn=f.length,Oe=nn-1;re<nn;Oe=re++)Xe=f[re],Lt=f[Oe],Xe._code&Bn?Lt._code&Bn||(Yn=mo(Lt,Xe,Bn,v,O),Yn._code=K1(Yn,v),F.push(Yn)):(Lt._code&Bn&&(Yn=mo(Lt,Xe,Bn,v,O),Yn._code=K1(Yn,v),F.push(Yn)),F.push(Xe));f=F}return f}function kr(f,v){var O,F,q,re,Oe,Qe,Xe,Lt,nn;if(!f||f.length===0)throw new Error("latlngs not passed");io(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var Bn=oe([0,0]),Yn=G(f),l1=Yn.getNorthWest().distanceTo(Yn.getSouthWest())*Yn.getNorthEast().distanceTo(Yn.getNorthWest());l1<1700&&(Bn=Ba(f));var pe=f.length,he=[];for(O=0;O<pe;O++){var we=oe(f[O]);he.push(v.project(oe([we.lat-Bn.lat,we.lng-Bn.lng])))}for(Qe=Xe=Lt=0,O=0,F=pe-1;O<pe;F=O++)q=he[O],re=he[F],Oe=q.y*re.x-re.y*q.x,Xe+=(q.x+re.x)*Oe,Lt+=(q.y+re.y)*Oe,Qe+=Oe*3;Qe===0?nn=he[0]:nn=[Xe/Qe,Lt/Qe];var Re=v.unproject(Z(nn));return oe([Re.lat+Bn.lat,Re.lng+Bn.lng])}function Ba(f){for(var v=0,O=0,F=0,q=0;q<f.length;q++){var re=oe(f[q]);v+=re.lat,O+=re.lng,F++}return oe([v/F,O/F])}var ns={__proto__:null,clipPolygon:La,polygonCenter:kr,centroid:Ba};function Yr(f,v){if(!v||!f.length)return f.slice();var O=v*v;return f=N2(f,O),f=l5(f,O),f}function oo(f,v,O){return Math.sqrt(C9(f,v,O,!0))}function Ra(f,v,O){return C9(f,v,O)}function l5(f,v){var O=f.length,F=typeof Uint8Array<"u"?Uint8Array:Array,q=new F(O);q[0]=q[O-1]=1,Ia(f,q,v,0,O-1);var re,Oe=[];for(re=0;re<O;re++)q[re]&&Oe.push(f[re]);return Oe}function Ia(f,v,O,F,q){var re=0,Oe,Qe,Xe;for(Qe=F+1;Qe<=q-1;Qe++)Xe=C9(f[Qe],f[F],f[q],!0),Xe>re&&(Oe=Qe,re=Xe);re>O&&(v[Oe]=1,Ia(f,v,O,F,Oe),Ia(f,v,O,Oe,q))}function N2(f,v){for(var O=[f[0]],F=1,q=0,re=f.length;F<re;F++)Na(f[F],f[q])>v&&(O.push(f[F]),q=F);return q<re-1&&O.push(f[re-1]),O}var Pa;function Da(f,v,O,F,q){var re=F?Pa:K1(f,O),Oe=K1(v,O),Qe,Xe,Lt;for(Pa=Oe;;){if(!(re|Oe))return[f,v];if(re&Oe)return!1;Qe=re||Oe,Xe=mo(f,v,Qe,O,q),Lt=K1(Xe,O),Qe===re?(f=Xe,re=Lt):(v=Xe,Oe=Lt)}}function mo(f,v,O,F,q){var re=v.x-f.x,Oe=v.y-f.y,Qe=F.min,Xe=F.max,Lt,nn;return O&8?(Lt=f.x+re*(Xe.y-f.y)/Oe,nn=Xe.y):O&4?(Lt=f.x+re*(Qe.y-f.y)/Oe,nn=Qe.y):O&2?(Lt=Xe.x,nn=f.y+Oe*(Xe.x-f.x)/re):O&1&&(Lt=Qe.x,nn=f.y+Oe*(Qe.x-f.x)/re),new $(Lt,nn,q)}function K1(f,v){var O=0;return f.x<v.min.x?O|=1:f.x>v.max.x&&(O|=2),f.y<v.min.y?O|=4:f.y>v.max.y&&(O|=8),O}function Na(f,v){var O=v.x-f.x,F=v.y-f.y;return O*O+F*F}function C9(f,v,O,F){var q=v.x,re=v.y,Oe=O.x-q,Qe=O.y-re,Xe=Oe*Oe+Qe*Qe,Lt;return Xe>0&&(Lt=((f.x-q)*Oe+(f.y-re)*Qe)/Xe,Lt>1?(q=O.x,re=O.y):Lt>0&&(q+=Oe*Lt,re+=Qe*Lt)),Oe=f.x-q,Qe=f.y-re,F?Oe*Oe+Qe*Qe:new $(q,re)}function io(f){return!x(f[0])||typeof f[0][0]!="object"&&typeof f[0][0]<"u"}function m9(f){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),io(f)}function Ta(f,v){var O,F,q,re,Oe,Qe,Xe,Lt;if(!f||f.length===0)throw new Error("latlngs not passed");io(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var nn=oe([0,0]),Bn=G(f),Yn=Bn.getNorthWest().distanceTo(Bn.getSouthWest())*Bn.getNorthEast().distanceTo(Bn.getNorthWest());Yn<1700&&(nn=Ba(f));var l1=f.length,pe=[];for(O=0;O<l1;O++){var he=oe(f[O]);pe.push(v.project(oe([he.lat-nn.lat,he.lng-nn.lng])))}for(O=0,F=0;O<l1-1;O++)F+=pe[O].distanceTo(pe[O+1])/2;if(F===0)Lt=pe[0];else for(O=0,re=0;O<l1-1;O++)if(Oe=pe[O],Qe=pe[O+1],q=Oe.distanceTo(Qe),re+=q,re>F){Xe=(re-F)/q,Lt=[Qe.x-Xe*(Qe.x-Oe.x),Qe.y-Xe*(Qe.y-Oe.y)];break}var we=v.unproject(Z(Lt));return oe([we.lat+nn.lat,we.lng+nn.lng])}var ka={__proto__:null,simplify:Yr,pointToSegmentDistance:oo,closestPointOnSegment:Ra,clipSegment:Da,_getEdgeIntersection:mo,_getBitCode:K1,_sqClosestPointOnSegment:C9,isFlat:io,_flat:m9,polylineCenter:Ta},po={project:function(f){return new $(f.lng,f.lat)},unproject:function(f){return new ee(f.y,f.x)},bounds:new U([-180,-90],[180,90])},Fa={R:6378137,R_MINOR:6356752314245179e-9,bounds:new U([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(f){var v=Math.PI/180,O=this.R,F=f.lat*v,q=this.R_MINOR/O,re=Math.sqrt(1-q*q),Oe=re*Math.sin(F),Qe=Math.tan(Math.PI/4-F/2)/Math.pow((1-Oe)/(1+Oe),re/2);return F=-O*Math.log(Math.max(Qe,1e-10)),new $(f.lng*v*O,F)},unproject:function(f){for(var v=180/Math.PI,O=this.R,F=this.R_MINOR/O,q=Math.sqrt(1-F*F),re=Math.exp(-f.y/O),Oe=Math.PI/2-2*Math.atan(re),Qe=0,Xe=.1,Lt;Qe<15&&Math.abs(Xe)>1e-7;Qe++)Lt=q*Math.sin(Oe),Lt=Math.pow((1-Lt)/(1+Lt),q/2),Xe=Math.PI/2-2*Math.atan(re*Lt)-Oe,Oe+=Xe;return new ee(Oe*v,f.x*v/O)}},Ao={__proto__:null,LonLat:po,Mercator:Fa,SphericalMercator:be},rs=o({},se,{code:"EPSG:3395",projection:Fa,transformation:function(){var f=.5/(Math.PI*Fa.R);return fe(f,.5,-f,.5)}()}),c5=o({},se,{code:"EPSG:4326",projection:po,transformation:fe(1/180,1,-1/180,.5)}),os=o({},ue,{projection:po,transformation:fe(1,0,-1,0),scale:function(f){return Math.pow(2,f)},zoom:function(f){return Math.log(f)/Math.LN2},distance:function(f,v){var O=v.lng-f.lng,F=v.lat-f.lat;return Math.sqrt(O*O+F*F)},infinite:!0});ue.Earth=se,ue.EPSG3395=rs,ue.EPSG3857=ae,ue.EPSG900913=ie,ue.EPSG4326=c5,ue.Simple=os;var tr=K.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(f){return f.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(f){return f&&f.removeLayer(this),this},getPane:function(f){return this._map.getPane(f?this.options[f]||f:this.options.pane)},addInteractiveTarget:function(f){return this._map._targets[l(f)]=this,this},removeInteractiveTarget:function(f){return delete this._map._targets[l(f)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(f){var v=f.target;if(v.hasLayer(this)){if(this._map=v,this._zoomAnimated=v._zoomAnimated,this.getEvents){var O=this.getEvents();v.on(O,this),this.once("remove",function(){v.off(O,this)},this)}this.onAdd(v),this.fire("add"),v.fire("layeradd",{layer:this})}}});fr.include({addLayer:function(f){if(!f._layerAdd)throw new Error("The provided object is not a Layer.");var v=l(f);return this._layers[v]?this:(this._layers[v]=f,f._mapToAdd=this,f.beforeAdd&&f.beforeAdd(this),this.whenReady(f._layerAdd,f),this)},removeLayer:function(f){var v=l(f);return this._layers[v]?(this._loaded&&f.onRemove(this),delete this._layers[v],this._loaded&&(this.fire("layerremove",{layer:f}),f.fire("remove")),f._map=f._mapToAdd=null,this):this},hasLayer:function(f){return l(f)in this._layers},eachLayer:function(f,v){for(var O in this._layers)f.call(v,this._layers[O]);return this},_addLayers:function(f){f=f?x(f)?f:[f]:[];for(var v=0,O=f.length;v<O;v++)this.addLayer(f[v])},_addZoomLimit:function(f){(!isNaN(f.options.maxZoom)||!isNaN(f.options.minZoom))&&(this._zoomBoundLayers[l(f)]=f,this._updateZoomLevels())},_removeZoomLimit:function(f){var v=l(f);this._zoomBoundLayers[v]&&(delete this._zoomBoundLayers[v],this._updateZoomLevels())},_updateZoomLevels:function(){var f=1/0,v=-1/0,O=this._getZoomSpan();for(var F in this._zoomBoundLayers){var q=this._zoomBoundLayers[F].options;f=q.minZoom===void 0?f:Math.min(f,q.minZoom),v=q.maxZoom===void 0?v:Math.max(v,q.maxZoom)}this._layersMaxZoom=v===-1/0?void 0:v,this._layersMinZoom=f===1/0?void 0:f,O!==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 Bo=tr.extend({initialize:function(f,v){b(this,v),this._layers={};var O,F;if(f)for(O=0,F=f.length;O<F;O++)this.addLayer(f[O])},addLayer:function(f){var v=this.getLayerId(f);return this._layers[v]=f,this._map&&this._map.addLayer(f),this},removeLayer:function(f){var v=f in this._layers?f:this.getLayerId(f);return this._map&&this._layers[v]&&this._map.removeLayer(this._layers[v]),delete this._layers[v],this},hasLayer:function(f){var v=typeof f=="number"?f:this.getLayerId(f);return v in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(f){var v=Array.prototype.slice.call(arguments,1),O,F;for(O in this._layers)F=this._layers[O],F[f]&&F[f].apply(F,v);return this},onAdd:function(f){this.eachLayer(f.addLayer,f)},onRemove:function(f){this.eachLayer(f.removeLayer,f)},eachLayer:function(f,v){for(var O in this._layers)f.call(v,this._layers[O]);return this},getLayer:function(f){return this._layers[f]},getLayers:function(){var f=[];return this.eachLayer(f.push,f),f},setZIndex:function(f){return this.invoke("setZIndex",f)},getLayerId:function(f){return l(f)}}),p9=function(f,v){return new Bo(f,v)},vo=Bo.extend({addLayer:function(f){return this.hasLayer(f)?this:(f.addEventParent(this),Bo.prototype.addLayer.call(this,f),this.fire("layeradd",{layer:f}))},removeLayer:function(f){return this.hasLayer(f)?(f in this._layers&&(f=this._layers[f]),f.removeEventParent(this),Bo.prototype.removeLayer.call(this,f),this.fire("layerremove",{layer:f})):this},setStyle:function(f){return this.invoke("setStyle",f)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var f=new J;for(var v in this._layers){var O=this._layers[v];f.extend(O.getBounds?O.getBounds():O.getLatLng())}return f}}),Ii=function(f,v){return new vo(f,v)},si=V.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(f){b(this,f)},createIcon:function(f){return this._createIcon("icon",f)},createShadow:function(f){return this._createIcon("shadow",f)},_createIcon:function(f,v){var O=this._getIconUrl(f);if(!O){if(f==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var F=this._createImg(O,v&&v.tagName==="IMG"?v:null);return this._setIconStyles(F,f),(this.options.crossOrigin||this.options.crossOrigin==="")&&(F.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),F},_setIconStyles:function(f,v){var O=this.options,F=O[v+"Size"];typeof F=="number"&&(F=[F,F]);var q=Z(F),re=Z(v==="shadow"&&O.shadowAnchor||O.iconAnchor||q&&q.divideBy(2,!0));f.className="leaflet-marker-"+v+" "+(O.className||""),re&&(f.style.marginLeft=-re.x+"px",f.style.marginTop=-re.y+"px"),q&&(f.style.width=q.x+"px",f.style.height=q.y+"px")},_createImg:function(f,v){return v=v||document.createElement("img"),v.src=f,v},_getIconUrl:function(f){return Ze.retina&&this.options[f+"RetinaUrl"]||this.options[f+"Url"]}});function T2(f){return new si(f)}var ja=si.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(f){return typeof ja.imagePath!="string"&&(ja.imagePath=this._detectIconPath()),(this.options.imagePath||ja.imagePath)+si.prototype._getIconUrl.call(this,f)},_stripUrl:function(f){var v=function(O,F,q){var re=F.exec(O);return re&&re[q]};return f=v(f,/^url\((['"])?(.+)\1\)$/,2),f&&v(f,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var f=Dt("div","leaflet-default-icon-path",document.body),v=Sn(f,"background-image")||Sn(f,"backgroundImage");if(document.body.removeChild(f),v=this._stripUrl(v),v)return v;var O=document.querySelector('link[href$="leaflet.css"]');return O?O.href.substring(0,O.href.length-11-1):""}}),u5=i1.extend({initialize:function(f){this._marker=f},addHooks:function(){var f=this._marker._icon;this._draggable||(this._draggable=new Ri(f,f,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),gn(f,"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&&Kt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(f){var v=this._marker,O=v._map,F=this._marker.options.autoPanSpeed,q=this._marker.options.autoPanPadding,re=Dn(v._icon),Oe=O.getPixelBounds(),Qe=O.getPixelOrigin(),Xe=Y(Oe.min._subtract(Qe).add(q),Oe.max._subtract(Qe).subtract(q));if(!Xe.contains(re)){var Lt=Z((Math.max(Xe.max.x,re.x)-Xe.max.x)/(Oe.max.x-Xe.max.x)-(Math.min(Xe.min.x,re.x)-Xe.min.x)/(Oe.min.x-Xe.min.x),(Math.max(Xe.max.y,re.y)-Xe.max.y)/(Oe.max.y-Xe.max.y)-(Math.min(Xe.min.y,re.y)-Xe.min.y)/(Oe.min.y-Xe.min.y)).multiplyBy(F);O.panBy(Lt,{animate:!1}),this._draggable._newPos._add(Lt),this._draggable._startPos._add(Lt),Cn(v._icon,this._draggable._newPos),this._onDrag(f),this._panRequest=N(this._adjustPan.bind(this,f))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(f){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=N(this._adjustPan.bind(this,f)))},_onDrag:function(f){var v=this._marker,O=v._shadow,F=Dn(v._icon),q=v._map.layerPointToLatLng(F);O&&Cn(O,F),v._latlng=q,f.latlng=q,f.oldLatLng=this._oldLatLng,v.fire("move",f).fire("drag",f)},_onDragEnd:function(f){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",f)}}),A9=tr.extend({options:{icon:new ja,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(f,v){b(this,v),this._latlng=oe(f)},onAdd:function(f){this._zoomAnimated=this._zoomAnimated&&f.options.markerZoomAnimation,this._zoomAnimated&&f.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(f){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&f.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(f){var v=this._latlng;return this._latlng=oe(f),this.update(),this.fire("move",{oldLatLng:v,latlng:this._latlng})},setZIndexOffset:function(f){return this.options.zIndexOffset=f,this.update()},getIcon:function(){return this.options.icon},setIcon:function(f){return this.options.icon=f,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 f=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(f)}return this},_initIcon:function(){var f=this.options,v="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),O=f.icon.createIcon(this._icon),F=!1;O!==this._icon&&(this._icon&&this._removeIcon(),F=!0,f.title&&(O.title=f.title),O.tagName==="IMG"&&(O.alt=f.alt||"")),gn(O,v),f.keyboard&&(O.tabIndex="0",O.setAttribute("role","button")),this._icon=O,f.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Tn(O,"focus",this._panOnFocus,this);var q=f.icon.createShadow(this._shadow),re=!1;q!==this._shadow&&(this._removeShadow(),re=!0),q&&(gn(q,v),q.alt=""),this._shadow=q,f.opacity<1&&this._updateOpacity(),F&&this.getPane().appendChild(this._icon),this._initInteraction(),q&&re&&this.getPane(f.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&mn(this._icon,"focus",this._panOnFocus,this),cn(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&cn(this._shadow),this._shadow=null},_setPos:function(f){this._icon&&Cn(this._icon,f),this._shadow&&Cn(this._shadow,f),this._zIndex=f.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(f){this._icon&&(this._icon.style.zIndex=this._zIndex+f)},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center).round();this._setPos(v)},_initInteraction:function(){if(this.options.interactive&&(gn(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),u5)){var f=this.options.draggable;this.dragging&&(f=this.dragging.enabled(),this.dragging.disable()),this.dragging=new u5(this),f&&this.dragging.enable()}},setOpacity:function(f){return this.options.opacity=f,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var f=this.options.opacity;this._icon&&bt(this._icon,f),this._shadow&&bt(this._shadow,f)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var f=this._map;if(f){var v=this.options.icon.options,O=v.iconSize?Z(v.iconSize):Z(0,0),F=v.iconAnchor?Z(v.iconAnchor):Z(0,0);f.panInside(this._latlng,{paddingTopLeft:F,paddingBottomRight:O.subtract(F)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function na(f,v){return new A9(f,v)}var Pi=tr.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(f){this._renderer=f.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(f){return b(this,f),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&f&&Object.prototype.hasOwnProperty.call(f,"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)}}),za=Pi.extend({options:{fill:!0,radius:10},initialize:function(f,v){b(this,v),this._latlng=oe(f),this._radius=this.options.radius},setLatLng:function(f){var v=this._latlng;return this._latlng=oe(f),this.redraw(),this.fire("move",{oldLatLng:v,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(f){return this.options.radius=this._radius=f,this.redraw()},getRadius:function(){return this._radius},setStyle:function(f){var v=f&&f.radius||this._radius;return Pi.prototype.setStyle.call(this,f),this.setRadius(v),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var f=this._radius,v=this._radiusY||f,O=this._clickTolerance(),F=[f+O,v+O];this._pxBounds=new U(this._point.subtract(F),this._point.add(F))},_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(f){return f.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Lr(f,v){return new za(f,v)}var bo=za.extend({initialize:function(f,v,O){if(typeof v=="number"&&(v=o({},O,{radius:v})),b(this,v),this._latlng=oe(f),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(f){return this._mRadius=f,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var f=[this._radius,this._radiusY||this._radius];return new J(this._map.layerPointToLatLng(this._point.subtract(f)),this._map.layerPointToLatLng(this._point.add(f)))},setStyle:Pi.prototype.setStyle,_project:function(){var f=this._latlng.lng,v=this._latlng.lat,O=this._map,F=O.options.crs;if(F.distance===se.distance){var q=Math.PI/180,re=this._mRadius/se.R/q,Oe=O.project([v+re,f]),Qe=O.project([v-re,f]),Xe=Oe.add(Qe).divideBy(2),Lt=O.unproject(Xe).lat,nn=Math.acos((Math.cos(re*q)-Math.sin(v*q)*Math.sin(Lt*q))/(Math.cos(v*q)*Math.cos(Lt*q)))/q;(isNaN(nn)||nn===0)&&(nn=re/Math.cos(Math.PI/180*v)),this._point=Xe.subtract(O.getPixelOrigin()),this._radius=isNaN(nn)?0:Xe.x-O.project([Lt,f-nn]).x,this._radiusY=Xe.y-Oe.y}else{var Bn=F.unproject(F.project(this._latlng).subtract([this._mRadius,0]));this._point=O.latLngToLayerPoint(this._latlng),this._radius=this._point.x-O.latLngToLayerPoint(Bn).x}this._updateBounds()}});function Di(f,v,O){return new bo(f,v,O)}var a1=Pi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(f,v){b(this,v),this._setLatLngs(f)},getLatLngs:function(){return this._latlngs},setLatLngs:function(f){return this._setLatLngs(f),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(f){for(var v=1/0,O=null,F=C9,q,re,Oe=0,Qe=this._parts.length;Oe<Qe;Oe++)for(var Xe=this._parts[Oe],Lt=1,nn=Xe.length;Lt<nn;Lt++){q=Xe[Lt-1],re=Xe[Lt];var Bn=F(f,q,re,!0);Bn<v&&(v=Bn,O=F(f,q,re))}return O&&(O.distance=Math.sqrt(v)),O},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ta(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(f,v){return v=v||this._defaultShape(),f=oe(f),v.push(f),this._bounds.extend(f),this.redraw()},_setLatLngs:function(f){this._bounds=new J,this._latlngs=this._convertLatLngs(f)},_defaultShape:function(){return io(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(f){for(var v=[],O=io(f),F=0,q=f.length;F<q;F++)O?(v[F]=oe(f[F]),this._bounds.extend(v[F])):v[F]=this._convertLatLngs(f[F]);return v},_project:function(){var f=new U;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,f),this._bounds.isValid()&&f.isValid()&&(this._rawPxBounds=f,this._updateBounds())},_updateBounds:function(){var f=this._clickTolerance(),v=new $(f,f);this._rawPxBounds&&(this._pxBounds=new U([this._rawPxBounds.min.subtract(v),this._rawPxBounds.max.add(v)]))},_projectLatlngs:function(f,v,O){var F=f[0]instanceof ee,q=f.length,re,Oe;if(F){for(Oe=[],re=0;re<q;re++)Oe[re]=this._map.latLngToLayerPoint(f[re]),O.extend(Oe[re]);v.push(Oe)}else for(re=0;re<q;re++)this._projectLatlngs(f[re],v,O)},_clipPoints:function(){var f=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(f))){if(this.options.noClip){this._parts=this._rings;return}var v=this._parts,O,F,q,re,Oe,Qe,Xe;for(O=0,q=0,re=this._rings.length;O<re;O++)for(Xe=this._rings[O],F=0,Oe=Xe.length;F<Oe-1;F++)Qe=Da(Xe[F],Xe[F+1],f,F,!0),Qe&&(v[q]=v[q]||[],v[q].push(Qe[0]),(Qe[1]!==Xe[F+1]||F===Oe-2)&&(v[q].push(Qe[1]),q++))}},_simplifyPoints:function(){for(var f=this._parts,v=this.options.smoothFactor,O=0,F=f.length;O<F;O++)f[O]=Yr(f[O],v)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(f,v){var O,F,q,re,Oe,Qe,Xe=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(f))return!1;for(O=0,re=this._parts.length;O<re;O++)for(Qe=this._parts[O],F=0,Oe=Qe.length,q=Oe-1;F<Oe;q=F++)if(!(!v&&F===0)&&oo(f,Qe[q],Qe[F])<=Xe)return!0;return!1}});function d5(f,v){return new a1(f,v)}a1._flat=m9;var ra=a1.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 kr(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(f){var v=a1.prototype._convertLatLngs.call(this,f),O=v.length;return O>=2&&v[0]instanceof ee&&v[0].equals(v[O-1])&&v.pop(),v},_setLatLngs:function(f){a1.prototype._setLatLngs.call(this,f),io(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return io(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var f=this._renderer._bounds,v=this.options.weight,O=new $(v,v);if(f=new U(f.min.subtract(O),f.max.add(O)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(f))){if(this.options.noClip){this._parts=this._rings;return}for(var F=0,q=this._rings.length,re;F<q;F++)re=La(this._rings[F],f,!0),re.length&&this._parts.push(re)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(f){var v=!1,O,F,q,re,Oe,Qe,Xe,Lt;if(!this._pxBounds||!this._pxBounds.contains(f))return!1;for(re=0,Xe=this._parts.length;re<Xe;re++)for(O=this._parts[re],Oe=0,Lt=O.length,Qe=Lt-1;Oe<Lt;Qe=Oe++)F=O[Oe],q=O[Qe],F.y>f.y!=q.y>f.y&&f.x<(q.x-F.x)*(f.y-F.y)/(q.y-F.y)+F.x&&(v=!v);return v||a1.prototype._containsPoint.call(this,f,!0)}});function f5(f,v){return new ra(f,v)}var k1=vo.extend({initialize:function(f,v){b(this,v),this._layers={},f&&this.addData(f)},addData:function(f){var v=x(f)?f:f.features,O,F,q;if(v){for(O=0,F=v.length;O<F;O++)q=v[O],(q.geometries||q.geometry||q.features||q.coordinates)&&this.addData(q);return this}var re=this.options;if(re.filter&&!re.filter(f))return this;var Oe=Z1(f,re);return Oe?(Oe.feature=Ro(f),Oe.defaultOptions=Oe.options,this.resetStyle(Oe),re.onEachFeature&&re.onEachFeature(f,Oe),this.addLayer(Oe)):this},resetStyle:function(f){return f===void 0?this.eachLayer(this.resetStyle,this):(f.options=o({},f.defaultOptions),this._setLayerStyle(f,this.options.style),this)},setStyle:function(f){return this.eachLayer(function(v){this._setLayerStyle(v,f)},this)},_setLayerStyle:function(f,v){f.setStyle&&(typeof v=="function"&&(v=v(f.feature)),f.setStyle(v))}});function Z1(f,v){var O=f.type==="Feature"?f.geometry:f,F=O?O.coordinates:null,q=[],re=v&&v.pointToLayer,Oe=v&&v.coordsToLatLng||v9,Qe,Xe,Lt,nn;if(!F&&!O)return null;switch(O.type){case"Point":return Qe=Oe(F),Va(re,f,Qe,v);case"MultiPoint":for(Lt=0,nn=F.length;Lt<nn;Lt++)Qe=Oe(F[Lt]),q.push(Va(re,f,Qe,v));return new vo(q);case"LineString":case"MultiLineString":return Xe=l0(F,O.type==="LineString"?0:1,Oe),new a1(Xe,v);case"Polygon":case"MultiPolygon":return Xe=l0(F,O.type==="Polygon"?1:2,Oe),new ra(Xe,v);case"GeometryCollection":for(Lt=0,nn=O.geometries.length;Lt<nn;Lt++){var Bn=Z1({geometry:O.geometries[Lt],type:"Feature",properties:f.properties},v);Bn&&q.push(Bn)}return new vo(q);case"FeatureCollection":for(Lt=0,nn=O.features.length;Lt<nn;Lt++){var Yn=Z1(O.features[Lt],v);Yn&&q.push(Yn)}return new vo(q);default:throw new Error("Invalid GeoJSON object.")}}function Va(f,v,O,F){return f?f(v,O):new A9(O,F&&F.markersInheritOptions&&F)}function v9(f){return new ee(f[1],f[0],f[2])}function l0(f,v,O){for(var F=[],q=0,re=f.length,Oe;q<re;q++)Oe=v?l0(f[q],v-1,O):(O||v9)(f[q]),F.push(Oe);return F}function is(f,v){return f=oe(f),f.alt!==void 0?[C(f.lng,v),C(f.lat,v),C(f.alt,v)]:[C(f.lng,v),C(f.lat,v)]}function b9(f,v,O,F){for(var q=[],re=0,Oe=f.length;re<Oe;re++)q.push(v?b9(f[re],io(f[re])?0:v-1,O,F):is(f[re],F));return!v&&O&&q.length>0&&q.push(q[0].slice()),q}function Ua(f,v){return f.feature?o({},f.feature,{geometry:v}):Ro(v)}function Ro(f){return f.type==="Feature"||f.type==="FeatureCollection"?f:{type:"Feature",properties:{},geometry:f}}var Te={toGeoJSON:function(f){return Ua(this,{type:"Point",coordinates:is(this.getLatLng(),f)})}};A9.include(Te),bo.include(Te),za.include(Te),a1.include({toGeoJSON:function(f){var v=!io(this._latlngs),O=b9(this._latlngs,v?1:0,!1,f);return Ua(this,{type:(v?"Multi":"")+"LineString",coordinates:O})}}),ra.include({toGeoJSON:function(f){var v=!io(this._latlngs),O=v&&!io(this._latlngs[0]),F=b9(this._latlngs,O?2:v?1:0,!0,f);return v||(F=[F]),Ua(this,{type:(O?"Multi":"")+"Polygon",coordinates:F})}}),Bo.include({toMultiPoint:function(f){var v=[];return this.eachLayer(function(O){v.push(O.toGeoJSON(f).geometry.coordinates)}),Ua(this,{type:"MultiPoint",coordinates:v})},toGeoJSON:function(f){var v=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(v==="MultiPoint")return this.toMultiPoint(f);var O=v==="GeometryCollection",F=[];return this.eachLayer(function(q){if(q.toGeoJSON){var re=q.toGeoJSON(f);if(O)F.push(re.geometry);else{var Oe=Ro(re);Oe.type==="FeatureCollection"?F.push.apply(F,Oe.features):F.push(Oe)}}}),O?Ua(this,{geometries:F,type:"GeometryCollection"}):{type:"FeatureCollection",features:F}}});function st(f,v){return new k1(f,v)}var nt=st,sn=tr.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(f,v,O){this._url=f,this._bounds=G(v),b(this,O)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(gn(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){cn(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(f){return this.options.opacity=f,this._image&&this._updateOpacity(),this},setStyle:function(f){return f.opacity&&this.setOpacity(f.opacity),this},bringToFront:function(){return this._map&&Pr(this._image),this},bringToBack:function(){return this._map&&nr(this._image),this},setUrl:function(f){return this._url=f,this._image&&(this._image.src=f),this},setBounds:function(f){return this._bounds=G(f),this._map&&this._reset(),this},getEvents:function(){var f={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(f.zoomanim=this._animateZoom),f},setZIndex:function(f){return this.options.zIndex=f,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var f=this._url.tagName==="IMG",v=this._image=f?this._url:Dt("img");if(gn(v,"leaflet-image-layer"),this._zoomAnimated&&gn(v,"leaflet-zoom-animated"),this.options.className&&gn(v,this.options.className),v.onselectstart=h,v.onmousemove=h,v.onload=a(this.fire,this,"load"),v.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(v.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),f){this._url=v.src;return}v.src=this._url,v.alt=this.options.alt},_animateZoom:function(f){var v=this._map.getZoomScale(f.zoom),O=this._map._latLngBoundsToNewLayerBounds(this._bounds,f.zoom,f.center).min;tt(this._image,O,v)},_reset:function(){var f=this._image,v=new U(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),O=v.getSize();Cn(f,v.min),f.style.width=O.x+"px",f.style.height=O.y+"px"},_updateOpacity:function(){bt(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 f=this.options.errorOverlayUrl;f&&this._url!==f&&(this._url=f,this._image.src=f)},getCenter:function(){return this._bounds.getCenter()}}),$n=function(f,v,O){return new sn(f,v,O)},hr=sn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var f=this._url.tagName==="VIDEO",v=this._image=f?this._url:Dt("video");if(gn(v,"leaflet-image-layer"),this._zoomAnimated&&gn(v,"leaflet-zoom-animated"),this.options.className&&gn(v,this.options.className),v.onselectstart=h,v.onmousemove=h,v.onloadeddata=a(this.fire,this,"load"),f){for(var O=v.getElementsByTagName("source"),F=[],q=0;q<O.length;q++)F.push(O[q].src);this._url=O.length>0?F:[v.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(v.style,"objectFit")&&(v.style.objectFit="fill"),v.autoplay=!!this.options.autoplay,v.loop=!!this.options.loop,v.muted=!!this.options.muted,v.playsInline=!!this.options.playsInline;for(var re=0;re<this._url.length;re++){var Oe=Dt("source");Oe.src=this._url[re],v.appendChild(Oe)}}});function Jr(f,v,O){return new hr(f,v,O)}var Br=sn.extend({_initImage:function(){var f=this._image=this._url;gn(f,"leaflet-image-layer"),this._zoomAnimated&&gn(f,"leaflet-zoom-animated"),this.options.className&&gn(f,this.options.className),f.onselectstart=h,f.onmousemove=h}});function oa(f,v,O){return new Br(f,v,O)}var Q1=tr.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(f,v){f&&(f instanceof ee||x(f))?(this._latlng=oe(f),b(this,v)):(b(this,f),this._source=v),this.options.content&&(this._content=this.options.content)},openOn:function(f){return f=arguments.length?f:this._source._map,f.hasLayer(this)||f.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(f){return this._map?this.close():(arguments.length?this._source=f:f=this._source,this._prepareOpen(),this.openOn(f._map)),this},onAdd:function(f){this._zoomAnimated=f._zoomAnimated,this._container||this._initLayout(),f._fadeAnimated&&bt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),f._fadeAnimated&&bt(this._container,1),this.bringToFront(),this.options.interactive&&(gn(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(f){f._fadeAnimated?(bt(this._container,0),this._removeTimeout=setTimeout(a(cn,void 0,this._container),200)):cn(this._container),this.options.interactive&&(Kt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(f){return this._latlng=oe(f),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(f){return this._content=f,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 f={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(f.zoomanim=this._animateZoom),f},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Pr(this._container),this},bringToBack:function(){return this._map&&nr(this._container),this},_prepareOpen:function(f){var v=this._source;if(!v._map)return!1;if(v instanceof vo){v=null;var O=this._source._layers;for(var F in O)if(O[F]._map){v=O[F];break}if(!v)return!1;this._source=v}if(!f)if(v.getCenter)f=v.getCenter();else if(v.getLatLng)f=v.getLatLng();else if(v.getBounds)f=v.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(f),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var f=this._contentNode,v=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof v=="string")f.innerHTML=v;else{for(;f.hasChildNodes();)f.removeChild(f.firstChild);f.appendChild(v)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var f=this._map.latLngToLayerPoint(this._latlng),v=Z(this.options.offset),O=this._getAnchor();this._zoomAnimated?Cn(this._container,f.add(O)):v=v.add(f).add(O);var F=this._containerBottom=-v.y,q=this._containerLeft=-Math.round(this._containerWidth/2)+v.x;this._container.style.bottom=F+"px",this._container.style.left=q+"px"}},_getAnchor:function(){return[0,0]}});fr.include({_initOverlay:function(f,v,O,F){var q=v;return q instanceof f||(q=new f(F).setContent(v)),O&&q.setLatLng(O),q}}),tr.include({_initOverlay:function(f,v,O,F){var q=O;return q instanceof f?(b(q,F),q._source=this):(q=v&&!F?v:new f(F,this),q.setContent(O)),q}});var b1=Q1.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(f){return f=arguments.length?f:this._source._map,!f.hasLayer(this)&&f._popup&&f._popup.options.autoClose&&f.removeLayer(f._popup),f._popup=this,Q1.prototype.openOn.call(this,f)},onAdd:function(f){Q1.prototype.onAdd.call(this,f),f.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Pi||this._source.on("preclick",Mr))},onRemove:function(f){Q1.prototype.onRemove.call(this,f),f.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Pi||this._source.off("preclick",Mr))},getEvents:function(){var f=Q1.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(f.preclick=this.close),this.options.keepInView&&(f.moveend=this._adjustPan),f},_initLayout:function(){var f="leaflet-popup",v=this._container=Dt("div",f+" "+(this.options.className||"")+" leaflet-zoom-animated"),O=this._wrapper=Dt("div",f+"-content-wrapper",v);if(this._contentNode=Dt("div",f+"-content",O),Oo(v),Li(this._contentNode),Tn(v,"contextmenu",Mr),this._tipContainer=Dt("div",f+"-tip-container",v),this._tip=Dt("div",f+"-tip",this._tipContainer),this.options.closeButton){var F=this._closeButton=Dt("a",f+"-close-button",v);F.setAttribute("role","button"),F.setAttribute("aria-label","Close popup"),F.href="#close",F.innerHTML='<span aria-hidden="true">&#215;</span>',Tn(F,"click",function(q){Fn(q),this.close()},this)}},_updateLayout:function(){var f=this._contentNode,v=f.style;v.width="",v.whiteSpace="nowrap";var O=f.offsetWidth;O=Math.min(O,this.options.maxWidth),O=Math.max(O,this.options.minWidth),v.width=O+1+"px",v.whiteSpace="",v.height="";var F=f.offsetHeight,q=this.options.maxHeight,re="leaflet-popup-scrolled";q&&F>q?(v.height=q+"px",gn(f,re)):Kt(f,re),this._containerWidth=this._container.offsetWidth},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center),O=this._getAnchor();Cn(this._container,v.add(O))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var f=this._map,v=parseInt(Sn(this._container,"marginBottom"),10)||0,O=this._container.offsetHeight+v,F=this._containerWidth,q=new $(this._containerLeft,-O-this._containerBottom);q._add(Dn(this._container));var re=f.layerPointToContainerPoint(q),Oe=Z(this.options.autoPanPadding),Qe=Z(this.options.autoPanPaddingTopLeft||Oe),Xe=Z(this.options.autoPanPaddingBottomRight||Oe),Lt=f.getSize(),nn=0,Bn=0;re.x+F+Xe.x>Lt.x&&(nn=re.x+F-Lt.x+Xe.x),re.x-nn-Qe.x<0&&(nn=re.x-Qe.x),re.y+O+Xe.y>Lt.y&&(Bn=re.y+O-Lt.y+Xe.y),re.y-Bn-Qe.y<0&&(Bn=re.y-Qe.y),(nn||Bn)&&(this.options.keepInView&&(this._autopanning=!0),f.fire("autopanstart").panBy([nn,Bn]))}},_getAnchor:function(){return Z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ia=function(f,v){return new b1(f,v)};fr.mergeOptions({closePopupOnClick:!0}),fr.include({openPopup:function(f,v,O){return this._initOverlay(b1,f,v,O).openOn(this),this},closePopup:function(f){return f=arguments.length?f:this._popup,f&&f.close(),this}}),tr.include({bindPopup:function(f,v){return this._popup=this._initOverlay(b1,this._popup,f,v),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(f){return this._popup&&(this instanceof vo||(this._popup._source=this),this._popup._prepareOpen(f||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(f){return this._popup&&this._popup.setContent(f),this},getPopup:function(){return this._popup},_openPopup:function(f){if(!(!this._popup||!this._map)){er(f);var v=f.layer||f.target;if(this._popup._source===v&&!(v instanceof Pi)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(f.latlng);return}this._popup._source=v,this.openPopup(f.latlng)}},_movePopup:function(f){this._popup.setLatLng(f.latlng)},_onKeyPress:function(f){f.originalEvent.keyCode===13&&this._openPopup(f)}});var aa=Q1.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(f){Q1.prototype.onAdd.call(this,f),this.setOpacity(this.options.opacity),f.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(f){Q1.prototype.onRemove.call(this,f),f.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var f=Q1.prototype.getEvents.call(this);return this.options.permanent||(f.preclick=this.close),f},_initLayout:function(){var f="leaflet-tooltip",v=f+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Dt("div",v),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(f){var v,O,F=this._map,q=this._container,re=F.latLngToContainerPoint(F.getCenter()),Oe=F.layerPointToContainerPoint(f),Qe=this.options.direction,Xe=q.offsetWidth,Lt=q.offsetHeight,nn=Z(this.options.offset),Bn=this._getAnchor();Qe==="top"?(v=Xe/2,O=Lt):Qe==="bottom"?(v=Xe/2,O=0):Qe==="center"?(v=Xe/2,O=Lt/2):Qe==="right"?(v=0,O=Lt/2):Qe==="left"?(v=Xe,O=Lt/2):Oe.x<re.x?(Qe="right",v=0,O=Lt/2):(Qe="left",v=Xe+(nn.x+Bn.x)*2,O=Lt/2),f=f.subtract(Z(v,O,!0)).add(nn).add(Bn),Kt(q,"leaflet-tooltip-right"),Kt(q,"leaflet-tooltip-left"),Kt(q,"leaflet-tooltip-top"),Kt(q,"leaflet-tooltip-bottom"),gn(q,"leaflet-tooltip-"+Qe),Cn(q,f)},_updatePosition:function(){var f=this._map.latLngToLayerPoint(this._latlng);this._setPosition(f)},setOpacity:function(f){this.options.opacity=f,this._container&&bt(this._container,f)},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center);this._setPosition(v)},_getAnchor:function(){return Z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),li=function(f,v){return new aa(f,v)};fr.include({openTooltip:function(f,v,O){return this._initOverlay(aa,f,v,O).openOn(this),this},closeTooltip:function(f){return f.close(),this}}),tr.include({bindTooltip:function(f,v){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(aa,this._tooltip,f,v),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(f){if(!(!f&&this._tooltipHandlersAdded)){var v=f?"off":"on",O={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?O.add=this._openTooltip:(O.mouseover=this._openTooltip,O.mouseout=this.closeTooltip,O.click=this._openTooltip,this._map?this._addFocusListeners():O.add=this._addFocusListeners),this._tooltip.options.sticky&&(O.mousemove=this._moveTooltip),this[v](O),this._tooltipHandlersAdded=!f}},openTooltip:function(f){return this._tooltip&&(this instanceof vo||(this._tooltip._source=this),this._tooltip._prepareOpen(f)&&(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(f){return this._tooltip&&this._tooltip.setContent(f),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(f){var v=typeof f.getElement=="function"&&f.getElement();v&&(Tn(v,"focus",function(){this._tooltip._source=f,this.openTooltip()},this),Tn(v,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(f){var v=typeof f.getElement=="function"&&f.getElement();v&&v.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(f){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var v=this;this._map.once("moveend",function(){v._openOnceFlag=!1,v._openTooltip(f)});return}this._tooltip._source=f.layer||f.target,this.openTooltip(this._tooltip.options.sticky?f.latlng:void 0)}},_moveTooltip:function(f){var v=f.latlng,O,F;this._tooltip.options.sticky&&f.originalEvent&&(O=this._map.mouseEventToContainerPoint(f.originalEvent),F=this._map.containerPointToLayerPoint(O),v=this._map.layerPointToLatLng(F)),this._tooltip.setLatLng(v)}});var Ni=si.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(f){var v=f&&f.tagName==="DIV"?f:document.createElement("div"),O=this.options;if(O.html instanceof Element?(zn(v),v.appendChild(O.html)):v.innerHTML=O.html!==!1?O.html:"",O.bgPos){var F=Z(O.bgPos);v.style.backgroundPosition=-F.x+"px "+-F.y+"px"}return this._setIconStyles(v,"icon"),v},createShadow:function(){return null}});function sa(f){return new Ni(f)}si.Default=ja;var lr=tr.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ze.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(f){b(this,f)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(f){f._addZoomLimit(this)},onRemove:function(f){this._removeAllTiles(),cn(this._container),f._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Pr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(nr(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(f){return this.options.opacity=f,this._updateOpacity(),this},setZIndex:function(f){return this.options.zIndex=f,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var f=this._clampZoom(this._map.getZoom());f!==this._tileZoom&&(this._tileZoom=f,this._updateLevels()),this._update()}return this},getEvents:function(){var f={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=u(this._onMoveEnd,this.options.updateInterval,this)),f.move=this._onMove),this._zoomAnimated&&(f.zoomanim=this._animateZoom),f},createTile:function(){return document.createElement("div")},getTileSize:function(){var f=this.options.tileSize;return f instanceof $?f:new $(f,f)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(f){for(var v=this.getPane().children,O=-f(-1/0,1/0),F=0,q=v.length,re;F<q;F++)re=v[F].style.zIndex,v[F]!==this._container&&re&&(O=f(O,+re));isFinite(O)&&(this.options.zIndex=O+f(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ze.ielt9){bt(this._container,this.options.opacity);var f=+new Date,v=!1,O=!1;for(var F in this._tiles){var q=this._tiles[F];if(!(!q.current||!q.loaded)){var re=Math.min(1,(f-q.loaded)/200);bt(q.el,re),re<1?v=!0:(q.active?O=!0:this._onOpaqueTile(q),q.active=!0)}}O&&!this._noPrune&&this._pruneTiles(),v&&(T(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=Dt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var f=this._tileZoom,v=this.options.maxZoom;if(f!==void 0){for(var O in this._levels)O=Number(O),this._levels[O].el.children.length||O===f?(this._levels[O].el.style.zIndex=v-Math.abs(f-O),this._onUpdateLevel(O)):(cn(this._levels[O].el),this._removeTilesAtZoom(O),this._onRemoveLevel(O),delete this._levels[O]);var F=this._levels[f],q=this._map;return F||(F=this._levels[f]={},F.el=Dt("div","leaflet-tile-container leaflet-zoom-animated",this._container),F.el.style.zIndex=v,F.origin=q.project(q.unproject(q.getPixelOrigin()),f).round(),F.zoom=f,this._setZoomTransform(F,q.getCenter(),q.getZoom()),h(F.el.offsetWidth),this._onCreateLevel(F)),this._level=F,F}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var f,v,O=this._map.getZoom();if(O>this.options.maxZoom||O<this.options.minZoom){this._removeAllTiles();return}for(f in this._tiles)v=this._tiles[f],v.retain=v.current;for(f in this._tiles)if(v=this._tiles[f],v.current&&!v.active){var F=v.coords;this._retainParent(F.x,F.y,F.z,F.z-5)||this._retainChildren(F.x,F.y,F.z,F.z+2)}for(f in this._tiles)this._tiles[f].retain||this._removeTile(f)}},_removeTilesAtZoom:function(f){for(var v in this._tiles)this._tiles[v].coords.z===f&&this._removeTile(v)},_removeAllTiles:function(){for(var f in this._tiles)this._removeTile(f)},_invalidateAll:function(){for(var f in this._levels)cn(this._levels[f].el),this._onRemoveLevel(Number(f)),delete this._levels[f];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(f,v,O,F){var q=Math.floor(f/2),re=Math.floor(v/2),Oe=O-1,Qe=new $(+q,+re);Qe.z=+Oe;var Xe=this._tileCoordsToKey(Qe),Lt=this._tiles[Xe];return Lt&&Lt.active?(Lt.retain=!0,!0):(Lt&&Lt.loaded&&(Lt.retain=!0),Oe>F?this._retainParent(q,re,Oe,F):!1)},_retainChildren:function(f,v,O,F){for(var q=2*f;q<2*f+2;q++)for(var re=2*v;re<2*v+2;re++){var Oe=new $(q,re);Oe.z=O+1;var Qe=this._tileCoordsToKey(Oe),Xe=this._tiles[Qe];if(Xe&&Xe.active){Xe.retain=!0;continue}else Xe&&Xe.loaded&&(Xe.retain=!0);O+1<F&&this._retainChildren(q,re,O+1,F)}},_resetView:function(f){var v=f&&(f.pinch||f.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),v,v)},_animateZoom:function(f){this._setView(f.center,f.zoom,!0,f.noUpdate)},_clampZoom:function(f){var v=this.options;return v.minNativeZoom!==void 0&&f<v.minNativeZoom?v.minNativeZoom:v.maxNativeZoom!==void 0&&v.maxNativeZoom<f?v.maxNativeZoom:f},_setView:function(f,v,O,F){var q=Math.round(v);this.options.maxZoom!==void 0&&q>this.options.maxZoom||this.options.minZoom!==void 0&&q<this.options.minZoom?q=void 0:q=this._clampZoom(q);var re=this.options.updateWhenZooming&&q!==this._tileZoom;(!F||re)&&(this._tileZoom=q,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),q!==void 0&&this._update(f),O||this._pruneTiles(),this._noPrune=!!O),this._setZoomTransforms(f,v)},_setZoomTransforms:function(f,v){for(var O in this._levels)this._setZoomTransform(this._levels[O],f,v)},_setZoomTransform:function(f,v,O){var F=this._map.getZoomScale(O,f.zoom),q=f.origin.multiplyBy(F).subtract(this._map._getNewPixelOrigin(v,O)).round();Ze.any3d?tt(f.el,q,F):Cn(f.el,q)},_resetGrid:function(){var f=this._map,v=f.options.crs,O=this._tileSize=this.getTileSize(),F=this._tileZoom,q=this._map.getPixelWorldBounds(this._tileZoom);q&&(this._globalTileRange=this._pxBoundsToTileRange(q)),this._wrapX=v.wrapLng&&!this.options.noWrap&&[Math.floor(f.project([0,v.wrapLng[0]],F).x/O.x),Math.ceil(f.project([0,v.wrapLng[1]],F).x/O.y)],this._wrapY=v.wrapLat&&!this.options.noWrap&&[Math.floor(f.project([v.wrapLat[0],0],F).y/O.x),Math.ceil(f.project([v.wrapLat[1],0],F).y/O.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(f){var v=this._map,O=v._animatingZoom?Math.max(v._animateToZoom,v.getZoom()):v.getZoom(),F=v.getZoomScale(O,this._tileZoom),q=v.project(f,this._tileZoom).floor(),re=v.getSize().divideBy(F*2);return new U(q.subtract(re),q.add(re))},_update:function(f){var v=this._map;if(v){var O=this._clampZoom(v.getZoom());if(f===void 0&&(f=v.getCenter()),this._tileZoom!==void 0){var F=this._getTiledPixelBounds(f),q=this._pxBoundsToTileRange(F),re=q.getCenter(),Oe=[],Qe=this.options.keepBuffer,Xe=new U(q.getBottomLeft().subtract([Qe,-Qe]),q.getTopRight().add([Qe,-Qe]));if(!(isFinite(q.min.x)&&isFinite(q.min.y)&&isFinite(q.max.x)&&isFinite(q.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Lt in this._tiles){var nn=this._tiles[Lt].coords;(nn.z!==this._tileZoom||!Xe.contains(new $(nn.x,nn.y)))&&(this._tiles[Lt].current=!1)}if(Math.abs(O-this._tileZoom)>1){this._setView(f,O);return}for(var Bn=q.min.y;Bn<=q.max.y;Bn++)for(var Yn=q.min.x;Yn<=q.max.x;Yn++){var l1=new $(Yn,Bn);if(l1.z=this._tileZoom,!!this._isValidTile(l1)){var pe=this._tiles[this._tileCoordsToKey(l1)];pe?pe.current=!0:Oe.push(l1)}}if(Oe.sort(function(we,Re){return we.distanceTo(re)-Re.distanceTo(re)}),Oe.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var he=document.createDocumentFragment();for(Yn=0;Yn<Oe.length;Yn++)this._addTile(Oe[Yn],he);this._level.el.appendChild(he)}}}},_isValidTile:function(f){var v=this._map.options.crs;if(!v.infinite){var O=this._globalTileRange;if(!v.wrapLng&&(f.x<O.min.x||f.x>O.max.x)||!v.wrapLat&&(f.y<O.min.y||f.y>O.max.y))return!1}if(!this.options.bounds)return!0;var F=this._tileCoordsToBounds(f);return G(this.options.bounds).overlaps(F)},_keyToBounds:function(f){return this._tileCoordsToBounds(this._keyToTileCoords(f))},_tileCoordsToNwSe:function(f){var v=this._map,O=this.getTileSize(),F=f.scaleBy(O),q=F.add(O),re=v.unproject(F,f.z),Oe=v.unproject(q,f.z);return[re,Oe]},_tileCoordsToBounds:function(f){var v=this._tileCoordsToNwSe(f),O=new J(v[0],v[1]);return this.options.noWrap||(O=this._map.wrapLatLngBounds(O)),O},_tileCoordsToKey:function(f){return f.x+":"+f.y+":"+f.z},_keyToTileCoords:function(f){var v=f.split(":"),O=new $(+v[0],+v[1]);return O.z=+v[2],O},_removeTile:function(f){var v=this._tiles[f];v&&(cn(v.el),delete this._tiles[f],this.fire("tileunload",{tile:v.el,coords:this._keyToTileCoords(f)}))},_initTile:function(f){gn(f,"leaflet-tile");var v=this.getTileSize();f.style.width=v.x+"px",f.style.height=v.y+"px",f.onselectstart=h,f.onmousemove=h,Ze.ielt9&&this.options.opacity<1&&bt(f,this.options.opacity)},_addTile:function(f,v){var O=this._getTilePos(f),F=this._tileCoordsToKey(f),q=this.createTile(this._wrapCoords(f),a(this._tileReady,this,f));this._initTile(q),this.createTile.length<2&&N(a(this._tileReady,this,f,null,q)),Cn(q,O),this._tiles[F]={el:q,coords:f,current:!0},v.appendChild(q),this.fire("tileloadstart",{tile:q,coords:f})},_tileReady:function(f,v,O){v&&this.fire("tileerror",{error:v,tile:O,coords:f});var F=this._tileCoordsToKey(f);O=this._tiles[F],O&&(O.loaded=+new Date,this._map._fadeAnimated?(bt(O.el,0),T(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(O.active=!0,this._pruneTiles()),v||(gn(O.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:O.el,coords:f})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ze.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(f){return f.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(f){var v=new $(this._wrapX?d(f.x,this._wrapX):f.x,this._wrapY?d(f.y,this._wrapY):f.y);return v.z=f.z,v},_pxBoundsToTileRange:function(f){var v=this.getTileSize();return new U(f.min.unscaleBy(v).floor(),f.max.unscaleBy(v).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var f in this._tiles)if(!this._tiles[f].loaded)return!1;return!0}});function k2(f){return new lr(f)}var la=lr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(f,v){this._url=f,v=b(this,v),v.detectRetina&&Ze.retina&&v.maxZoom>0?(v.tileSize=Math.floor(v.tileSize/2),v.zoomReverse?(v.zoomOffset--,v.minZoom=Math.min(v.maxZoom,v.minZoom+1)):(v.zoomOffset++,v.maxZoom=Math.max(v.minZoom,v.maxZoom-1)),v.minZoom=Math.max(0,v.minZoom)):v.zoomReverse?v.minZoom=Math.min(v.maxZoom,v.minZoom):v.maxZoom=Math.max(v.minZoom,v.maxZoom),typeof v.subdomains=="string"&&(v.subdomains=v.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(f,v){return this._url===f&&v===void 0&&(v=!0),this._url=f,v||this.redraw(),this},createTile:function(f,v){var O=document.createElement("img");return Tn(O,"load",a(this._tileOnLoad,this,v,O)),Tn(O,"error",a(this._tileOnError,this,v,O)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(O.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(O.referrerPolicy=this.options.referrerPolicy),O.alt="",O.src=this.getTileUrl(f),O},getTileUrl:function(f){var v={r:Ze.retina?"@2x":"",s:this._getSubdomain(f),x:f.x,y:f.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var O=this._globalTileRange.max.y-f.y;this.options.tms&&(v.y=O),v["-y"]=O}return w(this._url,o(v,this.options))},_tileOnLoad:function(f,v){Ze.ielt9?setTimeout(a(f,this,null,v),0):f(null,v)},_tileOnError:function(f,v,O){var F=this.options.errorTileUrl;F&&v.getAttribute("src")!==F&&(v.src=F),f(O,v)},_onTileRemove:function(f){f.tile.onload=null},_getZoomForUrl:function(){var f=this._tileZoom,v=this.options.maxZoom,O=this.options.zoomReverse,F=this.options.zoomOffset;return O&&(f=v-f),f+F},_getSubdomain:function(f){var v=Math.abs(f.x+f.y)%this.options.subdomains.length;return this.options.subdomains[v]},_abortLoading:function(){var f,v;for(f in this._tiles)if(this._tiles[f].coords.z!==this._tileZoom&&(v=this._tiles[f].el,v.onload=h,v.onerror=h,!v.complete)){v.src=S;var O=this._tiles[f].coords;cn(v),delete this._tiles[f],this.fire("tileabort",{tile:v,coords:O})}},_removeTile:function(f){var v=this._tiles[f];if(v)return v.el.setAttribute("src",S),lr.prototype._removeTile.call(this,f)},_tileReady:function(f,v,O){if(!(!this._map||O&&O.getAttribute("src")===S))return lr.prototype._tileReady.call(this,f,v,O)}});function y9(f,v){return new la(f,v)}var c0=la.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(f,v){this._url=f;var O=o({},this.defaultWmsParams);for(var F in v)F in this.options||(O[F]=v[F]);v=b(this,v);var q=v.detectRetina&&Ze.retina?2:1,re=this.getTileSize();O.width=re.x*q,O.height=re.y*q,this.wmsParams=O},onAdd:function(f){this._crs=this.options.crs||f.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var v=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[v]=this._crs.code,la.prototype.onAdd.call(this,f)},getTileUrl:function(f){var v=this._tileCoordsToNwSe(f),O=this._crs,F=Y(O.project(v[0]),O.project(v[1])),q=F.min,re=F.max,Oe=(this._wmsVersion>=1.3&&this._crs===c5?[q.y,q.x,re.y,re.x]:[q.x,q.y,re.x,re.y]).join(","),Qe=la.prototype.getTileUrl.call(this,f);return Qe+p(this.wmsParams,Qe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Oe},setParams:function(f,v){return o(this.wmsParams,f),v||this.redraw(),this}});function u0(f,v){return new c0(f,v)}la.WMS=c0,y9.wms=u0;var ci=tr.extend({options:{padding:.1},initialize:function(f){b(this,f),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),gn(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 f={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(f.zoomanim=this._onAnimZoom),f},_onAnimZoom:function(f){this._updateTransform(f.center,f.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(f,v){var O=this._map.getZoomScale(v,this._zoom),F=this._map.getSize().multiplyBy(.5+this.options.padding),q=this._map.project(this._center,v),re=F.multiplyBy(-O).add(q).subtract(this._map._getNewPixelOrigin(f,v));Ze.any3d?tt(this._container,re,O):Cn(this._container,re)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var f in this._layers)this._layers[f]._reset()},_onZoomEnd:function(){for(var f in this._layers)this._layers[f]._project()},_updatePaths:function(){for(var f in this._layers)this._layers[f]._update()},_update:function(){var f=this.options.padding,v=this._map.getSize(),O=this._map.containerPointToLayerPoint(v.multiplyBy(-f)).round();this._bounds=new U(O,O.add(v.multiplyBy(1+f*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),x9=ci.extend({options:{tolerance:0},getEvents:function(){var f=ci.prototype.getEvents.call(this);return f.viewprereset=this._onViewPreReset,f},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ci.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var f=this._container=document.createElement("canvas");Tn(f,"mousemove",this._onMouseMove,this),Tn(f,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Tn(f,"mouseout",this._handleMouseOut,this),f._leaflet_disable_events=!0,this._ctx=f.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,cn(this._container),mn(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var f;this._redrawBounds=null;for(var v in this._layers)f=this._layers[v],f._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ci.prototype._update.call(this);var f=this._bounds,v=this._container,O=f.getSize(),F=Ze.retina?2:1;Cn(v,f.min),v.width=F*O.x,v.height=F*O.y,v.style.width=O.x+"px",v.style.height=O.y+"px",Ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-f.min.x,-f.min.y),this.fire("update")}},_reset:function(){ci.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(f){this._updateDashArray(f),this._layers[l(f)]=f;var v=f._order={layer:f,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=v),this._drawLast=v,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(f){this._requestRedraw(f)},_removePath:function(f){var v=f._order,O=v.next,F=v.prev;O?O.prev=F:this._drawLast=F,F?F.next=O:this._drawFirst=O,delete f._order,delete this._layers[l(f)],this._requestRedraw(f)},_updatePath:function(f){this._extendRedrawBounds(f),f._project(),f._update(),this._requestRedraw(f)},_updateStyle:function(f){this._updateDashArray(f),this._requestRedraw(f)},_updateDashArray:function(f){if(typeof f.options.dashArray=="string"){var v=f.options.dashArray.split(/[, ]+/),O=[],F,q;for(q=0;q<v.length;q++){if(F=Number(v[q]),isNaN(F))return;O.push(F)}f.options._dashArray=O}else f.options._dashArray=f.options.dashArray},_requestRedraw:function(f){this._map&&(this._extendRedrawBounds(f),this._redrawRequest=this._redrawRequest||N(this._redraw,this))},_extendRedrawBounds:function(f){if(f._pxBounds){var v=(f.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new U,this._redrawBounds.extend(f._pxBounds.min.subtract([v,v])),this._redrawBounds.extend(f._pxBounds.max.add([v,v]))}},_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 f=this._redrawBounds;if(f){var v=f.getSize();this._ctx.clearRect(f.min.x,f.min.y,v.x,v.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 f,v=this._redrawBounds;if(this._ctx.save(),v){var O=v.getSize();this._ctx.beginPath(),this._ctx.rect(v.min.x,v.min.y,O.x,O.y),this._ctx.clip()}this._drawing=!0;for(var F=this._drawFirst;F;F=F.next)f=F.layer,(!v||f._pxBounds&&f._pxBounds.intersects(v))&&f._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(f,v){if(this._drawing){var O,F,q,re,Oe=f._parts,Qe=Oe.length,Xe=this._ctx;if(Qe){for(Xe.beginPath(),O=0;O<Qe;O++){for(F=0,q=Oe[O].length;F<q;F++)re=Oe[O][F],Xe[F?"lineTo":"moveTo"](re.x,re.y);v&&Xe.closePath()}this._fillStroke(Xe,f)}}},_updateCircle:function(f){if(!(!this._drawing||f._empty())){var v=f._point,O=this._ctx,F=Math.max(Math.round(f._radius),1),q=(Math.max(Math.round(f._radiusY),1)||F)/F;q!==1&&(O.save(),O.scale(1,q)),O.beginPath(),O.arc(v.x,v.y/q,F,0,Math.PI*2,!1),q!==1&&O.restore(),this._fillStroke(O,f)}},_fillStroke:function(f,v){var O=v.options;O.fill&&(f.globalAlpha=O.fillOpacity,f.fillStyle=O.fillColor||O.color,f.fill(O.fillRule||"evenodd")),O.stroke&&O.weight!==0&&(f.setLineDash&&f.setLineDash(v.options&&v.options._dashArray||[]),f.globalAlpha=O.opacity,f.lineWidth=O.weight,f.strokeStyle=O.color,f.lineCap=O.lineCap,f.lineJoin=O.lineJoin,f.stroke())},_onClick:function(f){for(var v=this._map.mouseEventToLayerPoint(f),O,F,q=this._drawFirst;q;q=q.next)O=q.layer,O.options.interactive&&O._containsPoint(v)&&(!(f.type==="click"||f.type==="preclick")||!this._map._draggableMoved(O))&&(F=O);this._fireEvent(F?[F]:!1,f)},_onMouseMove:function(f){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var v=this._map.mouseEventToLayerPoint(f);this._handleMouseHover(f,v)}},_handleMouseOut:function(f){var v=this._hoveredLayer;v&&(Kt(this._container,"leaflet-interactive"),this._fireEvent([v],f,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(f,v){if(!this._mouseHoverThrottled){for(var O,F,q=this._drawFirst;q;q=q.next)O=q.layer,O.options.interactive&&O._containsPoint(v)&&(F=O);F!==this._hoveredLayer&&(this._handleMouseOut(f),F&&(gn(this._container,"leaflet-interactive"),this._fireEvent([F],f,"mouseover"),this._hoveredLayer=F)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,f),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(f,v,O){this._map._fireDOMEvent(v,O||v.type,f)},_bringToFront:function(f){var v=f._order;if(v){var O=v.next,F=v.prev;if(O)O.prev=F;else return;F?F.next=O:O&&(this._drawFirst=O),v.prev=this._drawLast,this._drawLast.next=v,v.next=null,this._drawLast=v,this._requestRedraw(f)}},_bringToBack:function(f){var v=f._order;if(v){var O=v.next,F=v.prev;if(F)F.next=O;else return;O?O.prev=F:F&&(this._drawLast=F),v.prev=null,v.next=this._drawFirst,this._drawFirst.prev=v,this._drawFirst=v,this._requestRedraw(f)}}});function Io(f){return Ze.canvas?new x9(f):null}var Ko=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(f){return document.createElement("<lvml:"+f+' class="lvml">')}}catch{}return function(f){return document.createElement("<"+f+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),h5={_initContainer:function(){this._container=Dt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ci.prototype._update.call(this),this.fire("update"))},_initPath:function(f){var v=f._container=Ko("shape");gn(v,"leaflet-vml-shape "+(this.options.className||"")),v.coordsize="1 1",f._path=Ko("path"),v.appendChild(f._path),this._updateStyle(f),this._layers[l(f)]=f},_addPath:function(f){var v=f._container;this._container.appendChild(v),f.options.interactive&&f.addInteractiveTarget(v)},_removePath:function(f){var v=f._container;cn(v),f.removeInteractiveTarget(v),delete this._layers[l(f)]},_updateStyle:function(f){var v=f._stroke,O=f._fill,F=f.options,q=f._container;q.stroked=!!F.stroke,q.filled=!!F.fill,F.stroke?(v||(v=f._stroke=Ko("stroke")),q.appendChild(v),v.weight=F.weight+"px",v.color=F.color,v.opacity=F.opacity,F.dashArray?v.dashStyle=x(F.dashArray)?F.dashArray.join(" "):F.dashArray.replace(/( *, *)/g," "):v.dashStyle="",v.endcap=F.lineCap.replace("butt","flat"),v.joinstyle=F.lineJoin):v&&(q.removeChild(v),f._stroke=null),F.fill?(O||(O=f._fill=Ko("fill")),q.appendChild(O),O.color=F.fillColor||F.color,O.opacity=F.fillOpacity):O&&(q.removeChild(O),f._fill=null)},_updateCircle:function(f){var v=f._point.round(),O=Math.round(f._radius),F=Math.round(f._radiusY||O);this._setPath(f,f._empty()?"M0 0":"AL "+v.x+","+v.y+" "+O+","+F+" 0,"+65535*360)},_setPath:function(f,v){f._path.v=v},_bringToFront:function(f){Pr(f._container)},_bringToBack:function(f){nr(f._container)}},Zo=Ze.vml?Ko:Ae,ui=ci.extend({_initContainer:function(){this._container=Zo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){cn(this._container),mn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ci.prototype._update.call(this);var f=this._bounds,v=f.getSize(),O=this._container;(!this._svgSize||!this._svgSize.equals(v))&&(this._svgSize=v,O.setAttribute("width",v.x),O.setAttribute("height",v.y)),Cn(O,f.min),O.setAttribute("viewBox",[f.min.x,f.min.y,v.x,v.y].join(" ")),this.fire("update")}},_initPath:function(f){var v=f._path=Zo("path");f.options.className&&gn(v,f.options.className),f.options.interactive&&gn(v,"leaflet-interactive"),this._updateStyle(f),this._layers[l(f)]=f},_addPath:function(f){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(f._path),f.addInteractiveTarget(f._path)},_removePath:function(f){cn(f._path),f.removeInteractiveTarget(f._path),delete this._layers[l(f)]},_updatePath:function(f){f._project(),f._update()},_updateStyle:function(f){var v=f._path,O=f.options;v&&(O.stroke?(v.setAttribute("stroke",O.color),v.setAttribute("stroke-opacity",O.opacity),v.setAttribute("stroke-width",O.weight),v.setAttribute("stroke-linecap",O.lineCap),v.setAttribute("stroke-linejoin",O.lineJoin),O.dashArray?v.setAttribute("stroke-dasharray",O.dashArray):v.removeAttribute("stroke-dasharray"),O.dashOffset?v.setAttribute("stroke-dashoffset",O.dashOffset):v.removeAttribute("stroke-dashoffset")):v.setAttribute("stroke","none"),O.fill?(v.setAttribute("fill",O.fillColor||O.color),v.setAttribute("fill-opacity",O.fillOpacity),v.setAttribute("fill-rule",O.fillRule||"evenodd")):v.setAttribute("fill","none"))},_updatePoly:function(f,v){this._setPath(f,Me(f._parts,v))},_updateCircle:function(f){var v=f._point,O=Math.max(Math.round(f._radius),1),F=Math.max(Math.round(f._radiusY),1)||O,q="a"+O+","+F+" 0 1,0 ",re=f._empty()?"M0 0":"M"+(v.x-O)+","+v.y+q+O*2+",0 "+q+-O*2+",0 ";this._setPath(f,re)},_setPath:function(f,v){f._path.setAttribute("d",v)},_bringToFront:function(f){Pr(f._path)},_bringToBack:function(f){nr(f._path)}});Ze.vml&&ui.include(h5);function $a(f){return Ze.svg||Ze.vml?new ui(f):null}fr.include({getRenderer:function(f){var v=f.options.renderer||this._getPaneRenderer(f.options.pane)||this.options.renderer||this._renderer;return v||(v=this._renderer=this._createRenderer()),this.hasLayer(v)||this.addLayer(v),v},_getPaneRenderer:function(f){if(f==="overlayPane"||f===void 0)return!1;var v=this._paneRenderers[f];return v===void 0&&(v=this._createRenderer({pane:f}),this._paneRenderers[f]=v),v},_createRenderer:function(f){return this.options.preferCanvas&&Io(f)||$a(f)}});var Ti=ra.extend({initialize:function(f,v){ra.prototype.initialize.call(this,this._boundsToLatLngs(f),v)},setBounds:function(f){return this.setLatLngs(this._boundsToLatLngs(f))},_boundsToLatLngs:function(f){return f=G(f),[f.getSouthWest(),f.getNorthWest(),f.getNorthEast(),f.getSouthEast()]}});function d0(f,v){return new Ti(f,v)}ui.create=Zo,ui.pointsToPath=Me,k1.geometryToLayer=Z1,k1.coordsToLatLng=v9,k1.coordsToLatLngs=l0,k1.latLngToCoords=is,k1.latLngsToCoords=b9,k1.getFeature=Ua,k1.asFeature=Ro,fr.mergeOptions({boxZoom:!0});var ki=i1.extend({initialize:function(f){this._map=f,this._container=f._container,this._pane=f._panes.overlayPane,this._resetStateTimeout=0,f.on("unload",this._destroy,this)},addHooks:function(){Tn(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){mn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){cn(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(f){if(!f.shiftKey||f.which!==1&&f.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Dr(),yn(),this._startPoint=this._map.mouseEventToContainerPoint(f),Tn(document,{contextmenu:er,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(f){this._moved||(this._moved=!0,this._box=Dt("div","leaflet-zoom-box",this._container),gn(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(f);var v=new U(this._point,this._startPoint),O=v.getSize();Cn(this._box,v.min),this._box.style.width=O.x+"px",this._box.style.height=O.y+"px"},_finish:function(){this._moved&&(cn(this._box),Kt(this._container,"leaflet-crosshair")),sr(),tn(),mn(document,{contextmenu:er,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(f){if(!(f.which!==1&&f.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var v=new J(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(v).fire("boxzoomend",{boxZoomBounds:v})}},_onKeyDown:function(f){f.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});fr.addInitHook("addHandler","boxZoom",ki),fr.mergeOptions({doubleClickZoom:!0});var Qo=i1.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(f){var v=this._map,O=v.getZoom(),F=v.options.zoomDelta,q=f.originalEvent.shiftKey?O-F:O+F;v.options.doubleClickZoom==="center"?v.setZoom(q):v.setZoomAround(f.containerPoint,q)}});fr.addInitHook("addHandler","doubleClickZoom",Qo),fr.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ca=i1.extend({addHooks:function(){if(!this._draggable){var f=this._map;this._draggable=new Ri(f._mapPane,f._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),f.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),f.on("zoomend",this._onZoomEnd,this),f.whenReady(this._onZoomEnd,this))}gn(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Kt(this._map._container,"leaflet-grab"),Kt(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 f=this._map;if(f._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var v=G(this._map.options.maxBounds);this._offsetLimit=Y(this._map.latLngToContainerPoint(v.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(v.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;f.fire("movestart").fire("dragstart"),f.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(f){if(this._map.options.inertia){var v=this._lastTime=+new Date,O=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(O),this._times.push(v),this._prunePositions(v)}this._map.fire("move",f).fire("drag",f)},_prunePositions:function(f){for(;this._positions.length>1&&f-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var f=this._map.getSize().divideBy(2),v=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=v.subtract(f).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(f,v){return f-(f-v)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var f=this._draggable._newPos.subtract(this._draggable._startPos),v=this._offsetLimit;f.x<v.min.x&&(f.x=this._viscousLimit(f.x,v.min.x)),f.y<v.min.y&&(f.y=this._viscousLimit(f.y,v.min.y)),f.x>v.max.x&&(f.x=this._viscousLimit(f.x,v.max.x)),f.y>v.max.y&&(f.y=this._viscousLimit(f.y,v.max.y)),this._draggable._newPos=this._draggable._startPos.add(f)}},_onPreDragWrap:function(){var f=this._worldWidth,v=Math.round(f/2),O=this._initialWorldOffset,F=this._draggable._newPos.x,q=(F-v+O)%f+v-O,re=(F+v+O)%f-v-O,Oe=Math.abs(q+O)<Math.abs(re+O)?q:re;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Oe},_onDragEnd:function(f){var v=this._map,O=v.options,F=!O.inertia||f.noInertia||this._times.length<2;if(v.fire("dragend",f),F)v.fire("moveend");else{this._prunePositions(+new Date);var q=this._lastPos.subtract(this._positions[0]),re=(this._lastTime-this._times[0])/1e3,Oe=O.easeLinearity,Qe=q.multiplyBy(Oe/re),Xe=Qe.distanceTo([0,0]),Lt=Math.min(O.inertiaMaxSpeed,Xe),nn=Qe.multiplyBy(Lt/Xe),Bn=Lt/(O.inertiaDeceleration*Oe),Yn=nn.multiplyBy(-Bn/2).round();!Yn.x&&!Yn.y?v.fire("moveend"):(Yn=v._limitOffset(Yn,v.options.maxBounds),N(function(){v.panBy(Yn,{duration:Bn,easeLinearity:Oe,noMoveStart:!0,animate:!0})}))}}});fr.addInitHook("addHandler","dragging",ca),fr.mergeOptions({keyboard:!0,keyboardPanDelta:80});var w9=i1.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(f){this._map=f,this._setPanDelta(f.options.keyboardPanDelta),this._setZoomDelta(f.options.zoomDelta)},addHooks:function(){var f=this._map._container;f.tabIndex<=0&&(f.tabIndex="0"),Tn(f,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),mn(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 f=document.body,v=document.documentElement,O=f.scrollTop||v.scrollTop,F=f.scrollLeft||v.scrollLeft;this._map._container.focus(),window.scrollTo(F,O)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(f){var v=this._panKeys={},O=this.keyCodes,F,q;for(F=0,q=O.left.length;F<q;F++)v[O.left[F]]=[-1*f,0];for(F=0,q=O.right.length;F<q;F++)v[O.right[F]]=[f,0];for(F=0,q=O.down.length;F<q;F++)v[O.down[F]]=[0,f];for(F=0,q=O.up.length;F<q;F++)v[O.up[F]]=[0,-1*f]},_setZoomDelta:function(f){var v=this._zoomKeys={},O=this.keyCodes,F,q;for(F=0,q=O.zoomIn.length;F<q;F++)v[O.zoomIn[F]]=f;for(F=0,q=O.zoomOut.length;F<q;F++)v[O.zoomOut[F]]=-f},_addHooks:function(){Tn(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){mn(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(f){if(!(f.altKey||f.ctrlKey||f.metaKey)){var v=f.keyCode,O=this._map,F;if(v in this._panKeys){if(!O._panAnim||!O._panAnim._inProgress)if(F=this._panKeys[v],f.shiftKey&&(F=Z(F).multiplyBy(3)),O.options.maxBounds&&(F=O._limitOffset(Z(F),O.options.maxBounds)),O.options.worldCopyJump){var q=O.wrapLatLng(O.unproject(O.project(O.getCenter()).add(F)));O.panTo(q)}else O.panBy(F)}else if(v in this._zoomKeys)O.setZoom(O.getZoom()+(f.shiftKey?3:1)*this._zoomKeys[v]);else if(v===27&&O._popup&&O._popup.options.closeOnEscapeKey)O.closePopup();else return;er(f)}}});fr.addInitHook("addHandler","keyboard",w9),fr.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var f0=i1.extend({addHooks:function(){Tn(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){mn(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(f){var v=Bi(f),O=this._map.options.wheelDebounceTime;this._delta+=v,this._lastMousePos=this._map.mouseEventToContainerPoint(f),this._startTime||(this._startTime=+new Date);var F=Math.max(O-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),F),er(f)},_performZoom:function(){var f=this._map,v=f.getZoom(),O=this._map.options.zoomSnap||0;f._stop();var F=this._delta/(this._map.options.wheelPxPerZoomLevel*4),q=4*Math.log(2/(1+Math.exp(-Math.abs(F))))/Math.LN2,re=O?Math.ceil(q/O)*O:q,Oe=f._limitZoom(v+(this._delta>0?re:-re))-v;this._delta=0,this._startTime=null,Oe&&(f.options.scrollWheelZoom==="center"?f.setZoom(v+Oe):f.setZoomAround(this._lastMousePos,v+Oe))}});fr.addInitHook("addHandler","scrollWheelZoom",f0);var as=600;fr.mergeOptions({tapHold:Ze.touchNative&&Ze.safari&&Ze.mobile,tapTolerance:15});var _9=i1.extend({addHooks:function(){Tn(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){mn(this._map._container,"touchstart",this._onDown,this)},_onDown:function(f){if(clearTimeout(this._holdTimeout),f.touches.length===1){var v=f.touches[0];this._startPos=this._newPos=new $(v.clientX,v.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Tn(document,"touchend",Fn),Tn(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",v))},this),as),Tn(document,"touchend touchcancel contextmenu",this._cancel,this),Tn(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function f(){mn(document,"touchend",Fn),mn(document,"touchend touchcancel",f)},_cancel:function(){clearTimeout(this._holdTimeout),mn(document,"touchend touchcancel contextmenu",this._cancel,this),mn(document,"touchmove",this._onMove,this)},_onMove:function(f){var v=f.touches[0];this._newPos=new $(v.clientX,v.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(f,v){var O=new MouseEvent(f,{bubbles:!0,cancelable:!0,view:window,screenX:v.screenX,screenY:v.screenY,clientX:v.clientX,clientY:v.clientY});O._simulated=!0,v.target.dispatchEvent(O)}});fr.addInitHook("addHandler","tapHold",_9),fr.mergeOptions({touchZoom:Ze.touch,bounceAtZoomLimits:!0});var Ka=i1.extend({addHooks:function(){gn(this._map._container,"leaflet-touch-zoom"),Tn(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Kt(this._map._container,"leaflet-touch-zoom"),mn(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(f){var v=this._map;if(!(!f.touches||f.touches.length!==2||v._animatingZoom||this._zooming)){var O=v.mouseEventToContainerPoint(f.touches[0]),F=v.mouseEventToContainerPoint(f.touches[1]);this._centerPoint=v.getSize()._divideBy(2),this._startLatLng=v.containerPointToLatLng(this._centerPoint),v.options.touchZoom!=="center"&&(this._pinchStartLatLng=v.containerPointToLatLng(O.add(F)._divideBy(2))),this._startDist=O.distanceTo(F),this._startZoom=v.getZoom(),this._moved=!1,this._zooming=!0,v._stop(),Tn(document,"touchmove",this._onTouchMove,this),Tn(document,"touchend touchcancel",this._onTouchEnd,this),Fn(f)}},_onTouchMove:function(f){if(!(!f.touches||f.touches.length!==2||!this._zooming)){var v=this._map,O=v.mouseEventToContainerPoint(f.touches[0]),F=v.mouseEventToContainerPoint(f.touches[1]),q=O.distanceTo(F)/this._startDist;if(this._zoom=v.getScaleZoom(q,this._startZoom),!v.options.bounceAtZoomLimits&&(this._zoom<v.getMinZoom()&&q<1||this._zoom>v.getMaxZoom()&&q>1)&&(this._zoom=v._limitZoom(this._zoom)),v.options.touchZoom==="center"){if(this._center=this._startLatLng,q===1)return}else{var re=O._add(F)._divideBy(2)._subtract(this._centerPoint);if(q===1&&re.x===0&&re.y===0)return;this._center=v.unproject(v.project(this._pinchStartLatLng,this._zoom).subtract(re),this._zoom)}this._moved||(v._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var Oe=a(v._move,v,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(Oe,this,!0),Fn(f)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,T(this._animRequest),mn(document,"touchmove",this._onTouchMove,this),mn(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))}});fr.addInitHook("addHandler","touchZoom",Ka),fr.BoxZoom=ki,fr.DoubleClickZoom=Qo,fr.Drag=ca,fr.Keyboard=w9,fr.ScrollWheelZoom=f0,fr.TapHold=_9,fr.TouchZoom=Ka,n.Bounds=U,n.Browser=Ze,n.CRS=ue,n.Canvas=x9,n.Circle=bo,n.CircleMarker=za,n.Class=V,n.Control=ro,n.DivIcon=Ni,n.DivOverlay=Q1,n.DomEvent=es,n.DomUtil=go,n.Draggable=Ri,n.Evented=K,n.FeatureGroup=vo,n.GeoJSON=k1,n.GridLayer=lr,n.Handler=i1,n.Icon=si,n.ImageOverlay=sn,n.LatLng=ee,n.LatLngBounds=J,n.Layer=tr,n.LayerGroup=Bo,n.LineUtil=ka,n.Map=fr,n.Marker=A9,n.Mixin=s5,n.Path=Pi,n.Point=$,n.PolyUtil=ns,n.Polygon=ra,n.Polyline=a1,n.Popup=b1,n.PosAnimation=ts,n.Projection=Ao,n.Rectangle=Ti,n.Renderer=ci,n.SVG=ui,n.SVGOverlay=Br,n.TileLayer=la,n.Tooltip=aa,n.Transformation=Ce,n.Util=j,n.VideoOverlay=hr,n.bind=a,n.bounds=Y,n.canvas=Io,n.circle=Di,n.circleMarker=Lr,n.control=Co,n.divIcon=sa,n.extend=o,n.featureGroup=Ii,n.geoJSON=st,n.geoJson=nt,n.gridLayer=k2,n.icon=T2,n.imageOverlay=$n,n.latLng=oe,n.latLngBounds=G,n.layerGroup=p9,n.map=E1,n.marker=na,n.point=Z,n.polygon=f5,n.polyline=d5,n.popup=ia,n.rectangle=d0,n.setOptions=b,n.stamp=l,n.svg=$a,n.svgOverlay=oa,n.tileLayer=y9,n.tooltip=li,n.transformation=fe,n.version=r,n.videoOverlay=Jr;var h0=window.L;n.noConflict=function(){return window.L=h0,this},window.L=n})}(Rl,Rl.exports)),Rl.exports}var D2=bOe();const Nc=Ji(D2);function $u(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function Ku(e,t){return t==null?function(r,o){const i=I.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=I.useRef();i.current||(i.current=e(r,o));const a=I.useRef(r),{instance:s}=i.current;return I.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,o]),i}}function yOe(e,t){I.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var i;(i=t.layerContainer)==null||i.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function sP(e){return function(n){const r=Uu(),o=e(Mm(n,r),r);return nP(r.map,n.attribution),aP(o.current,n.eventHandlers),yOe(o.current,r),o}}function xOe(e){function t(o,i){return $u(e(o),i)}const n=Ku(t),r=pOe(n);return iP(r)}function wOe(e,t){const n=Ku(e,t),r=sP(n);return COe(r)}function _Oe(e,t){const n=Ku(e),r=AOe(n,t);return mOe(r)}function EOe(e,t){const n=Ku(e,t),r=sP(n);return iP(r)}function SOe(e,t,n){const{opacity:r,zIndex:o}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),o!=null&&o!==n.zIndex&&e.setZIndex(o)}function lP(){return Uu().map}function gg(){return gg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gg.apply(this,arguments)}function MOe({bounds:e,boundsOptions:t,center:n,children:r,className:o,id:i,placeholder:a,style:s,whenReady:l,zoom:u,...d},h){const[C]=I.useState({className:o,id:i,style:s}),[m,A]=I.useState(null);I.useImperativeHandle(h,()=>(m==null?void 0:m.map)??null,[m]);const b=I.useCallback(_=>{if(_!==null&&m===null){const w=new D2.Map(_,d);n!=null&&u!=null?w.setView(n,u):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),A(hOe(w))}},[]);I.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const p=m?I.createElement(oP,{value:m},r):a??null;return I.createElement("div",gg({},C,{ref:b}),p)}const HOe=I.forwardRef(MOe),OOe=wOe(function({position:t,...n},r){const o=new D2.Marker(t,n);return $u(o,gOe(r,{overlayContainer:o}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),LOe=_Oe(function(t,n){const r=new D2.Popup(t,n.overlayContainer);return $u(r,n)},function(t,n,{position:r},o){I.useEffect(function(){const{instance:a}=t;function s(u){u.popup===a&&(a.update(),o(!0))}function l(u){u.popup===a&&o(!1)}return n.map.on({popupopen:s,popupclose:l}),n.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(n.map)):n.overlayContainer.bindPopup(a),function(){var d;n.map.off({popupopen:s,popupclose:l}),(d=n.overlayContainer)==null||d.unbindPopup(),n.map.removeLayer(a)}},[t,n,o,r])}),BOe=EOe(function({url:t,...n},r){const o=new D2.TileLayer(t,Mm(n,r));return $u(o,r)},function(t,n,r){SOe(t,n,r);const{url:o}=n;o!=null&&o!==r.url&&t.setUrl(o)}),ROe=xOe(function(t){return new D2.Control.Zoom(t)}),IOe={lat:20.5937,lng:78.9629},POe=5,DOe={osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'}},mf={defaultZoom:POe,defaultCenter:IOe,defaultMapProvider:DOe.osm},NOe=({items:e})=>{const t=lP();return I.useEffect(()=>{if(!(e!=null&&e.length))return;const n=Nc.latLngBounds(e==null?void 0:e.map(r=>r==null?void 0:r.position));t.fitBounds(n,{padding:[50,50]})},[e,t]),null},TOe=({mapRef:e})=>{const t=lP();return I.useEffect(()=>{e.current=t},[t]),null},kOe="../../src/assets/images/map_pin.svg",FOe=new Nc.Icon({iconUrl:kOe,iconSize:new Nc.Point(32,32),iconAnchor:new Nc.Point(16,32),className:"leaflet-div-icon",attribution:'<a href="https://www.flaticon.com/free-icons/location" title="location icons">@adrianadam - Flaticon</a>'}),V_=I.forwardRef(({position:e,children:t,...n},r)=>W.jsx(OOe,{position:e,icon:FOe,draggable:!1,ref:r,...n,children:t})),jOe=({items:e,width:t="500px",height:n="500px",showCardPopup:r=!0,showNavigation:o=!0,navClassName:i,navButtonColor:a,className:s,focusedIndex:l,onFocusedIndexChange:u})=>{const[d,h]=I.useState(!1),[C,m]=I.useState(0),A=typeof l=="number",b=A?l:C;I.useEffect(()=>{h(!0)},[]);const p=()=>{const M=(b-1+e.length)%e.length;A&&u?u(M):m(M)},_=()=>{const M=(b+1)%e.length;A&&u?u(M):m(M)},w=I.useMemo(()=>e==null?void 0:e[b],[e,b]),x=I.useRef(null);I.useEffect(()=>{if(!d)return;const M=requestAnimationFrame(()=>{var H;(H=x==null?void 0:x.current)==null||H.openPopup()});return()=>cancelAnimationFrame(M)},[b,d]);const E=a||"var(--awi-color-common-highlight, #ffcc00)",S=I.useRef(null);return I.useEffect(()=>{const M=S.current;M&&(w!=null&&w.position)&&M.setView(w.position,M.getZoom(),{animate:!0})},[w,d]),typeof window>"u"||!d||!(e!=null&&e.length)?null:W.jsxs("div",{className:`map_view_container ${s}`,style:{width:t,height:n},children:[W.jsxs(HOe,{center:w==null?void 0:w.position,zoom:mf.defaultZoom,className:"static_map",zoomControl:!1,style:{width:"100%",height:"100%"},children:[W.jsx(BOe,{url:mf.defaultMapProvider.url,attribution:mf.defaultMapProvider.attribution}),W.jsx(TOe,{mapRef:S}),W.jsx(NOe,{items:e}),W.jsx(ROe,{position:"bottomright"}),e==null?void 0:e.map((M,H)=>H===b?W.jsx(V_,{position:M==null?void 0:M.position,ref:x,children:r?W.jsx(LOe,{closeButton:!1,autoPan:!1,children:M==null?void 0:M.element}):null},H):W.jsx(V_,{position:M==null?void 0:M.position},H))]}),o?W.jsxs("div",{className:`map_view_nav_container ${i??""}`,children:[W.jsx(oi,{variant:"primary",onClick:p,size:"s",icon:"leftArrow",backgroundColor:E,borderColor:E,title:"Previous"}),W.jsx(oi,{variant:"primary",onClick:_,size:"s",icon:"rightArrow",iconPosition:"after",backgroundColor:E,borderColor:E,title:"Next"})]}):null]})},Cg=()=>{const e=I.useRef(!1),t=I.useRef(!1);return I.useEffect(()=>{const o=l=>{l.key==="Control"&&(e.current=!0,Qr.success("Control pressed, Handling control press events")),l.key==="Alt"&&(t.current=!0,Qr.success("Alt pressed, Handling alt press events")),l.key==="Command"&&(e.current=!0,Qr.success("Command pressed, Handling command press events"))},i=l=>{l.key==="Control"&&(e.current=!1),l.key==="Alt"&&(t.current=!1),l.key==="Command"&&(e.current=!1)},a=()=>{document.hidden&&(e.current=!1,t.current=!1)},s=()=>{e.current=!1,t.current=!1};return window.addEventListener("keydown",o),window.addEventListener("keyup",i),document.addEventListener("visibilitychange",a),window.addEventListener("blur",s),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",i),document.removeEventListener("visibilitychange",a),window.removeEventListener("blur",s)}},[]),{isCtrlPressedFunc:()=>e.current,isAltPressedFunc:()=>t.current}};function zOe(e=1,t=1){const[n,r]=I.useState(e),[o,i]=I.useState(t),a=I.useCallback(u=>{u>=1&&u<=o?r(u):console.error(`Invalid page number: ${u}`)},[o]),s=I.useCallback(()=>{a(n+1)},[n,a]),l=I.useCallback(()=>{a(n-1)},[n,a]);return{currentPage:n,setPage:a,nextPage:s,prevPage:l,totalPages:o,setTotalPages:i}}const cP=(e,t="",n)=>{!n||!e||s9.forEach(e,(r,o)=>{const i=`--${t}${o}`;s9.isObject(r)&&!s9.isArray(r)?cP(r,`${t}${o}-`,n):typeof r=="string"&&n.style.setProperty(i,r)})},uP=(e,t="",n)=>{!n||!e||s9.forEach(e,(r,o)=>{const i=`--${t}${o}`;s9.isObject(r)&&!s9.isArray(r)?uP(r,`${t}${o}-`,n):n.style.removeProperty(i)})},VOe=(e,t="")=>{const n={},r=(o,i)=>{s9.forEach(o,(a,s)=>{const l=`--${t}${i}${s}`;s9.isObject(a)&&!s9.isArray(a)?r(a,`${i}${s}-`):typeof a=="string"&&(n[`${i}${s}`.toUpperCase().replace(/-/g,"_")]=`var(${l})`)})};return r(e,""),n},dP=I.createContext({}),UOe="awi-color-",$Oe="awi-size-",KOe="awi-weight-",pf=(e,t,n)=>(I.useEffect(()=>{if(s9.isEqual(n.current,e))return;const r=document.documentElement;return cP(e,t,r),()=>uP(e,t,r)},[e,n,t]),e?VOe(e,t):{}),ZOe=({theme:e=Q_,log:t=!0,children:n})=>{const r=I.useRef(null),o=I.useRef(null),i=I.useRef(null),a=pf(e.colors,UOe,r),s=pf(e.sizes,$Oe,o),l=pf(e.weights,KOe,i),u=new yEe;return t&&(console.group("Theme Variables"),console.table(a),console.table(s),console.table(l),console.groupEnd()),W.jsx(EEe,{client:u,children:W.jsxs(dP.Provider,{value:{...a,...s,...l},children:[W.jsx(TE,{}),n]})})},QOe=()=>{const e=I.useContext(dP);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},WOe=()=>({success:(e,t)=>p6("success",e,t),error:(e,t)=>p6("error",e,t),info:(e,t)=>p6("info",e,t),warning:(e,t)=>p6("warning",e,t)});exports.AWI_ALL_GLOBALS=Rr;exports.AWI_IMAGE_VALIDITY_HELPER=nE;exports.AnnotationComponentLibrary=XHe;exports.AwiAnnotationHotkeys=yf;exports.AwiAnnotationTools=Rc;exports.AwiCanvasContainer=Ic;exports.AwiCustomConfirmation=YI;exports.AwiEmptyState=Qq;exports.AwiGenerateHeader=HE;exports.AwiHelperMethods=bi;exports.AwiInput=IE;exports.AwiLoadMoreButton=lee;exports.AwiMessageScreen=oc;exports.AwiModal=N8;exports.AwiModalBody=T8;exports.AwiModalFooter=F8;exports.AwiModalHeader=k8;exports.AwiModalRow=bl;exports.AwiPagination=NE;exports.AwiSafeLocalStorage=U9;exports.AwiSamModal=DE;exports.AwiScrollableTableCellList=cee;exports.AwiSlider=PE;exports.AwiTableBar=dOe;exports.AwiTableBody=EE;exports.AwiTableCell=vl;exports.AwiTableHeader=SE;exports.AwiTableHeaders=ME;exports.AwiTableInfinite=_E;exports.AwiTableRow=xg;exports.AwiToastMessage=Qr;exports.AwiUseKeyChecker=Cg;exports.Backdrop=OE;exports.Badge=uee;exports.Button=oi;exports.ButtonGroup=dee;exports.Chart=noe;exports.CompactEventCard=PS;exports.ContactInput=awe;exports.DEFAULT_THEME=Q_;exports.DateRangePicker=dwe;exports.DetectionCarousel=FR;exports.EventPreview=fwe;exports.Heatmap=Fwe;exports.Icon=T0;exports.Input=r4;exports.MapView=jOe;exports.MathAnnotationHelper=Ln;exports.MockImageGenerationHelper=GI;exports.Modal=zwe;exports.Multiselect=Vwe;exports.Pagination=Uwe;exports.Select=TR;exports.Sidebar=$we;exports.Spinner=_g;exports.Switch=Kwe;exports.Table=Zwe;exports.ThemeProvider=ZOe;exports.Toast=VR;exports.ToastProvider=TE;exports.usePagination=zOe;exports.useTheme=QOe;exports.useToast=WOe;